The dm emc hardware handler code memset the hardware handler
structure to zero AFTER it had initialized the structure's
spinlock field.
Signed-Off-By: Alasdair G Kergon <[email protected]>
From: Dave Olien <[email protected]>
--- diff/drivers/md/dm-emc.c 2005-04-21 18:48:40.000000000 +0100
+++ source/drivers/md/dm-emc.c 2005-04-21 18:48:29.000000000 +0100
@@ -223,8 +223,10 @@
{
struct emc_handler *h = kmalloc(sizeof(*h), GFP_KERNEL);
- if (h)
+ if (h) {
+ memset(h, 0, sizeof(*h));
spin_lock_init(&h->lock);
+ }
return h;
}
@@ -259,8 +261,6 @@
if (!h)
return -ENOMEM;
- memset(h, 0, sizeof(*h));
-
hwh->context = h;
if ((h->short_trespass = short_trespass))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]