From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH 6/7] fcntl: Don't use ambiguous SIG_POLL si_codes Date: Thu, 20 Jul 2017 18:16:04 +0200 Message-ID: <20170720161603.GA14430@redhat.com> References: <87o9shg7t7.fsf_-_@xmission.com> <20170718140651.15973-6-ebiederm@xmission.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170718140651.15973-6-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Eric W. Biederman" Cc: linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrei Vagin , Greg KH , Linux Containers , Pavel Emelyanov , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Al Viro , Andy Lutomirski , linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Cyrill Gorcunov , Michael Kerrisk , Thomas Gleixner , Linus Torvalds , Willy Tarreau , Andrey Vagin List-Id: containers.vger.kernel.org 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.