]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qlcnic: fix data structure corruption in async mbx command handling
authorManish Chopra <manish.chopra@qlogic.com>
Wed, 3 Aug 2016 08:02:02 +0000 (04:02 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 20:46:53 +0000 (12:46 -0800)
commitac2df1fe3a454a62c3c6395460552caf5942126c
tree158c18a9cf59498bb410d20c02a92384de2ce455
parent8634cd466045309444178b0224be24ce1594b2f8
qlcnic: fix data structure corruption in async mbx command handling

This patch fixes a data structure corruption bug in the SRIOV VF mailbox
handler code. While handling mailbox commands from the atomic context,
driver is accessing and updating qlcnic_async_work_list_struct entry fields
in the async work list. These fields could be concurrently accessed by the
work function resulting in data corruption.

This patch restructures async mbx command handling by using a separate
async command list instead of using a list of work_struct structures.
A single work_struct is used to schedule and handle the async commands
with proper locking mechanism.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 25605962
(cherry picked from commit 2b10d3ecf2dac737653828889ff85f614318f01a)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c