All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Srihari Vijayaraghavan <sriharivijayaraghavan@yahoo.com.au>,
	linux-kernel@vger.kernel.org, Max Asbock <masbock@us.ibm.com>,
	Vernon Mauery <vernux@us.ibm.com>
Subject: Re: Oops on ibmasm
Date: Thu, 9 Mar 2006 08:26:55 -0500	[thread overview]
Message-ID: <20060309132655.GA26354@redhat.com> (raw)
In-Reply-To: <20060309014023.2caa42d2.akpm@osdl.org>

On Thu, Mar 09, 2006 at 01:40:23AM -0800, Andrew Morton wrote:

 > I assume this'll fix it?
 > 
 > I suspect there's no point in the locking around that kobject_put() anyway.
 > Or if there is, it wasn't the right way to fix the race.
 > 
 > diff -puN drivers/misc/ibmasm/ibmasm.h~ibmasm-use-after-free-fix drivers/misc/ibmasm/ibmasm.h
 > --- devel/drivers/misc/ibmasm/ibmasm.h~ibmasm-use-after-free-fix	2006-03-09 01:35:05.000000000 -0800
 > +++ devel-akpm/drivers/misc/ibmasm/ibmasm.h	2006-03-09 01:35:16.000000000 -0800
 > @@ -100,11 +100,7 @@ struct command {
 >  
 >  static inline void command_put(struct command *cmd)
 >  {
 > -	unsigned long flags;
 > -
 > -	spin_lock_irqsave(cmd->lock, flags);
 >          kobject_put(&cmd->kobj);
 > -	spin_unlock_irqrestore(cmd->lock, flags);
 >  }

I don't think this is right.  This is just a kobject-convoluted
use-after-free afaics.

		Dave

-- 
http://www.codemonkey.org.uk

  reply	other threads:[~2006-03-09 13:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-08 22:41 Oops on ibmasm Srihari Vijayaraghavan
2006-03-08 22:59 ` Dave Jones
2006-03-09  6:41   ` Greg KH
2006-03-09  9:40 ` Andrew Morton
2006-03-09 13:26   ` Dave Jones [this message]
2006-03-09 17:37     ` Max Asbock
2006-03-09 21:58       ` Srihari Vijayaraghavan
  -- strict thread matches above, loose matches on Subject: below --
2006-03-10  4:35 Srihari Vijayaraghavan

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=20060309132655.GA26354@redhat.com \
    --to=davej@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masbock@us.ibm.com \
    --cc=sriharivijayaraghavan@yahoo.com.au \
    --cc=vernux@us.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.