diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2011-05-17 18:25:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-07 15:02:00 -0400 |
commit | 663dd6dcaf7e95526e469e91f41972a9c0cca30c (patch) | |
tree | 819a0fb54725a53e59c4a855f92a4425946f0fcd | |
parent | ea2c00095c022846dd8dfd211de05154d3e4e1b8 (diff) |
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 <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>
-rw-r--r-- | drivers/connector/connector.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 219d88a0eeae..dde6a0fad408 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
@@ -139,6 +139,7 @@ static int cn_call_callback(struct sk_buff *skb) | |||
139 | spin_unlock_bh(&dev->cbdev->queue_lock); | 139 | spin_unlock_bh(&dev->cbdev->queue_lock); |
140 | 140 | ||
141 | if (cbq != NULL) { | 141 | if (cbq != NULL) { |
142 | err = 0; | ||
142 | cbq->callback(msg, nsp); | 143 | cbq->callback(msg, nsp); |
143 | kfree_skb(skb); | 144 | kfree_skb(skb); |
144 | cn_queue_release_callback(cbq); | 145 | cn_queue_release_callback(cbq); |