tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Specifying names for tap interfaces
On 5/07/2012 8:25 PM, Roger Pau Monne wrote:
> Darren Reed wrote:
>> Roger Pau Monne wrote:
>>> The attached patch adds a new ioctl to perform the rename and
>>> propagate that rename to the associated device_t and sysctl entries.
>>> Please review this patch and check that the use of the spls is
>>> correct. I also had to change a part of the code of bpf_setif in bpf.c
>>> to allow the use of interfaces that doesn't end with a number.
>>
>> This patch does not appear to be safe for SMP systems where
>> you might have competing programs trying to rename different
>> interfaces to the same new name.
>
> Yes, I was expecting this. I've changed it to acquire the
> KERNEL_LOCK from the check (ifunit) to the end of change
> (including driver_t and sysctl changes). Do you think the
> use of splnet and driver_t mutex is correct?
Well answer this question - if I attempt to rename a network
device to the same name as the usb NIC that I'm about to plug
in, what race conditions are still exposed considering that
the autoconf name allocation will not use an ioctl to assign
the name?
Darren
Home |
Main Index |
Thread Index |
Old Index