]> err.no Git - linux-2.6/commitdiff
IB/umad: Fix declaration of dev_map[]
authorHal Rosenstock <halr@voltaire.com>
Mon, 2 Apr 2007 16:45:16 +0000 (12:45 -0400)
committerRoland Dreier <rolandd@cisco.com>
Thu, 19 Apr 2007 03:20:53 +0000 (20:20 -0700)
The current ib_umad code never accesses bits past IB_UMAD_MAX_PORTS in
dev_map[].  We shouldn't declare it to be twice as big.

Pointed-out-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Hal Rosenstock <halr@voltaire.com>
drivers/infiniband/core/user_mad.c

index c069ebeba8e33c18746459830b05c61d8469bd45..2ce3eead2ba1f095750550287aa9b558dc9af067 100644 (file)
@@ -135,7 +135,7 @@ static const dev_t base_dev = MKDEV(IB_UMAD_MAJOR, IB_UMAD_MINOR_BASE);
 
 static DEFINE_SPINLOCK(port_lock);
 static struct ib_umad_port *umad_port[IB_UMAD_MAX_PORTS];
-static DECLARE_BITMAP(dev_map, IB_UMAD_MAX_PORTS * 2);
+static DECLARE_BITMAP(dev_map, IB_UMAD_MAX_PORTS);
 
 static void ib_umad_add_one(struct ib_device *device);
 static void ib_umad_remove_one(struct ib_device *device);