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: <1248639091.4766.4.camel@mulgrave.site>
Date:	Sun, 26 Jul 2009 16:11:31 -0400
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-scsi <linux-scsi@...r.kernel.org>
Subject: Re: [Patch RFC 14/37] scsi: aacraid semaphore cleanup

cc linux-scsi added

On Sun, 2009-07-26 at 08:18 +0000, Thomas Gleixner wrote:
> plain text document attachment
> (driver-scsi-aacraid-sema-cleanup.patch)
> The usage of these "mutex"es is non obvious and probably completions
> in some places. Make it them semaphores.

-ENOCONTEXT on this ... I assume this is just a global
s/init_MUTEX/semaphore_init/?

I think both are really just mutexes; no need for a counting semaphore.
There's no stack declaration issues (the fibs are long lived entities)
that would necessitate a completion.

James


> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: James Bottomley <James.Bottomley@...senPartnership.com>
> ---
>  drivers/scsi/aacraid/commctrl.c |    2 +-
>  drivers/scsi/aacraid/commsup.c  |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6-tip/drivers/scsi/aacraid/commctrl.c
> ===================================================================
> --- linux-2.6-tip.orig/drivers/scsi/aacraid/commctrl.c
> +++ linux-2.6-tip/drivers/scsi/aacraid/commctrl.c
> @@ -190,7 +190,7 @@ static int open_getadapter_fib(struct aa
>  		/*
>  		 *	Initialize the mutex used to wait for the next AIF.
>  		 */
> -		init_MUTEX_LOCKED(&fibctx->wait_sem);
> +		semaphore_init_locked(&fibctx->wait_sem);
>  		fibctx->wait = 0;
>  		/*
>  		 *	Initialize the fibs and set the count of fibs on
> Index: linux-2.6-tip/drivers/scsi/aacraid/commsup.c
> ===================================================================
> --- linux-2.6-tip.orig/drivers/scsi/aacraid/commsup.c
> +++ linux-2.6-tip/drivers/scsi/aacraid/commsup.c
> @@ -124,7 +124,7 @@ int aac_fib_setup(struct aac_dev * dev)
>  		fibptr->hw_fib_va = hw_fib;
>  		fibptr->data = (void *) fibptr->hw_fib_va->data;
>  		fibptr->next = fibptr+1;	/* Forward chain the fibs */
> -		init_MUTEX_LOCKED(&fibptr->event_wait);
> +		semaphore_init_locked(&fibptr->event_wait);
>  		spin_lock_init(&fibptr->event_lock);
>  		hw_fib->header.XferState = cpu_to_le32(0xffffffff);
>  		hw_fib->header.SenderSize = cpu_to_le16(dev->max_fib_size);
> 

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