From: Chris Mason <clm@fb.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch -next] eventfd: type bug in eventfd_poll()
Date: Mon, 19 Jan 2015 19:41:14 +0000 [thread overview]
Message-ID: <1421696474.27917.3@mail.thefacebook.com> (raw)
In-Reply-To: <20150119193319.GA32634@mwanda>
On Mon, Jan 19, 2015 at 2:33 PM, Dan Carpenter
<dan.carpenter@oracle.com> 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
WARNING: multiple messages have this Message-ID (diff)
From: Chris Mason <clm@fb.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
<linux-fsdevel@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>
Subject: Re: [patch -next] eventfd: type bug in eventfd_poll()
Date: Mon, 19 Jan 2015 14:41:14 -0500 [thread overview]
Message-ID: <1421696474.27917.3@mail.thefacebook.com> (raw)
In-Reply-To: <20150119193319.GA32634@mwanda>
On Mon, Jan 19, 2015 at 2:33 PM, Dan Carpenter
<dan.carpenter@oracle.com> 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
next prev parent reply other threads:[~2015-01-19 19:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 19:33 [patch -next] eventfd: type bug in eventfd_poll() Dan Carpenter
2015-01-19 19:33 ` Dan Carpenter
2015-01-19 19:41 ` Chris Mason [this message]
2015-01-19 19:41 ` Chris Mason
2015-01-29 18:56 ` Chris Mason
2015-01-29 18:56 ` Chris Mason
2015-01-30 8:28 ` walter harms
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421696474.27917.3@mail.thefacebook.com \
--to=clm@fb.com \
--cc=akpm@linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.