No description
Find a file
Shay Drory 4f86b7f536 net/mlx5: Drain fw_reset when removing device
[ Upstream commit 16d42d3133 ]

In case fw sync reset is called in parallel to device removal, device
might stuck in the following deadlock:
         CPU 0                        CPU 1
         -----                        -----
                                  remove_one
                                   uninit_one (locks intf_state_mutex)
mlx5_sync_reset_now_event()
work in fw_reset->wq.
 mlx5_enter_error_state()
  mutex_lock (intf_state_mutex)
                                   cleanup_once
                                    fw_reset_cleanup()
                                     destroy_workqueue(fw_reset->wq)

Drain the fw_reset WQ, and make sure no new work is being queued, before
entering uninit_one().
The Drain is done before devlink_unregister() since fw_reset, in some
flows, is using devlink API devlink_remote_reload_actions_performed().

Fixes: 38b9f903f2 ("net/mlx5: Handle sync reset request event")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-25 09:59:10 +02:00
arch arm64: kexec: load from kimage prior to clobbering 2022-05-25 09:59:08 +02:00
block block/mq-deadline: Set the fifo_time member also if inserting at head 2022-05-25 09:59:06 +02:00
certs
crypto
Documentation
drivers net/mlx5: Drain fw_reset when removing device 2022-05-25 09:59:10 +02:00
fs nilfs2: fix lockdep warnings during disk space reclamation 2022-05-25 09:59:02 +02:00
include net: fix dev_fill_forward_path with pppoe + bridge 2022-05-25 09:59:07 +02:00
init
ipc
kernel audit,io_uring,io-wq: call __audit_uring_exit for dummy contexts 2022-05-25 09:59:02 +02:00
lib
LICENSES
mm
net NFC: nci: fix sleep in atomic context bugs caused by nci_skb_alloc 2022-05-25 09:59:08 +02:00
samples
scripts
security selinux: fix bad cleanup on error in hashtab_duplicate() 2022-05-25 09:59:02 +02:00
sound ALSA: hda - fix unused Realtek function when PM is not enabled 2022-05-25 09:59:05 +02:00
tools
usr
virt KVM: Free new dirty bitmap if creating a new memslot fails 2022-05-25 09:59:03 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.