Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Make sure splx() is called for all bridge_ioctl() er...



details:   https://anonhg.NetBSD.org/src/rev/7b507d8d639d
branches:  trunk
changeset: 547587:7b507d8d639d
user:      kristerw <kristerw%NetBSD.org@localhost>
date:      Sat May 24 14:22:14 2003 +0000

description:
Make sure splx() is called for all bridge_ioctl() error cases.

diffstat:

 sys/net/if_bridge.c |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diffs (38 lines):

diff -r 90fc5128b6ac -r 7b507d8d639d sys/net/if_bridge.c
--- a/sys/net/if_bridge.c       Sat May 24 06:25:39 2003 +0000
+++ b/sys/net/if_bridge.c       Sat May 24 14:22:14 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bridge.c,v 1.13 2003/05/16 04:54:55 itojun Exp $    */
+/*     $NetBSD: if_bridge.c,v 1.14 2003/05/24 14:22:14 kristerw Exp $  */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.13 2003/05/16 04:54:55 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.14 2003/05/24 14:22:14 kristerw Exp $");
 
 #include "opt_bridge_ipf.h"
 #include "bpfilter.h"
@@ -458,11 +458,15 @@
                bc = &bridge_control_table[ifd->ifd_cmd];
 
                if (cmd == SIOCGDRVSPEC &&
-                   (bc->bc_flags & BC_F_COPYOUT) == 0)
-                       return (EINVAL);
+                   (bc->bc_flags & BC_F_COPYOUT) == 0) {
+                       error = EINVAL;
+                       break;
+               }
                else if (cmd == SIOCSDRVSPEC &&
-                   (bc->bc_flags & BC_F_COPYOUT) != 0)
-                       return (EINVAL);
+                   (bc->bc_flags & BC_F_COPYOUT) != 0) {
+                       error = EINVAL;
+                       break;
+               }
 
                if (bc->bc_flags & BC_F_SUSER) {
                        error = suser(p->p_ucred, &p->p_acflag);



Home | Main Index | Thread Index | Old Index