Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2178850iof; Tue, 7 Jun 2022 22:20:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu8afAqtRJ+8e/l+8uWORJXNfCVN8e4SKWZbKntkAuemZpZ8VE2u3ROMJwmAmk+ZErpVTH X-Received: by 2002:a63:1422:0:b0:3fc:5a4e:d68 with SMTP id u34-20020a631422000000b003fc5a4e0d68mr28033479pgl.418.1654665600430; Tue, 07 Jun 2022 22:20:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654665600; cv=none; d=google.com; s=arc-20160816; b=xbYvU3AD+CNJzBvoSflsT3bssq0hqdO61wRDE74OwdyeFxWZvzXkOhZ1+BLYTdAs3+ cImJzfmLyG2DKMDWTo4EAAccQ08+8EG/j5fOYi/AhNvd54AOsgUihXrpj625ii02sbRK KhLRm5Qzu/a++hXysxL+Yz4eG11XMe1yKwZ1T7BNFXlY40/xzHMxGqdfBa0apUQ6cEEi cusDYVdAGG/UydShE7/yveVj7oqjLWBDe70OBRS5d6Gtl1htOZG59WUG0rLG0AFzXo00 8tIsdlGM2NrijOXidnPe1hCHPr7Gl6Su8q6g3qHw7YjSvkcMptIzWVesvEpxlkcCs2ze dv0Q== 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=eQwY8xvQ3ojmTozvNsdxixCAJESSewdvfHgw8Zo+JJo=; b=LdSLn6B3IKKqmxXcKYaARkhILtT6LXPy9wbAnSe39BTH3hrfPQhs9gCQZeEfVnLBsC mRkbdgdRB2RhiKMJ15WRyJy/EIpadx0kv5vP4hHb/7mkHPzZJnR6ZN0Y+BJqjpE0bxib AbpuAEgpLWWKo0/gzKuqeAetutd6ZhIjd1ENU3k3EYOjcaeqgjSnoNR3lusAM89h2pd/ XmMa5vQFGOHOGoffgKzSg1p9dnbBth8x3vZQhu/s5/iUWzIfDVFeWq8PhadOyDF7CdiT yT32Wdpr01mZZ8THgHHMfOHFeTeTQi3hfVPZx4/JOOGkLYRcxeAPrRxrJ3mZFtervkHY /0Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jQDs9J5R; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id g191-20020a636bc8000000b003c233469c0asi26428192pgc.745.2022.06.07.22.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:20:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jQDs9J5R; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 4B3C82F4499; Tue, 7 Jun 2022 21:48:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346633AbiFGRcB (ORCPT + 99 others); Tue, 7 Jun 2022 13:32:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346822AbiFGRZb (ORCPT ); Tue, 7 Jun 2022 13:25:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D37311098F; Tue, 7 Jun 2022 10:23:18 -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 272BF60BC6; Tue, 7 Jun 2022 17:23:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31F57C385A5; Tue, 7 Jun 2022 17:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622597; bh=YjcHEhCxy8AQgAgWf5d6Py/JLOr5IKgh0bz0IGQIrzc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jQDs9J5RSSHbTx4tlDY7zj2Fw7keYDgnOS0kDqYls8lGL7lEw224sKj9JJFdaZQQl vkZzjVuA5YL+Ljf9glVGGzRx6SNIWF3l6k1jDfvztjK6Fz3O5DxxYAgjVC20jBEkG4 0hR2I+R2KmBF7pdj49j5tJPNF7Ju93c6/e9sE5ig= 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.10 076/452] rtlwifi: Use pr_warn instead of WARN_ONCE Date: Tue, 7 Jun 2022 18:58:53 +0200 Message-Id: <20220607164910.818044293@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@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 06e073defad6..c6e4fda7e431 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -1015,7 +1015,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