Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp55985pxk; Thu, 10 Sep 2020 23:36:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwghNAgvYm0XKyPME7STlq+Z7S3FCLQrtC43+QHAiVSObLrag5fAnLgTB7I74hf4/olmOo4 X-Received: by 2002:a17:906:e918:: with SMTP id ju24mr590592ejb.442.1599806168041; Thu, 10 Sep 2020 23:36:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599806168; cv=none; d=google.com; s=arc-20160816; b=NHrmrZ7ku4XuQRzLVoHo+hlPA851imm6xaPzO9iE3gk/pOYHLfkX16i/puibijH3IU fcOyV7p64SsX2CsjU1LMY5irj4feGhhqptcqhy5GRdYYZ3d6UyGQY/R1Cvpm3O0yub6l M1sD718IuEZpqSy7/5m+M5YjYtQOtKKkDJbKclxgwi7BapjZdIwFnQ6Eih3rh3YItvqz EJ/okdjfQl+HSiyEaBNRvGZdE5ohJz4IQZDY04zz0jltALoaE7cSFA5JI6czmYQubda1 V+dqSA3BRWbVLLDUVIFqvq6sSvyGFtZOY3isvkGZe+iK9kzSU6xxgvcFIaEPGn6F4fOO 4mew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=ndHZtUig8ulrxjgOeUro9f64fpE4pGFrMYQ9ez5zwFQ=; b=FR7dboBzvU52AcKF6OI75s6QuhcB3rXobmnP2NYipG81XHMhCHCFMd9sLCuOcnWdok 9JdNLvvO38iPjk+JBWgJ0IIXhMIN0WJMXom3m1+mQar/7kSyZeNWVNZnqLQQMKeK/60X Gc6FspWvfkFUpXIfG6TkN2Flgl85Rk+ELwxBeRB2WQmitdeXlC9pq7hpYJ7BP8Saz7Yn hSnVANsyv8dYFk4tVP1Jc+piHn0J482JzO/NyHqvdlgk+DzS1gqjLj7PnlgcGxcqWzVl Z9VmaTKjOc9rglzWs29XmMKsELZrBaAOydowkmhENCXSmCqzCYdTtZvaJEh1X32rDPuR tr9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lt3si667132ejb.687.2020.09.10.23.35.43; Thu, 10 Sep 2020 23:36:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725747AbgIKGdJ (ORCPT + 99 others); Fri, 11 Sep 2020 02:33:09 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:38523 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgIKGdI (ORCPT ); Fri, 11 Sep 2020 02:33:08 -0400 Received: by mail-ot1-f67.google.com with SMTP id y5so7482118otg.5; Thu, 10 Sep 2020 23:33:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ndHZtUig8ulrxjgOeUro9f64fpE4pGFrMYQ9ez5zwFQ=; b=uDG2mh81U21qPOKyiCzeRDeSkqmms65goCMMH+MXHmRUKDHGZ/vxudO3aG6nU3Y5Lx GKzdEXs1nG08VORRHFAlQQlfoVy+5SEjcn3HJxmW3ciK+G70MYNK3FOfK1prui+sindV gLd81nIMKlbRU4NrALrOCWPOpy50YTvmCzW98HubaVZRy3R3RXPTGUQ8ku9hagWEkOLB xdbketmDxO8T+pHldyLl5+yLJLQfgMUucdIA35+/vr1pFkM2KWexeNSD+V1Ikhj9BZWv sMVeP9XiF6l9o7BIMOlyQria0s6McaQpnegBnt4BSLE16xTFlQ04+5Tzop4Bmb4E9xvy 0HNQ== X-Gm-Message-State: AOAM533lHedLKEJybjBbC8L08p8PF+imiXWfR+44Nc6SCwiyL8CEh0v7 32Is0w/W297UifA4y4ZGCxnZNUgRibsUa3kestU= X-Received: by 2002:a9d:5a92:: with SMTP id w18mr294713oth.145.1599805987300; Thu, 10 Sep 2020 23:33:07 -0700 (PDT) MIME-Version: 1.0 References: <20200901150237.15302-1-geert+renesas@glider.be> <20200910.122033.2205909020498878557.davem@davemloft.net> In-Reply-To: <20200910.122033.2205909020498878557.davem@davemloft.net> From: Geert Uytterhoeven Date: Fri, 11 Sep 2020 08:32:55 +0200 Message-ID: Subject: Re: [PATCH] Revert "net: linkwatch: add check for netdevice being present to linkwatch_do_dev" To: David Miller Cc: Heiner Kallweit , Florian Fainelli , Andrew Lunn , Jakub Kicinski , Gaku Inami , Yoshihiro Shimoda , netdev , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On Thu, Sep 10, 2020 at 9:20 PM David Miller wrote: > From: Geert Uytterhoeven > Date: Tue, 1 Sep 2020 17:02:37 +0200 > > > This reverts commit 124eee3f6955f7aa19b9e6ff5c9b6d37cb3d1e2c. > > > > Inami-san reported that this commit breaks bridge support in a Xen > > environment, and that reverting it fixes this. > > > > During system resume, bridge ports are no longer enabled, as that relies > > on the receipt of the NETDEV_CHANGE notification. This notification is > > not sent, as netdev_state_change() is no longer called. > > > > Note that the condition this commit intended to fix never existed > > upstream, as the patch triggering it and referenced in the commit was > > never applied upstream. Hence I can confirm s2ram on r8a73a4/ape6evm > > and sh73a0/kzm9g works fine before/after this revert. > > > > Reported-by Gaku Inami > > Signed-off-by: Geert Uytterhoeven > > Maybe you cannot reproduce it, but the problem is there and it still > looks very real to me. > > netdev_state_change() does two things: > > 1) Emit the NETDEV_CHANGE notification > > 2) Emit an rtmsg_ifinfo() netlink message, which in turn tries to access > the device statistics via ->ndo_get_stats*(). > > It is absolutely wrong to do #2 when netif_device_present() is false. > > So I cannot apply this patch as-is, sorry. Thanks a lot for looking into this! But doing #1 is still safe? That is the part that calls into the bridge code. So would moving the netif_device_present() check from linkwatch_do_dev() to netdev_state_change(), to prevent doing #2, be acceptable? Thanks again! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds