lkml.org 
[lkml]   [2006]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[2.6 patch] drivers/md/raid6algos.c: fix a NULL dereference
This patch fixes a NULL dereference spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

drivers/md/raid6algos.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

--- linux-2.6.17-rc2-mm1-full/drivers/md/raid6algos.c.old 2006-04-27 20:38:18.000000000 +0200
+++ linux-2.6.17-rc2-mm1-full/drivers/md/raid6algos.c 2006-04-27 20:41:21.000000000 +0200
@@ -139,15 +139,14 @@ int __init raid6_select_algo(void)
}
}

- if ( best )
+ if (best) {
printk("raid6: using algorithm %s (%ld MB/s)\n",
best->name,
(bestperf*HZ) >> (20-16+RAID6_TIME_JIFFIES_LG2));
- else
+ raid6_call = *best;
+ } else
printk("raid6: Yikes! No algorithm found!\n");

- raid6_call = *best;
-
free_pages((unsigned long)syndromes, 1);

return best ? 0 : -EINVAL;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-27 22:38    [W:0.023 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site