Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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();