lkml.org 
[lkml]   [2005]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: 2.6.15-rc5-mm1: raid related oops
On Monday December 5, thunder7@xs4all.nl wrote:
> Written by hand:
>
> Null pointer dereference
> last sysfs file /block/md0/md/sync_action
> put_page

ohh dear, it seems that, unlike kfree, put_page doesn't like 'NULL' as
an argument.

You can try
------------------
diff ./mm/swap.c~current~ ./mm/swap.c
--- ./mm/swap.c~current~ 2005-12-06 10:29:16.000000000 +1100
+++ ./mm/swap.c 2005-12-06 10:29:25.000000000 +1100
@@ -36,6 +36,8 @@ int page_cluster;

void put_page(struct page *page)
{
+ if (unlikely(page==NULL))
+ return;
if (unlikely(PageCompound(page))) {
page = (struct page *)page_private(page);
if (put_page_testzero(page)) {
-------------------
for now. If Andrew doesn't like that I'll make the code in raid1
more careful (maybe I'll define put_page_unless_null :-)
Thanks for the testing and the report.

NeilBrown
-
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: 2005-12-06 00:37    [W:0.482 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site