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: <45661073.6020605@drzeus.cx>
Date:	Thu, 23 Nov 2006 22:19:47 +0100
From:	Pierre Ossman <drzeus-list@...eus.cx>
To:	Jens Axboe <jens.axboe@...cle.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: How to cleanly shut down a block device

Russell King wrote:
> I'm not entirely convinced that del_gendisk() will prevent any new
> requests getting into the queue, which is why the comment below
> says:
>
>   

Jens wasn't either, so my second patch also modifies the request
function to drop requests.

>>  
>> -               /*
>> -                * I think this is needed.
>> -                */
>> -               md->disk->queue = NULL;
>>     
>
> Yes, del_gendisk() removes the disk from view for new opens, but what
> about existing users?
>   

I find it a bit disconcerting to modify that structure without any locks
held. Once we've given the queue to gendisk, it should do its own
reference handling. If that assign to NULL is needed then IMHO,
something is broken elsewhere and should be fixed.

> These hunks do not achieve us anything.
>
> However, what we _do_ need to do is to arrange for the MMC queue thread
> to error out all pending requests before dying if MMC_QUEUE_EXIT is set.
> That's already handled since the queue thread only ever exits if there
> are no requests pending _and_ MMC_QUEUE_EXIT has been set.
>
>   

Well, Jens seemed to suggest that the proper way was not to try and
prevent everyone from putting new stuff into the queue, but to start
failing requests. Hence my changes.

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