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:	Tue, 03 Nov 2009 20:51:29 +0100
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Jarkko Lavinen <jarkko.lavinen@...ia.com>
CC:	Jens Axboe <axboe@...nel.dk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>
Subject: Re: [PATCH 1/2] Disk hot removal causing oopses and fixes

Jarkko Lavinen wrote:
> Hi Steven
> 
> Sorry for late reply.
> 
>> It has to reference-count its objects so that they are not freed as long
>> as they are used by upper layers,
> 
> The block layer and device removal seems to be designed from
> top-down approach.  Althouh disc is referenced from
> __blkdev_get(), disc's request queue is not.  Also
> blk_cleanup_queue() calls elevator_exit() without caring if
> anyone still uses the elevator.
[...]

I still don't understand how there can be a problem here.  Shouldn't the
sequence be:

 1. low-level determines that a device went away
 2. low-level takes note that from now on no new requests must be
    enqueued anymore
 3. low-level calls blk_cleanup_queue
 4. blk_cleanup_queue waits until remaining requests are done
    (it calls blk_sync_queue)
 5. blk_cleanup_queue cleans up block layer data
 6. low-level can now clean up/ free its own data

Does the MMC layer miss step 2?  Because without this, step 4 would be
in vain.
-- 
Stefan Richter
-=====-==--= =-== ---==
http://arcgraph.de/sr/
--
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