mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
594725db0c
When a cgroup classifier is added, there is a small time interval in
which tp->root is NULL. If we receive a packet in this small time slice
a NULL pointer dereference will happen, leading to a kernel panic:
# mkdir /sys/fs/cgroup/net_cls/0
# echo 0x100001 > /sys/fs/cgroup/net_cls/0/net_cls.classid
# echo $$ >/sys/fs/cgroup/net_cls/0/tasks
# ping -qfb 255.255.255.255 -I eth0 &>/dev/null &
# tc qdisc add dev eth0 root handle 10: htb
# while : ; do
> tc filter add dev eth0 parent 10: protocol ip prio 10 handle 1: cgroup
> tc filter delete dev eth0
> done
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000028
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: 4k pages, 39-bit VAs, pgdp = 0000000098a7ff91
[0000000000000028] pgd=0000000000000000, pud=0000000000000000
Internal error: Oops: 96000005 [#1] SMP
Modules linked in: sch_htb cls_cgroup algif_hash af_alg nls_iso8859_1 nls_cp437 vfat fat xhci_plat_hcd m25p80 spi_nor xhci_hcd mtd usbcore usb_common spi_orion sfp i2c_mv64xxx phy_generic mdio_i2c marvell10g i2c_core mvpp2 mvmdio phylink sbsa_gwdt ip_tables x_tables autofs4
Process ping (pid: 5421, stack limit = 0x00000000b20b1505)
CPU: 3 PID: 5421 Comm: ping Not tainted 5.1.0-rc6 #31
Hardware name: Marvell 8040 MACCHIATOBin Double-shot (DT)
pstate: 60000005 (nZCv daif -PAN -UAO)
pc : cls_cgroup_classify+0x80/0xec [cls_cgroup]
lr : cls_cgroup_classify+0x34/0xec [cls_cgroup]
sp : ffffff8012e6b850
x29: ffffff8012e6b850 x28: ffffffc423dd3c00
x27: ffffff801093ebc0 x26: ffffffc425a85b00
x25: 0000000020000000 x24: 0000000000000000
x23: ffffff8012e6b910 x22: ffffffc428db4900
x21: ffffff8012e6b910 x20: 0000000000100001
x19: 0000000000000000 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000000 x14: 0000000000000000
x13: 0000000000000000 x12: 000000000000001c
x11: 0000000000000018 x10: ffffff8012e6b840
x9 : 0000000000003580 x8 : 000000000000009d
x7 : 0000000000000002 x6 : ffffff8012e6b860
x5 : 000000007cd66ffe x4 : 000000009742a193
x3 : ffffff800865b4d8 x2 : ffffff8012e6b910
x1 : 0000000000000400 x0 : ffffffc42c38f300
Call trace:
cls_cgroup_classify+0x80/0xec [cls_cgroup]
tcf_classify+0x78/0x138
htb_enqueue+0x74/0x320 [sch_htb]
__dev_queue_xmit+0x3e4/0x9d0
dev_queue_xmit+0x24/0x30
ip_finish_output2+0x2e4/0x4d0
ip_finish_output+0x1d8/0x270
ip_mc_output+0xa8/0x240
ip_local_out+0x58/0x68
ip_send_skb+0x2c/0x88
ip_push_pending_frames+0x44/0x50
raw_sendmsg+0x458/0x830
inet_sendmsg+0x54/0xe8
sock_sendmsg+0x34/0x50
__sys_sendto+0xd0/0x120
__arm64_sys_sendto+0x30/0x40
el0_svc_common.constprop.0+0x88/0xf8
el0_svc_handler+0x2c/0x38
el0_svc+0x8/0xc
Code: 39496001 360002a1 b9425c14 34000274 (79405260)
Fixes:
|
||
---|---|---|
.. | ||
act_api.c | ||
act_bpf.c | ||
act_connmark.c | ||
act_csum.c | ||
act_gact.c | ||
act_ife.c | ||
act_ipt.c | ||
act_meta_mark.c | ||
act_meta_skbprio.c | ||
act_meta_skbtcindex.c | ||
act_mirred.c | ||
act_nat.c | ||
act_pedit.c | ||
act_police.c | ||
act_sample.c | ||
act_simple.c | ||
act_skbedit.c | ||
act_skbmod.c | ||
act_tunnel_key.c | ||
act_vlan.c | ||
cls_api.c | ||
cls_basic.c | ||
cls_bpf.c | ||
cls_cgroup.c | ||
cls_flow.c | ||
cls_flower.c | ||
cls_fw.c | ||
cls_matchall.c | ||
cls_route.c | ||
cls_rsvp6.c | ||
cls_rsvp.c | ||
cls_rsvp.h | ||
cls_tcindex.c | ||
cls_u32.c | ||
em_canid.c | ||
em_cmp.c | ||
em_ipset.c | ||
em_ipt.c | ||
em_meta.c | ||
em_nbyte.c | ||
em_text.c | ||
em_u32.c | ||
ematch.c | ||
Kconfig | ||
Makefile | ||
sch_api.c | ||
sch_atm.c | ||
sch_blackhole.c | ||
sch_cake.c | ||
sch_cbq.c | ||
sch_cbs.c | ||
sch_choke.c | ||
sch_codel.c | ||
sch_drr.c | ||
sch_dsmark.c | ||
sch_etf.c | ||
sch_fifo.c | ||
sch_fq_codel.c | ||
sch_fq.c | ||
sch_generic.c | ||
sch_gred.c | ||
sch_hfsc.c | ||
sch_hhf.c | ||
sch_htb.c | ||
sch_ingress.c | ||
sch_mq.c | ||
sch_mqprio.c | ||
sch_multiq.c | ||
sch_netem.c | ||
sch_pie.c | ||
sch_plug.c | ||
sch_prio.c | ||
sch_qfq.c | ||
sch_red.c | ||
sch_sfb.c | ||
sch_sfq.c | ||
sch_skbprio.c | ||
sch_taprio.c | ||
sch_tbf.c | ||
sch_teql.c |