Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2142857iof; Tue, 7 Jun 2022 21:10:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZQvdcHLR0uSbmhhvG0xs+491o+J0hAYyD0Zz9c3TdL96FzNOBdcxdzQmdrvuj68T3XryU X-Received: by 2002:a17:902:aa4b:b0:164:11ad:af0f with SMTP id c11-20020a170902aa4b00b0016411adaf0fmr32502939plr.54.1654661450107; Tue, 07 Jun 2022 21:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654661450; cv=none; d=google.com; s=arc-20160816; b=sl8qTors3nAJN5cUtclP6z3P898vwTlWA6NWDtmpQRoHUjq6BBPULJDMlncJ8L5Ot4 ti86AuDYwnw2lDR63OFgu6/nlrIaxMZ+34hwcHbN62bdnplwp11j22qmir4kmHrNeKE0 4/8a1jOCaY9n+dlJUXpUTL45tGobk/ac012frkZGq2HGsxegQDr7b0lOJk3K5GM33FM9 ApMagC03zDhM4i1pXxdtE/1I7ZMfBU0WBIH0GZD0PeWDIaA1nka4nBJTIGUsqUiurp/5 DIONQ6OHeM2NERXqldrnm6al4ocgvMyFUjGk9+vdRpGRWcoJuJTQdcFFOQ+WIvBmjpHS htKA== 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=ukcFS6Y1IZGua2RV9lhj8O0wn0Pz2RVWkDf8O6z3se4=; b=X6HpCtTIBrekNeZhL/1Sb0HRyvrXbU4CXiEl95pHY3iWz+8K1ygRprH8yg0EA0zcgL aUjl6+Mh3pYIYLforxXJ0r0j7DmrCYIL3U8BGKRYwWOixnWeB+M+9UxcVPphAxP9v+U5 drVcgtOpFFkzXnqoO946YiYAWc/k8dKXqGNXC5PnD1P86Q/hXzHk25+vuOXvvvw/ov3J 8qYark8C/YgJa1Doqj/Iz/NgXe+TEqoT4nDLG0HmW8F56cwUWEq2rhIyxHb5ktM8Sbyc WTvb+GnXpioE8SNB8PXUDjCzImJCTUDriQTb7m4RoOlZcxpIXdU2FNEn2lngAqS3XK/w CcZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rgxIGMh9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p27-20020a631e5b000000b003fbfbf2615fsi27455258pgm.577.2022.06.07.21.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:10:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rgxIGMh9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 18348281844; Tue, 7 Jun 2022 20:42:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382150AbiFGWUB (ORCPT + 99 others); Tue, 7 Jun 2022 18:20:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378952AbiFGVOg (ORCPT ); Tue, 7 Jun 2022 17:14:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B4E821B111; Tue, 7 Jun 2022 11:54:38 -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 38386612F2; Tue, 7 Jun 2022 18:54:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 481A5C385A2; Tue, 7 Jun 2022 18:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628077; bh=KcMfdVrPS5sBaTos33sAmjiggMA4Goon5JHj92fmjP8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rgxIGMh9TBj+ecXphlvdYrQqpP35OkTYC4SvnvikoaiCwYd3ow5gPlf7vZ4HYM9BS QT/wBp0FDmMPW2W2peIgNowl/LIl7+92uLDXRnV28FWbC/Cx16PcxMDqkqmaNjdAgK PGCgKsUC2WW5dzkKaXR7w+ZLnKj4smXr3CmSwApM= 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.18 158/879] rtlwifi: Use pr_warn instead of WARN_ONCE Date: Tue, 7 Jun 2022 18:54:36 +0200 Message-Id: <20220607165007.292230291@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 86a236873254..a8eebafb9a7e 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -1014,7 +1014,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