All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Artem B. Bityutskiy" <dedekind@oktetlabs.ru>
To: David Teigland <teigland@redhat.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 12/16] GFS2: Mounting & sysfs interface
Date: Wed, 26 Apr 2006 13:53:00 +0400	[thread overview]
Message-ID: <444F42FC.8020306@oktetlabs.ru> (raw)
In-Reply-To: <20060425180433.GA17525@redhat.com>

David Teigland wrote:
> On Tue, Apr 25, 2006 at 08:53:16PM +0400, Artem B. Bityutskiy wrote:
> 
>>Hello,
>>
>>last time I tried to use "bare" sysfs functions to create my sysfs 
>>hierarchy I ended up with a problem that the module refcount is not 
>>increased when those sysfs files are opened. So I could open a sysfs 
>>file from userspace, do rmmod and enjoy oops.
>>
>>Then I started using the class and class_device stuff, which have an 
>>.owner field, and all became fine.
>>
>>I'm not sure if this is a problem of sysfs, but I suspect it could take 
>>care of module refcount better.
>>
>>In your patch, I looked for THIS_MODULE pattern and did not find. I did 
>>not try, but I suspect your code is not devoid of the problem I 
>>described. So, this is just FYI and may be not the case.
> 
> 
> Others have also alluded to /sys/fs/ races that we'll probably need to
> resolve.  In this case the question is more about umount than rmmod since
> the mount should reference the module.
Right. I just thought you expose sysfs files even if you're not mounted. 
Sorry, I did not dig deeply.

-- 
Best regards, Artem B. Bityutskiy
Oktet Labs (St. Petersburg), Software Engineer.
+7 812 4286709 (office) +7 911 2449030 (mobile)
E-mail: dedekind@oktetlabs.ru, Web: www.oktetlabs.ru

  reply	other threads:[~2006-04-26  9:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-21 16:21 [PATCH 12/16] GFS2: Mounting & sysfs interface Steven Whitehouse
2006-04-25 16:53 ` Artem B. Bityutskiy
2006-04-25 18:04   ` David Teigland
2006-04-26  9:53     ` Artem B. Bityutskiy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-08-31 13:39 Steven Whitehouse
2006-09-05 10:02 ` Jan Engelhardt

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=444F42FC.8020306@oktetlabs.ru \
    --to=dedekind@oktetlabs.ru \
    --cc=akpm@osdl.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swhiteho@redhat.com \
    --cc=teigland@redhat.com \
    /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.