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 e1fd21f5c7c56d69a865aae3bd836d27b5c12374..7299cd17d2e9227c89d2e91d3d09ffe58c061b6a 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);
        }