login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
17
Re: [patch 1/3] NFS: fix potential NULL pointer dereference
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Cyrill Gorcunov <gorcunov@...>
To: Trond Myklebust <trond.myklebust@...>
Cc: <bfields@...>, <neilb@...>, <ibm-acpi@...>, <len.brown@...>, <kkeil@...>, <akpm@...>, <linux-kernel@...>
Subject:
Re: [patch 1/3] NFS: fix potential NULL pointer dereference
Date: Thursday, April 17, 2008 - 12:25 am
On Thu, Apr 17, 2008 at 12:40 AM, Trond Myklebust <trond.myklebust@fys.uio.no> wrote:
quoted text
> > On Thu, 2008-04-17 at 00:19 +0400, Cyrill Gorcunov wrote: > > Trond, I've just pointed the problem and its solution (which is seems > > to be a bit ugly, according to the rest nfs coding principle). So if > > you prefer to have such a check in 'walk_path' function - just say me > > that. You choose :) Thanks for comments > > > > > So? The defensive coding principle is that you perform validity checks > > > when the pointer is created. Otherwise, we could equally well have added > > > the NULL deref check to nfs4_path_walk()... > > No, your fix was correct, it was just incomplete. > > The point I was making above was that defensive programming means that > _all_ these validity/NULL pointer checks should really be done in > nfs4_validate_mount_data and nfs_validate_mount_data. We shouldn't rely > on checks in other parts of the code. > > In fact, as an example: it looks to me as if the lack of a > nfs_server.hostname, leads to a lack of nfs_client->cl_hostname, which > will eventually cause an Oops if you 'cat /proc/fs/nfsfs/servers', or if > you hit the printk in nfs_update_inode(), or various other dprintk()s. > > Trond > >
Thanks Trond, I'll remake it ASAP (but can't guarantie that it will be soon ;) --
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 1/3] NFS: fix potential NULL pointer dereference
, Cyrill Gorcunov
, (Wed Apr 16, 1:44 pm)
Re: [patch 1/3] NFS: fix potential NULL pointer dereference
, Trond Myklebust
, (Wed Apr 16, 2:11 pm)
Re: [patch 1/3] NFS: fix potential NULL pointer dereference
, Cyrill Gorcunov
, (Wed Apr 16, 2:13 pm)
Re: [patch 1/3] NFS: fix potential NULL pointer dereference
, Trond Myklebust
, (Wed Apr 16, 2:55 pm)
Re: [patch 1/3] NFS: fix potential NULL pointer dereference
, Cyrill Gorcunov
, (Wed Apr 16, 4:24 pm)
Re: [patch 1/3] NFS: fix potential NULL pointer dereference
, Cyrill Gorcunov
, (Wed Apr 16, 4:19 pm)
Re: [patch 1/3] NFS: fix potential NULL pointer dereference
, Trond Myklebust
, (Wed Apr 16, 4:40 pm)
Re: [patch 1/3] NFS: fix potential NULL pointer dereference
, Cyrill Gorcunov
, (Thu Apr 17, 12:25 am)
Re: [patch 1/3] NFS: fix potential NULL pointer dereference
, Cyrill Gorcunov
, (Thu Apr 17, 3:25 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 004/196] Chinese: add translation of SubmittingPatches
David Chinner
Re: [RFD] BIO_RW_BARRIER - what it means for devices, filesystems, and dm/md.
Andrew Morton
-mm merge plans for 2.6.23
Trent Piepho
Re: [PATCH] [POWERPC] Improve (in|out)_beXX() asm code
git
:
linux-netdev
:
David Miller
Re: iptables very slow after commit784544739a25c30637397ace5489eeb6e15d7d49
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
[GIT]: Networking
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
8 users
and
797 guests
online.
Online users
racebin
eddymartinezku
pargafin
hugomoya98
currencytradin
custody11
tvwallmountsrpn
kellyholmane
Syndicate