Subject: should networkdevice_ioctl() always be called from a thread context?
To: None <email@example.com, firstname.lastname@example.org>
From: Ignatios Souvatzis <email@example.com>
Date: 09/25/2006 13:35:22
while analyzing, writing, and reparing kern/34521, I wondered:
- should interface_ioctl() always be called by a thread context?
IPv6 neighbour/router/prefix discovery can trigger an interface
address addition from the (soft) network interupt when an ICMPv6
router advertizement comes in. THe ICMPv6 code eventally calls
the driver's foo_ioctl(... SIOCADDMULTI ...) call to register the
multicast address the interface needs to listen to for the IPv6
neigbbour discovery to work.
Now, the aue_ioctl() eventually calls usb code that is not interupt
You may have noticed that I fixed this for netbsd-4 and later by
activating a workqueue(9) [which is a kernel thread in disguise].
However, I wonder whether foo_ioctl() should be able to expect that
it's called from a thread context, that is, whether the ICMPv6 code
(and other code that calls ..._ioctl() entry points) should create
a work thread itself if necessary.
[Others have already mentioned that we're doing too much stuff in
What do you think?