From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Cochran Subject: Re: [PATCH net] vlan: also check phy_driver ts_info for vlan's real device Date: Fri, 30 Mar 2018 08:21:21 -0700 Message-ID: <20180330152121.rmvdkjrqmhekasnh@localhost> References: <1522374240-18673-1-git-send-email-liuhangbin@gmail.com> <20180330150214.GF28244@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Hangbin Liu , netdev@vger.kernel.org, "David S. Miller" To: Andrew Lunn Return-path: Received: from mail-pf0-f173.google.com ([209.85.192.173]:42380 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751313AbeC3PVY (ORCPT ); Fri, 30 Mar 2018 11:21:24 -0400 Received: by mail-pf0-f173.google.com with SMTP id o16so195036pfk.9 for ; Fri, 30 Mar 2018 08:21:24 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20180330150214.GF28244@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Mar 30, 2018 at 05:02:14PM +0200, Andrew Lunn wrote: > Would it not be better to just call ethtool_get_ts_info() on the real > device? That would then also deal with the case that the 'real' device > is another virtual device stacked on top of a real device. That won't work. The returned 'ethtool_ts_info' is on the stack of ethtool_get_ts_info(). Both the top level and the inner call to will call copy_to_user(), but the top level will clobber the correct result with zeros. Thanks, Richard