Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3323737pxf; Mon, 15 Mar 2021 07:08:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsJM1OSL2GRC1fOj/0B0q/47LIW3rTzzcAK8zX75yNbaeiM2EM7q5c3J/OFwf4i4YCnVwr X-Received: by 2002:a17:906:4f02:: with SMTP id t2mr23698885eju.121.1615817329123; Mon, 15 Mar 2021 07:08:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817329; cv=none; d=google.com; s=arc-20160816; b=IojHFpenfFWKTsAeZVvQiIwvneh95x0losdYzhLnAUlpVa9uonHPfMIdTTfhO9lvsT Mj4EvKLQpoZGLW8ldkINoAQdo/p7yc/JDy8a2sRJ880fGZfyjMoSh5layPpzkb8YtqCu vzJGMGftB71r6gWV+Ets7YbxqWCMj7dpRqNlSSPIAvniu8bsNTa7xs+mIwYxZrkqOG6x yXlfG4yj5qMJcAtxmwRr157INgfw55JTE6d84NX6yE4Rl57J1kNwNy3Etzje3tR6MvH8 MuUkOb64ufq/6Ex9bT01ufEhSMQ5Ursywk/kwXqXD2EdYaTyAowuTKlJ1aOA4CChrWng u3kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XMTeZX1OTclQ+qbHQrq0bdqWYtobNhQN9vEXk+f1SAs=; b=yrCQWCDvxtKCBTn+DAL4NiJrbjQzPzN1Mnf1ok3nl0S+eCvW/PHiJBbrbO3X6kpbDC issFW9phY27ISBFT3Li1BRDL7WHirFLz/jRtt1iYr5a/VIVA3brPhPv4qp8ziFzK5Rcx 7kwcBqjUX4nLqXioENPKsTeJdca/V2Duw9HLlTpvVdpUB/44UTwtESkmSpzYmUwP25Af C/OprjWF8rqzWU965nc42SIqrQIMyQQBqCYKiNfywagraGYDNjGtcL8zt/dtnDYIrWpF TCtFtb99zB/lssrVn+uOqsAlC+fVZ1A0jNIzwMfXDUAIy0UHnScMhHaQ8ISWXhuH0iLm V2bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S9ye3SZc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si10554188ejd.543.2021.03.15.07.08.25; Mon, 15 Mar 2021 07:08:49 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S9ye3SZc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234903AbhCOOGW (ORCPT + 99 others); Mon, 15 Mar 2021 10:06:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:35420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232056AbhCON5l (ORCPT ); Mon, 15 Mar 2021 09:57:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4170264F18; Mon, 15 Mar 2021 13:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816660; bh=mKJZjhQv1yzUxkCoiUJBVMYoChuA3YOPhKW/1WDUzLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S9ye3SZc4t451LazKGUg+oHppIbpApHddsb3GkzFQeHlch8nj8JimlpOyx2uOBdx2 wU6c9dsoMuO9sahiKQIm0wDqj4gLgr2hddiySIBfsl3VFmtv2kga1t/mMGgAVVeCGj vwp6zG3iqEoZu5Z5XUpJq7A/SfFa3cLW5q4L7oqo= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aleksander Morgado , Daniele Palmas , =?UTF-8?q?Bj=C3=B8rn=20Mork?= , "David S. Miller" Subject: [PATCH 5.4 031/168] net: usb: qmi_wwan: allow qmimux add/del with master up Date: Mon, 15 Mar 2021 14:54:23 +0100 Message-Id: <20210315135551.375574967@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Daniele Palmas commit 6c59cff38e66584ae3ac6c2f0cbd8d039c710ba7 upstream. There's no reason for preventing the creation and removal of qmimux network interfaces when the underlying interface is up. This makes qmi_wwan mux implementation more similar to the rmnet one, simplifying userspace management of the same logical interfaces. Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support") Reported-by: Aleksander Morgado Signed-off-by: Daniele Palmas Acked-by: Bjørn Mork Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/usb/qmi_wwan.c | 14 -------------- 1 file changed, 14 deletions(-) --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -441,13 +441,6 @@ static ssize_t add_mux_store(struct devi goto err; } - /* we don't want to modify a running netdev */ - if (netif_running(dev->net)) { - netdev_err(dev->net, "Cannot change a running device\n"); - ret = -EBUSY; - goto err; - } - ret = qmimux_register_device(dev->net, mux_id); if (!ret) { info->flags |= QMI_WWAN_FLAG_MUX; @@ -477,13 +470,6 @@ static ssize_t del_mux_store(struct devi if (!rtnl_trylock()) return restart_syscall(); - /* we don't want to modify a running netdev */ - if (netif_running(dev->net)) { - netdev_err(dev->net, "Cannot change a running device\n"); - ret = -EBUSY; - goto err; - } - del_dev = qmimux_find_dev(dev, mux_id); if (!del_dev) { netdev_err(dev->net, "mux_id not present\n");