All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] Re: [PATCH 2.6.9-rc2 1/4] w1/dscore: replace
Date: Tue, 28 Sep 2004 03:25:21 +0000	[thread overview]
Message-ID: <1096341921.21750.24.camel@uganda> (raw)
In-Reply-To: <Pine.LNX.4.58.0409161253580.14212@server.home>


[-- Attachment #1.1: Type: text/plain, Size: 1450 bytes --]

On Tue, 2004-09-28 at 07:19, Evgeniy Polyakov wrote:
> On Tue, 2004-09-28 at 03:17, Nishanth Aravamudan wrote:
> > Any comments would be appreciated.
> 
> Following code is buggy, I know, the latest -mm tree already contains
> codepath which properly sets process state and checks signals.
> I've not used msleep*() due to future ability of special signal
> handling.

Hmm, I've rechecked -mm3, no it is not containing such fixes yet. I hope
next -mm release will have them.
Anyway if you set TASK_INTERRUPTIBLE you must be prepared to check
signal pending and either flush them or proper handle.

> > Description: Use msleep_interruptible() instead of schedule_timeout() to
> > guarantee the task delays as expected.
> > 
> > --- 2.6.9-rc2-vanilla/drivers/w1/dscore.c	2004-09-13 17:16:07.000000000 -0700
> > +++ 2.6.9-rc2/drivers/w1/dscore.c	2004-09-27 16:16:47.000000000 -0700
> > @@ -23,6 +23,7 @@
> >  #include <linux/kernel.h>
> >  #include <linux/mod_devicetable.h>
> >  #include <linux/usb.h>
> > +#include <linux/delay.h>
> >  
> >  #include "dscore.h"
> >  
> > @@ -731,7 +732,7 @@ void ds_disconnect(struct usb_interface 
> >  	usb_set_intfdata (intf, NULL);
> >  
> >  	while(atomic_read(&dev->refcnt))
> > -		schedule_timeout(HZ);
> > +		msleep_interruptible(1000);
> >  
> >  	usb_put_dev(dev->udev);
> >  	kfree(dev);
-- 
	Evgeniy Polyakov

Crash is better than data corruption. -- Art Grabowski

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2004-09-28  3:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-16 19:54 [Kernel-janitors] Re: [PATCH 2.6.9-rc2 19/33] char/pcxx: replace Christoph Lameter
2004-09-17  4:38 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 11/33] char/i830_irq: Jon Smirl
2004-09-17 16:10 ` Nishanth Aravamudan
2004-09-18 16:46 ` Jon Smirl
2004-09-19  9:39 ` Dave Airlie
2004-09-20 22:11 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/17] media/zr36120: Nishanth Aravamudan
2004-09-21 21:58 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 1/40] net/3c505: replace Phil Blundell
2004-09-21 23:49 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 1/2] i2c/i2c-algo-ite: Greg KH
2004-09-27 18:21 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 1/16] scsi/53c700: replace James Bottomley
2004-09-27 18:39 ` Nishanth Aravamudan
2004-09-27 19:35 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 15/16] scsi/st: replace Kai Makisara
2004-09-27 21:15 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 1/6] serial/68328serial: Nishanth Aravamudan
2004-09-27 23:07 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 1/4] video/pxafb: replace Nishanth Aravamudan
2004-09-28  1:00 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 1/6] serial/68328serial: David McCullough
2004-09-28  3:19 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 1/4] w1/dscore: replace Evgeniy Polyakov
2004-09-28  3:25 ` Evgeniy Polyakov [this message]
2004-09-29 17:41 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 1/4] pci Greg KH

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=1096341921.21750.24.camel@uganda \
    --to=johnpol@2ka.mipt.ru \
    --cc=kernel-janitors@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.