mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Greg KH <greg@kroah.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm] sysfs: Fix oops in sysfs_drop_dentry on x86_64
Date: Wed, 13 Jun 2007 22:43:45 +0900	[thread overview]
Message-ID: <466FF491.30409@gmail.com> (raw)
In-Reply-To: <200706131536.18882.rjw@sisk.pl>

Hello, Rafael.

Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
> 
> Fix oops on x86_64 caused by the dereference of dir in sysfs_drop_dentry() made
> before checking if dir is not NULL
> (cf. http://marc.info/?l=linux-kernel&m=118151626704924&w=2).
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
>  fs/sysfs/inode.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6.22-rc4-mm2/fs/sysfs/inode.c
> ===================================================================
> --- linux-2.6.22-rc4-mm2.orig/fs/sysfs/inode.c
> +++ linux-2.6.22-rc4-mm2/fs/sysfs/inode.c
> @@ -285,7 +285,7 @@ void sysfs_drop_dentry(struct sysfs_dire
>  int sysfs_hash_and_remove(struct dentry * dir, const char * name)
>  {
>  	struct sysfs_dirent **pos, *sd;
> -	struct sysfs_dirent *parent_sd = dir->d_fsdata;
> +	struct sysfs_dirent *parent_sd;
>  	int found = 0;

Argh... Right.  My delusional mind somehow thought the nonsense early
dereferencing was there before any changes so I passed on that one.
Thanks a lot for catching it.  The whole sysfs patchset is pending
regeneration.  I'll include the fix patch.

Thanks a lot.  :-)

-- 
tejun

      reply	other threads:[~2007-06-13 13:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-13 13:36 Rafael J. Wysocki
2007-06-13 13:43 ` Tejun Heo [this message]

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=466FF491.30409@gmail.com \
    --to=htejun@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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

Powered by JetHome