From: Joe Perches <joe@perches.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>,
Andreas Dilger <andreas.dilger@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, HPDD-discuss@ml01.01.org,
devel@driverdev.osuosl.org
Subject: Re: [PATCH 2/2] staging: lustre: lov: remove always false condition
Date: Tue, 08 Sep 2015 09:53:09 -0700 [thread overview]
Message-ID: <1441731189.17219.1.camel@perches.com> (raw)
In-Reply-To: <1441729382-27865-2-git-send-email-sudipm.mukherjee@gmail.com>
On Tue, 2015-09-08 at 21:53 +0530, Sudip Mukherjee wrote:
> The member qc_idx of struct if_quotactl is unsigned and hence it can
> never be less than zero.
[]
> diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c
[]
> @@ -1487,7 +1487,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
> struct obd_quotactl *oqctl;
>
> if (qctl->qc_valid == QC_OSTIDX) {
> - if (qctl->qc_idx < 0 || count <= qctl->qc_idx)
> + if (count <= qctl->qc_idx)
Perhaps this test would be clearer reversed too
if (qctl->qc_idx >= count)
> return -EINVAL;
next prev parent reply other threads:[~2015-09-08 16:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-08 16:23 [PATCH 1/2] staging: lustre: lov: fix dereference of ERR_PTR Sudip Mukherjee
2015-09-08 16:23 ` [PATCH 2/2] staging: lustre: lov: remove always false condition Sudip Mukherjee
2015-09-08 16:53 ` Joe Perches [this message]
2015-09-08 17:42 ` Sudip Mukherjee
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=1441731189.17219.1.camel@perches.com \
--to=joe@perches.com \
--cc=HPDD-discuss@ml01.01.org \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.com \
--cc=sudipm.mukherjee@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox