From: "J. Bruce Fields" <bfields@fieldses.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Jeff Layton <jlayton@redhat.com>
Subject: Re: [PATCH] Fix allocation sizes of knfsd raparm hash
Date: Fri, 15 Aug 2008 15:02:21 -0400 [thread overview]
Message-ID: <20080815190221.GB26563@fieldses.org> (raw)
In-Reply-To: <s5hr68q5rm8.wl%tiwai@suse.de>
On Fri, Aug 15, 2008 at 03:34:39PM +0200, Takashi Iwai wrote:
> The raparm was allocated in a wrong size in the commit
>
> ca80290ebda9009aedc4bd93ede5d397cb1853dc
> nfsd: permit unauthenticated stat of export root
>
> and thus it resulted in memory corruption, eventually Oopsing.
> This patch fixes the allocation size.
Whoops, my fault, now fixed; thanks!
(Out of curiosity--how did you find this?)
--b.
>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>
> ---
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index bfa5453..30d606f 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -2093,7 +2093,7 @@ nfsd_racache_init(int cache_size)
>
> raparm = &raparm_hash[i].pb_head;
> for (j = 0; j < nperbucket; j++) {
> - *raparm = kzalloc(sizeof(*raparm), GFP_KERNEL);
> + *raparm = kzalloc(sizeof(**raparm), GFP_KERNEL);
> if (!*raparm)
> goto out_nomem;
> raparm = &(*raparm)->p_next;
next prev parent reply other threads:[~2008-08-15 19:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-15 8:40 linux-next: Tree for August 15 Stephen Rothwell
2008-08-15 15:41 ` linux-next: Tree for August 15 (bnx2) [resend/lost] Randy Dunlap
2008-08-15 22:17 ` David Miller
2008-08-15 23:41 ` Randy Dunlap
[not found] ` <s5hr68q5rm8.wl%tiwai@suse.de>
2008-08-15 19:02 ` J. Bruce Fields [this message]
2008-08-16 8:45 ` [PATCH] Fix allocation sizes of knfsd raparm hash Takashi Iwai
2008-08-18 14:59 ` J. Bruce Fields
2008-08-18 5:49 ` linux-next: Tree for August 15 Tino Keitel
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=20080815190221.GB26563@fieldses.org \
--to=bfields@fieldses.org \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=tiwai@suse.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).