Skip to content

Commit

Permalink
Connector: Correctly set the error code in case of success when dispa…
Browse files Browse the repository at this point in the history
…tching 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 <kys@microsoft.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: stable <stable@kernel.org>  [.39]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Jun 7, 2011
1 parent ea2c000 commit 663dd6d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/connector/connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ static int cn_call_callback(struct sk_buff *skb)
spin_unlock_bh(&dev->cbdev->queue_lock);

if (cbq != NULL) {
err = 0;
cbq->callback(msg, nsp);
kfree_skb(skb);
cn_queue_release_callback(cbq);
Expand Down

0 comments on commit 663dd6d

Please sign in to comment.