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] [day] [month] [year] [list]
Date:	Sat, 23 Oct 2010 16:44:00 +0200
From:	Ohad Ben-Cohen <ohad@...ery.com>
To:	Maxim Levitsky <maximlevitsky@...il.com>
Cc:	linux-mmc@...r.kernel.org, Sven Neumann <s.neumann@...mfeld.com>,
	Chris Ball <cjb@...top.org>, Nicolas Pitre <nico@...xnic.net>,
	libertas-dev@...ts.infradead.org,
	"Rafael J. Wysocki" <rjw@...k.pl>, Daniel Mack <daniel@...aq.de>,
	Colin Cross <ccross@...roid.com>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	stable@...nel.org
Subject: Re: [PATCH] sdio: fix suspend/resume regression

On Sat, Oct 23, 2010 at 4:18 PM, Maxim Levitsky <maximlevitsky@...il.com> wrote:
> On Sat, 2010-10-23 at 12:09 +0200, Ohad Ben-Cohen wrote:
...
>> >> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
>> >> index c94565d..515ff39 100644
>> >> --- a/drivers/mmc/core/core.c
>> >> +++ b/drivers/mmc/core/core.c
>> >> @@ -1682,6 +1682,19 @@ int mmc_suspend_host(struct mmc_host *host)
>> >>       if (host->bus_ops && !host->bus_dead) {
>> >>               if (host->bus_ops->suspend)
>> >>                       err = host->bus_ops->suspend(host);
>> >> +             if (err == -ENOSYS || !host->bus_ops->resume) {

>> > This reintroduces the bug I fixed.
...
>> In this case, mmc_suspend_host() should skip the code you are concerned about.

> You are right here.
> There is a very unlikely case that suspend of sd/mmc card fails (with
> CONFIG_MMC_UNSAFE_RESUME set, and that will trigger the hang, but that
> currently isn't possible because both mmc_sd_suspend and mmc_suspend
> just return 0 unconditionally).

Please note that the card is removed only on -ENOSYS, which is not a
random error that can happen. In this context, it's a deliberate
request (from the underlying bus) to remove the card.

So even if mmc_{sd_}suspend will be changed to propagate an error code
one day, it is unlikely that they will trigger this bug even if they
fail.

> Btw, two above functions are identical, so some refactoring won't hurt.

Feel free to send a patch ;)

Regards,
Ohad.
--
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