hinic: panic when reading back he IRQ affinity hint
It is wrong for using stack variable to store the current code sets an affinity hint, it will cause a panic or returning corrupt data. So this patch moves the mask local variable into hinic_rq struct to avoid this situation. Backtrace: Internal error: Oops: 96000007 [#1] SMP Process irqbalance (pid: 1464, stack limit = 0x000000009bc2bec4) CPU: 35 PID: 1464 Comm: irqbalance Tainted: G W pstate: 00400089 (nzcv daIf +PAN -UAO) pc : __memcpy+0x44/0x180 lr : irq_affinity_hint_proc_show+0x9c/0x100 sp : ffff00002cb7bb60 x29: ffff00002cb7bb60 x28: 0000ffff9f6d9000 x27: ffff803f27cef9c0 x26: ffff00002cb7be30 x25: 0000000000000400 x24: ffff803f290e7000 x23: 0000000000000000 x22: ffff803f27cef980 x21: ffff000009009000 x20: ffff802fb9f01000 x19: ffff00002cb7bba8 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 x8 : 0000000000000000 x7 : 0000000000000000 x6 : ffff00002cb7bba8 x5 : ffff802fb9f01000 x4 : 0000000000000008 x3 : ffff802fb9f01194 x2 : 0000000000000078 x1 : ffff000027d2b8b8 x0 : ffff00002cb7bba8 Call trace: __memcpy+0x44/0x180 seq_read+0x1b4/0x45c proc_reg_read+0x7c/0xb8 __vfs_read+0x58/0x190 vfs_read+0x94/0x154 ksys_read+0x68/0xd8 __arm64_sys_read+0x28/0x34 el0_svc_common+0xe8/0x19c el0_svc_handler+0x78/0x94 el0_svc+0x8/0xc Code: 36100064 b8404423 b80044c3 36180064 (f8408423) ---[ end trace b2cae62a9c2d153f ]--- Signed-off-by: NZou Cao <zoucao@linux.alibaba.com> Reviewed-by: NBaoyou Xie <xie.baoyou@linux.alibaba.com>
Showing
想要评论请 注册 或 登录