From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B3F05DF40 for ; Mon, 15 May 2023 16:34:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBE55C433EF; Mon, 15 May 2023 16:34:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684168472; bh=6z9xOcEbsVGrDT4mttiiXZJTastv1uH7L4qetwN81tE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KTA4H34srwNRcqwj/D/ZjtQ00o2L29V1oFH3kYu/SNKA+Oh8WaRhOWEdk3Ox0M/yk whE8jfbe3K57wUrT3VuYg74z2bDaHtqx0Yrp5oTG/3SftgVawt/IT6Vw7OhuUMkrpl 4fVV3mHx1Cpv/KSqVAlFsAwVpG8PA4aLmDjAAEY4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vadim Fedorenko , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 031/116] vlan: partially enable SIOCSHWTSTAMP in container Date: Mon, 15 May 2023 18:25:28 +0200 Message-Id: <20230515161659.298204621@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230515161658.228491273@linuxfoundation.org> References: <20230515161658.228491273@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Vadim Fedorenko [ Upstream commit 731b73dba359e3ff00517c13aa0daa82b34ff466 ] Setting timestamp filter was explicitly disabled on vlan devices in containers because it might affect other processes on the host. But it's absolutely legit in case when real device is in the same namespace. Fixes: 873017af7784 ("vlan: disable SIOCSHWTSTAMP in container") Signed-off-by: Vadim Fedorenko Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/8021q/vlan_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index ed3717dc2d201..e871d3b27c479 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -367,7 +367,7 @@ static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) switch (cmd) { case SIOCSHWTSTAMP: - if (!net_eq(dev_net(dev), &init_net)) + if (!net_eq(dev_net(dev), dev_net(real_dev))) break; case SIOCGMIIPHY: case SIOCGMIIREG: -- 2.39.2