]> granicus.if.org Git - spl/commitdiff
Ensure all file ops pointer are NULL or we may end up
authorbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Tue, 1 Apr 2008 03:24:17 +0000 (03:24 +0000)
committerbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Tue, 1 Apr 2008 03:24:17 +0000 (03:24 +0000)
calling garbage pointers on open/close etc and get
what look like random crashes.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@61 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

modules/spl/spl-module.c

index 309188ce56ce3e4ca413024845aa7b5d22dfa355..59183d86434a4e9221dda05ff6905ca1945aa782 100644 (file)
@@ -56,7 +56,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type,
        BUG_ON(strcmp(node_type, DDI_PSEUDO));
        BUG_ON(flag != 0);
 
-       fops = kmalloc(sizeof(struct file_operations), GFP_KERNEL);
+       fops = kzalloc(sizeof(struct file_operations), GFP_KERNEL);
        if (fops == NULL)
                return DDI_FAILURE;