OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be4852c
)
caif: added check for potential null return
author
Kim Lilliestierna XX
<kim.xx.lilliestierna@stericsson.com>
Mon, 25 Jun 2012 07:49:34 +0000
(07:49 +0000)
committer
David S. Miller
<davem@davemloft.net>
Mon, 25 Jun 2012 23:44:11 +0000
(16:44 -0700)
Add check on NULL return from caif_get().
Signed-off-by: Kim Lilliestierna <Kim.xx.Lilliestierna@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericssion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/caif_dev.c
patch
|
blob
|
history
diff --git
a/net/caif/caif_dev.c
b/net/caif/caif_dev.c
index
e601da7
..
551d2fd
100644
(file)
--- a/
net/caif/caif_dev.c
+++ b/
net/caif/caif_dev.c
@@
-128,6
+128,11
@@
void caif_flow_cb(struct sk_buff *skb)
rcu_read_lock();
caifd = caif_get(skb->dev);
+
+ WARN_ON(caifd == NULL);
+ if (caifd == NULL)
+ return;
+
caifd_hold(caifd);
rcu_read_unlock();