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:
c1f897c
)
net: caif: Add a missing rcu_read_unlock() in caif_flow_cb
author
YueHaibing
<yuehaibing@huawei.com>
Thu, 19 Jul 2018 02:27:13 +0000
(10:27 +0800)
committer
David S. Miller
<davem@davemloft.net>
Sat, 21 Jul 2018 23:14:39 +0000
(16:14 -0700)
Add a missing rcu_read_unlock in the error path
Fixes:
c95567c80352
("caif: added check for potential null return")
Signed-off-by: YueHaibing <yuehaibing@huawei.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
e0adcd1
..
711d715
100644
(file)
--- a/
net/caif/caif_dev.c
+++ b/
net/caif/caif_dev.c
@@
-131,8
+131,10
@@
static void caif_flow_cb(struct sk_buff *skb)
caifd = caif_get(skb->dev);
WARN_ON(caifd == NULL);
- if (caifd == NULL)
+ if (!caifd) {
+ rcu_read_unlock();
return;
+ }
caifd_hold(caifd);
rcu_read_unlock();