linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* broken pcmcia_bus_match for dynids
@ 2010-01-13 12:42 Jiri Slaby
  2010-01-16 12:04 ` Dominik Brodowski
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2010-01-13 12:42 UTC (permalink / raw)
  To: linux-pcmcia; +Cc: LKML

Hi,

stanse found that when PCMCIA_DEV_ID_MATCH_FAKE_CIS is set in
match_flags for a dynid, the pcmcia layer may deadlock.

pcmcia_load_firmware in such case calls non-atomic operations
(request_firmware, kzalloc(GFP_KERNEL)), while dynids.lock spinlock is held.

Any ideas how to solve this? Any idea, why p_drv->dynids.lock is not a
mutex instead?

thanks,
-- 
js

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: broken pcmcia_bus_match for dynids
  2010-01-13 12:42 broken pcmcia_bus_match for dynids Jiri Slaby
@ 2010-01-16 12:04 ` Dominik Brodowski
  2010-01-16 12:22   ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Dominik Brodowski @ 2010-01-16 12:04 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-pcmcia, LKML

Hey,

On Wed, Jan 13, 2010 at 01:42:05PM +0100, Jiri Slaby wrote:
> stanse found that when PCMCIA_DEV_ID_MATCH_FAKE_CIS is set in
> match_flags for a dynid, the pcmcia layer may deadlock.
> 
> pcmcia_load_firmware in such case calls non-atomic operations
> (request_firmware, kzalloc(GFP_KERNEL)), while dynids.lock spinlock is held.
> 
> Any ideas how to solve this? Any idea, why p_drv->dynids.lock is not a
> mutex instead?

Well, as dynid->id.cisfile is never set, it is still NULL, which means
pcmcia_load_firmware is left immediately, without calling the (blocking)
request_firmare(). So this actually isn't a problem, AFAICS.

Nonetheless, I'll prepare a patch to replace it with a mutex for 2.6.34.

Best,
	Dominik

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: broken pcmcia_bus_match for dynids
  2010-01-16 12:04 ` Dominik Brodowski
@ 2010-01-16 12:22   ` Jiri Slaby
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2010-01-16 12:22 UTC (permalink / raw)
  To: Dominik Brodowski; +Cc: linux-pcmcia, LKML

On 01/16/2010 01:04 PM, Dominik Brodowski wrote:
> Well, as dynid->id.cisfile is never set, it is still NULL

Ah, I overlooked that. Thanks for pointing out.

-- 
js

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-16 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-13 12:42 broken pcmcia_bus_match for dynids Jiri Slaby
2010-01-16 12:04 ` Dominik Brodowski
2010-01-16 12:22   ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).