All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: usb hotplug $DEVICE empty
@ 2004-10-27 11:59 Klaus Dittrich
  2004-10-29  4:24 ` [PATCH] kobject hotplug: don't let SEQNUM overwrite other vars (was Re: usb hotplug $DEVICE empty) Roland Dreier
  0 siblings, 1 reply; 4+ messages in thread
From: Klaus Dittrich @ 2004-10-27 11:59 UTC (permalink / raw)
  To: linux mailing-list

I found out why $DEVICE did not show of in /sbin/hotplug
any more. (2.6.10-rc1-bk5)

Depending on the setting of CONFIG_USB_DEVICEFS
either the environment variables DEVICE or PRODUCT
which should be passed to /sbin/hotplug become overwritten
by the environment variable SEQNUM.

This happens in kobject_hotplug() of lib/kobject_uevent.c.

The here called hotplug_ops->hotplug function usb_hotplug()
advances both, the index to envp and the pointer into buffer
but the calling function gets no notice of that.

So to add SEQNUM later on it advances index/pointer to
envp/buffer from where it has stopped before calling
usb_hotplug(), thus overwriting the first entry that 
usb_hotplug() has added before.


-- 
Klaus

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-30  1:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-27 11:59 usb hotplug $DEVICE empty Klaus Dittrich
2004-10-29  4:24 ` [PATCH] kobject hotplug: don't let SEQNUM overwrite other vars (was Re: usb hotplug $DEVICE empty) Roland Dreier
2004-10-29  4:38   ` Greg KH
2004-10-29 18:44     ` [PATCH] kobject hotplug: don't let SEQNUM overwrite other vars Roland Dreier

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.