lkml.org 
[lkml]   [2006]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectpotential null dereference in splice code.
We can get to out: with a NULL page, which we probably
don't want to be calling page_cache_release() on.

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6.16.noarch/fs/splice.c~ 2006-04-03 18:47:40.000000000 -0500
+++ linux-2.6.16.noarch/fs/splice.c 2006-04-03 18:50:06.000000000 -0500
@@ -445,7 +445,7 @@ find_page:
ret = -ENOMEM;
page = find_or_create_page(mapping, index, gfp_mask);
if (!page)
- goto out;
+ goto out_nomem;

/*
* If the page is uptodate, it is also locked. If it isn't
@@ -507,6 +507,7 @@ out:
page_cache_release(page);
unlock_page(page);
}
+out_nomem:
buf->ops->unmap(info, buf);
return ret;
}
-
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-04 01:56    [W:0.050 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site