All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the userns tree with the cel tree
@ 2021-12-16 19:34 broonie
  2021-12-16 20:22 ` Mark Brown
  2021-12-17  6:48 ` Stephen Rothwell
  0 siblings, 2 replies; 5+ messages in thread
From: broonie @ 2021-12-16 19:34 UTC (permalink / raw)
  To: Eric W . Biederman
  Cc: Chuck Lever, Linux Kernel Mailing List, Linux Next Mailing List,
	NeilBrown

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the userns tree with the cel tree
  2021-12-16 19:34 linux-next: manual merge of the userns tree with the cel tree broonie
@ 2021-12-16 20:22 ` Mark Brown
  2021-12-17  7:47   ` Stephen Rothwell
  2021-12-17  6:48 ` Stephen Rothwell
  1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2021-12-16 20:22 UTC (permalink / raw)
  To: Eric W . Biederman
  Cc: Chuck Lever, Linux Kernel Mailing List, Linux Next Mailing List,
	NeilBrown

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

On Thu, Dec 16, 2021 at 07:34:12PM +0000, broonie@kernel.org wrote:
> Hi all,
> 
> Today's linux-next merge of the userns tree got a conflict in:
> 
>   fs/nfsd/nfssvc.c

This is also causing further build errors including but not limited to:

/tmp/next/build/kernel/fork.c: In function 'copy_process':
/tmp/next/build/kernel/fork.c:2106:4: error: label 'bad_fork_cleanup_threadgroup_lock' used but not defined
 2106 |    goto bad_fork_cleanup_threadgroup_lock;
      |    ^~~~

Partly due to vaccine side effects and partly in the interest of time
I'm going to use the userns tree from yesterday.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the userns tree with the cel tree
  2021-12-16 19:34 linux-next: manual merge of the userns tree with the cel tree broonie
  2021-12-16 20:22 ` Mark Brown
@ 2021-12-17  6:48 ` Stephen Rothwell
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2021-12-17  6:48 UTC (permalink / raw)
  To: Eric W . Biederman, Chuck Lever
  Cc: broonie, Linux Kernel Mailing List, Linux Next Mailing List, NeilBrown

[-- Attachment #1: Type: text/plain, Size: 1901 bytes --]

Hi all,

On Thu, 16 Dec 2021 19:34:12 +0000 broonie@kernel.org wrote:
>
> 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")

This is now commit 9d3792aefdcd

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

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the userns tree with the cel tree
  2021-12-16 20:22 ` Mark Brown
@ 2021-12-17  7:47   ` Stephen Rothwell
  2021-12-17 16:40     ` Eric W. Biederman
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2021-12-17  7:47 UTC (permalink / raw)
  To: Eric W . Biederman
  Cc: Mark Brown, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

Hi Mark,

On Thu, 16 Dec 2021 20:22:32 +0000 Mark Brown <broonie@kernel.org> wrote:
>
> On Thu, Dec 16, 2021 at 07:34:12PM +0000, broonie@kernel.org wrote:
> > Hi all,
> > 
> > Today's linux-next merge of the userns tree got a conflict in:
> > 
> >   fs/nfsd/nfssvc.c  
> 
> This is also causing further build errors including but not limited to:
> 
> /tmp/next/build/kernel/fork.c: In function 'copy_process':
> /tmp/next/build/kernel/fork.c:2106:4: error: label 'bad_fork_cleanup_threadgroup_lock' used but not defined
>  2106 |    goto bad_fork_cleanup_threadgroup_lock;
>       |    ^~~~
> 
> Partly due to vaccine side effects and partly in the interest of time
> I'm going to use the userns tree from yesterday.

Caused by commit

  40966e316f86 ("kthread: Ensure struct kthread is present for all kthreads")

The label is guarded by CONFIG_NUMA, but the new goto is not.

This is still failing, so I have used the userns tree from next-20211215
for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the userns tree with the cel tree
  2021-12-17  7:47   ` Stephen Rothwell
@ 2021-12-17 16:40     ` Eric W. Biederman
  0 siblings, 0 replies; 5+ messages in thread
From: Eric W. Biederman @ 2021-12-17 16:40 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Mark Brown, Linux Kernel Mailing List, Linux Next Mailing List

Stephen Rothwell <sfr@canb.auug.org.au> writes:

> Hi Mark,
>
> On Thu, 16 Dec 2021 20:22:32 +0000 Mark Brown <broonie@kernel.org> wrote:
>>
>> On Thu, Dec 16, 2021 at 07:34:12PM +0000, broonie@kernel.org wrote:
>> > Hi all,
>> > 
>> > Today's linux-next merge of the userns tree got a conflict in:
>> > 
>> >   fs/nfsd/nfssvc.c  
>> 
>> This is also causing further build errors including but not limited to:
>> 
>> /tmp/next/build/kernel/fork.c: In function 'copy_process':
>> /tmp/next/build/kernel/fork.c:2106:4: error: label 'bad_fork_cleanup_threadgroup_lock' used but not defined
>>  2106 |    goto bad_fork_cleanup_threadgroup_lock;
>>       |    ^~~~
>> 
>> Partly due to vaccine side effects and partly in the interest of time
>> I'm going to use the userns tree from yesterday.
>
> Caused by commit
>
>   40966e316f86 ("kthread: Ensure struct kthread is present for all kthreads")
>
> The label is guarded by CONFIG_NUMA, but the new goto is not.
>
> This is still failing, so I have used the userns tree from next-20211215
> for today.

Huh.  I thought I fixed that.

I will dig in later today.  I just got power back after a bad storm so I
have not see the emails until just now.

Eric

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-17 16:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 19:34 linux-next: manual merge of the userns tree with the cel tree broonie
2021-12-16 20:22 ` Mark Brown
2021-12-17  7:47   ` Stephen Rothwell
2021-12-17 16:40     ` Eric W. Biederman
2021-12-17  6:48 ` Stephen Rothwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.