LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [GIT PULL] thread fixes v5.6-rc6
@ 2020-03-11 15:44 Christian Brauner
  2020-03-11 20:45 ` pr-tracker-bot
  2020-03-12 16:49 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Brauner @ 2020-03-11 15:44 UTC (permalink / raw)
  To: Linus Torvalds, Linux Kernel Mailing List

Hey Linus,

/* Summary */
This contains a single fix for a regression which was introduced when we
introduced the ability to select a specific pid at process creation time. When
this feature is requested, the error value will be set to -EPERM after exiting
the pid allocation loop. This caused EPERM to be returned when e.g. the init
process/child subreaper of the pid namespace has already died where we used to
return ENOMEM before.
The first patch here simply fixes the regression by unconditionally setting the
return value back to ENOMEM again once we've successfully allocated the
requested pid number. This should be easy to backport to v5.5.

The second patch adds a comment explaining that we must keep returning ENOMEM
since we've been doing it for a long time and have explicitly documented this
behavior for userspace. This seemed worthwhile because we now have at least two
separate example where people tried to change the return value to something
other than ENOMEM (The first version of the regression fix did that too and the
commit message links to an earlier patch that tried to do the same.).

I have a simple regression test to make sure we catch this regression in the
future but since that introduces a whole new selftest subdir and test files
I'll keep this for v5.7.

/* Testing */
All patches have seen exposure in linux-next and are based on v5.6-rc1.
I've had a build warning reported to me for the first version of the second
patch two days ago that tried to remove the unconditional initalization but
that's fixed and linux-next seemed happy. The second patch is now a pure
non-functional change.

/* Conflicts */
At the time of creating this pr no merge conflicts were reported with anything
that is expected to land this merge window.

The following changes since commit 98d54f81e36ba3bf92172791eba5ca5bd813989b:

  Linux 5.6-rc4 (2020-03-01 16:38:46 -0600)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux tags/for-linus-2020-03-10

for you to fetch changes up to 10dab84caf400f2f5f8b010ebb0c7c4272ec5093:

  pid: make ENOMEM return value more obvious (2020-03-09 23:40:05 +0100)

Please consider pulling these changes from the signed for-linus-2020-03-10 tag.

Thanks!
Christian

----------------------------------------------------------------
for-linus-2020-03-10

----------------------------------------------------------------
Christian Brauner (1):
      pid: make ENOMEM return value more obvious

Corey Minyard (1):
      pid: Fix error return value in some cases

 kernel/pid.c | 10 ++++++++++
 1 file changed, 10 insertions(+)


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

* Re: [GIT PULL] thread fixes v5.6-rc6
  2020-03-11 15:44 [GIT PULL] thread fixes v5.6-rc6 Christian Brauner
@ 2020-03-11 20:45 ` pr-tracker-bot
  2020-03-12 16:49 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: pr-tracker-bot @ 2020-03-11 20:45 UTC (permalink / raw)
  To: Christian Brauner; +Cc: Linus Torvalds, Linux Kernel Mailing List

The pull request you sent on Wed, 11 Mar 2020 16:44:05 +0100:

> git@gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux tags/for-linus-2020-03-10

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/addcb1d0ee31aa1472a7afd31a63162423af9c93

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

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

* Re: [GIT PULL] thread fixes v5.6-rc6
  2020-03-11 15:44 [GIT PULL] thread fixes v5.6-rc6 Christian Brauner
  2020-03-11 20:45 ` pr-tracker-bot
@ 2020-03-12 16:49 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2020-03-12 16:49 UTC (permalink / raw)
  To: Linus Torvalds, Linux Kernel Mailing List

On Wed, Mar 11, 2020 at 04:44:05PM +0100, Christian Brauner wrote:
> Hey Linus,
> 
> /* Summary */
> This contains a single fix for a regression which was introduced when we
> introduced the ability to select a specific pid at process creation time. When
> this feature is requested, the error value will be set to -EPERM after exiting
> the pid allocation loop. This caused EPERM to be returned when e.g. the init
> process/child subreaper of the pid namespace has already died where we used to
> return ENOMEM before.
> The first patch here simply fixes the regression by unconditionally setting the
> return value back to ENOMEM again once we've successfully allocated the
> requested pid number. This should be easy to backport to v5.5.
> 
> The second patch adds a comment explaining that we must keep returning ENOMEM
> since we've been doing it for a long time and have explicitly documented this
> behavior for userspace. This seemed worthwhile because we now have at least two
> separate example where people tried to change the return value to something
> other than ENOMEM (The first version of the regression fix did that too and the
> commit message links to an earlier patch that tried to do the same.).
> 
> I have a simple regression test to make sure we catch this regression in the
> future but since that introduces a whole new selftest subdir and test files
> I'll keep this for v5.7.
> 
> /* Testing */
> All patches have seen exposure in linux-next and are based on v5.6-rc1.

Hm, just noticed this was supposed to be v5.6-rc4 as can be seen from
the base commit below. Missed to update it.

> I've had a build warning reported to me for the first version of the second
> patch two days ago that tried to remove the unconditional initalization but
> that's fixed and linux-next seemed happy. The second patch is now a pure
> non-functional change.
> 
> /* Conflicts */
> At the time of creating this pr no merge conflicts were reported with anything
> that is expected to land this merge window.
> 
> The following changes since commit 98d54f81e36ba3bf92172791eba5ca5bd813989b:
> 
>   Linux 5.6-rc4 (2020-03-01 16:38:46 -0600)
> 
> are available in the Git repository at:
> 
>   git@gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux tags/for-linus-2020-03-10
> 
> for you to fetch changes up to 10dab84caf400f2f5f8b010ebb0c7c4272ec5093:
> 
>   pid: make ENOMEM return value more obvious (2020-03-09 23:40:05 +0100)
> 
> Please consider pulling these changes from the signed for-linus-2020-03-10 tag.
> 
> Thanks!
> Christian
> 
> ----------------------------------------------------------------
> for-linus-2020-03-10
> 
> ----------------------------------------------------------------
> Christian Brauner (1):
>       pid: make ENOMEM return value more obvious
> 
> Corey Minyard (1):
>       pid: Fix error return value in some cases
> 
>  kernel/pid.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 

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

end of thread, other threads:[~2020-03-12 16:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 15:44 [GIT PULL] thread fixes v5.6-rc6 Christian Brauner
2020-03-11 20:45 ` pr-tracker-bot
2020-03-12 16:49 ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).