From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Mason Subject: Re: [patch -next] eventfd: type bug in eventfd_poll() Date: Mon, 19 Jan 2015 14:41:14 -0500 Message-ID: <1421696474.27917.3@mail.thefacebook.com> References: <20150119193319.GA32634@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Cc: Alexander Viro , Andrew Morton , , To: Dan Carpenter Return-path: In-Reply-To: <20150119193319.GA32634@mwanda> Sender: kernel-janitors-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Jan 19, 2015 at 2:33 PM, Dan Carpenter wrote: > Since "count" is an unsigned int, then these conditions are never > true: > > if (count == ULLONG_MAX) > events |= POLLERR; > if (ULLONG_MAX - 1 > count) > events |= POLLOUT; > > It should be a u64, because that's what ctx->count is. Also GCC > complains that "flags" is unused. Ugh, thanks Dan, I copied the unsigned int out of eventfd_file_create instead of checking the struct. I'll test v3. -chris