public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v2] xfs: avoid underflow in xfs_ioc_trim()
Date: Fri, 12 Oct 2012 08:35:33 +1100	[thread overview]
Message-ID: <20121011213533.GE2739@dastard> (raw)
In-Reply-To: <1349944432-13776-1-git-send-email-lczerner@redhat.com>

On Thu, Oct 11, 2012 at 10:33:52AM +0200, Lukas Czerner wrote:
> Currently if len argument in xfs_ioc_trim() is smaller than one FSB
> the 'end' variable underflow. Avoid that by returning EINVAL when
> range is smaller than FSB.
> 
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>

Just a thought - wouldn't this be better done at the VFS so it is
consistent across all filesystems? i.e. using inode->i_blkbits?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-10-11 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11  8:33 [PATCH v2] xfs: avoid underflow in xfs_ioc_trim() Lukas Czerner
2012-10-11 21:35 ` Dave Chinner [this message]
2012-10-12  5:35   ` Lukáš Czerner
2012-10-12  5:49     ` Dave Chinner

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=20121011213533.GE2739@dastard \
    --to=david@fromorbit.com \
    --cc=lczerner@redhat.com \
    --cc=xfs@oss.sgi.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