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]
Date:	Wed, 4 Aug 2010 00:50:20 -0700 (PDT)
From:	Alex Dubov <oakad@...oo.com>
To:	Maxim Levitsky <maximlevitsky@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] MEMSTICK: fix hangs on unexpected device removal in mspro_blk

--- On Tue, 3/8/10, Maxim Levitsky <maximlevitsky@...il.com> wrote:

> Now that del_gendisk syncs, we better
> start rejecting requests right away.


I don't quite see why this change is needed. My understanding is, user
accessible interface should be marked as removed as early, as possible.


> 
> Signed-off-by: Maxim Levitsky <maximlevitsky@...il.com>
> ---
>  drivers/memstick/core/mspro_block.c |    5
> +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/memstick/core/mspro_block.c
> b/drivers/memstick/core/mspro_block.c
> index 8327e24..8d27c13 100644
> --- a/drivers/memstick/core/mspro_block.c
> +++ b/drivers/memstick/core/mspro_block.c
> @@ -1330,13 +1330,14 @@ static void
> mspro_block_remove(struct memstick_dev *card)
>      struct mspro_block_data *msb =
> memstick_get_drvdata(card);
>      unsigned long flags;
>  
> -    del_gendisk(msb->disk);
> -    dev_dbg(&card->dev, "mspro block
> remove\n");
>      spin_lock_irqsave(&msb->q_lock,
> flags);
>      msb->eject = 1;
>      blk_start_queue(msb->queue);
>     
> spin_unlock_irqrestore(&msb->q_lock, flags);
>  
> +    del_gendisk(msb->disk);
> +    dev_dbg(&card->dev, "mspro block
> remove\n");
> +
>      blk_cleanup_queue(msb->queue);
>      msb->queue = NULL;
>  
> -- 
> 1.7.0.4
> 
> 


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