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-next>] [day] [month] [year] [list]
Message-Id: <20120731142441.0d01100f9d050ec6e479c923@canb.auug.org.au>
Date:	Tue, 31 Jul 2012 14:24:41 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jeff Layton <jlayton@...hat.com>,
	Trond Myklebust <trond.myklebust@....uio.no>,
	Mel Gorman <mgorman@...e.de>
Subject: linux-next: manual merge of the akpm tree with the nfs tree

Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
net/sunrpc/xprtsock.c between commit 5cf02d09b50b ("nfs: skip commit in
releasepage if we're freeing memory for fs-related reasons") from the nfs
tree and commit "nfs: enable swap on NFS" from the akpm tree.

Just context changes?  I fixed it up (I think - see below) and can carry
the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc net/sunrpc/xprtsock.c
index 9266794,83bb0eb..0000000
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@@ -1927,9 -1925,47 +1927,48 @@@ static void xs_local_setup_socket(struc
  out:
  	xprt_clear_connecting(xprt);
  	xprt_wake_pending_tasks(xprt, status);
 +	current->flags &= ~PF_FSTRANS;
  }
  
+ #ifdef CONFIG_SUNRPC_SWAP
+ static void xs_set_memalloc(struct rpc_xprt *xprt)
+ {
+ 	struct sock_xprt *transport = container_of(xprt, struct sock_xprt,
+ 			xprt);
+ 
+ 	if (xprt->swapper)
+ 		sk_set_memalloc(transport->inet);
+ }
+ 
+ /**
+  * xs_swapper - Tag this transport as being used for swap.
+  * @xprt: transport to tag
+  * @enable: enable/disable
+  *
+  */
+ int xs_swapper(struct rpc_xprt *xprt, int enable)
+ {
+ 	struct sock_xprt *transport = container_of(xprt, struct sock_xprt,
+ 			xprt);
+ 	int err = 0;
+ 
+ 	if (enable) {
+ 		xprt->swapper++;
+ 		xs_set_memalloc(xprt);
+ 	} else if (xprt->swapper) {
+ 		xprt->swapper--;
+ 		sk_clear_memalloc(transport->inet);
+ 	}
+ 
+ 	return err;
+ }
+ EXPORT_SYMBOL_GPL(xs_swapper);
+ #else
+ static void xs_set_memalloc(struct rpc_xprt *xprt)
+ {
+ }
+ #endif
+ 
  static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
  {
  	struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
@@@ -1970,7 -2009,8 +2012,9 @@@ static void xs_udp_setup_socket(struct 
  	if (xprt->shutdown)
  		goto out;
  
 +	current->flags |= PF_FSTRANS;
+ 	if (xprt->swapper)
+ 		current->flags |= PF_MEMALLOC;
  
  	/* Start by resetting any existing state */
  	xs_reset_transport(transport);
@@@ -1990,7 -2030,7 +2034,8 @@@
  out:
  	xprt_clear_connecting(xprt);
  	xprt_wake_pending_tasks(xprt, status);
+ 	tsk_restore_flags(current, pflags, PF_MEMALLOC);
 +	current->flags &= ~PF_FSTRANS;
  }
  
  /*
@@@ -2116,7 -2159,8 +2164,9 @@@ static void xs_tcp_setup_socket(struct 
  	if (xprt->shutdown)
  		goto out;
  
 +	current->flags |= PF_FSTRANS;
+ 	if (xprt->swapper)
+ 		current->flags |= PF_MEMALLOC;
  
  	if (!sock) {
  		clear_bit(XPRT_CONNECTION_ABORT, &xprt->state);
@@@ -2167,7 -2211,7 +2217,8 @@@
  	case -EINPROGRESS:
  	case -EALREADY:
  		xprt_clear_connecting(xprt);
+ 		tsk_restore_flags(current, pflags, PF_MEMALLOC);
 +		current->flags &= ~PF_FSTRANS;
  		return;
  	case -EINVAL:
  		/* Happens, for instance, if the user specified a link
@@@ -2180,7 -2224,7 +2231,8 @@@ out_eagain
  out:
  	xprt_clear_connecting(xprt);
  	xprt_wake_pending_tasks(xprt, status);
+ 	tsk_restore_flags(current, pflags, PF_MEMALLOC);
 +	current->flags &= ~PF_FSTRANS;
  }
  
  /**

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ