Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3253415lqo; Wed, 15 May 2024 04:34:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUjwn6JN76PlzVv1j6Kx6+0C1H1UdoBok76ZkrAlJ3YxQuLb6TvlW5AGGnb/i+kB026+8a6EvMFlI+OScB7jHv7PKXn9ndNmiSXChMykQ== X-Google-Smtp-Source: AGHT+IG71XnMHb7AdX/jLeh7olQgvtNJIpnMqNa1D4tHZ3qh9EPnlKvrlteB/fTCDVvJ0XGc7jV3 X-Received: by 2002:a50:baeb:0:b0:56e:2ebc:5c4 with SMTP id 4fb4d7f45d1cf-5734d5ceae0mr10889307a12.20.1715772897900; Wed, 15 May 2024 04:34:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715772897; cv=pass; d=google.com; s=arc-20160816; b=J15pD9zQ9PvnPLwZWz1zvmcfYrqcy4y+1JmFPaODugmrW8HJllWnaF1snhsGT5g5XD N0wx0+o1BfzG4Wk9h3aZxxCL+1CCoCN+9QjOv3cWVb9DvTFKS0rq1g6tT8O+LK9Ubl5+ a5HT+CddNzOiRpZH/UD5DFhdbQX4qvYZW914+9DPqJW8H5nCCi1lWE0oQu8yrH/2+ao+ fhEPz/exAK+USwT6jIlkkX2GrNa/UTrtxUpTu0VCgIiI/QKx0ANjsTpQJyog+hfxJgaW 70W2EbGWJghzcdarOJz/kU3kZXouMe2IxP/W5nFu9OBzzZgsAvliugJgkvy3PcDA54nU hbnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Ky26idQRhunGw7aElTq0VpoXitSVxuHab5pSmfrr8PU=; fh=+TvQnmqVkW6zYxNNBsFZbZpK4xozuFXapJx1K15XzHk=; b=oU7sehvGl3dmWJ7yyF+57eZ798z848tkzAAHKwLtlFmhRNdVZWp2klng38bxvHMNrP In5070sdEXGCxapkVsrVIjQdXUc0MUVOJJze+1RH56RJ2e0gpMmn1tNDUyxHRCqpS07e Fol/5qRHnGfmKCMz0ZN7kz0YvGGiBu9rQ1jmzspJKUUtNSf5UUDHBkwU9mxfAqu3ladT MMp+liu2tVrZfmE/DK5HTSSu3mcPj1zvO7pTcyVWXGwCymwlP9dIT9R0uSFo0AG0q1tv 6UltJBgBJv0AZdeE9C1q+iXHVAjECV4lI4Uo5hTEXspZX1q+Ltw+IzfnMCn730oYL1Dv u0yw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=Fi5qQQa+; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-7682-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7682-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c37825asi7698294a12.645.2024.05.15.04.34.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 04:34:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7682-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=Fi5qQQa+; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-7682-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7682-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 22C6D1F2495C for ; Wed, 15 May 2024 11:34:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FCE66EB5B; Wed, 15 May 2024 11:34:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="Fi5qQQa+" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 AEC046D1B9 for ; Wed, 15 May 2024 11:34:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715772863; cv=none; b=OvAchDZHxjMhiF1Dp7KcxLI6nvqJPAeXlaZ5ljRb0eKEvFlxUCh5z+yYchi+idXL9LDpdXtGsiTpOQo2aFO3S5MLwTYoAdCWI72paEVvIVMylX2vsfc5RVhVHtGay5g3Tn0mNhOFHiz2ih7Zjkh+gPG2qBF9fuFqia+EjZD94E0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715772863; c=relaxed/simple; bh=NNae1xFyNrQKxs1BchZjjOAmPsAKlMlez7WxglOU9xE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UEPIkhSp4+liRus7GMiZf7B/4GX9XxqV3/OegB6Y20fkemVFosULiQPHot7fahZC5P+XP49af5St5ypOcDlqxcFqWf9222I2Thfuhtf0jZZC0YlT4FmRktbTTqUIqumPyOXQJ7rv3bQgRqB5M4s82FA5XSlfeNTTX1F5ctaVMDo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=Fi5qQQa+; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=Ky26idQRhunGw7aElTq0VpoXitSVxuHab5pSmfrr8PU=; t=1715772861; x=1716982461; b=Fi5qQQa+aMl5F2xKBBjJwwe+1lrS6QznL8uULFL16GwNz32FoqdKMSAWfCVH5YjPk0F0/eWT58q zCs3V11CaLx73V4jWwPqs/QaxgY5g3LJcmd7YJ8qN7yS18+ZTFE8Zmfu5/Zk6yrnbb6uFmKOcDrT7 w8BnJRSBAKUIyCFGZqtLfdjxqWf28cuMjvVmvMPtBTbp/lYvHyiUh6pNrGBwcILdRzkq3vtEud7zg Q7vLEbvzT9RzHtqs97y1W/asFZ9LQWS19ZAEj4LeV0zjmm8KoE5K+fv3T9iXujKh+uBsiB2MKQ2cs izNFVJETwj5zSSY+TF0tDyoAJkREanQh9qMg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1s7Ctg-00000006Mj3-3jIS; Wed, 15 May 2024 13:34:13 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , syzbot+de87c09cc7b964ea2e23@syzkaller.appspotmail.com Subject: [PATCH] wifi: mac80211: apply mcast rate only if interface is up Date: Wed, 15 May 2024 13:34:10 +0200 Message-ID: <20240515133410.d6cffe5756cc.I47b624a317e62bdb4609ff7fa79403c0c444d32d@changeid> X-Mailer: git-send-email 2.45.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Johannes Berg If the interface isn't enabled, don't apply multicast rate changes immediately. Reported-by: syzbot+de87c09cc7b964ea2e23@syzkaller.appspotmail.com Signed-off-by: Johannes Berg --- net/mac80211/cfg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index b08e5d7687e3..99abbb9e8477 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2958,8 +2958,9 @@ static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev, memcpy(sdata->vif.bss_conf.mcast_rate, rate, sizeof(int) * NUM_NL80211_BANDS); - ieee80211_link_info_change_notify(sdata, &sdata->deflink, - BSS_CHANGED_MCAST_RATE); + if (ieee80211_sdata_running(sdata)) + ieee80211_link_info_change_notify(sdata, &sdata->deflink, + BSS_CHANGED_MCAST_RATE); return 0; } -- 2.45.0