From patchwork Thu Jul 22 18:21:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 483931 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp596039jao; Thu, 22 Jul 2021 11:10:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybsN4JZu/sP/w5Xmng9wJW8Gqp4gJgWd0+YPxWGbKCsnofZdCP4HkO9oWOwWn8oCM73vob X-Received: by 2002:a05:6402:951:: with SMTP id h17mr1059481edz.198.1626977442968; Thu, 22 Jul 2021 11:10:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626977442; cv=none; d=google.com; s=arc-20160816; b=z+Orui0DnTWaJI/cb6LtlhtZgpwY5OdfXXX02T04R7WtApm6lNp0nB7h0Tetu0ROoz lCvk2JlfWvS0e8qz6DX1enVsZQAN9k7v7P6xm80sZ38scLptI88XVvdVqO6/AJ9hoywi ELi9dXye6SIZJXPgYY7A807zoABeNbmfSJ7w8Zp8waQUoiG9bUqKd+dfNAsTefMm0FR5 3aUuyYfHkEBXm3GuwzkK/LDCNIs2E4rXhOk7zKMOsl0hrS+3Nw84jgJbtQso1mFixJOI U7D2ApI6njXTDwU7DGuXRzlrWwk6uGiDU679ZR+Dg7O+/OX8lBgYrbJ0AbDWeiB6jgGY ix4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=ePG+wUWFKV4MneEDFhxnLHUQf4MdfW7eykx/Xqx/8zw=; b=UBZ8Lx85eJhiv06wwFmkAv7co7gtleQD5BC0zdrjlK2U1DN4DvDIoQ0nBsn1kKESoT +s7kMEYauRhqijcZqVagsK/mJon42rL+Tonpju8vbg4c0ZhGAM5fIsSMidDBVv8z5+VC HJLzuWm6MRMQNh6p8dkuHGd55yhxa4ideZifVdR73W+fQzgAhjz2ID350ydB3KjB7GqN TjfzH67FtT5DjQWlk1BvmLnuS1RhftQ7luUNtAeyb8+nYGj1tfrdyYtqjbB6tw+M4Ecy 1S4ZZD5CcyodWae/rksZdq2NS8CMnwNxU/iAXLylvn8kBa+Iyji5Q+IGt/wYv95rheuc r2/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hPkYuV8O; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si16734217edx.26.2021.07.22.11.10.41; Thu, 22 Jul 2021 11:10:42 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hPkYuV8O; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229737AbhGVRaF (ORCPT + 12 others); Thu, 22 Jul 2021 13:30:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbhGVRaF (ORCPT ); Thu, 22 Jul 2021 13:30:05 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD098C061575 for ; Thu, 22 Jul 2021 11:10:39 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id f17so6866131wrt.6 for ; Thu, 22 Jul 2021 11:10:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ePG+wUWFKV4MneEDFhxnLHUQf4MdfW7eykx/Xqx/8zw=; b=hPkYuV8Oogk8ZL5wms8EaEdZnvHLkb9Vb1yXF00AtxJS+VbnYAmTSmP856xePRYK2f mSCj3VrNTY5BDwcdEHjn/eHIWpYm42sy+nQSvZUmkHMTad+8tJpUE8fRBx3oI40T1qIC 8asgrfvpfKZJP9s2Zd/O9sOqyjcyjbP4eUXo6yg3ANen2UbCd1NkGuMitWfHxIZ96mss UmpYduTIucMq8WmNRS7sWC5Wd5hSHQtcKWdQo1gztSIoMl/O4fW9RpNY6ZJ1azx8ZIAd V6KpMZ3k/Mz2YWeNblDCemX3yiGx3aTP3GfWB8nEYycDtUBYq1t28Z9/8mpUuJnHkdDK L68A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ePG+wUWFKV4MneEDFhxnLHUQf4MdfW7eykx/Xqx/8zw=; b=Ku11MBj1//NHuhZ8uP3hnhXNNxzS+nQkUfDhM17NjVBmhlDKEYX00mriEWDdHj8WDf 2H0HcZw4rvixHHwhUiT31gp6ZiqMeCa9Qtn6Dgo0Umq5m8iF0QAT9tVAeUI79S/K6lph quS1BpnZc1hrp6v34VE6PdYrHJq+XUfpLhbB37L2bv8ZmwnbZenmxxy+qqJmZSSXG6gB 7jEXLS/gzgAurWmxoPirr5YPsJFemA9+vFJXWYAZDoUL5/oOIuT6AyAmQOWmCMJYHp0w WRMdtPrZwUIKz9wcEKinaaHMSXbsx/4FmI8nEs4ox1fcSsSbNZLgCTBcTdEBm53DBOFQ zt4w== X-Gm-Message-State: AOAM532Ez8otBAzIUf7aWIpEQHl4VC67SJlxbQrtbA8BeQp8D8WVyBPq 7tOpAiSRO8piFzaWt/qwGO4XKQ== X-Received: by 2002:adf:f74f:: with SMTP id z15mr1269983wrp.54.1626977438148; Thu, 22 Jul 2021 11:10:38 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:82c:5f0:69b5:b274:5cfc:ef2]) by smtp.gmail.com with ESMTPSA id b16sm30761779wrw.46.2021.07.22.11.10.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jul 2021 11:10:37 -0700 (PDT) From: Loic Poulain To: davem@davemloft.net, kuba@kernel.org Cc: johannes@sipsolutions.net, netdev@vger.kernel.org, ryazanov.s.a@gmail.com, Loic Poulain , stable@vger.kernel.org Subject: [PATCH] wwan: core: Fix missing RTM_NEWLINK event for default link Date: Thu, 22 Jul 2021 20:21:05 +0200 Message-Id: <1626978065-5239-1-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org A wwan link created via the wwan_create_default_link procedure is never notified to the user (RTM_NEWLINK), causing issues with user tools relying on such event to track network links (NetworkManager). This is because the procedure misses a call to rtnl_configure_link(), which sets the link as initialized and notifies the new link (cf proper usage in __rtnl_newlink()). Cc: stable@vger.kernel.org Fixes: ca374290aaad ("wwan: core: support default netdev creation") Suggested-by: Sergey Ryazanov Signed-off-by: Loic Poulain --- drivers/net/wwan/wwan_core.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 Acked-by: Sergey Ryazanov diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c index 3e16c31..674a81d 100644 --- a/drivers/net/wwan/wwan_core.c +++ b/drivers/net/wwan/wwan_core.c @@ -984,6 +984,8 @@ static void wwan_create_default_link(struct wwan_device *wwandev, goto unlock; } + rtnl_configure_link(dev, NULL); /* Link initialized, notify new link */ + unlock: rtnl_unlock();