From: Dave Chinner <david@fromorbit.com>
To: "Arkadiusz Miśkiewicz" <arekm@maven.pl>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] Disallow 32bit project quota id.
Date: Thu, 26 Aug 2010 18:12:47 +1000 [thread overview]
Message-ID: <20100826081247.GD705@dastard> (raw)
In-Reply-To: <1282806131-20163-1-git-send-email-arekm@maven.pl>
On Thu, Aug 26, 2010 at 09:02:11AM +0200, Arkadiusz Miśkiewicz wrote:
> Currently on-disk structure is able to keep only 16bit project quota id,
> so disallow 32bit ones. This fixes a problem where part of kernel
> structures holding project quota id uses 32bit variable while part
> (on-disk) uses 16bit variable which causes project quota member files
> to be inaccessible for some operations (like mv/rm).
>
> Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
> ---
>
> Please queue for upcoming 2.6.36 fixes.
>
>
> fs/xfs/linux-2.6/xfs_ioctl.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
> index 237f5ff..0166226 100644
> --- a/fs/xfs/linux-2.6/xfs_ioctl.c
> +++ b/fs/xfs/linux-2.6/xfs_ioctl.c
> @@ -906,6 +906,10 @@ xfs_ioctl_setattr(
> if (XFS_FORCED_SHUTDOWN(mp))
> return XFS_ERROR(EIO);
>
> + /* Disallow 32bit project ids that because on-disk structure is 16bit only */
> + if (fa->fsx_projid > (__uint16_t)-1)
> + return XFS_ERROR(EINVAL);
> +
If think that needs to include a (mask & FSX_PROJID) check first.
i.e. only validate the projid if it was set by userspace.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-08-26 8:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-26 7:02 [PATCH] Disallow 32bit project quota id Arkadiusz Miśkiewicz
2010-08-26 8:12 ` Dave Chinner [this message]
2010-08-26 10:19 ` Arkadiusz Miśkiewicz
2010-09-01 10:20 ` Christoph Hellwig
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=20100826081247.GD705@dastard \
--to=david@fromorbit.com \
--cc=arekm@maven.pl \
--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