diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-07-19 10:27:13 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-21 16:14:39 -0700 |
commit | 64119e05f7b31e83e2555f6782e6cdc8f81c63f4 (patch) | |
tree | 87d44bf9e7cecbc6fa4cbb7e6d45f8ec32b62b4a /net/caif | |
parent | c1f897ce186a529a494441642125479d38727a3d (diff) | |
download | lwn-64119e05f7b31e83e2555f6782e6cdc8f81c63f4.tar.gz lwn-64119e05f7b31e83e2555f6782e6cdc8f81c63f4.zip |
net: caif: Add a missing rcu_read_unlock() in caif_flow_cb
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>
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 e0adcd123f48..711d7156efd8 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(); |