lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46B6B22C.1020609@gmail.com>
Date:	Mon, 06 Aug 2007 14:31:24 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Kay Sievers <kay.sievers@...y.org>
CC:	Alexey Dobriyan <adobriyan@...il.com>, akpm@...l.org,
	gregkh@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Off-by-one in /sys/module/*/refcnt

Kay Sievers wrote:
>> @@ -785,7 +785,7 @@ 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));
>>  }
> 
> It's likely caused by sysfs core changes, that opened attributes are
> no longer coupled to the refcount of modules. They used to take a
> reference.
> 
> The "holds a reference" comment should be removed along with your fix.
> Adding Tejun, to confirm this.

Yeap, that's correct.  Opening a sysfs node doesn't hold the module anymore.

Thanks.

-- 
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ