projects
/
platform
/
kernel
/
linux-3.10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
644f5d5
)
md: bcache: io.c: fix a potential NULL pointer dereference
author
Kumar Amit Mehta
<gmate.amit@gmail.com>
Tue, 28 May 2013 07:31:15 +0000
(
00:31
-0700)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 29 Aug 2013 16:47:40 +0000
(09:47 -0700)
commit
5c694129c8db6d89c9be109049a16510b2f70f6d
upstream.
bio_alloc_bioset returns NULL on failure. This fix adds a missing check
for potential NULL pointer dereferencing.
Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/bcache/io.c
patch
|
blob
|
history
diff --git
a/drivers/md/bcache/io.c
b/drivers/md/bcache/io.c
index
48efd4d
..
d285cd4
100644
(file)
--- a/
drivers/md/bcache/io.c
+++ b/
drivers/md/bcache/io.c
@@
-97,6
+97,8
@@
struct bio *bch_bio_split(struct bio *bio, int sectors,
if (bio->bi_rw & REQ_DISCARD) {
ret = bio_alloc_bioset(gfp, 1, bs);
+ if (!ret)
+ return NULL;
idx = 0;
goto out;
}