public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] brown paper bag fix for SIGPOLL si_codes
@ 2017-09-19 18:30 Eric W. Biederman
  2017-09-19 20:06 ` Vince Weaver
  0 siblings, 1 reply; 3+ messages in thread
From: Eric W. Biederman @ 2017-09-19 18:30 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Vince Weaver, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo


Linus,

Please pull the for-linus branch from the git tree:

   git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git for-linus

   HEAD: 54640d238760a1a54dfebe039b49682522100186 fcntl: Don't set si_code to SI_SIGIO when sig == SIGPOLL

When sorting out the si_code ambiguity fcntl I accidentally overshot and
included SIGPOLL as well.  Ooops!  This is my trivial fix for that.

Vince Weaver caught this when it landed in your tree with his
perf_event_tests many of which started failing because the si_code changed.

From: "Eric W. Biederman" <ebiederm@xmission.com>
Date: Mon, 18 Sep 2017 22:51:14 -0500
Subject: [PATCH] fcntl: Don't set si_code to SI_SIGIO when sig == SIGPOLL

When fixing things to avoid ambiguous cases I had a thinko
and included SIGPOLL/SIGIO in with all of the other signals
that have signal specific si_codes.  Which is completely wrong.

Fix that.

Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
 fs/fcntl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fcntl.c b/fs/fcntl.c
index 0491da3b28c3..448a1119f0be 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -749,7 +749,7 @@ static void send_sigio_to_task(struct task_struct *p,
 			 * specific si_codes.  In that case use SI_SIGIO instead
 			 * to remove the ambiguity.
 			 */
-			if (sig_specific_sicodes(signum))
+			if ((signum != SIGPOLL) && sig_specific_sicodes(signum))
 				si.si_code = SI_SIGIO;
 
 			/* Make sure we are called with one of the POLL_*
-- 
2.14.1

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

* Re: [GIT PULL] brown paper bag fix for SIGPOLL si_codes
  2017-09-19 18:30 [GIT PULL] brown paper bag fix for SIGPOLL si_codes Eric W. Biederman
@ 2017-09-19 20:06 ` Vince Weaver
  2017-09-19 23:13   ` Eric W. Biederman
  0 siblings, 1 reply; 3+ messages in thread
From: Vince Weaver @ 2017-09-19 20:06 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Linus Torvalds, linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo

On Tue, 19 Sep 2017, Eric W. Biederman wrote:

> When sorting out the si_code ambiguity fcntl I accidentally overshot and
> included SIGPOLL as well.  Ooops!  This is my trivial fix for that.
> 
> Vince Weaver caught this when it landed in your tree with his
> perf_event_tests many of which started failing because the si_code changed.

I've tested with this patch applied and can confirm all of my tests now 
pass again.

Thanks,

Vince

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

* Re: [GIT PULL] brown paper bag fix for SIGPOLL si_codes
  2017-09-19 20:06 ` Vince Weaver
@ 2017-09-19 23:13   ` Eric W. Biederman
  0 siblings, 0 replies; 3+ messages in thread
From: Eric W. Biederman @ 2017-09-19 23:13 UTC (permalink / raw)
  To: Vince Weaver
  Cc: Linus Torvalds, linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo

Vince Weaver <vincent.weaver@maine.edu> writes:

> On Tue, 19 Sep 2017, Eric W. Biederman wrote:
>
>> When sorting out the si_code ambiguity fcntl I accidentally overshot and
>> included SIGPOLL as well.  Ooops!  This is my trivial fix for that.
>> 
>> Vince Weaver caught this when it landed in your tree with his
>> perf_event_tests many of which started failing because the si_code changed.
>
> I've tested with this patch applied and can confirm all of my tests now 
> pass again.

And in my tiredness and distractedness doing this on my honeymoon
I forgot to include:

Fixes: d08477aa975e ("fcntl: Don't use ambiguous SIG_POLL si_codes")

Not that there are any backport issues since all of this is new with
-rc1.  But just in case someone needs the information for double
checking me.

Eric

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

end of thread, other threads:[~2017-09-19 23:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-19 18:30 [GIT PULL] brown paper bag fix for SIGPOLL si_codes Eric W. Biederman
2017-09-19 20:06 ` Vince Weaver
2017-09-19 23:13   ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox