Patch "rds: rds_rm_zerocopy_callback() correct order for list_add_tail()" has been added to the 5.15-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

    rds: rds_rm_zerocopy_callback() correct order for list_add_tail()

to the 5.15-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:
     rds-rds_rm_zerocopy_callback-correct-order-for-list_.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 12ac7335c077164a766a26fbb8e471c042060b4c
Author: Pietro Borrello <borrello@xxxxxxxxxxxxxxxx>
Date:   Thu Feb 9 12:26:23 2023 +0000

    rds: rds_rm_zerocopy_callback() correct order for list_add_tail()
    
    [ Upstream commit 68762148d1b011d47bc2ceed7321739b5aea1e63 ]
    
    rds_rm_zerocopy_callback() uses list_add_tail() with swapped
    arguments. This links the list head with the new entry, losing
    the references to the remaining part of the list.
    
    Fixes: 9426bbc6de99 ("rds: use list structure to track information for zerocopy completion notification")
    Suggested-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Pietro Borrello <borrello@xxxxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/rds/message.c b/net/rds/message.c
index b363ef13c75ef..8fa3d19c2e667 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -118,7 +118,7 @@ static void rds_rm_zerocopy_callback(struct rds_sock *rs,
 	ck = &info->zcookies;
 	memset(ck, 0, sizeof(*ck));
 	WARN_ON(!rds_zcookie_add(info, cookie));
-	list_add_tail(&q->zcookie_head, &info->rs_zcookie_next);
+	list_add_tail(&info->rs_zcookie_next, &q->zcookie_head);
 
 	spin_unlock_irqrestore(&q->lock, flags);
 	/* caller invokes rds_wake_sk_sleep() */



[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