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: <1444753222.93285.236.camel@localhost>
Date:	Tue, 13 Oct 2015 09:20:22 -0700
From:	Sudeep Dutt <sudeep.dutt@...el.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Sudeep Dutt <sudeep.dutt@...el.com>,
	Nikhil Rao <nikhil.rao@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] misc: mic/scif: re-take a lock on error path

On Tue, 2015-10-13 at 15:52 +0300, Dan Carpenter wrote:
> The caller expects that we take this lock again before returning
> otherwise it you get double unlocks and races.
> 

Reviewed-by: Sudeep Dutt <sudeep.dutt@...el.com>

Thanks for the fix!

> Fixes: ba612aa8b487 ('misc: mic: SCIF memory registration and unregistration')
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/drivers/misc/mic/scif/scif_rma.c b/drivers/misc/mic/scif/scif_rma.c
> index e288996..980ef13 100644
> --- a/drivers/misc/mic/scif/scif_rma.c
> +++ b/drivers/misc/mic/scif/scif_rma.c
> @@ -680,6 +680,7 @@ int scif_unregister_window(struct scif_window *window)
>  			}
>  		} else {
>  			/* Return ENXIO since unregistration is in progress */
> +			mutex_lock(&ep->rma_info.rma_lock);
>  			return -ENXIO;
>  		}
>  retry:


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