login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
14
Re: [PATCH] nfsd: fix NULL dereference in nfsd_statfs()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: J. Bruce Fields
Subject:
Re: [PATCH] nfsd: fix NULL dereference in nfsd_statfs()
Date: Saturday, August 14, 2010 - 6:02 am
On Fri, Aug 13, 2010 at 03:53:49PM +0200, Takashi Iwai wrote:
quoted text
> The commit ebabe9a9001af0af56c0c2780ca1576246e7a74b > pass a struct path to vfs_statfs > introduced the struct path initialization, and this seems to trigger > an Oops on my machine. > > fh_dentry field may be NULL and set later in fh_verify(), thus the > initialization of path must be after fh_verify(). > > Signed-off-by: Takashi Iwai <tiwai@suse.de>
I'm travelling, but, looks good: Acked-by: J. Bruce Fields <bfields@redhat.com> --b.
quoted text
> --- > fs/nfsd/vfs.c | 14 ++++++++------ > 1 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c > index 96360a8..661a6cf 100644 > --- a/fs/nfsd/vfs.c > +++ b/fs/nfsd/vfs.c > @@ -2033,15 +2033,17 @@ out: > __be32 > nfsd_statfs(struct svc_rqst *rqstp, struct svc_fh *fhp, struct kstatfs *stat, int access) > { > - struct path path = { > - .mnt = fhp->fh_export->ex_path.mnt, > - .dentry = fhp->fh_dentry, > - }; > __be32 err; > > err = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP | access); > - if (!err && vfs_statfs(&path, stat)) > - err = nfserr_io; > + if (!err) { > + struct path path = { > + .mnt = fhp->fh_export->ex_path.mnt, > + .dentry = fhp->fh_dentry, > + }; > + if (vfs_statfs(&path, stat)) > + err = nfserr_io; > + } > return err; > } > > -- > 1.7.2.1 >
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] nfsd: fix NULL dereference in nfsd_statfs()
, Takashi Iwai
, (Fri Aug 13, 6:53 am)
Re: [PATCH] nfsd: fix NULL dereference in nfsd_statfs()
, Christoph Hellwig
, (Fri Aug 13, 7:42 am)
Re: [PATCH] nfsd: fix NULL dereference in nfsd_statfs()
, Minchan Kim
, (Fri Aug 13, 6:32 pm)
Re: [PATCH] nfsd: fix NULL dereference in nfsd_statfs()
, J. Bruce Fields
, (Sat Aug 14, 6:02 am)
Re: [PATCH] nfsd: fix NULL dereference in nfsd_statfs()
, J. Bruce Fields
, (Fri Aug 20, 2:29 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Kay Sievers
Re: char/tpm: tpm_infineon no longer loaded for HP 2510p laptop
Eric W. Biederman
[PATCH 8/8] sysfs: user namespaces: fix bug with clone(CLONE_NEWUSER) with fairsched
S K
Re: cpufreq doesn't seem to work in Intel Q9300
Bart Van Assche
Re: Is gcc thread-unsafe?
Aaron Straus
Re: [NFS] blocks of zeros (NULLs) in NFS files in kernels >= 2.6.20
git
:
Junio C Hamano
Re: git-svnimport
Junio C Hamano
Re: [PATCH] git-mv: Keep moved index entries inact
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
Juergen Ruehle
Re: [ANNOUNCE] Guilt 0.16
linux-netdev
:
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Ingo Molnar
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
Eric W. Biederman
[PATCH 14/20] net: Simplify pppol2tp pernet operations.
Jeff Kirsher
[net-2.6 PATCH 2/5] e1000e: increase swflag acquisition timeout for ICHx/PCH
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
sm501: add power control callback
Linux Kernel Mailing List
MIPS: Cavium: Remove unused watchdog code.
Linux Kernel Mailing List
V4L/DVB (8976): af9015: Add USB ID for AVerMedia A309
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
openbsd-misc
:
daniele.pilenga
snmpd hangs on 4.1 looking up hrSWRunTable
Christophe Rioux
Implementation example of snmp
Nick Holland
Re: booting openbsd on eee without cd-rom
Bryan Irvine
Re: OpenBSD 4.7 Released, May 19 2010
Cabillot Julien
Re: OpenBSD isakmpd and pf vs Cisco PIX or ASA
Colocation donated by:
Syndicate