weichenchen
a533b70a65
net: neighbor: fix a crash caused by mod zero
...
pneigh_enqueue() tries to obtain a random delay by mod
NEIGH_VAR(p, PROXY_DELAY). However, NEIGH_VAR(p, PROXY_DELAY)
migth be zero at that point because someone could write zero
to /proc/sys/net/ipv4/neigh/[device]/proxy_delay after the
callers check it.
This patch uses prandom_u32_max() to get a random delay instead
which avoids potential division by zero.
Signed-off-by: weichenchen <weichen.chen@linux.alibaba.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2020-12-28 14:49:48 -08:00
..
2020-12-04 22:32:40 +01:00
2020-11-17 14:15:03 -08:00
2020-09-28 15:00:15 -07:00
2020-11-03 17:49:26 -08:00
2020-12-16 11:43:25 -08:00
2020-12-08 16:22:54 -08:00
2020-10-02 19:11:11 -07:00
2020-09-10 13:28:57 -07:00
2019-10-04 11:10:56 -07:00
2020-11-16 08:08:54 -08:00
2020-12-08 18:23:36 -08:00
2020-11-07 15:52:21 -08:00
2020-12-09 16:08:33 -08:00
2019-11-06 21:51:36 -08:00
2020-04-28 14:39:46 -07:00
2020-11-25 11:28:12 -08:00
2019-06-09 19:40:10 -07:00
2020-04-20 12:43:24 -07:00
2020-12-07 11:53:40 -08:00
2020-03-29 22:30:57 -07:00
2019-12-12 17:07:05 -08:00
2020-12-28 14:49:48 -08:00
2020-12-14 16:40:27 -08:00
2020-09-21 13:56:37 -07:00
2020-12-28 13:26:46 -08:00
2020-02-26 20:07:25 -08:00
2019-06-19 11:23:13 -04:00
2020-12-04 22:32:40 +01:00
2020-11-18 11:04:11 -08:00
2020-12-04 22:32:40 +01:00
2020-11-14 02:29:00 +01:00
2020-10-01 18:45:23 -07:00
2020-08-19 16:07:49 -07:00
2019-10-13 10:13:08 -07:00
2020-12-10 13:35:59 -08:00
2020-07-13 11:03:44 -07:00
2020-05-08 15:32:17 +10:00
2020-12-14 18:41:01 -08:00
2020-11-18 00:14:04 +01:00
2020-09-30 11:50:35 -07:00
2020-12-02 18:32:47 -08:00
2020-07-21 15:31:02 -07:00
2020-12-04 22:32:40 +01:00
2019-08-19 13:07:43 -07:00
2020-08-28 06:52:44 -07:00
2019-12-25 19:51:33 -08:00
2020-06-18 20:46:23 -07:00
2020-01-24 20:54:30 +01:00
2020-12-11 22:29:38 -08:00