Patch "xsk: Don't assume metadata is always requested in TX completion" has been added to the 6.8-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

    xsk: Don't assume metadata is always requested in TX completion

to the 6.8-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:
     xsk-don-t-assume-metadata-is-always-requested-in-tx-.patch
and it can be found in the queue-6.8 subdirectory.

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



commit 73e1de4dcd5fc4f3ef1646515ab3172b0c875c14
Author: Stanislav Fomichev <sdf@xxxxxxxxxx>
Date:   Mon Mar 18 09:54:27 2024 -0700

    xsk: Don't assume metadata is always requested in TX completion
    
    [ Upstream commit f6e922365faf4cd576bd1cf3e64b58c8a32e1856 ]
    
    `compl->tx_timestam != NULL` means that the user has explicitly
    requested the metadata via XDP_TX_METADATA+XDP_TX_METADATA_TIMESTAMP.
    
    Fixes: 48eb03dd2630 ("xsk: Add TX timestamp and TX checksum offload support")
    Reported-by: Daniele Salvatore Albano <d.albano@xxxxxxxxx>
    Signed-off-by: Stanislav Fomichev <sdf@xxxxxxxxxx>
    Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
    Tested-by: Daniele Salvatore Albano <d.albano@xxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20240318165427.1403313-1-sdf@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/net/xdp_sock.h b/include/net/xdp_sock.h
index 3cb4dc9bd70e4..3d54de168a6d9 100644
--- a/include/net/xdp_sock.h
+++ b/include/net/xdp_sock.h
@@ -188,6 +188,8 @@ static inline void xsk_tx_metadata_complete(struct xsk_tx_metadata_compl *compl,
 {
 	if (!compl)
 		return;
+	if (!compl->tx_timestamp)
+		return;
 
 	*compl->tx_timestamp = ops->tmo_fill_timestamp(priv);
 }




[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