From: yuan linyu <cug...@163.com> Date: Tue, 15 Nov 2016 20:44:59 +0800
> @@ -1063,10 +1063,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, > void __user *arg) > if (!ifa) > break; > INIT_HLIST_NODE(&ifa->hash); > - if (colon) > - memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ); > - else > - memcpy(ifa->ifa_label, dev->name, IFNAMSIZ); > + memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ); This is an incorrect and untested change. If there is a colon character in ifr.ifr_name, earlier in this function we will: 1) First replace that colon with a NULL character. 2) Perform __dev_get_by_name() on the result. 3) Put the ":" colon character back into ifr.ifr_name So the two strings ifr.ifr_name and dev->name can in fact be different here. Therefore the code has to be left as it is.