lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 6 Jun 2023 11:08:18 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Leon Romanovsky <leon@...nel.org>
Cc: Jakub Kicinski <kuba@...nel.org>,
	Patrisious Haddad <phaddad@...dia.com>,
	Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
	Paolo Abeni <pabeni@...hat.com>, Raed Salem <raeds@...dia.com>,
	Saeed Mahameed <saeedm@...dia.com>,
	Steffen Klassert <steffen.klassert@...unet.com>
Subject: Re: [PATCH net 2/4] net/mlx5e: Fix ESN update kernel panic

On Mon, Jun 05, 2023 at 11:09:50AM +0300, Leon Romanovsky wrote:
> From: Patrisious Haddad <phaddad@...dia.com>
> 
> Previously during mlx5e_ipsec_handle_event the driver tried to execute
> an operation that could sleep, while holding a spinlock, which caused
> the kernel panic mentioned below.
> 
> Move the function call that can sleep outside of the spinlock context.
> 
>  Call Trace:
>  <TASK>
>  dump_stack_lvl+0x49/0x6c
>  __schedule_bug.cold+0x42/0x4e
>  schedule_debug.constprop.0+0xe0/0x118
>  __schedule+0x59/0x58a
>  ? __mod_timer+0x2a1/0x3ef
>  schedule+0x5e/0xd4
>  schedule_timeout+0x99/0x164
>  ? __pfx_process_timeout+0x10/0x10
>  __wait_for_common+0x90/0x1da
>  ? __pfx_schedule_timeout+0x10/0x10
>  wait_func+0x34/0x142 [mlx5_core]
>  mlx5_cmd_invoke+0x1f3/0x313 [mlx5_core]
>  cmd_exec+0x1fe/0x325 [mlx5_core]
>  mlx5_cmd_do+0x22/0x50 [mlx5_core]
>  mlx5_cmd_exec+0x1c/0x40 [mlx5_core]
>  mlx5_modify_ipsec_obj+0xb2/0x17f [mlx5_core]
>  mlx5e_ipsec_update_esn_state+0x69/0xf0 [mlx5_core]
>  ? wake_affine+0x62/0x1f8
>  mlx5e_ipsec_handle_event+0xb1/0xc0 [mlx5_core]
>  process_one_work+0x1e2/0x3e6
>  ? __pfx_worker_thread+0x10/0x10
>  worker_thread+0x54/0x3ad
>  ? __pfx_worker_thread+0x10/0x10
>  kthread+0xda/0x101
>  ? __pfx_kthread+0x10/0x10
>  ret_from_fork+0x29/0x37
>  </TASK>
>  BUG: workqueue leaked lock or atomic: kworker/u256:4/0x7fffffff/189754#012     last function: mlx5e_ipsec_handle_event [mlx5_core]
>  CPU: 66 PID: 189754 Comm: kworker/u256:4 Kdump: loaded Tainted: G        W          6.2.0-2596.20230309201517_5.el8uek.rc1.x86_64 #2
>  Hardware name: Oracle Corporation ORACLE SERVER X9-2/ASMMBX9-2, BIOS 61070300 08/17/2022
>  Workqueue: mlx5e_ipsec: eth%d mlx5e_ipsec_handle_event [mlx5_core]
>  Call Trace:
>  <TASK>
>  dump_stack_lvl+0x49/0x6c
>  process_one_work.cold+0x2b/0x3c
>  ? __pfx_worker_thread+0x10/0x10
>  worker_thread+0x54/0x3ad
>  ? __pfx_worker_thread+0x10/0x10
>  kthread+0xda/0x101
>  ? __pfx_kthread+0x10/0x10
>  ret_from_fork+0x29/0x37
>  </TASK>
>  BUG: scheduling while atomic: kworker/u256:4/189754/0x00000000
> 
> Fixes: cee137a63431 ("net/mlx5e: Handle ESN update events")
> Signed-off-by: Patrisious Haddad <phaddad@...dia.com>
> Signed-off-by: Leon Romanovsky <leonro@...dia.com>

Reviewed-by: Simon Horman <simon.horman@...igine.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ