[Devel] [PATCH RHEL7 COMMIT] kobj, uevent: allow to broadcast event to ve0 from any ve

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jul 21 11:47:02 MSK 2017


On 07/21/2017 11:42 AM, Vasily Averin wrote:
> should we wait until it'll be preporly tested ?

Well, no urgency with this patch => can be easily prepared after vz7 update 5 release.


> On 2017-07-21 11:29, Konstantin Khorenko wrote:
>> Please consider creating a ReadyKernel patch for it.
>>
>> https://readykernel.com/
>>
>> --
>> Best regards,
>>
>> Konstantin Khorenko,
>> Virtuozzo Linux Kernel Team
>>
>> On 07/21/2017 11:24 AM, Konstantin Khorenko wrote:
>>> The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.33.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
>>> after rh7-3.10.0-514.26.1.vz7.33.12
>>> ------>
>>> commit ab14494ba29caf688ba38a519cbe12552294714c
>>> Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
>>> Date:   Fri Jul 21 12:24:48 2017 +0400
>>>
>>>     kobj, uevent: allow to broadcast event to ve0 from any ve
>>>
>>>     Commit 732eb5c2ac0a ("ve/kobj: Send events per VE instead of
>>>     all net-namespaces broadcasting") forbid to send uevents to any another
>>>     ve. So when container stumps on FS-corruption and sends uevent about that,
>>>     the host uevents won't see it. Let's allow to broadcast any events to
>>>     the ve0 from other ve's to fix this
>>>
>>>     https://jira.sw.ru/browse/PSBM-68710
>>>
>>>     Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
>>>     Reviewed-by: Cyrill Gorcunov <gorcunov at openvz.org>
>>> ---
>>>  lib/kobject_uevent.c | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
>>> index 2ef1e15..f67dca2 100644
>>> --- a/lib/kobject_uevent.c
>>> +++ b/lib/kobject_uevent.c
>>> @@ -259,11 +259,13 @@ int kobject_uevent_env_one(struct kobject *kobj, enum kobject_action action,
>>>          struct sock *uevent_sock = ue_sk->sk;
>>>          struct sk_buff *skb;
>>>          size_t len;
>>> +        struct ve_struct *owner_ve;
>>>
>>>          if (!netlink_has_listeners(uevent_sock, 1))
>>>              continue;
>>>
>>> -        if (sock_net(uevent_sock)->owner_ve != get_exec_env())
>>> +        owner_ve = sock_net(uevent_sock)->owner_ve;
>>> +        if (!ve_is_super(owner_ve) && owner_ve != get_exec_env())
>>>              continue;
>>>
>>>          /* allocate message with the maximum possible size */
>>> .
>>>
>>
> .
>


More information about the Devel mailing list