1
0
Fork 0

net: caif: Add a missing rcu_read_unlock() in caif_flow_cb

Add a missing rcu_read_unlock in the error path

Fixes: c95567c803 ("caif: added check for potential null return")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
zero-colors
YueHaibing 2018-07-19 10:27:13 +08:00 committed by David S. Miller
parent c1f897ce18
commit 64119e05f7
1 changed files with 3 additions and 1 deletions

View File

@ -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();