From: Tejun Heo <htejun@gmail.com>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
akpm@osdl.org, gregkh@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Off-by-one in /sys/module/*/refcnt
Date: Mon, 06 Aug 2007 14:31:24 +0900 [thread overview]
Message-ID: <46B6B22C.1020609@gmail.com> (raw)
In-Reply-To: <3ae72650708050700p1fc2959epcc1e9307e3c64fed@mail.gmail.com>
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
next prev parent reply other threads:[~2007-08-06 5:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-05 13:49 [PATCH] Off-by-one in /sys/module/*/refcnt Alexey Dobriyan
2007-08-05 14:00 ` Kay Sievers
2007-08-06 5:31 ` Tejun Heo [this message]
2007-08-06 19:47 ` [PATCH v2] " Alexey Dobriyan
2007-08-07 4:08 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46B6B22C.1020609@gmail.com \
--to=htejun@gmail.com \
--cc=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=gregkh@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.