Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3815636pxv; Mon, 28 Jun 2021 13:38:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNMRFq7HL1RlJGd197K36VUNnJlRvR2j9PrnqhzS+1An1pQE7B3PlZ7me1/n1zw+uGtf1O X-Received: by 2002:a05:6e02:7:: with SMTP id h7mr14091652ilr.288.1624912728971; Mon, 28 Jun 2021 13:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624912728; cv=none; d=google.com; s=arc-20160816; b=vsqlOLNoodOANqrTwj85ATQEIPukaMaA00i7HDBMiLdEoobDiokqCvG33X09Ng7dwj urUxd31coH0alpj28kImWIZEcSN0o9q5s/AuDsUH41mrG61EBnalO6J3WpOcApg/X7H2 3Rk3V2TYID+KKDdDQqlVqtooxsAd1u2LObE4LODjqtkgBoe+GbodioCnqqeFtyVU1SFB WhJZWp7bdM0WMAgWE5rG5GKjSQDdFV0XX5E41rJsmwNlbylLbUCpkQu0pfPtyQG6KoDr do+QPNZv+ch/LbR72z0qy9ga2w2uLkyJoyrZci2G4i5UU8MNhR9rMiHAEr0wlT3nP9zQ OPKA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=q3WqRGaGrJqhw3OBKd5wEF15j8D+7w0PhYZMRyTTb6E=; b=zPHz8vqgbrluEZmNJJrFpUHsmAk4prc4B+ZmmGc8EsVqLHFIhz7qxDHdvSpz5AVcWd Bh/CC5wcBPFpbEJfKyJcJQj4FUkEFsoVc8VaiGX+eMfbHaD5OwVkDd/euPUjPqqeddHK uTDxM92l7lgAb54xS5a5+XN2u4ObClN9S+UAQYqG0O+eHToHjA9IZc2H1MyXg95F+o7m mYLl5mYsKsFu5Rlk8+SJPbLJye688ELY5GLvD19Nt8sJl4o+9GFCgRGmMsJdUKrhTHXx 4X/S0gL8NmTKGciqFrlKpyO6lXQY2b1N8X3FGFHbaHccaNGAhn1Vrj6HRCOL47Q9bgNL v02w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GnmSJvBL; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n6si17871384ilj.66.2021.06.28.13.38.35; Mon, 28 Jun 2021 13:38:48 -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=@kernel.org header.s=k20201202 header.b=GnmSJvBL; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238089AbhF1PPV (ORCPT + 99 others); Mon, 28 Jun 2021 11:15:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:33276 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233871AbhF1Ox5 (ORCPT ); Mon, 28 Jun 2021 10:53:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 049D561D42; Mon, 28 Jun 2021 14:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891052; bh=ZLPt8kxCyAWdk/ZTBZbdbecFoIKHELBBeps1J3oa41Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GnmSJvBLyY+JfvL/MFO6f4iD3Cm9Mu0/m2QExDJqo8J/8SIIiGxwuCG4pscVoWNYX dJS7UWw1wrZxWB5NZCIqSRmPydG/Ktg2BNsm6SVZueZbpC4Mgye4yNV+OYxF3FwmAb 65ZNhgW+x5Ixp/FYlkCvuLmz+1OhGeYuy9oL/JP68K4S0umpLvkuUbm9wlpCkVyrE/ p53SFZYZwl0sRw5uEFqgNe8W3dC81y6tC0Hp+VCruCd+vuAaeVIAIZslk43yymr9d1 o87r2d40p4+VrOlLqgxMBBPkjQeUNgy8xqHym6iRhMbAGMWQ5nz8FTIrR7/bymc5vc 84mJJuqBBWD6A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Johannes Berg , syzbot+7716dbc401d9a437890d@syzkaller.appspotmail.com, Sasha Levin Subject: [PATCH 4.14 72/88] mac80211: remove warning in ieee80211_get_sband() Date: Mon, 28 Jun 2021 10:36:12 -0400 Message-Id: <20210628143628.33342-73-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg [ Upstream commit 0ee4d55534f82a0624701d0bb9fc2304d4529086 ] Syzbot reports that it's possible to hit this from userspace, by trying to add a station before any other connection setup has been done. Instead of trying to catch this in some other way simply remove the warning, that will appropriately reject the call from userspace. Reported-by: syzbot+7716dbc401d9a437890d@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20210517164715.f537da276d17.Id05f40ec8761d6a8cc2df87f1aa09c651988a586@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/ieee80211_i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 790c771e8108..0d4f7258b243 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1393,7 +1393,7 @@ ieee80211_get_sband(struct ieee80211_sub_if_data *sdata) rcu_read_lock(); chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); - if (WARN_ON_ONCE(!chanctx_conf)) { + if (!chanctx_conf) { rcu_read_unlock(); return NULL; } -- 2.30.2