* kobject_set_name() uses GFP_KERNEL
@ 2009-05-05 16:21 Marcel Holtmann
2009-05-06 13:17 ` Kay Sievers
0 siblings, 1 reply; 2+ messages in thread
From: Marcel Holtmann @ 2009-05-05 16:21 UTC (permalink / raw)
To: Kay Sievers; +Cc: linux-kernel
Hi Kay,
all the users of kobject_set_name() which includes dev_set_name() are
allocating their memory for the device name with GFP_KERNEL. It is not a
big deal since device_add() does the same. However it is not obvious and
I ran into an issue in the Bluetooth stack where I was setting the
device name from a context that can't sleep. If this behavior is on
purpose, we better add an extra comment in the documentation.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: kobject_set_name() uses GFP_KERNEL
2009-05-05 16:21 kobject_set_name() uses GFP_KERNEL Marcel Holtmann
@ 2009-05-06 13:17 ` Kay Sievers
0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2009-05-06 13:17 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-kernel
On Tue, May 5, 2009 at 18:21, Marcel Holtmann <marcel@holtmann.org> wrote:
> all the users of kobject_set_name() which includes dev_set_name() are
> allocating their memory for the device name with GFP_KERNEL. It is not a
> big deal since device_add() does the same. However it is not obvious and
> I ran into an issue in the Bluetooth stack where I was setting the
> device name from a context that can't sleep. If this behavior is on
> purpose, we better add an extra comment in the documentation.
It's the entire driver core and kobjects which use GFP_KERNEL, so it
just "happened" for that function too, I guess.
If it helps to documents that, where should it be added? Maybe you can
just send a patch?
Thanks,
Kay
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-06 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-05 16:21 kobject_set_name() uses GFP_KERNEL Marcel Holtmann
2009-05-06 13:17 ` Kay Sievers
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.