Patch "ntb: Drop packets when qp link is down" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ntb: Drop packets when qp link is down

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ntb-drop-packets-when-qp-link-is-down.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From f195a1a6fe416882984f8bd6c61afc1383171860 Mon Sep 17 00:00:00 2001
From: Dave Jiang <dave.jiang@xxxxxxxxx>
Date: Tue, 22 Aug 2023 09:04:51 -0700
Subject: ntb: Drop packets when qp link is down

From: Dave Jiang <dave.jiang@xxxxxxxxx>

commit f195a1a6fe416882984f8bd6c61afc1383171860 upstream.

Currently when the transport receive packets after netdev has closed the
transport returns error and triggers tx errors to be incremented and
carrier to be stopped. There is no reason to return error if the device is
already closed. Drop the packet and return 0.

Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Reported-by: Yuan Y Lu <yuan.y.lu@xxxxxxxxx>
Tested-by: Yuan Y Lu <yuan.y.lu@xxxxxxxxx>
Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
Signed-off-by: Jon Mason <jdmason@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/ntb/ntb_transport.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/drivers/ntb/ntb_transport.c
+++ b/drivers/ntb/ntb_transport.c
@@ -2276,9 +2276,13 @@ int ntb_transport_tx_enqueue(struct ntb_
 	struct ntb_queue_entry *entry;
 	int rc;
 
-	if (!qp || !qp->link_is_up || !len)
+	if (!qp || !len)
 		return -EINVAL;
 
+	/* If the qp link is down already, just ignore. */
+	if (!qp->link_is_up)
+		return 0;
+
 	entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q);
 	if (!entry) {
 		qp->tx_err_no_buf++;


Patches currently in stable-queue which might be from dave.jiang@xxxxxxxxx are

queue-6.1/ntb-fix-calculation-ntb_transport_tx_free_entry.patch
queue-6.1/ntb-clean-up-tx-tail-index-on-link-down.patch
queue-6.1/nvdimm-fix-dereference-after-free-in-register_nvdimm.patch
queue-6.1/ntb-drop-packets-when-qp-link-is-down.patch
queue-6.1/nvdimm-fix-memleak-of-pmu-attr_groups-in-unregister_.patch
queue-6.1/dmaengine-idxd-modify-the-dependence-of-attribute-pa.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux