Commit:     5309809129ca3ab14f8bd5e5ef66c1b7686eb639
Parent:     544002ef832730b18327000c898a140bfc93efd4
Author:     Linus Torvalds <[EMAIL PROTECTED]>
AuthorDate: Wed Sep 26 09:16:21 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Sep 26 09:16:21 2007 -0700

    Add explicit zeroing to "envp" array in device 'show' method
    As Stephen Hemminger says, this is a "belt and suspenders" patch that
    zeroes the envp array at allocation time, even though all the users
    should NULL-terminate it anyway (and we've hopefully fixed everybody
    that doesn't do that).
    And we'll apparently clean the whole envp thing up for 2.6.24 anyway.
    But let's just be robust, and do both this *and* make sure that all
    users are doing the right thing.
    Acked-by: Stephen Hemminger <[EMAIL PROTECTED]>
    Acked-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/base/core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 6de33d7..67c9258 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -284,6 +284,7 @@ static ssize_t show_uevent(struct device *dev, struct 
device_attribute *attr,
        /* let the kset specific function add its keys */
        pos = data;
+       memset(envp, 0, sizeof(envp));
        retval = kset->uevent_ops->uevent(kset, &dev->kobj,
                                          envp, ARRAY_SIZE(envp),
                                          pos, PAGE_SIZE);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to