Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Stopgap XXX kludge for PR kern/42848 and PR kern...
details: https://anonhg.NetBSD.org/src/rev/48354beb0844
branches: trunk
changeset: 772736:48354beb0844
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Jan 14 20:51:00 2012 +0000
description:
Stopgap XXX kludge for PR kern/42848 and PR kern/45013.
Someone should really find and fix the real problem,
but it's better to not crash in the meantime.
diffstat:
sys/dev/usb/ucom.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 58b912d5d453 -r 48354beb0844 sys/dev/usb/ucom.c
--- a/sys/dev/usb/ucom.c Sat Jan 14 20:41:49 2012 +0000
+++ b/sys/dev/usb/ucom.c Sat Jan 14 20:51:00 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ucom.c,v 1.95 2012/01/14 20:41:49 jakllsch Exp $ */
+/* $NetBSD: ucom.c,v 1.96 2012/01/14 20:51:00 jakllsch Exp $ */
/*
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.95 2012/01/14 20:41:49 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.96 2012/01/14 20:51:00 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -370,6 +370,10 @@
int s, i;
int error;
+ /* XXX This is a hopefully temporary stopgap for kern/42848. */
+ if ((flag & (FREAD|FWRITE)) != (FREAD|FWRITE))
+ return (EINVAL);
+
if (sc == NULL)
return (ENXIO);
Home |
Main Index |
Thread Index |
Old Index