[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090311181904.GA10309@suse.de>
Date: Wed, 11 Mar 2009 11:19:04 -0700
From: Greg KH <gregkh@...e.de>
To: Cornelia Huck <cornelia.huck@...ibm.com>
Cc: Alex Chiang <achiang@...com>,
Vegard Nossum <vegard.nossum@...il.com>,
Pekka Enberg <penberg@...helsinki.fi>,
Ingo Molnar <mingo@...e.hu>, jbarnes@...tuousgeek.org,
tj@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH, RFC] sysfs: only allow one scheduled removal callback
per kobj
On Wed, Mar 11, 2009 at 06:47:29PM +0100, Cornelia Huck wrote:
> On Wed, 11 Mar 2009 08:32:28 -0700,
> Greg KH <gregkh@...e.de> wrote:
>
> > Why can't you use device_unregister()? Or, you could use device_del(),
> > which lets you rely on the fact that the device structure is still
> > around for a bit, but it will disappear from sysfs. Just don't forget
> > to do the final put_device() on it to free the memory and "really"
> > release it.
> >
> > Or am I missing something else here?
>
> You can't unregister a device from one of its attribute callbacks,
Doh! You're right, very sorry Alex for missing this.
> (For the original oops, I'd rather solve the problem by making sure the
> caller doesn't trigger removal several times - should probably be less
> code than the proposed patch?)
Any ideas on how to do this?
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists