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]
Message-Id: <1254837049.4383.17.camel@mulgrave.site>
Date:	Tue, 06 Oct 2009 13:50:49 +0000
From:	James Bottomley <James.Bottomley@...e.de>
To:	iceberg <strakh@...ras.ru>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, eric@...ante.org,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	Kay Sievers <kay.sievers@...y.org>, Greg KH <greg@...ah.com>
Subject: Re: [PATCH] scsi_lib.c: sleeping function called from invalid
 context

On Tue, 2009-10-06 at 12:30 +0000, iceberg wrote:
> James, what about code where spin_unlock is called before scsi_device_put, 
> especially for avoiding atomic context?
> In code like 
> 	spin_unlock
> 	scsi_device_put
> 	spin_lock
> Is spin_unlock/spin_lock redundant?

Depends on context ... most of them are actually swapping locks or
providing pre-emption points ... it could be redundant, but doesn't have
to be.

> Why do we need scsi_device_get/scsi_device_put pair in scsi_lib.c at all? If 
> we are sure that scsi_device_put is always not last, for what purpose do we 
> call it together with scsi_device_get in the loop?

We're not sure (and never can be in a hotplug world) that any put isn't
the last one.

James


--
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