Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp442471iog; Mon, 13 Jun 2022 06:05:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzekbpusHbsv0tNkaOaH4TiTWKYgmpxGoJYS28Bp0A+TiUOTO+V+brv52DbOFh9Jf914C/e X-Received: by 2002:a17:903:1c8:b0:167:67ff:323d with SMTP id e8-20020a17090301c800b0016767ff323dmr43941078plh.22.1655125556212; Mon, 13 Jun 2022 06:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125556; cv=none; d=google.com; s=arc-20160816; b=lziq7yYX8rphc0a5xKBOgD/KHaH/MKzsE1gxub0iWCm4gnDBHEpysgckbhMFAGX9yL 63oZIQIGvnitmE4mx9plwStPrmuZNGmsxDa243VxYpFMGw7ogqvNT/h5JW6n+7xx8Jo4 Ei42IAo64TbjsG6mAzSfPTwyFWUO4OPisGfal6AXIkTCHr++a8v3X2BLQD8VSp8Y/AIq 58OiiAnC47qfJ3KgpAQdnARdH81MgvWDWutZ2hUOsvZ7sfB6BHdl2KOlEWAed2JUPx0q CyjQtipiwWdsxi/chFZnIfhRUlJ/hDc6IE/ONzXAMqYEaHjlIH2fFdBFcWt1hAZSM6Tw TXig== 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=0jozMw1QMwIrcYu8JMW5c9ivebkXQ9EdNFecL/dXviM=; b=Dos5TfUXDq833G5sTTgJMxKS7SMNLZjq08FUWtBSR6R2AcrY01xeYtmZfRJA7o6la9 fGiPB7AZmkpbsKdvM1kWeeJtTsc+KNm7MqTXeCex11pN7XAsRN7zp80I5tGfvcaNGDrs +2pyDPv/ZsFLENLfgW2iOOS4FDGhwO3/+TlMSolt/NT2ley95n3esuCwhzGzuCP/zP1b DwpSINsYFprQvMTlk1ItvPAxzD/9fgTXJO0m7RzQxPQjXfu/dgxq38U+t5FPbvXNTmOW EmZCzGU+LeVhqZ4FL/Lm5jAttaU5RV4KOoa3XyG1Qi5brws3z06rIA5CfdGVvl8VJuO5 5XJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="apSgV/VF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h5-20020a63f905000000b00401ae0f4a06si9283180pgi.577.2022.06.13.06.05.39; Mon, 13 Jun 2022 06:05:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="apSgV/VF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1351080AbiFMLDF (ORCPT + 99 others); Mon, 13 Jun 2022 07:03:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350443AbiFMKyx (ORCPT ); Mon, 13 Jun 2022 06:54:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B71E320F6B; Mon, 13 Jun 2022 03:31:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 55BB160B8B; Mon, 13 Jun 2022 10:31:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D152C34114; Mon, 13 Jun 2022 10:31:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655116289; bh=hqCtAb/WgSm7rzufedKllC993dM4mSQ0Ss6AEyB21jo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=apSgV/VFbgdxN5e5/iBxn73TnXSa1TlEZwQi8L6Sg38HXwoyMSsAIWpaeA9rSOJ9x woMGI4Kno2EJx3ssYdpfAVGI9nrvtugPAb5zu/yGzUrxZsKugzyI2EMjvUTZ6AvWgm gX/Ulgj2mef8MxXN/pBh/LNRNNoV18eZii7vRYT0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzkaller , Dongliang Mu , Kalle Valo , Sasha Levin Subject: [PATCH 5.4 049/411] rtlwifi: Use pr_warn instead of WARN_ONCE Date: Mon, 13 Jun 2022 12:05:22 +0200 Message-Id: <20220613094929.982180231@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dongliang Mu [ Upstream commit ad732da434a2936128769216eddaece3b1af4588 ] This memory allocation failure can be triggered by fault injection or high pressure testing, resulting a WARN. Fix this by replacing WARN with pr_warn. Reported-by: syzkaller Signed-off-by: Dongliang Mu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220511014453.1621366-1-dzm91@hust.edu.cn Signed-off-by: Sasha Levin --- drivers/net/wireless/realtek/rtlwifi/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c index bad06939a247..9bcb187d37dc 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -1013,7 +1013,7 @@ int rtl_usb_probe(struct usb_interface *intf, hw = ieee80211_alloc_hw(sizeof(struct rtl_priv) + sizeof(struct rtl_usb_priv), &rtl_ops); if (!hw) { - WARN_ONCE(true, "rtl_usb: ieee80211 alloc failed\n"); + pr_warn("rtl_usb: ieee80211 alloc failed\n"); return -ENOMEM; } rtlpriv = hw->priv; -- 2.35.1