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>] [day] [month] [year] [list]
Message-ID: <20250916131225.21589-1-sedara@marvell.com>
Date: Tue, 16 Sep 2025 06:12:25 -0700
From: Sathesh B Edara <sedara@...vell.com>
To: <linux-kernel@...r.kernel.org>, <sburla@...vell.com>, <vburru@...vell.com>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
        <pabeni@...hat.com>, <netdev@...r.kernel.org>, <hgani@...vell.com>,
        <andrew@...n.ch>, <srasheed@...vell.com>
CC: <sedara@...vell.com>
Subject: [net PATCH v2] octeon_ep: Clear VF info at PF when VF driver is removed

When a VF (Virtual Function) driver is removed, the PF (Physical Function)
driver continues to retain stale VF-specific information. This can lead to
inconsistencies or unexpected behavior when the VF is re-initialized or
reassigned.

This patch ensures that the PF driver clears the corresponding VF info
when the VF driver is removed, maintaining a clean state and preventing
potential issues.

Fixes: cde29af9e68e ("octeon_ep: add PF-VF mailbox communication")
Signed-off-by: Sathesh B Edara <sedara@...vell.com>
---
Changes:
V2:
  - Commit header format corrected.

 drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
index ebecdd29f3bd..f2759d2073d1 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
@@ -205,6 +205,8 @@ static void octep_pfvf_dev_remove(struct octep_device *oct,  u32 vf_id,
 {
 	int err;
 
+	/* Reset VF-specific information maintained by the PF */
+	memset(&oct->vf_info[vf_id], 0, sizeof(struct octep_pfvf_info));
 	err = octep_ctrl_net_dev_remove(oct, vf_id);
 	if (err) {
 		rsp->s.type = OCTEP_PFVF_MBOX_TYPE_RSP_NACK;
-- 
2.36.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ