[Devel] [PATCH RH9 25/26] connector: take VE from socket upon callback
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Thu Oct 7 15:54:05 MSK 2021
From: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
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>
(cherry picked from vz8 commit 7bb6d59f26eb5933ead9f66e15aa84d02969f16b)
Signed-off-by: Pavel Tikhomirov <ptikhomirov 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 952a21603bdc..a8ee6b09a074 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -148,7 +148,7 @@ static int cn_call_callback(struct sk_buff *skb)
{
struct nlmsghdr *nlh;
struct cn_callback_entry *i, *cbq = NULL;
- struct cn_dev *dev = get_cdev(get_ve0());
+ struct cn_dev *dev = get_cdev(sock_net(skb->sk)->owner_ve);
struct cn_msg *msg = nlmsg_data(nlmsg_hdr(skb));
struct netlink_skb_parms *nsp = &NETLINK_CB(skb);
int err = -ENODEV;
--
2.31.1
More information about the Devel
mailing list