* [Kernel-janitors] Re: [linux-usb-devel] no set_current_state()
@ 2004-07-13 18:53 Oliver Neukum
2004-07-13 18:55 ` Oliver Neukum
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Oliver Neukum @ 2004-07-13 18:53 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 676 bytes --]
Am Dienstag, 13. Juli 2004 19:52 schrieb Nishanth Aravamudan:
> Hi,
>
> In continuing to replace, where appropriate, code with msleep() calls, I
> ran across the following file(s) / function(s), which do not invoke
> set_current_state() before schedule_timeout(), which causes the latter
> to return immediately:
>
> drivers/usb/media/dabusb.c::dabusb_open()
>
> If someone could tell me which state (TASK_INTERRUPTIBLE or
> TASK_UNINTERRUPTIBLE) is desired, I can fix this and perhaps replace the
> calls with msleep().
TASK_INTERRUPTIBLE. It checks for pending signals. While you are at it,
try to move the check for nonblocking outside of the loop.
HTH
Oliver
[-- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Kernel-janitors] Re: [linux-usb-devel] no set_current_state()
2004-07-13 18:53 [Kernel-janitors] Re: [linux-usb-devel] no set_current_state() Oliver Neukum
@ 2004-07-13 18:55 ` Oliver Neukum
2004-07-13 18:57 ` Oliver Neukum
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Oliver Neukum @ 2004-07-13 18:55 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 463 bytes --]
Am Dienstag, 13. Juli 2004 19:54 schrieb Nishanth Aravamudan:
> Hi,
>
> In continuing to replace, where appropriate, code with msleep() calls, I
> ran across the following file(s) / function(s), which do not invoke
> set_current_state() before schedule_timeout(), which causes the latter
> to return immediately:
>
> drivers/usb/media/ov511.c::init_ov_sensor()
Should use msleep.
> drivers/usb/media/ov511.c::ov7xx0_configure()
also msleep
HTH
Oliver
[-- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Kernel-janitors] Re: [linux-usb-devel] no set_current_state()
2004-07-13 18:53 [Kernel-janitors] Re: [linux-usb-devel] no set_current_state() Oliver Neukum
2004-07-13 18:55 ` Oliver Neukum
@ 2004-07-13 18:57 ` Oliver Neukum
2004-07-13 18:59 ` Oliver Neukum
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Oliver Neukum @ 2004-07-13 18:57 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
Am Dienstag, 13. Juli 2004 19:57 schrieb Nishanth Aravamudan:
> Hi,
>
> In continuing to replace, where appropriate, code with msleep() calls, I
> ran across the following file(s) / function(s), which do not invoke
> set_current_state() before schedule_timeout(), which causes the latter
> to return immediately:
>
> drivers/usb/misc/tiglusb.c::tiglusb_open()
TASK_INTERRUPTIBLE
HTH
Oliver
[-- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Kernel-janitors] Re: [linux-usb-devel] no set_current_state()
2004-07-13 18:53 [Kernel-janitors] Re: [linux-usb-devel] no set_current_state() Oliver Neukum
2004-07-13 18:55 ` Oliver Neukum
2004-07-13 18:57 ` Oliver Neukum
@ 2004-07-13 18:59 ` Oliver Neukum
2004-07-13 19:00 ` Oliver Neukum
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Oliver Neukum @ 2004-07-13 18:59 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 677 bytes --]
Am Dienstag, 13. Juli 2004 19:52 schrieb Nishanth Aravamudan:
> Hi,
>
> In continuing to replace, where appropriate, code with msleep() calls, I
> ran across the following file(s) / function(s), which do not invoke
> set_current_state() before schedule_timeout(), which causes the latter
> to return immediately:
>
> drivers/usb/media/dabusb.c::dabusb_open()
>
> If someone could tell me which state (TASK_INTERRUPTIBLE or
> TASK_UNINTERRUPTIBLE) is desired, I can fix this and perhaps replace the
> calls with msleep().
TASK_INTERRUPTIBLE. It checks for pending signals. While you are at it,
try to move the check for nonblocking outside of the loop.
HTH
Oliver
[-- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Kernel-janitors] Re: [linux-usb-devel] no set_current_state()
2004-07-13 18:53 [Kernel-janitors] Re: [linux-usb-devel] no set_current_state() Oliver Neukum
` (2 preceding siblings ...)
2004-07-13 18:59 ` Oliver Neukum
@ 2004-07-13 19:00 ` Oliver Neukum
2004-07-13 19:00 ` Oliver Neukum
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Oliver Neukum @ 2004-07-13 19:00 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
Am Dienstag, 13. Juli 2004 19:54 schrieb Nishanth Aravamudan:
> Hi,
>
> In continuing to replace, where appropriate, code with msleep() calls, I
> ran across the following file(s) / function(s), which do not invoke
> set_current_state() before schedule_timeout(), which causes the latter
> to return immediately:
>
> drivers/usb/media/ov511.c::init_ov_sensor()
Should use msleep.
> drivers/usb/media/ov511.c::ov7xx0_configure()
also msleep
HTH
Oliver
[-- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Kernel-janitors] Re: [linux-usb-devel] no set_current_state()
2004-07-13 18:53 [Kernel-janitors] Re: [linux-usb-devel] no set_current_state() Oliver Neukum
` (3 preceding siblings ...)
2004-07-13 19:00 ` Oliver Neukum
@ 2004-07-13 19:00 ` Oliver Neukum
2004-07-13 19:16 ` David Brownell
2004-07-13 19:34 ` Pete Zaitcev
6 siblings, 0 replies; 8+ messages in thread
From: Oliver Neukum @ 2004-07-13 19:00 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
Am Dienstag, 13. Juli 2004 19:57 schrieb Nishanth Aravamudan:
> Hi,
>
> In continuing to replace, where appropriate, code with msleep() calls, I
> ran across the following file(s) / function(s), which do not invoke
> set_current_state() before schedule_timeout(), which causes the latter
> to return immediately:
>
> drivers/usb/misc/tiglusb.c::tiglusb_open()
TASK_INTERRUPTIBLE
HTH
Oliver
[-- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Kernel-janitors] Re: [linux-usb-devel] no set_current_state()
2004-07-13 18:53 [Kernel-janitors] Re: [linux-usb-devel] no set_current_state() Oliver Neukum
` (4 preceding siblings ...)
2004-07-13 19:00 ` Oliver Neukum
@ 2004-07-13 19:16 ` David Brownell
2004-07-13 19:34 ` Pete Zaitcev
6 siblings, 0 replies; 8+ messages in thread
From: David Brownell @ 2004-07-13 19:16 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
Nishanth Aravamudan wrote:
> drivers/usb/gadget/pxa2xx_udc.c::udc_enable()
>
> If someone could tell me which state (TASK_INTERRUPTIBLE or
> TASK_UNINTERRUPTIBLE) is desired, I can fix this and perhaps replace the
> calls with msleep().
That'd make a fine msleep(), thanks.
- Dave
[-- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Kernel-janitors] Re: [linux-usb-devel] no set_current_state()
2004-07-13 18:53 [Kernel-janitors] Re: [linux-usb-devel] no set_current_state() Oliver Neukum
` (5 preceding siblings ...)
2004-07-13 19:16 ` David Brownell
@ 2004-07-13 19:34 ` Pete Zaitcev
6 siblings, 0 replies; 8+ messages in thread
From: Pete Zaitcev @ 2004-07-13 19:34 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 746 bytes --]
On Tue, 13 Jul 2004 20:57:14 +0200
Oliver Neukum <oliver@neukum.org> wrote:
> Am Dienstag, 13. Juli 2004 19:57 schrieb Nishanth Aravamudan:
> > In continuing to replace, where appropriate, code with msleep() calls, I
> > ran across the following file(s) / function(s), which do not invoke
> > set_current_state() before schedule_timeout(), which causes the latter
> > to return immediately:
> >
> > drivers/usb/misc/tiglusb.c::tiglusb_open()
>
> TASK_INTERRUPTIBLE
In this case, Oliver is right. However, do not use TASK_INTERRUPTIBLE
in any path which is called from ->release(). When an application is
killed with ^C and is exiting, schedule() returns immediately if
called so, so the end result would be a fix with no effect.
-- Pete
[-- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-07-13 19:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-13 18:53 [Kernel-janitors] Re: [linux-usb-devel] no set_current_state() Oliver Neukum
2004-07-13 18:55 ` Oliver Neukum
2004-07-13 18:57 ` Oliver Neukum
2004-07-13 18:59 ` Oliver Neukum
2004-07-13 19:00 ` Oliver Neukum
2004-07-13 19:00 ` Oliver Neukum
2004-07-13 19:16 ` David Brownell
2004-07-13 19:34 ` Pete Zaitcev
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.