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: <20160412035445.GA27982@kroah.com>
Date:	Mon, 11 Apr 2016 20:54:45 -0700
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	James Simmons <jsimmons@...radead.org>
Cc:	devel@...verdev.osuosl.org,
	Andreas Dilger <andreas.dilger@...el.com>,
	Oleg Drokin <oleg.drokin@...el.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Lustre Development List <lustre-devel@...ts.lustre.org>,
	Patrick Farrell <paf@...y.com>,
	James Simmons <uja.ornl@...il.com>
Subject: Re: [PATCH 18/18] staging: lustre: osc: Lustre returns EINTR from
 writes when SA_RESTART is set

Some of this series didn't apply, due to merge issues with 4.6-rc3.  Can
you rebase and resend the remaining patches?

thanks,

greg k-h

On Mon, Apr 04, 2016 at 09:37:03PM -0400, James Simmons wrote:
> When Lustre is in a read or write system call and receives a
> SIGALRM, it will return EINTR if interrupted in osc_enter_cache.
> This prevents the system call from being restarted if
> SA_RESTART is set in the handler.
> 
> This patch changes behavior in this location to return ERESTARTSYS
> when a signal arrives during the call to l_wait_event.
> 
> Signed-off-by: Patrick Farrell <paf@...y.com>
> Signed-off-by: James Simmons <uja.ornl@...il.com>
> ntel-bug-id: https://jira.hpdd.intel.com/browse/LU-3581
> Reviewed-on: http://review.whamcloud.com/7002
> Reviewed-by: Rahul Deshmukh <rahul_deshmukh@...atex.com>
> Reviewed-by: Cory Spitz <spitzcor@...y.com>
> Reviewed-by: Andreas Dilger <andreas.dilger@...el.com>
> Signed-off-by: James Simmons <jsimmons@...radead.org>
> ---
>  drivers/staging/lustre/lustre/osc/osc_cache.c |   13 ++++++++++++-
>  1 files changed, 12 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c
> index f09b89d..956d57b 100644
> --- a/drivers/staging/lustre/lustre/osc/osc_cache.c
> +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c
> @@ -1626,11 +1626,22 @@ static int osc_enter_cache(const struct lu_env *env, struct client_obd *cli,
>  
>  		/* l_wait_event is interrupted by signal, or timed out */
>  		if (rc < 0) {
> -			if (rc == -ETIMEDOUT) {
> +			switch (rc) {
> +			case -ETIMEDOUT:
>  				OSC_DUMP_GRANT(D_ERROR, cli,
>  					       "try to reserve %d.\n", bytes);
>  				osc_extent_tree_dump(D_ERROR, osc);
>  				rc = -EDQUOT;
> +				break;
> +			case -EINTR:
> +				/* Ensures restartability - LU-3581 */
> +				rc = -ERESTARTSYS;
> +				break;
> +			default:
> +				CDEBUG(D_CACHE, "%s: event for cache space @ %p never arrived due to %d\n",
> +				       cli->cl_import->imp_obd->obd_name,
> +				       &ocw, rc);
> +				break;
>  			}
>  			list_del_init(&ocw.ocw_entry);
>  			goto out;
> -- 
> 1.7.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ