summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Woithe <jwoithe@physics.adelaide.edu.au>2009-10-17 20:55:46 +0930
committerKristian Høgsberg <krh@redhat.com>2009-10-26 12:38:15 -0400
commitfd9ed6c2c040064f86a5b73c757448296a29170f (patch)
treec1399909c2cdc7665f9c3e4f197f507946b241ba
parent29facbced9358781bb395ef68563708a70f5d8c1 (diff)
Fix uninitialised memory (needed for 2.6.31 kernel)
Hi Kristian The patch below (against what I believe to be the current version of nosy) fixes a kernel oops under 2.6.31 which stems from the dereferencing of the struct miscdevice devnode field which nosy doesn't explicitly initialise. The bug was triggered by misc_nodename() in the call chain originating from a dma_generic_alloc_coherent() call in add_card(). Please consider applying this to the git repo. Regards jonathan
-rw-r--r--nosy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nosy.c b/nosy.c
index f828198..5d3b701 100644
--- a/nosy.c
+++ b/nosy.c
@@ -555,7 +555,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)
err = -ENOMEM;
- lynx = kmalloc(sizeof *lynx, GFP_KERNEL);
+ lynx = kzalloc(sizeof *lynx, GFP_KERNEL);
if (lynx == NULL)
FAIL("Failed to allocate control structure memory.\n");