All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Paul Larson <plars@linuxtestproject.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	davej@codemonkey.org.uk, Patrick Mochel <mochel@osdl.org>
Subject: Re: writing to sysfs appears to hang
Date: Wed, 20 Nov 2002 20:14:51 +0100	[thread overview]
Message-ID: <20021120191451.GF4925@suse.de> (raw)
In-Reply-To: <1037813063.24031.32.camel@plars>

On Wed, Nov 20 2002, Paul Larson wrote:
> On Tue, 2002-11-19 at 11:02, Jens Axboe wrote:
> > This has been in the deadline-rbtree patches for some time (uses writes
> > to sysfs, too).
> > 
> > ===== fs/sysfs/inode.c 1.59 vs edited =====
> > --- 1.59/fs/sysfs/inode.c	Wed Oct 30 21:27:35 2002
> > +++ edited/fs/sysfs/inode.c	Fri Nov  8 14:33:59 2002
> > @@ -243,7 +243,7 @@
> >  	if (kobj && kobj->subsys)
> >  		ops = kobj->subsys->sysfs_ops;
> >  	if (!ops || !ops->store)
> > -		return 0;
> > +		return -EINVAL;
> >  
> >  	page = (char *)__get_free_page(GFP_KERNEL);
> >  	if (!page)
> 
> No effect, the behaviour is still the same for me.

strace the program then, what is happening? What I saw was a program
seeing write() return 0, assuming it didn't write anything, rewrite the
whole thing. Repeat.

I bet this wouldn't happen if just sysfs didn't allow write open of a
file that doesn't have any writeable bits. Smells like another sysfs
bug. Pat?

-- 
Jens Axboe


  reply	other threads:[~2002-11-20 19:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-15 23:00 writing to sysfs appears to hang Paul Larson
2002-11-16  0:47 ` Mike Anderson
2002-11-19 17:02   ` Jens Axboe
2002-11-20 17:24     ` Paul Larson
2002-11-20 19:14       ` Jens Axboe [this message]
2002-11-20 19:33         ` Patrick Mochel

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=20021120191451.GF4925@suse.de \
    --to=axboe@suse.de \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.org \
    --cc=plars@linuxtestproject.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.