* [PATCH] bug in acpi_os_wait_semaphore
@ 2004-03-03 14:37 Sebastian Seifert
[not found] ` <20040303143725.GA1657-nlVyBo/8EO9N0TnZuCh8vA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Seifert @ 2004-03-03 14:37 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hello,
I have found a tiny bug in acpi_os_wait_semaphore, which has caused my mutex
problems. If Acquire is called on a mutex with a non-zero, non-infinity
timeout, a bad return value check will cause the timeout to expire instantly.
Here's a one-line patch against osl.c in 2.6.3-mm4 (I hope that's current
enough):
--- ../../../linux-2.6.3-nopreempt/drivers/acpi/osl.c 2004-03-03 10:37:10.000000000 +0100
+++ osl.c 2004-03-03 15:11:11.000000000 +0100
@@ -892,7 +892,7 @@
static const int quantum_ms = 1000/HZ;
ret = down_trylock(sem);
- for (i = timeout; (i > 0 && ret < 0); i -= quantum_ms) {
+ for (i = timeout; (i > 0 && ret != 0); i -= quantum_ms) {
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(1);
ret = down_trylock(sem);
Sebastian
--
Man gewoehnt sich an allem, auch am Dativ.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bug in acpi_os_wait_semaphore
[not found] ` <20040303143725.GA1657-nlVyBo/8EO9N0TnZuCh8vA@public.gmane.org>
@ 2004-03-06 13:34 ` Luca Capello
0 siblings, 0 replies; 4+ messages in thread
From: Luca Capello @ 2004-03-06 13:34 UTC (permalink / raw)
To: ML ACPI-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
on 03/03/04 15:37, Sebastian Seifert wrote:
> I have found a tiny bug in acpi_os_wait_semaphore, which has caused my mutex
> problems. If Acquire is called on a mutex with a non-zero, non-infinity
> timeout, a bad return value check will cause the timeout to expire instantly.
I've a problem with 'acpi_os_wait_semaphore':
=====
luca-HSB4nKSusd8@public.gmane.org:/usr/src$ dmesg | tail -n 5
osl-0909 [1212919] os_wait_semaphore : Failed to acquire
semaphore[dff3e600|1|0], AE_TIME
osl-0909 [1213627] os_wait_semaphore : Failed to acquire
semaphore[dff3e600|1|0], AE_TIME
osl-0909 [1213649] os_wait_semaphore : Failed to acquire
semaphore[dff3e600|1|0], AE_TIME
osl-0909 [1219462] os_wait_semaphore : Failed to acquire
semaphore[dff3e600|1|0], AE_TIME
osl-0909 [1219483] os_wait_semaphore : Failed to acquire
semaphore[dff3e600|1|0], AE_TIME
luca-HSB4nKSusd8@public.gmane.org:/usr/src$
=====
Could your patch solve it?
Thx, bye,
Gismo / Luca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org
iD8DBQFASdN4VAp7Xm10JmkRAu3oAJwLev6mvIlrkNsEWHM+HwmybuVtqACfWeHp
UayMAyMXnm5xF08cn2FXqeI=
=cXYE
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] bug in acpi_os_wait_semaphore
@ 2004-03-08 1:24 Yu, Luming
0 siblings, 0 replies; 4+ messages in thread
From: Yu, Luming @ 2004-03-08 1:24 UTC (permalink / raw)
To: Luca Capello, ML ACPI-devel
Sebastian Seifert [mailto:soapy-nlVyBo/8EO9N0TnZuCh8vA@public.gmane.org] has made a patch for
this bug.
--- ../../../linux-2.6.3-nopreempt/drivers/acpi/osl.c 2004-03-03
10:37:10.000000000 +0100
+++ osl.c 2004-03-03 15:11:11.000000000 +0100
@@ -892,7 +892,7 @@
static const int quantum_ms = 1000/HZ;
ret = down_trylock(sem);
- for (i = timeout; (i > 0 && ret < 0); i -=
quantum_ms) {
+ for (i = timeout; (i > 0 && ret != 0); i -=
quantum_ms) {
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(1);
ret = down_trylock(sem);
Thanks,
Luming
> -----Original Message-----
> From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> [mailto:acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
> Luca Capello
> Sent: Saturday, March 06, 2004 9:35 PM
> To: ML ACPI-devel
> Subject: Re: [ACPI] [PATCH] bug in acpi_os_wait_semaphore
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> on 03/03/04 15:37, Sebastian Seifert wrote:
> > I have found a tiny bug in acpi_os_wait_semaphore, which
> has caused my mutex
> > problems. If Acquire is called on a mutex with a non-zero,
> non-infinity
> > timeout, a bad return value check will cause the timeout to
> expire instantly.
> I've a problem with 'acpi_os_wait_semaphore':
> =====
> luca-HSB4nKSusd8@public.gmane.org:/usr/src$ dmesg | tail -n 5
> osl-0909 [1212919] os_wait_semaphore : Failed to acquire
> semaphore[dff3e600|1|0], AE_TIME
> osl-0909 [1213627] os_wait_semaphore : Failed to acquire
> semaphore[dff3e600|1|0], AE_TIME
> osl-0909 [1213649] os_wait_semaphore : Failed to acquire
> semaphore[dff3e600|1|0], AE_TIME
> osl-0909 [1219462] os_wait_semaphore : Failed to acquire
> semaphore[dff3e600|1|0], AE_TIME
> osl-0909 [1219483] os_wait_semaphore : Failed to acquire
> semaphore[dff3e600|1|0], AE_TIME
> luca-HSB4nKSusd8@public.gmane.org:/usr/src$
> =====
>
> Could your patch solve it?
>
> Thx, bye,
> Gismo / Luca
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> Comment: Using GnuPG with Debian - http://enigmail.mozdev.org
>
> iD8DBQFASdN4VAp7Xm10JmkRAu3oAJwLev6mvIlrkNsEWHM+HwmybuVtqACfWeHp
> UayMAyMXnm5xF08cn2FXqeI=
> =cXYE
> -----END PGP SIGNATURE-----
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] bug in acpi_os_wait_semaphore
@ 2004-03-09 11:42 Ow Mun Heng
0 siblings, 0 replies; 4+ messages in thread
From: Ow Mun Heng @ 2004-03-09 11:42 UTC (permalink / raw)
To: Yu, Luming, Luca Capello, ML ACPI-devel,
soapy-nlVyBo/8EO9N0TnZuCh8vA
> -----Original Message-----
> From: Yu, Luming [mailto:luming.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org]
> Sent: Monday, March 08, 2004 9:24 AM
> To: Luca Capello; ML ACPI-devel
> Subject: RE: [ACPI] [PATCH] bug in acpi_os_wait_semaphore
>
>
> Sebastian Seifert [mailto:soapy-nlVyBo/8EO9N0TnZuCh8vA@public.gmane.org] has made a patch for
> this bug.
>
> --- ../../../linux-2.6.3-nopreempt/drivers/acpi/osl.c 2004-03-03
> 10:37:10.000000000 +0100
> +++ osl.c 2004-03-03 15:11:11.000000000 +0100
> @@ -892,7 +892,7 @@
> static const int quantum_ms = 1000/HZ;
>
> ret = down_trylock(sem);
> - for (i = timeout; (i > 0 && ret < 0); i -=
> quantum_ms) {
> + for (i = timeout; (i > 0 && ret != 0); i -=
> quantum_ms) {
> current->state = TASK_INTERRUPTIBLE;
> schedule_timeout(1);
> ret = down_trylock(sem);
>
Luming/Sebastian,
I tried the above patch on 2.6.3 kernel and it still is happening
on my system.
But it's not happening All that often now. It used to be like 20sec
apart. Now it's more like 2 mins.
> > -----Original Message-----
> > From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > [mailto:acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
> > Luca Capello
> > Sent: Saturday, March 06, 2004 9:35 PM
> > To: ML ACPI-devel
> > Subject: Re: [ACPI] [PATCH] bug in acpi_os_wait_semaphore
> >
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hello,
> >
> > on 03/03/04 15:37, Sebastian Seifert wrote:
> > > I have found a tiny bug in acpi_os_wait_semaphore, which
> > has caused my mutex
> > > problems. If Acquire is called on a mutex with a non-zero,
> > non-infinity
> > > timeout, a bad return value check will cause the timeout to
> > expire instantly.
> > I've a problem with 'acpi_os_wait_semaphore':
> > =====
> > luca-HSB4nKSusd8@public.gmane.org:/usr/src$ dmesg | tail -n 5
> > osl-0909 [1212919] os_wait_semaphore : Failed to acquire
> > semaphore[dff3e600|1|0], AE_TIME
> > osl-0909 [1213627] os_wait_semaphore : Failed to acquire
> > semaphore[dff3e600|1|0], AE_TIME
> > osl-0909 [1213649] os_wait_semaphore : Failed to acquire
> > semaphore[dff3e600|1|0], AE_TIME
> > osl-0909 [1219462] os_wait_semaphore : Failed to acquire
> > semaphore[dff3e600|1|0], AE_TIME
> > osl-0909 [1219483] os_wait_semaphore : Failed to acquire
> > semaphore[dff3e600|1|0], AE_TIME
> > luca-HSB4nKSusd8@public.gmane.org:/usr/src$
> > =====
> >
> > Could your patch solve it?
> >
> > Thx, bye,
> > Gismo / Luca
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.4 (GNU/Linux)
> > Comment: Using GnuPG with Debian - http://enigmail.mozdev.org
> >
> > iD8DBQFASdN4VAp7Xm10JmkRAu3oAJwLev6mvIlrkNsEWHM+HwmybuVtqACfWeHp
> > UayMAyMXnm5xF08cn2FXqeI=
> > =cXYE
> > -----END PGP SIGNATURE-----
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President
> and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> >
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > _______________________________________________
> > Acpi-devel mailing list
> > Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > https://lists.sourceforge.net/lists/listinfo/acpi-devel
> >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=ick
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-03-09 11:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-03 14:37 [PATCH] bug in acpi_os_wait_semaphore Sebastian Seifert
[not found] ` <20040303143725.GA1657-nlVyBo/8EO9N0TnZuCh8vA@public.gmane.org>
2004-03-06 13:34 ` Luca Capello
-- strict thread matches above, loose matches on Subject: below --
2004-03-08 1:24 Yu, Luming
2004-03-09 11:42 Ow Mun Heng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox