diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-07-19 05:27:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-05 10:18:34 +0300 |
commit | 7193329df84d8d346585e22ea1b800b8fa177124 (patch) | |
tree | a462d7713fa8f68d20fd79a36263f62118a54ebc /net/caif | |
parent | 1fa903cb3b09af0c32888fbf8dde4d3def60fb6f (diff) | |
download | linux-7193329df84d8d346585e22ea1b800b8fa177124.tar.xz |
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/caif')
-rw-r--r-- | net/caif/caif_dev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index d730a0f68f46..a0443d40d677 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(); |