Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/linux/common Don't call cdevsw_lookup() with an u...
details: https://anonhg.NetBSD.org/src/rev/a020ed10cfd9
branches: trunk
changeset: 538536:a020ed10cfd9
user: simonb <simonb%NetBSD.org@localhost>
date: Tue Oct 22 11:55:10 2002 +0000
description:
Don't call cdevsw_lookup() with an uninitialised variable in
linux_sys_ioctl().
diffstat:
sys/compat/linux/common/linux_ioctl.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (37 lines):
diff -r aad3d0cec335 -r a020ed10cfd9 sys/compat/linux/common/linux_ioctl.c
--- a/sys/compat/linux/common/linux_ioctl.c Tue Oct 22 11:37:34 2002 +0000
+++ b/sys/compat/linux/common/linux_ioctl.c Tue Oct 22 11:55:10 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_ioctl.c,v 1.29 2002/09/06 13:18:43 gehenna Exp $ */
+/* $NetBSD: linux_ioctl.c,v 1.30 2002/10/22 11:55:10 simonb Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.29 2002/09/06 13:18:43 gehenna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.30 2002/10/22 11:55:10 simonb Exp $");
#if defined(_KERNEL_OPT)
#include "sequencer.h"
@@ -114,17 +114,15 @@
struct vnode *vp;
struct vattr va;
extern const struct cdevsw sequencer_cdevsw;
- const struct cdevsw *cdev;
fdp = p->p_fd;
- cdev = cdevsw_lookup(va.va_rdev);
if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
return EBADF;
if (fp->f_type == DTYPE_VNODE &&
(vp = (struct vnode *)fp->f_data) != NULL &&
vp->v_type == VCHR &&
VOP_GETATTR(vp, &va, p->p_ucred, p) == 0 &&
- cdev == &sequencer_cdevsw)
+ cdevsw_lookup(va.va_rdev) == &sequencer_cdevsw)
return oss_ioctl_sequencer(p, (void*)LINUX_TO_OSS(uap),
retval);
else
Home |
Main Index |
Thread Index |
Old Index