Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev Apply patch, requested by nat in ticket #1419:
details: https://anonhg.NetBSD.org/src/rev/01be53c6e7ec
branches: netbsd-8
changeset: 460610:01be53c6e7ec
user: martin <martin%NetBSD.org@localhost>
date: Mon Oct 28 19:12:17 2019 +0000
description:
Apply patch, requested by nat in ticket #1419:
PR kern/54547:
do not allow mmap() of audio devices that have not been opened for r/w.
diffstat:
sys/dev/audio.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r fdb7b9e863c3 -r 01be53c6e7ec sys/dev/audio.c
--- a/sys/dev/audio.c Mon Oct 28 18:40:31 2019 +0000
+++ b/sys/dev/audio.c Mon Oct 28 19:12:17 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.357.2.13 2018/06/07 18:24:16 martin Exp $ */
+/* $NetBSD: audio.c,v 1.357.2.14 2019/10/28 19:12:17 martin Exp $ */
/*-
* Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.357.2.13 2018/06/07 18:24:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.357.2.14 2019/10/28 19:12:17 martin Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -3521,6 +3521,9 @@
if (!(audio_get_props(sc) & AUDIO_PROP_MMAP))
return ENOTSUP;
+ if (vc->sc_open != AUOPEN_WRITE)
+ return EINVAL;
+
if (*offp < 0)
return EINVAL;
Home |
Main Index |
Thread Index |
Old Index