summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-07-19 10:27:13 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-05 09:26:27 +0200
commitb970d8a1c213d8f030feddb3cbf934df4302eb47 (patch)
tree7cbb8dabdd6f69ad174d44cddee0a464714b1135 /net
parenta10170d94ed4954f62e2cf73ce7cf5c531790163 (diff)
downloadlinux-exynos-b970d8a1c213d8f030feddb3cbf934df4302eb47.tar.gz
linux-exynos-b970d8a1c213d8f030feddb3cbf934df4302eb47.tar.bz2
linux-exynos-b970d8a1c213d8f030feddb3cbf934df4302eb47.zip
net: caif: Add a missing rcu_read_unlock() in caif_flow_cb
[ Upstream commit 64119e05f7b31e83e2555f6782e6cdc8f81c63f4 ] 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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/caif/caif_dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index 2d38b6e34203..98b62a7990aa 100644
--- 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();