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>] [day] [month] [year] [list]
Date:	Tue, 29 Dec 2015 11:27:42 -0700
From:	Jens Axboe <axboe@...nel.dk>
To:	Nicholas Krause <xerofoify@...il.com>, JBottomley@...n.com
Cc:	martin.petersen@...cle.com, anish@...lsio.com, hare@...e.de,
	davem@...emloft.net, hariprasad@...lsio.com,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] csiostor:Fix locking issues in the function
 csio_scsim_cleanup_io_lnode

On 12/29/2015 11:23 AM, Nicholas Krause wrote:
> This fixes locking issues in the function csio_scsim_cleanup_io_lnode
> by locking around the call to the function csio_csci_gather_active_ios
> with the function pair spin_lock_irq/spin_unlock_irq as any function
> calling this particular function must do in order to avoid concurrent
> threads of execution on the passed structure pointer of type csio_hw
> as this structure pointer can be shared across mutliple threads in the
> kernel.
>
> Signed-off-by: Nicholas Krause <xerofoify@...il.com>
> ---
>   drivers/scsi/csiostor/csio_scsi.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
> index 2c4562d..c318855 100644
> --- a/drivers/scsi/csiostor/csio_scsi.c
> +++ b/drivers/scsi/csiostor/csio_scsi.c
> @@ -1327,7 +1327,9 @@ csio_scsim_cleanup_io_lnode(struct csio_scsim *scm, struct csio_lnode *ln)
>   	sld.level = CSIO_LEV_LNODE;
>   	sld.lnode = ln;
>   	INIT_LIST_HEAD(&ln->cmpl_q);
> +	spin_lock_irq(&hw->lock);
>   	csio_scsi_gather_active_ios(scm, &sld, &ln->cmpl_q);
> +	spin_unlock_irq(&hw->lock);

All the callers grab that lock, you've just added a deadlock instead.

Nick, I've said this before and I'll say this again. Stop sending me 
patches. They are all untested and broken, you are wasting peoples time.

-- 
Jens Axboe

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