lkml.org 
[lkml]   [2004]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [PATCH] Driver Core patches for 2.6.10-rc1
    Date
    From
    ChangeSet 1.2023, 2004/10/22 15:43:17-07:00, greg@kroah.com

    hotplug: prevent skips in sequence number from happening

    Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


    lib/kobject_uevent.c | 17 +++++++++--------
    1 files changed, 9 insertions(+), 8 deletions(-)


    diff -Nru a/lib/kobject_uevent.c b/lib/kobject_uevent.c
    --- a/lib/kobject_uevent.c 2004-10-22 15:59:34 -07:00
    +++ b/lib/kobject_uevent.c 2004-10-22 15:59:34 -07:00
    @@ -255,13 +255,6 @@
    envp [i++] = scratch;
    scratch += sprintf (scratch, "DEVPATH=%s", kobj_path) + 1;

    - spin_lock(&sequence_lock);
    - seq = ++hotplug_seqnum;
    - spin_unlock(&sequence_lock);
    -
    - envp [i++] = scratch;
    - scratch += sprintf(scratch, "SEQNUM=%lld", (long long)seq) + 1;
    -
    envp [i++] = scratch;
    scratch += sprintf(scratch, "SUBSYSTEM=%s", name) + 1;

    @@ -277,7 +270,15 @@
    }
    }

    - pr_debug ("%s: %s %s %s %s %s %s %s\n", __FUNCTION__, argv[0], argv[1],
    + spin_lock(&sequence_lock);
    + seq = ++hotplug_seqnum;
    + spin_unlock(&sequence_lock);
    +
    + envp [i++] = scratch;
    + scratch += sprintf(scratch, "SEQNUM=%lld", (long long)seq) + 1;
    +
    + pr_debug ("%s: %s %s seq=%lld %s %s %s %s %s\n",
    + __FUNCTION__, argv[0], argv[1], (long long)seq,
    envp[0], envp[1], envp[2], envp[3], envp[4]);

    send_uevent(action_string, kobj_path, buffer, scratch - buffer, GFP_KERNEL);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:07    [W:0.052 / U:0.016 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site