K. Y. Srinivasan
2011-May-17 22:25 UTC
[PATCH 1/2] Connector: Set the CN_NETLINK_USERS correctly
The CN_NETLINK_USERS must be set to the highest valid index +1. Thanks to Evgeniy for pointing this out. Signed-off-by: K. Y. Srinivasan <kys at microsoft.com> --- include/linux/connector.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/connector.h b/include/linux/connector.h index 7c60d09..f696bcc 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h @@ -44,7 +44,7 @@ #define CN_VAL_DRBD 0x1 #define CN_KVP_IDX 0x9 /* HyperV KVP */ -#define CN_NETLINK_USERS 9 +#define CN_NETLINK_USERS 10 /* Highest index + 1 */ /* * Maximum connector's message size. -- 1.7.4.1
K. Y. Srinivasan
2011-May-17 22:25 UTC
[PATCH 2/2] 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 at microsoft.com>
---
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 d770058..c36fbe1 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -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);
--
1.7.4.1
Greg KH
2011-May-17 22:31 UTC
[PATCH 2/2] Connector: Correctly set the error code in case of success when dispatching receive callbacks
On Tue, May 17, 2011 at 03:25:38PM -0700, K. Y. Srinivasan wrote:> 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.By "recent" what do you mean? Is this something that is in the .39 kernel? Do you have a git commit id that caused this? Or is this due to changes that are queued up for the .40 merge window? thanks, greg k-h
Possibly Parallel Threads
- [PATCH 1/2] Connector: Set the CN_NETLINK_USERS correctly
- [PATCH 1/4] Connector: Add an index to support key/value pair (KVP) functionality
- [PATCH 1/4] Connector: Add an index to support key/value pair (KVP) functionality
- [PATCH 1/3]: An implementation of HyperV KVP functionality
- [PATCH 1/3]: An implementation of HyperV KVP functionality