datapath: Fix ODP_PORT_DEL handling of bad user memory read.
authorBen Pfaff <blp@nicira.com>
Wed, 17 Jun 2009 18:50:46 +0000 (11:50 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 6 Jul 2009 16:07:24 +0000 (09:07 -0700)
datapath/datapath.c

index e1fd21f..7299cd1 100644 (file)
@@ -1355,7 +1355,7 @@ static long openvswitch_ioctl(struct file *f, unsigned int cmd,
        case ODP_PORT_DEL:
                err = get_user(port_no, (int __user *)argp);
                if (err)
-                       break;
+                       return err;
                return del_port(dp_idx, port_no);
        }