From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9CBF2900A3 for ; Tue, 17 Jun 2025 08:49:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.71 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750150174; cv=none; b=ShyX6SIIctKJXvlMs0NAulnWHgkfq6yX7f73G7Jxr5MRpwMbm3cuXzM+NQom4UDwiusodHE7owGYNZGrkl760EnTZSbakGob0hWj0YmyNffuBZ3LMAcfIGDnMs0zUMwX3jSdTj+GQl67VaMJiVzzxRu/R485C2ICG09JS3zWB4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750150174; c=relaxed/simple; bh=Zb0FAtKn57hylXZbbwWlQKoYiVchTs5O181iCBXBun0=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To:Cc: Content-Type; b=ZqKOM35GOznYGcxWwD7VRcrGf0TIRuMtH4Xk1gTjAJhiqHOVnUTrFTKNVuRC9fBU/QbFUJFMbsREYgV7ik/hmuIzPrWSHa2lUcJHlSjbRoBGu2CExv3VcfS/odt+RGOymjNpT7DMpMxx1XkEc1eCAUp2hzBu7oS23jDwz8vZito= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-io1-f71.google.com with SMTP id ca18e2360f4ac-8760733a107so15674039f.3 for ; Tue, 17 Jun 2025 01:49:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750150170; x=1750754970; h=cc:to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=W442XvOuTnKTzRsQQgphpGuH6koS5hmx6kx/lqAmOV8=; b=s8kueyrWc2N5aExkmtY5VkYQHzprJr0SbD2Gon6E6uW8GjzBbfyqCj8QXNBd1PQkDG H8rLn+Et7Rz/H31zXKP4Ao3ksUXCVPEeZ3OK4A1E8YLlKxRb41x6jGU133KGCio7xaNL qBb8EsaM4ae5dk+lsj3RGa6u823POg2qeH0V5ntf+CxPhd6A7+xrlP3ngkL/D6rtZaPN DnA87dXEf8c6TslNU4pZer/TnP5XhGKl9HAZjgfVbpKboh6OYMHb7NifJV8EJTBcricp AT6GCYNSNyag+iA6Gi8ZalJ6nmxFe6Qf5Nck6B+pT7cDvJL9zFHZbmohUSLzjPWeVfOM E5Dw== X-Forwarded-Encrypted: i=1; AJvYcCUEjgdavgMpeDaefEjYQdjprA/PjT8RNBC+qaiO64bAY03yZkNuDfjt+CgOirI8kZoxpciRJU9+gUia2ZCn9A==@vger.kernel.org X-Gm-Message-State: AOJu0Yw9bq3WTwY/ynGQWP8VDkR2WkRtxjWPC1FJUoMAhkmM2bpwg3M4 GhwRnf79OQcLyjmMjdIT2RtfS0PUQP0qYYYK1W0C6wGONjIoC+h03CEZ2OsE1ZCpg70YeCM+pgc q47+QrKpR3nmJJD7qphXecjpAunP8RZE4g+0JD8inQL9sWnfC5h+TctgWCjw= X-Google-Smtp-Source: AGHT+IH6WvyrPmIsphA2ItSpqKp/VTGU1MvxzsrVG8XGfyO74fU2hn5rRpupa20aBnADK6oXp38aqdv2pIOK5y3ygfPYOsdTYRXJ Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6e02:3289:b0:3dd:c4ed:39c0 with SMTP id e9e14a558f8ab-3de07c4c2eamr149344515ab.1.1750150169937; Tue, 17 Jun 2025 01:49:29 -0700 (PDT) Date: Tue, 17 Jun 2025 01:49:29 -0700 In-Reply-To: <20250617104902.146e10919be1.I85f352ca4a2dce6f556e5ff45ceaa5f3769cb5ce@changeid> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <68512c19.050a0220.2608ac.0013.GAE@google.com> Subject: Re: [PATCH wireless] wifi: mac80211: don't WARN for late channel/color switch From: syzbot To: johannes@sipsolutions.net Cc: johannes.berg@intel.com, johannes@sipsolutions.net, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" > From: Johannes Berg > > There's really no value in the WARN stack trace etc., the reason > for this happening isn't directly related to the calling function > anyway. Also, syzbot has been observing it constantly, and there's > no way we can resolve it there - those systems are just slow. > > Instead print an error message (once) and add a comment about what > really causes this message. > > Reported-by: syzbot+468656785707b0e995df@syzkaller.appspotmail.com > Reported-by: syzbot+18c783c5cf6a781e3e2c@syzkaller.appspotmail.com > Reported-by: syzbot+d5924d5cffddfccab68e@syzkaller.appspotmail.com > Reported-by: syzbot+7d73d99525d1ff7752ef@syzkaller.appspotmail.com > Reported-by: syzbot+8e6e002c74d1927edaf5@syzkaller.appspotmail.com > Reported-by: syzbot+97254a3b10c541879a65@syzkaller.appspotmail.com > Reported-by: syzbot+dfd1fd46a1960ad9c6ec@syzkaller.appspotmail.com > Reported-by: syzbot+85e0b8d12d9ca877d806@syzkaller.appspotmail.com > Signed-off-by: Johannes Berg > --- > #syz test This crash does not have a reproducer. I cannot test it. > --- > net/mac80211/debug.h | 5 ++++- > net/mac80211/tx.c | 29 +++++++++++++++++++++-------- > 2 files changed, 25 insertions(+), 9 deletions(-) > > diff --git a/net/mac80211/debug.h b/net/mac80211/debug.h > index 5b81998cb0c9..ef7c1a68d88d 100644 > --- a/net/mac80211/debug.h > +++ b/net/mac80211/debug.h > @@ -1,10 +1,11 @@ > /* SPDX-License-Identifier: GPL-2.0 */ > /* > * Portions > - * Copyright (C) 2022 - 2024 Intel Corporation > + * Copyright (C) 2022 - 2025 Intel Corporation > */ > #ifndef __MAC80211_DEBUG_H > #define __MAC80211_DEBUG_H > +#include > #include > > #ifdef CONFIG_MAC80211_OCB_DEBUG > @@ -152,6 +153,8 @@ do { \ > else \ > _sdata_err((link)->sdata, fmt, ##__VA_ARGS__); \ > } while (0) > +#define link_err_once(link, fmt, ...) \ > + DO_ONCE_LITE(link_err, link, fmt, ##__VA_ARGS__) > #define link_id_info(sdata, link_id, fmt, ...) \ > do { \ > if (ieee80211_vif_is_mld(&sdata->vif)) \ > diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c > index d8d4f3d7d7f2..d58b80813bdd 100644 > --- a/net/mac80211/tx.c > +++ b/net/mac80211/tx.c > @@ -5,7 +5,7 @@ > * Copyright 2006-2007 Jiri Benc > * Copyright 2007 Johannes Berg > * Copyright 2013-2014 Intel Mobile Communications GmbH > - * Copyright (C) 2018-2024 Intel Corporation > + * Copyright (C) 2018-2025 Intel Corporation > * > * Transmit and frame generation functions. > */ > @@ -5016,12 +5016,25 @@ static void ieee80211_set_beacon_cntdwn(struct ieee80211_sub_if_data *sdata, > } > } > > -static u8 __ieee80211_beacon_update_cntdwn(struct beacon_data *beacon) > +static u8 __ieee80211_beacon_update_cntdwn(struct ieee80211_link_data *link, > + struct beacon_data *beacon) > { > - beacon->cntdwn_current_counter--; > + if (beacon->cntdwn_current_counter == 1) { > + /* > + * Channel switch handling is done by a worker thread while > + * beacons get pulled from hardware timers. It's therefore > + * possible that software threads are slow enough to not be > + * able to complete CSA handling in a single beacon interval, > + * in which case we get here. There isn't much to do about > + * it, other than letting the user know that the AP isn't > + * behaving correctly. > + */ > + link_err_once(link, > + "beacon TX faster than countdown (channel/color switch) completion\n"); > + return 0; > + } > > - /* the counter should never reach 0 */ > - WARN_ON_ONCE(!beacon->cntdwn_current_counter); > + beacon->cntdwn_current_counter--; > > return beacon->cntdwn_current_counter; > } > @@ -5052,7 +5065,7 @@ u8 ieee80211_beacon_update_cntdwn(struct ieee80211_vif *vif, unsigned int link_i > if (!beacon) > goto unlock; > > - count = __ieee80211_beacon_update_cntdwn(beacon); > + count = __ieee80211_beacon_update_cntdwn(link, beacon); > > unlock: > rcu_read_unlock(); > @@ -5450,7 +5463,7 @@ __ieee80211_beacon_get(struct ieee80211_hw *hw, > > if (beacon->cntdwn_counter_offsets[0]) { > if (!is_template) > - __ieee80211_beacon_update_cntdwn(beacon); > + __ieee80211_beacon_update_cntdwn(link, beacon); > > ieee80211_set_beacon_cntdwn(sdata, beacon, link); > } > @@ -5482,7 +5495,7 @@ __ieee80211_beacon_get(struct ieee80211_hw *hw, > * for now we leave it consistent with overall > * mac80211's behavior. > */ > - __ieee80211_beacon_update_cntdwn(beacon); > + __ieee80211_beacon_update_cntdwn(link, beacon); > > ieee80211_set_beacon_cntdwn(sdata, beacon, link); > } > -- > 2.49.0 >