Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1693076

Re: [PATCH 6/7] fcntl: Don't use ambiguous SIG_POLL si_codes

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 6/7] fcntl: Don't use ambiguous SIG_POLL si_codes
Date 2017-07-20 18:20 +0200
Message-ID <u5mlb-1oO-3@gated-at.bofh.it> (permalink)
References <u4BvX-3ta-9@gated-at.bofh.it> <u4BvY-3ta-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 07/18, Eric W. Biederman wrote:
>
> -			BUG_ON((reason & __SI_MASK) != __SI_POLL);
> +			BUG_ON((reason < POLL_IN) || (reason > NSIGPOLL));
                                                      ^^^^^^^^^^^^^^^^^
looks obviously wrong? Say, POLL_IN is obviously > NSIGPOLL == 6.

Probably you meant

			BUG_ON((reason < POLL_IN) || (reason - POLL_IN > NSIGPOLL)

?

but this contradicts with the next line:

>  			if (reason - POLL_IN >= NSIGPOLL)
>  				si.si_band  = ~0L;

confused...

Oleg.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/7] signal: Fix sending signals with siginfo ebiederm@xmission.com (Eric W. Biederman) - 2017-07-18 16:20 +0200
  [PATCH 6/7] fcntl: Don't use ambiguous SIG_POLL si_codes "Eric W. Biederman" <ebiederm@xmission.com> - 2017-07-18 16:20 +0200
    Re: [PATCH 6/7] fcntl: Don't use ambiguous SIG_POLL si_codes Oleg Nesterov <oleg@redhat.com> - 2017-07-20 18:20 +0200
      Re: [PATCH 6/7] fcntl: Don't use ambiguous SIG_POLL si_codes ebiederm@xmission.com (Eric W. Biederman) - 2017-07-21 04:50 +0200
  [PATCH 4/7] signal/mips: Document a conflict with SI_USER with SIGFPE "Eric W. Biederman" <ebiederm@xmission.com> - 2017-07-18 16:20 +0200
  [PATCH 3/7] signal/sparc: Document a conflict with SI_USER with SIGFPE "Eric W. Biederman" <ebiederm@xmission.com> - 2017-07-18 16:20 +0200
  [PATCH 1/7] signal/alpha: Document a conflict with SI_USER for SIGTRAP "Eric W. Biederman" <ebiederm@xmission.com> - 2017-07-18 16:20 +0200
    Re: [PATCH 1/7] signal/alpha: Document a conflict with SI_USER for  SIGTRAP Richard Henderson <rth@twiddle.net> - 2017-07-18 20:30 +0200
  Re: [PATCH 7/7] signal: Remove kernel interal si_code magic Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-18 19:00 +0200
    Re: [PATCH 7/7] signal: Remove kernel interal si_code magic ebiederm@xmission.com (Eric W. Biederman) - 2017-07-18 19:40 +0200
      Simplfying copy_siginfo_to_user ebiederm@xmission.com (Eric W. Biederman) - 2017-07-22 22:40 +0200
        Re: Simplfying copy_siginfo_to_user Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-24 19:50 +0200
          Re: Simplfying copy_siginfo_to_user ebiederm@xmission.com (Eric W. Biederman) - 2017-07-24 21:20 +0200
          Re: Simplfying copy_siginfo_to_user Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-25 03:40 +0200

csiph-web