Davide Caratti
092e22e586
net/sched: pfifo_fast: fix wrong dereference in pfifo_fast_enqueue
...
Now that 'TCQ_F_CPUSTATS' bit can be cleared, depending on the value of
'TCQ_F_NOLOCK' bit in the parent qdisc, we can't assume anymore that
per-cpu counters are there in the error path of skb_array_produce().
Otherwise, the following splat can be seen:
Unable to handle kernel paging request at virtual address 0000600dea430008
Mem abort info:
ESR = 0x96000005
Exception class = DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
Data abort info:
ISV = 0, ISS = 0x00000005
CM = 0, WnR = 0
user pgtable: 64k pages, 48-bit VAs, pgdp = 000000007b97530e
[0000600dea430008] pgd=0000000000000000, pud=0000000000000000
Internal error: Oops: 96000005 [#1 ] SMP
[...]
pstate: 10000005 (nzcV daif -PAN -UAO)
pc : pfifo_fast_enqueue+0x524/0x6e8
lr : pfifo_fast_enqueue+0x46c/0x6e8
sp : ffff800d39376fe0
x29: ffff800d39376fe0 x28: 1ffff001a07d1e40
x27: ffff800d03e8f188 x26: ffff800d03e8f200
x25: 0000000000000062 x24: ffff800d393772f0
x23: 0000000000000000 x22: 0000000000000403
x21: ffff800cca569a00 x20: ffff800d03e8ee00
x19: ffff800cca569a10 x18: 00000000000000bf
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000000 x14: ffff1001a726edd0
x13: 1fffe4000276a9a4 x12: 0000000000000000
x11: dfff200000000000 x10: ffff800d03e8f1a0
x9 : 0000000000000003 x8 : 0000000000000000
x7 : 00000000f1f1f1f1 x6 : ffff1001a726edea
x5 : ffff800cca56a53c x4 : 1ffff001bf9a8003
x3 : 1ffff001bf9a8003 x2 : 1ffff001a07d1dcb
x1 : 0000600dea430000 x0 : 0000600dea430008
Process ping (pid: 6067, stack limit = 0x00000000dc0aa557)
Call trace:
pfifo_fast_enqueue+0x524/0x6e8
htb_enqueue+0x660/0x10e0 [sch_htb]
__dev_queue_xmit+0x123c/0x2de0
dev_queue_xmit+0x24/0x30
ip_finish_output2+0xc48/0x1720
ip_finish_output+0x548/0x9d8
ip_output+0x334/0x788
ip_local_out+0x90/0x138
ip_send_skb+0x44/0x1d0
ip_push_pending_frames+0x5c/0x78
raw_sendmsg+0xed8/0x28d0
inet_sendmsg+0xc4/0x5c0
sock_sendmsg+0xac/0x108
__sys_sendto+0x1ac/0x2a0
__arm64_sys_sendto+0xc4/0x138
el0_svc_handler+0x13c/0x298
el0_svc+0x8/0xc
Code: f9402e80 d538d081 91002000 8b010000 (885f7c03)
Fix this by testing the value of 'TCQ_F_CPUSTATS' bit in 'qdisc->flags',
before dereferencing 'qdisc->cpu_qstats'.
Fixes: 8a53e616de29 ("net: sched: when clearing NOLOCK, clear TCQ_F_CPUSTATS, too")
CC: Paolo Abeni <pabeni@redhat.com>
CC: Stefano Brivio <sbrivio@redhat.com>
Reported-by: Li Shuang <shuali@redhat.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-08-28 15:57:38 -07:00
..
2019-07-06 12:50:01 +02:00
2019-07-12 17:31:19 -07:00
2019-06-19 17:09:55 +02:00
2019-06-22 08:59:24 -04:00
2019-06-05 17:37:10 +02:00
2019-05-30 11:26:32 -07:00
2019-06-16 14:22:37 -07:00
2019-08-14 19:27:07 +02:00
2019-08-17 13:54:40 +03:00
2019-05-30 11:29:53 -07:00
2019-07-12 16:03:16 -07:00
2019-08-19 09:34:20 +02:00
2019-05-30 11:29:22 -07:00
2019-07-24 11:19:03 +02:00
2019-08-22 10:47:41 +02:00
2019-08-27 20:52:02 -07:00
2019-05-30 11:29:52 -07:00
2019-07-18 17:08:07 -07:00
2019-05-24 17:36:42 +02:00
2019-07-10 18:43:43 -07:00
2019-08-27 20:31:12 -07:00
2019-06-07 11:00:14 -07:00
2019-07-11 14:37:45 -07:00
2019-08-24 13:46:57 -07:00
2019-05-21 10:50:46 +02:00
2019-08-28 15:56:28 -07:00
2019-08-28 14:47:35 -07:00
2019-07-29 10:26:14 -07:00
2019-06-19 17:09:55 +02:00
2019-07-08 19:48:57 -07:00
2019-07-30 14:42:13 -07:00
2019-06-23 13:24:17 -07:00
2019-06-17 20:20:36 -07:00
2019-06-05 17:36:36 +02:00
2019-08-21 10:15:33 +02:00
2019-05-30 11:26:41 -07:00
2019-08-25 14:34:08 -07:00
2019-08-22 19:27:02 -07:00
2019-08-19 09:34:21 +02:00
2019-05-21 11:28:45 +02:00
2019-06-14 19:50:33 -07:00
2019-07-24 15:49:05 -07:00
2019-07-08 12:46:24 -07:00
2019-06-19 17:09:55 +02:00
2019-08-28 14:53:51 -07:00
2019-08-15 13:59:48 -07:00
2019-06-05 17:37:07 +02:00
2019-08-28 15:53:51 -07:00
2019-06-05 17:36:37 +02:00
2019-08-27 20:56:06 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-08-14 11:37:51 +01:00
2019-08-28 15:57:38 -07:00
2019-08-13 20:45:01 -07:00
2019-08-20 12:25:14 -07:00
2019-06-22 08:59:24 -04:00
2019-08-26 15:31:29 -04:00
2019-05-30 11:26:32 -07:00
2019-08-16 16:27:13 -07:00
2019-08-15 12:40:15 -07:00
2019-06-07 11:00:14 -07:00
2019-08-02 17:26:27 -07:00
2019-06-05 17:30:29 +02:00
2019-08-21 10:43:03 +02:00
2019-05-24 17:27:12 +02:00
2019-08-20 16:39:48 +02:00
2019-08-24 14:49:35 -07:00
2019-05-31 15:30:03 -06:00
2019-06-17 13:56:26 -07:00
2019-07-19 10:42:02 -07:00
2019-05-21 10:50:45 +02:00