From: Adam Belay <ambx1@neo.rr.com>
To: rmk@arm.linux.org.uk
Cc: linux@dominikbrodowski.de, akpm@osdl.org, rml@ximian.com,
linux-kernel@vger.kernel.org, linux-pcmcia@lists.infradead.org
Subject: [PATCH] pcmcia driver model support [4/5]
Date: Thu, 5 Aug 2004 22:28:20 +0000 [thread overview]
Message-ID: <20040805222820.GE11641@neo.rr.com> (raw)
[PCMCIA] fix eject lockup
It is not safe to use the skt_sem in pcmcia_validate_mem. This patch fixes a
real world bug, and without it many systems will fail to shutdown properly. When
pcmcia-cs calls DS_EJECT_CARD, it creates a CS_EVENT_EJECTION_REQUEST event.
The event is then eventually reported to the ds.c client. DS then informs
userspace of the ejection request and waits for userspace to reply with whether
the request was successful. pcmcia-cs, in turn, calls DS_GET_FIRST_TUPLE while
verifying the ejection request. Unfortunately, at this point the skt_sem
semaphore is already held by pcmcia_eject_card. This results in the ds event
code waiting forever for skt_sem to become available.
--- a/drivers/pcmcia/rsrc_mgr.c 2004-08-05 13:05:45.000000000 +0000
+++ b/drivers/pcmcia/rsrc_mgr.c 2004-08-05 21:31:32.000000000 +0000
@@ -520,12 +520,8 @@
void pcmcia_validate_mem(struct pcmcia_socket *s)
{
- down(&s->skt_sem);
-
if (probe_mem && s->state & SOCKET_PRESENT)
validate_mem(s);
-
- up(&s->skt_sem);
}
EXPORT_SYMBOL(pcmcia_validate_mem);
next reply other threads:[~2004-08-06 2:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-05 22:28 Adam Belay [this message]
2004-08-06 10:43 ` [PATCH] pcmcia driver model support [4/5] Russell King
2004-08-06 10:35 ` Adam Belay
2004-08-06 10:44 ` Adam Belay
2004-08-23 18:05 ` Russell King
2004-08-23 18:16 ` Russell King
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=20040805222820.GE11641@neo.rr.com \
--to=ambx1@neo.rr.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=linux@dominikbrodowski.de \
--cc=rmk@arm.linux.org.uk \
--cc=rml@ximian.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox