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

Commit 0e087858 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

connector: fix skb double free in cn_rx_skb()



When a skb is delivered to a registered callback, cn_call_callback()
incorrectly returns -ENODEV after freeing the skb, causing cn_rx_skb()
to free the skb a second time.

Reported-by: default avatarEric B Munson <emunson@mgebm.net>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Tested-by: default avatarEric B Munson <emunson@mgebm.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 192910a6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -142,6 +142,7 @@ static int cn_call_callback(struct sk_buff *skb)
		cbq->callback(msg, nsp);
		kfree_skb(skb);
		cn_queue_release_callback(cbq);
		err = 0;
	}

	return err;