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: <20211216193412.2441434-1-broonie@kernel.org>
Date:   Thu, 16 Dec 2021 19:34:12 +0000
From:   broonie@...nel.org
To:     "Eric W . Biederman" <ebiederm@...ssion.com>
Cc:     Chuck Lever <chuck.lever@...cle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        NeilBrown <neilb@...e.de>
Subject: linux-next: manual merge of the userns tree with the cel tree

Hi all,

Today's linux-next merge of the userns tree got a conflict in:

  fs/nfsd/nfssvc.c

between commit:

  cfb05a7336741 ("NFSD: narrow nfsd_mutex protection in nfsd thread")

from the cel tree and commit:

  ca3574bd653ab ("exit: Rename module_put_and_exit to module_put_and_kthread_exit")

from the userns tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc fs/nfsd/nfssvc.c
index 14c1ef6f8cc74,5ce9f14318c4e..0000000000000
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@@ -977,25 -982,11 +977,25 @@@ out
  	/* Release the thread */
  	svc_exit_thread(rqstp);
  
 -	nfsd_destroy(net);
 +	/* We need to drop a ref, but may not drop the last reference
 +	 * without holding nfsd_mutex, and we cannot wait for nfsd_mutex as that
 +	 * could deadlock with nfsd_shutdown_threads() waiting for us.
 +	 * So three options are:
 +	 * - drop a non-final reference,
 +	 * - get the mutex without waiting
 +	 * - sleep briefly andd try the above again
 +	 */
 +	while (!svc_put_not_last(nn->nfsd_serv)) {
 +		if (mutex_trylock(&nfsd_mutex)) {
 +			nfsd_put(net);
 +			mutex_unlock(&nfsd_mutex);
 +			break;
 +		}
 +		msleep(20);
 +	}
  
  	/* Release module */
- 	module_put_and_exit(0);
 -	mutex_unlock(&nfsd_mutex);
+ 	module_put_and_kthread_exit(0);
  	return 0;
  }
  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ