All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Ira Weiny <ira.weiny@intel.com>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] ext4: fix signed vs unsigned comparison in ext4_valid_extent()
Date: Wed, 23 Oct 2019 15:46:05 -0400	[thread overview]
Message-ID: <20191023194605.GA7630@mit.edu> (raw)
In-Reply-To: <20191023184332.GC7689@iweiny-DESK2.sc.intel.com>

On Wed, Oct 23, 2019 at 11:43:33AM -0700, Ira Weiny wrote:
> On Wed, Oct 23, 2019 at 09:15:46AM -0400, Theodore Y. Ts'o wrote:
> > On Tue, Oct 22, 2019 at 10:44:47PM -0700, Eric Biggers wrote:
> > > 
> > > This patch can't be fixing anything because the comparison is unsigned both
> > > before and after this patch.
> > 
> > Thanks, you're right; I had forgotten C's signed/unsigned rules for
> > addition.  The funny thing is the original reporter of BZ #205197
> > reported that the problem went away he tried a similar patch.
> 
> Not trying to stick my nose in too much here but:
> 
> What does it mean if ext4_ext_get_actual_len() to return < 0?

It's not possible for it to return < 0.  We probably should clean it
up to make it return an unsigned int, but that's a longer-term clean-up.

      	      	     		 - Ted

      reply	other threads:[~2019-10-23 19:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23  1:31 [PATCH] ext4: fix signed vs unsigned comparison in ext4_valid_extent() Theodore Ts'o
2019-10-23  5:44 ` Eric Biggers
2019-10-23 13:15   ` Theodore Y. Ts'o
2019-10-23 18:43     ` Ira Weiny
2019-10-23 19:46       ` Theodore Y. Ts'o [this message]

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=20191023194605.GA7630@mit.edu \
    --to=tytso@mit.edu \
    --cc=ira.weiny@intel.com \
    --cc=linux-ext4@vger.kernel.org \
    /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.