[Devel] [PATCH RHEL7 COMMIT] connector: take VE from socket upon callback
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Aug 31 17:40:44 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.35.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.35.5
------>
commit d7f362627da257bcb656a806fa0ece3743371fd4
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date: Thu Aug 31 17:40:44 2017 +0300
connector: take VE from socket upon callback
This is needed to attach listener to the right device. I.e. attach to the
right source of events (in terms of CT).
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
drivers/connector/connector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 771dadf..81854bf 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -130,7 +130,7 @@ EXPORT_SYMBOL_GPL(cn_netlink_send);
static int cn_call_callback(struct sk_buff *skb)
{
struct cn_callback_entry *i, *cbq = NULL;
- struct cn_dev *dev = get_cdev(get_ve0());
+ struct cn_dev *dev = get_cdev(skb->sk->sk_net->owner_ve);
struct cn_msg *msg = nlmsg_data(nlmsg_hdr(skb));
struct netlink_skb_parms *nsp = &NETLINK_CB(skb);
int err = -ENODEV;
More information about the Devel
mailing list