Re: [RFC][PATCH -mm take5 4/7] using symlink for the net_device

2007-06-21 Thread Keiichi KII
Hello Satyam, In any case, however, the point to extend the critical section here to encapsulate all the three parts still stands. We wouldn't want ioctl(NETCON_REMOVE_TARGET) on the specified target to return without removing the target that the user specified just because that target's etherne

Re: [RFC][PATCH -mm take5 4/7] using symlink for the net_device

2007-06-19 Thread Satyam Sharma
Hi, On 6/19/07, Keiichi KII <[EMAIL PROTECTED]> wrote: Hello Satyam, > and this is why we have to use the dual-list mechanism to react to the net > device rename. This isn't so obvious, a comment at the point where you > declare modify_target_list would be nice? (BTW temporary_list would be > a

Re: [RFC][PATCH -mm take5 4/7] using symlink for the net_device

2007-06-19 Thread Satyam Sharma
Hi Keiichi, On 6/19/07, Keiichi KII <[EMAIL PROTECTED]> wrote: Hello Satyam, > Sorry, but we're not covering from the error condition fully here. Note > that later you merge the temporary modify_target_list entirely back > into the target_list ... which would still contain these erroneous > nod

Re: [RFC][PATCH -mm take5 4/7] using symlink for the net_device

2007-06-19 Thread Keiichi KII
Hello Satyam, and this is why we have to use the dual-list mechanism to react to the net device rename. This isn't so obvious, a comment at the point where you declare modify_target_list would be nice? (BTW temporary_list would be a better name for that, IMO) All right, my patches are short of

Re: [RFC][PATCH -mm take5 4/7] using symlink for the net_device

2007-06-19 Thread Keiichi KII
Hello Satyam, Sorry, but we're not covering from the error condition fully here. Note that later you merge the temporary modify_target_list entirely back into the target_list ... which would still contain these erroneous nodes. A full cleanup (kobject_unregister the entry, and then list_del from

Re: [RFC][PATCH -mm take5 4/7] using symlink for the net_device

2007-06-13 Thread Satyam Sharma
Hi again, Ok, so sysfs_create_link() would be illegal from inside spin_lock_irqsave(), and this is why we have to use the dual-list mechanism to react to the net device rename. This isn't so obvious, a comment at the point where you declare modify_target_list would be nice? (BTW temporary_list wo

Re: [RFC][PATCH -mm take5 4/7] using symlink for the net_device

2007-06-13 Thread Satyam Sharma
Hi, On 6/13/07, Keiichi KII <[EMAIL PROTECTED]> wrote: [...] +static DECLARE_MUTEX(netdev_change_sem); The preferred style these days is to use a DEFINE_MUTEX (and the struct mutex primitives) for such locks that are used as binary semaphores. BTW, a comment here to note what this lock protec

[RFC][PATCH -mm take5 4/7] using symlink for the net_device

2007-06-13 Thread Keiichi KII
From: Keiichi KII <[EMAIL PROTECTED]> We use symbolic link for net_device. The link in sysfs represents the corresponding network etherdevice. -+- /sys/class/misc/ |-+- netconsole/ |-+- port1/ | |--- id [r--r--r--] id | |--- net: [r--r--r--] net_dev: eth0,eth1,... | ... |---