From: Andrew Morton <akpm@linux-foundation.org>
To: Bob Copeland <me@bobcopeland.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
snakebyte@gmx.de
Subject: Re: [PATCH 1/2] omfs: fix potential oops when directory size is corrupted
Date: Fri, 15 Aug 2008 00:19:56 -0700 [thread overview]
Message-ID: <20080815001956.6b16f383.akpm@linux-foundation.org> (raw)
In-Reply-To: <1218770022-31956-1-git-send-email-me@bobcopeland.com>
On Thu, 14 Aug 2008 23:13:41 -0400 Bob Copeland <me@bobcopeland.com> wrote:
> --- a/fs/omfs/inode.c
> +++ b/fs/omfs/inode.c
> @@ -232,8 +232,7 @@ struct inode *omfs_iget(struct super_block *sb, ino_t ino)
> inode->i_mode = S_IFDIR | (S_IRWXUGO & ~sbi->s_dmask);
> inode->i_op = &omfs_dir_inops;
> inode->i_fop = &omfs_dir_operations;
> - inode->i_size = be32_to_cpu(oi->i_head.h_body_size) +
> - sizeof(struct omfs_header);
> + inode->i_size = sbi->s_sys_blocksize;
> inc_nlink(inode);
> break;
> case OMFS_FILE:
We don't need to use i_size_write() on this code path, but we do in other
places. There's also i_size_read(). I wonder if omfs gets it right
everywhere..
next prev parent reply other threads:[~2008-08-15 7:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-15 3:13 [PATCH 1/2] omfs: fix potential oops when directory size is corrupted Bob Copeland
2008-08-15 7:19 ` Andrew Morton [this message]
2008-08-15 11:35 ` Bob Copeland
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=20080815001956.6b16f383.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@bobcopeland.com \
--cc=snakebyte@gmx.de \
/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;
as well as URLs for NNTP newsgroup(s).