lkml.org 
[lkml]   [2011]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[070/101] kobj_uevent: Ignore if some listeners cannot handle message
    2.6.33-longterm review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Milan Broz <mbroz@redhat.com>

    commit ebf4127cd677e9781b450e44dfaaa1cc595efcaa upstream.

    kobject_uevent() uses a multicast socket and should ignore
    if one of listeners cannot handle messages or nobody is
    listening at all.

    Easily reproducible when a process in system is cloned
    with CLONE_NEWNET flag.

    (See also http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/5256)

    Signed-off-by: Milan Broz <mbroz@redhat.com>
    Acked-by: Kay Sievers <kay.sievers@vrfy.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    lib/kobject_uevent.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/lib/kobject_uevent.c
    +++ b/lib/kobject_uevent.c
    @@ -235,7 +235,7 @@ int kobject_uevent_env(struct kobject *k
    retval = netlink_broadcast(uevent_sock, skb, 0, 1,
    GFP_KERNEL);
    /* ENOBUFS should be handled in userspace */
    - if (retval == -ENOBUFS)
    + if (retval == -ENOBUFS || retval == -ESRCH)
    retval = 0;
    } else
    retval = -ENOMEM;



    \
     
     \ /
      Last update: 2011-11-03 03:07    [W:0.044 / U:31.924 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site