linux-stable/Documentation
Eric Dumazet a31196b07f net: rfs: fix crash in get_rps_cpus()
Commit 567e4b79731c ("net: rfs: add hash collision detection") had one
mistake :

RPS_NO_CPU is no longer the marker for invalid cpu in set_rps_cpu()
and get_rps_cpu(), as @next_cpu was the result of an AND with
rps_cpu_mask

This bug showed up on a host with 72 cpus :
next_cpu was 0x7f, and the code was trying to access percpu data of an
non existent cpu.

In a follow up patch, we might get rid of compares against nr_cpu_ids,
if we init the tables with 0. This is silly to test for a very unlikely
condition that exists only shortly after table initialization, as
we got rid of rps_reset_sock_flow() and similar functions that were
writing this RPS_NO_CPU magic value at flow dismantle : When table is
old enough, it never contains this value anymore.

Fixes: 567e4b79731c ("net: rfs: add hash collision detection")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <tom@herbertland.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-26 16:07:57 -04:00
..
2015-04-22 09:24:55 -07:00
2014-05-05 15:32:05 +02:00
2014-02-28 15:12:08 -08:00
2014-02-10 16:01:40 -08:00
2014-12-10 17:41:10 -08:00
2015-02-11 13:03:11 -08:00
2014-06-11 08:35:34 -07:00
2015-04-13 14:14:29 +02:00
2015-03-24 22:57:49 +01:00
2014-06-19 17:45:14 -07:00
2015-02-02 14:23:42 -08:00
2015-02-27 11:44:24 -08:00
2014-05-05 15:32:05 +02:00
2013-12-02 14:48:28 +01:00
2014-12-08 09:07:11 -05:00
2013-12-02 14:45:19 +01:00
2014-11-21 19:48:50 +05:30
2014-05-05 15:32:05 +02:00
2014-05-05 15:32:05 +02:00
2014-09-23 23:44:16 -07:00