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: <4559ADEE.90209@drzeus.cx>
Date:	Tue, 14 Nov 2006 12:52:14 +0100
From:	Pierre Ossman <drzeus-list@...eus.cx>
To:	Jens Axboe <jens.axboe@...cle.com>
CC:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: How to cleanly shut down a block device

Jens Axboe wrote:
> I think you are making this way too complicated, it's actually pretty
> simple: you call blk_put_queue() or blk_cleanup_queue() (same thing)
> when _you_ drop your reference to the queue. That's just normal cleanup.
> When a device goes away, you make sure that you know about this. I said
> that SCSI clears q->queuedata, so it knows that when ->request_fn is
> invoked with a NULL q->queuedata (where it stores the device pointer),
> the device is not there and the request should just be flushed to
> heaven.
>   

What about the gendisk object? Since I assigned the queue pointer to it,
it didn't naturally get a chance to increase the reference count. When
can I safely drop my reference without the gendisk getting upset?

> Don't make any assumptions about when request_fn will be called or not.
> That's bound to be racy anyway.
>
>   

Things get a bit muddy by the fact that the mmc layer has a thread that
handles the queue. So I guess we need to have a way to shut down that
thread, but still be able to throw away any stray requests from the
block layer?

Rgds

-- 
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  PulseAudio, core developer          http://pulseaudio.org
  rdesktop, core developer          http://www.rdesktop.org

-
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