Commit 64119e05 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

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

Add a missing rcu_read_unlock in the error path

Fixes: c95567c8 ("caif: added check for potential null return")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c1f897ce
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment