mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
net: caif: Add a missing rcu_read_unlock() in caif_flow_cb
[ Upstream commit64119e05f7] 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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a10170d94e
commit
b970d8a1c2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user