]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: DR, use non preemptible call to get the current cpu number
authorErez Shitrit <erezsh@mellanox.com>
Sun, 12 Jan 2020 06:57:59 +0000 (08:57 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 24 Jan 2020 20:04:29 +0000 (12:04 -0800)
commit1828e9f5b5c0d0eb8ee0475ed8d5370ae33d6f7e
treebf1f5b17fbe86f261d1a53a8e6134743282407aa
parentc16d769280b2bcc02fa952426e689e25a1c33bf6
net/mlx5: DR, use non preemptible call to get the current cpu number

Use raw_smp_processor_id instead of smp_processor_id() otherwise we will
get the following trace in debug-kernel:
BUG: using smp_processor_id() in preemptible [00000000] code: devlink
caller is dr_create_cq.constprop.2+0x31d/0x970 [mlx5_core]
Call Trace:
dump_stack+0x9a/0xf0
debug_smp_processor_id+0x1f3/0x200
dr_create_cq.constprop.2+0x31d/0x970
genl_family_rcv_msg+0x5fd/0x1170
genl_rcv_msg+0xb8/0x160
netlink_rcv_skb+0x11e/0x340

Fixes: c45ded7f28d3 ("net/mlx5: DR, Expose an internal API to issue RDMA operations")
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c