Skip to content

Commit 663dd6d

Browse files
kattisrinivasangregkh
authored andcommitted
Connector: Correctly set the error code in case of success when dispatching receive callbacks
The recent changes to the connector code introduced this bug where even when a callback was invoked, we would return an error resulting in double freeing of the skb. This patch fixes this bug. Signed-off-by: K. Y. Srinivasan <[email protected]> Acked-by: Evgeniy Polyakov <[email protected]> Cc: stable <[email protected]> [.39] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ea2c000 commit 663dd6d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/connector/connector.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ static int cn_call_callback(struct sk_buff *skb)
139139
spin_unlock_bh(&dev->cbdev->queue_lock);
140140

141141
if (cbq != NULL) {
142+
err = 0;
142143
cbq->callback(msg, nsp);
143144
kfree_skb(skb);
144145
cn_queue_release_callback(cbq);

0 commit comments

Comments
 (0)