[PATCH 2/2] pcmcia: don't lock up in rsrc_nonstatic pcmcia_validate_mem

Russell King rmk+pcmcia at arm.linux.org.uk
Sat Mar 19 06:51:09 EST 2005


On Sat, Mar 19, 2005 at 12:28:52PM +0100, Dominik Brodowski wrote:
> struct socket_data wasn't zeroed, so pcmcia_validate_mem() didn't get called.
> If it is called, though, one possible code-path already holds skt_sem, so
> lockups occur. Therefore, change calling conventions to pcmcia_validate_mem().

Beware - you can get a lockup through cardmgr callbacks.  This is why
the locking is _inside_ this function, protected against being called
unnecessarily.

I suggest you read back on why I ended up modifying it to be this way -
having gotten bug reports when doing it the way you're now trying to.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core



More information about the linux-pcmcia mailing list