Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Return ENXIO if the get ioctl exceeds the number of ...
details: https://anonhg.NetBSD.org/src/rev/676761cba19c
branches: trunk
changeset: 341516:676761cba19c
user: christos <christos%NetBSD.org@localhost>
date: Mon Nov 09 17:41:24 2015 +0000
description:
Return ENXIO if the get ioctl exceeds the number of configured devices.
XXX: pullup-7
diffstat:
sys/dev/vnd.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (31 lines):
diff -r 79b2dbc7cae5 -r 676761cba19c sys/dev/vnd.c
--- a/sys/dev/vnd.c Mon Nov 09 17:39:20 2015 +0000
+++ b/sys/dev/vnd.c Mon Nov 09 17:41:24 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.250 2015/11/09 16:54:26 christos Exp $ */
+/* $NetBSD: vnd.c,v 1.251 2015/11/09 17:41:24 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.250 2015/11/09 16:54:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.251 2015/11/09 17:41:24 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vnd.h"
@@ -1067,11 +1067,9 @@
int error;
KASSERT(l);
-#ifdef notyet
- /* Current userland code does not handle this */
+
if (*(int *)data >= vnd_cd.cd_ndevs)
return ENXIO;
-#endif
switch (error = vnd_cget(l, unit, (int *)data, va)) {
case -1:
Home |
Main Index |
Thread Index |
Old Index