* potential null dereference in splice code.
@ 2006-04-03 23:52 Dave Jones
2006-04-04 6:50 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2006-04-03 23:52 UTC (permalink / raw)
To: Linux Kernel; +Cc: axboe
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: potential null dereference in splice code.
2006-04-03 23:52 potential null dereference in splice code Dave Jones
@ 2006-04-04 6:50 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2006-04-04 6:50 UTC (permalink / raw)
To: Dave Jones, Linux Kernel
On Mon, Apr 03 2006, Dave Jones wrote:
> We can get to out: with a NULL page, which we probably
> don't want to be calling page_cache_release() on.
Thanks Dave, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-04 6:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-03 23:52 potential null dereference in splice code Dave Jones
2006-04-04 6:50 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).