linux/drivers/net
Rusty Russell f36963c9d3 cpumask_set_cpu_local_first => cpumask_local_spread, lament
da91309e0a (cpumask: Utility function to set n'th cpu...) created a
genuinely weird function.  I never saw it before, it went through DaveM.
(He only does this to make us other maintainers feel better about our own
mistakes.)

cpumask_set_cpu_local_first's purpose is say "I need to spread things
across N online cpus, choose the ones on this numa node first"; you call
it in a loop.

It can fail.  One of the two callers ignores this, the other aborts and
fails the device open.

It can fail in two ways: allocating the off-stack cpumask, or through a
convoluted codepath which AFAICT can only occur if cpu_online_mask
changes.  Which shouldn't happen, because if cpu_online_mask can change
while you call this, it could return a now-offline cpu anyway.

It contains a nonsensical test "!cpumask_of_node(numa_node)".  This was
drawn to my attention by Geert, who said this causes a warning on Sparc.
It sets a single bit in a cpumask instead of returning a cpu number,
because that's what the callers want.

It could be made more efficient by passing the previous cpu rather than
an index, but that would be more invasive to the callers.

Fixes: da91309e0a
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (then rebased)
Tested-by: Amir Vadai <amirv@mellanox.com>
Acked-by: Amir Vadai <amirv@mellanox.com>
Acked-by: David S. Miller <davem@davemloft.net>
2015-05-28 11:05:20 +09:30
..
appletalk
arcnet
bonding net: Fix Kernel Panic in bonding driver debugfs file: rlb_hash_table 2015-04-29 15:37:19 -04:00
caif caif: remove unused struct member 2015-04-01 12:43:09 -04:00
can net:treewide: Fix typo in drivers/net 2015-04-27 13:40:53 -04:00
cris
dsa net: dsa: mv88e6xxx: use PORT_DEFAULT_VLAN 2015-04-20 22:01:16 -04:00
ethernet cpumask_set_cpu_local_first => cpumask_local_spread, lament 2015-05-28 11:05:20 +09:30
fddi
hamradio
hippi
hyperv hv_netvsc: Fix a bug in netvsc_start_xmit() 2015-04-29 15:20:39 -04:00
ieee802154 mac802154: fix transmission power datatype 2015-04-09 19:56:15 +02:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-02 16:16:53 -04:00
irda
phy mdio-mux-gpio: use new gpiod_get_array and gpiod_put_array functions 2015-04-27 13:35:40 -04:00
plip
ppp ppp: mppe: discard late packet in stateless mode 2015-04-26 23:25:13 -04:00
slip
team team: Don't segment multiple tagged packets on team device 2015-03-29 13:33:24 -07:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-14 15:44:14 -04:00
vmxnet3 vmxnet3: spelling fixes 2015-04-01 22:52:29 -04:00
wan cosa: fix error return code 2015-04-07 15:21:55 -04:00
wimax
wireless ARM: DT updates for v4.1 2015-04-22 09:09:46 -07:00
xen-netback xen: features and fixes for 4.1-rc0 2015-04-16 14:01:03 -05:00
dummy.c
eql.c
ifb.c act_mirred: Fix bogus header when redirecting from VLAN 2015-04-17 13:29:28 -04:00
Kconfig
LICENSE.SRC
loopback.c
macvlan.c macvlan: implement ndo_get_iflink 2015-04-02 14:05:00 -04:00
macvtap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-17 16:31:08 -04:00
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c PNP: net/sb1000: Use module_pnp_driver to register driver 2015-03-18 22:39:17 +01:00
Space.c
sungem_phy.c
tun.c make new_sync_{read,write}() static 2015-04-11 22:29:40 -04:00
veth.c veth: set iflink to the peer veth 2015-04-02 14:05:01 -04:00
virtio_net.c virtio: document queue state logic 2015-04-06 16:44:24 -04:00
vxlan.c vxlan: remove the unnecessary codes 2015-04-22 18:45:49 -04:00
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-17 16:31:08 -04:00