Messages in this thread | | | Date | Mon, 12 Jan 2004 16:18:33 -0800 | From | Greg KH <> | Subject | Re: [PATCH] restrict class names to valid file names |
| |
On Mon, Jan 12, 2004 at 04:13:36PM -0800, Stephen Hemminger wrote: > On Mon, 12 Jan 2004 16:05:14 -0800 > Greg KH <greg@kroah.com> wrote: > > > On Mon, Jan 12, 2004 at 03:13:57PM -0800, Stephen Hemminger wrote: > > > It is possible to name network devices with names like "my/bogus" or "." or ".." > > > which leaves /sys/class/net/ a mess. Since other subsystems could have the same > > > problem, it made sense to me to enforce some restrictions in the class device > > > layer. > > > > > > A lateer patch fixes the network device registration path because the > > > sysfs registration takes place after the register_netdevice call has taken place. > > > > Heh, so you will have already "scrubbed" the name before you submit it > > to the driver core? If so, why add this patch? > > Because name won't be scrubbed for the rename case
Why not? Does that mean that those characters are valid names for network devices if the device is renamed from userspace?
> , and other class devices probably have the same possible problem
I don't know of any other class device code in the kernel that accepts userspace input as its name.
thanks,
greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |