Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=256e2fdf033f5c8b5093cd817d44cea3a11a4e6f
Commit:     256e2fdf033f5c8b5093cd817d44cea3a11a4e6f
Parent:     6cb52147b254373364a2fef5df8b4aa3739c8bb6
Author:     Alexey Dobriyan <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 6 23:47:45 2007 +0400
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Wed Aug 22 14:35:35 2007 -0700

    Fix Off-by-one in /sys/module/*/refcnt
    
    sysfs internals were changed to not pin module in question.
    
    Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]>
    Acked-by: Kay Sievers <[EMAIL PROTECTED]>
    Acked-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 kernel/module.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index 33c04ad..db0ead0 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -784,8 +784,7 @@ EXPORT_SYMBOL_GPL(symbol_put_addr);
 static ssize_t show_refcnt(struct module_attribute *mattr,
                           struct module *mod, char *buffer)
 {
-       /* sysfs holds a reference */
-       return sprintf(buffer, "%u\n", module_refcount(mod)-1);
+       return sprintf(buffer, "%u\n", module_refcount(mod));
 }
 
 static struct module_attribute refcnt = {
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to