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]
Message-ID: <20100223181229.GF560@agk-dp.fab.redhat.com>
Date:	Tue, 23 Feb 2010 18:12:29 +0000
From:	Alasdair G Kergon <agk@...hat.com>
To:	Kiyoshi Ueda <k-ueda@...jp.nec.com>
Cc:	Stefan Bader <stefan.bader@...onical.com>,
	Greg KH <gregkh@...e.de>, linux-kernel@...r.kernel.org,
	Mikulas Patocka <mpatocka@...hat.com>, stable@...nel.org,
	Junichi Nomura <j-nomura@...jp.nec.com>,
	akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
	stable-review@...nel.org, alan@...rguk.ukuu.org.uk
Subject: Re: [Stable-review] [93/93] dm mpath: fix stall when requeueing io

On Mon, Feb 22, 2010 at 07:16:34PM +0900, Kiyoshi Ueda wrote:
> On 02/22/2010 01:07 AM +0900, Stefan Bader wrote:
> >> @@ -1568,12 +1575,16 @@ static void dm_request_fn(struct request
> >>  
> >>  		blk_start_request(rq);
> >>  		spin_unlock(q->queue_lock);
> >> -		map_request(ti, rq, md);
> >> +		if (map_request(ti, rq, md))
> >> +			goto requeued;
> >>  		spin_lock_irq(q->queue_lock);
> >>  	}
> In the current device-mapper code, I would like to go with
> spin_unlock/lock here.
> However, there was a case to enable irq in map_requst() for request
> allocation, and this spin_lock_irq was a work-around for the case.
> Now, there is no such case in the device-mapper code, so spin_lock should
> be enough here.  But I'm still using spin_lock_irq for safeness, since
> there might be some more cases to enable irq during request submission
> to underlying devices.
> I'll remove the _irq in the future after lots of testings.
 
So, have I understood your reasoning?

- This function (dm_request_fn) is always called with local interrupts disabled.
E.g. from generic_unplug_device() or blk_run_queue().

- The 'map_request()' function was found to re-enable interrupts in one case, but
that case got fixed.

- The code still uses spin_lock_irq to ensure they remain disabled as protection
against there being other cases.  This should be changed to spin_lock as a clean-up
but you are not aware of any current breakage.

Alasdair

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