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:	Fri, 17 Nov 2006 16:13:14 +0000
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	Anderson Briglia <anderson.briglia@...t.org.br>
Cc:	"Linux-omap-open-source@...ux.omap.com" 
	<linux-omap-open-source@...ux.omap.com>,
	linux-kernel@...r.kernel.org,
	Pierre Ossman <drzeus-list@...eus.cx>,
	ext David Brownell <david-b@...bell.net>,
	Tony Lindgren <tony@...mide.com>,
	"Aguiar Carlos (EXT-INdT/Manaus)" <carlos.aguiar@...t.org.br>,
	"Biris Ilias (EXT-INdT/Manaus)" <Ilias.Biris@...t.org.br>
Subject: Re: [patch 5/6] [RFC] Add MMC Password Protection (lock/unlock) support V6

On Fri, Nov 17, 2006 at 09:12:39AM -0400, Anderson Briglia wrote:
> +	if (mmc_card_locked(card) && !strncmp(data, "erase", 5)) {
> +		/* forced erase only works while card is locked */
> +		spin_lock(&mmc_lock);
> +		mmc_lock_unlock(card, NULL, MMC_LOCK_MODE_ERASE);
> +		spin_unlock(&mmc_lock);

mmc_lock_unlock can sleep; holding a spinlock while sleeping is illegal
and is a serious bug.  Inappropriate locking?  What's this lock trying
to achieve?

I don't see any requirement for locking here - mmc_lock_unlock() claims
the host, and if that succeeds, it has exclusive access via that host to
the card.  No one else will be able to talk on the bus until
mmc_lock_unlock() releases it's claim on the host.  So I suspect that
whatever locking you require is already in place.

Ditto for each other instances.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
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