to, 2025-04-24 kello 16:19 -0400, Luiz Augusto von Dentz kirjoitti: > Hi Pauli, > > On Thu, Apr 24, 2025 at 3:59 PM Pauli Virtanen <pav@xxxxxx> wrote: > > > > Copy timestamp too when allocating new skb for received fragment. > > Fixes missing RX timestamps with fragmentation. > > > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > > Signed-off-by: Pauli Virtanen <pav@xxxxxx> > > Hmm I though it only matters for TX timestamp but this is actually > different, anyway I don't think it would be possible to backport to > that old patch, so we might need to use a more recent one when we > introduced l2cap_recv_frag to make sure it properly backported: > > Fixes: 4d7ea8ee90e4 ("Bluetooth: L2CAP: Fix handling fragmented length") > > I can fix it up in place though, so don't bother spinning a new one, Yes, that's probably first where the patch applies directly. The bug itself is old. > btw shall we replace the __net_timestamp with skb_set_delivery_time? AFAICS the __net_timestamp() in hci_recv_frame() is correct as it is now. > > --- > > net/bluetooth/l2cap_core.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c > > index 5ca7ac43c58d..73472756618a 100644 > > --- a/net/bluetooth/l2cap_core.c > > +++ b/net/bluetooth/l2cap_core.c > > @@ -7415,6 +7415,9 @@ static int l2cap_recv_frag(struct l2cap_conn *conn, struct sk_buff *skb, > > return -ENOMEM; > > /* Init rx_len */ > > conn->rx_len = len; > > + > > + skb_set_delivery_time(conn->rx_skb, skb->tstamp, > > + skb->tstamp_type); > > } > > > > /* Copy as much as the rx_skb can hold */ > > -- > > 2.49.0 > > > > > -- Pauli Virtanen