alibaba/ali_kernel — pull request #31 by 4tar (2013-11-19 05:08:25+00:00)
Title: 2 hotfixes for AI kernel

Sorry, there are 2 fixes in this request. One is for VLAN creation in no-root namespace, which is included in commit bb933dc which involved only 1 file changed (net/core/dev.c), another is for netpoll function enabling for bridge or bonding device, which is included in commit f4639eb and involved 2 file changed (drivers/net/bonding/bond_main.c and net/bridge/br_device.c).

For the VLAN one, the modifcation just simply detect whether the device which is being created is a 8021q one, if so, gives the green light to it, else will return -EPERM to stop the procedure.

For the netpoll one, current code prevents the netpoll function from being enabled for a specific device, if it is a bridge with one port which doesn't support netpoll, or a bonding device with one slave which doesn't support netpoll. That is too restrict and prevent the netoops from working in AI env after we have already created instance, however, it really seems no sense since the netpoll function pointer would alwayws be checked during runtime. So in this patch, the logic has been changed to prevent the netpoll function from being enabled only when none port or slave belonging to the specific bridge or bonding device supports netpoll, otherwise, it would say OK to let go.