lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Jan 2007 17:50:37 -0800 (PST)
From:	Alex Dubov <oakad@...oo.com>
To:	Pierre Ossman <drzeus-list@...eus.cx>
Cc:	linux-kernel@...r.kernel.org
Subject: mmc: correct semantics of the mmc_host_remove

Greetings.

It appears to me that under certain circumstances mmc layer will issue requests to the host after
mmc_host_remove returns. This happens, for example, in tifm_sd driver because mmc_host may be
removed mid-transfer, as the socket shall be freed for possible reuse by different media type.
Currently, the only solution is to sleep a little somewhere after mmc_remove_host but before
mmc_free_host. I think the correct way to handle the situation is to ensure that mmc_host is never
accessed by the mmc layer after mmc_remove_host returns.


I think a easy way to handle this is to modify __mmc_claim_host to fail if the mmc_host is marked
for removal (this implies that its return value should be checked on use, which is not currently
the case everywhere). This way, mmc_host_remove can claim host, mark it as "dead" and then return
safely knowing that nobody will send any more requests to the host. 

Some questions:
1. Will this suffice for the task? 
2. Are there any reasons not to do this?
3. Is it possible to replace the fancy locking loop in the __mmc_claim_host with mutex based
locking (mutex does the same thing, isn't it)?



 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ