Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965255AbdGTQQN (ORCPT ); Thu, 20 Jul 2017 12:16:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55630 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965130AbdGTQQI (ORCPT ); Thu, 20 Jul 2017 12:16:08 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D43917CE14 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=oleg@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D43917CE14 Date: Thu, 20 Jul 2017 18:16:04 +0200 From: Oleg Nesterov To: "Eric W. Biederman" Cc: linux-kernel@vger.kernel.org, Andy Lutomirski , Linus Torvalds , Al Viro , Andrei Vagin , Thomas Gleixner , Greg KH , Andrey Vagin , Serge Hallyn , Pavel Emelyanov , Cyrill Gorcunov , Peter Zijlstra , Willy Tarreau , linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Linux Containers , Michael Kerrisk Subject: Re: [PATCH 6/7] fcntl: Don't use ambiguous SIG_POLL si_codes 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-Disposition: inline In-Reply-To: <20170718140651.15973-6-ebiederm@xmission.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 20 Jul 2017 16:16:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 496 Lines: 21 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.