Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3490886imu; Sun, 11 Nov 2018 16:17:32 -0800 (PST) X-Google-Smtp-Source: AJdET5cCyafS8JM/PCGv8pn0c6QS3B1EneMsOwhRmH5sDfMzZeHzrQvI6nDDhwq3eXQr4v+fvNlq X-Received: by 2002:a63:fa02:: with SMTP id y2mr15692936pgh.177.1541981851950; Sun, 11 Nov 2018 16:17:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981851; cv=none; d=google.com; s=arc-20160816; b=zsihmU/PWurcXUFKOfdDM4yPyHOqI1NN9pDzh+zTeeLFl8EIa+dLNVqfRebCLbmn9q CiAVCnMwrhS4o0FUpXgMggHGnEQNUxvMTi/rfw41DQ4p5uvpzB8lFvilV9ir/dv8YHjb sIWn+yPNvWM59Xjff29tlNa+qjCahK6Au3TsleVirLwvWkHpwN2lX/L0bpn1o+OHyplD B/+BhjUEnE3TPFbml/YW6dk1SPSAOv81MlXL3sRxk2z+35MPNIIrxRoysgsBpD7yVGQO 7T7tc1oKMb4dcZkpA6c3DbpKg/E7JQpqhKlTh5DZwT9kykW1z3EKGowKsgSiPf4lIxDO 2JQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aptthbIXauGtFrQV26hcsX6xnMHUtBo2uHjqdcSu0JY=; b=R85uaL2Y0QU9ZC4JD+tWiGgTeb2QrPIoOGssLLEpgGLWigdGS6OPmlwe1xcv4oh8zx kKtY86buXrUd/HTeCM19qAItYPHY6jDBuaduXqetTPLITB91CbvTBNC7eWfsW8zgbgGL KiLjZ9N+RCvEpF6gtDUaolKmiKU7Ll1IXDOgTFymagh4OE7+RikzCA8l7Xk+HZMHu2Dl hXGfLWt71Bmbzx5TpTGtxqb1cjoLETAFFU2NGZglr0zS16f1Do2o0/pZmLQQLGLapZkJ 6b+ROi+Bi9CYshQTLbouXzE/+TqJV6qNwiW2p0SNMs9nb92n1xUhlGBLqZAkJp/Yq71g y//A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=obhXpFUL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si15003711pgu.570.2018.11.11.16.17.16; Sun, 11 Nov 2018 16:17:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=obhXpFUL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730328AbeKLKHV (ORCPT + 99 others); Mon, 12 Nov 2018 05:07:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:58446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730099AbeKLIRE (ORCPT ); Mon, 12 Nov 2018 03:17:04 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7271214F1; Sun, 11 Nov 2018 22:27:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975228; bh=p7l974Tids2d34jb7NqHoOxbM0u3o4Ch6oIBVWrKQig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=obhXpFULvFBtQtnhX1ZxdYEdkVxExCgzMWNsEbPCcQ89RQTl5AtQHoq/XcoiUs47V 1eIAigMbthgOoaoJ+rjUcOkH0laCzAcchSRF5boSNenZnJa6ewPqeLwCjrPoufFLTb UZ/NxtNslXfbD5hO5fyYAMvczlfjzxcvQmokMyN4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Willem de Bruijn , Soheil Hassas Yeganeh , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 049/361] net: loopback: clear skb->tstamp before netif_rx() Date: Sun, 11 Nov 2018 14:16:36 -0800 Message-Id: <20181111221626.882767669@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet [ Upstream commit 4c16128b6271e70c8743178e90cccee147858503 ] At least UDP / TCP stacks can now cook skbs with a tstamp using MONOTONIC base (or arbitrary values with SCM_TXTIME) Since loopback driver does not call (directly or indirectly) skb_scrub_packet(), we need to clear skb->tstamp so that net_timestamp_check() can eventually resample the time, using ktime_get_real(). Fixes: 80b14dee2bea ("net: Add a new socket option for a future transmit time.") Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/loopback.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -75,6 +75,10 @@ static netdev_tx_t loopback_xmit(struct int len; skb_tx_timestamp(skb); + + /* do not fool net_timestamp_check() with various clock bases */ + skb->tstamp = 0; + skb_orphan(skb); /* Before queueing this packet to netif_rx(),