From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95C41C433EF for ; Tue, 17 May 2022 10:09:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343565AbiEQKJe (ORCPT ); Tue, 17 May 2022 06:09:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343767AbiEQKGz (ORCPT ); Tue, 17 May 2022 06:06:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FD6E11147; Tue, 17 May 2022 03:06:17 -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 09E09615A1; Tue, 17 May 2022 10:06:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8A6EC385B8; Tue, 17 May 2022 10:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652781976; bh=nrWHF6l7uVq8ZHQkdWkkCFxu0w4eyZo6b16CWXfYuA8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ufYKC8u82/D8v3M2j5bcuFJLTIhJlOZys4GxKIK9Iq7X4uDGArMQbwo72pELRcppv AOJR3NHEWscpmZxRLvkJ9w8iflTotdq+2Th2+/O1w0JDy9QilASlW74BzZQeBWTFr6 4lazJqHWQ31Y9U5r1ofIXalvwCgEtYGyrZd3rbOk= Date: Tue, 17 May 2022 12:06:12 +0200 From: Greg KH To: Yuanjun Gong Cc: Larry Finger , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 1/1] staging: fix a potential infinite loop Message-ID: References: <20220517095809.7791-1-ruc_gongyuanjun@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220517095809.7791-1-ruc_gongyuanjun@163.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 17, 2022 at 05:58:09PM +0800, Yuanjun Gong wrote: > From: Gong Yuanjun > > In the for-loop in _rtl92e_update_rxcounts(), > i is a u8 counter while priv->rtllib->LinkDetectInfo.SlotNum is > a u16 num, there is a potential infinite loop if SlotNum is larger > than u8_max. can SlotNum ever get larger than that? If not, then why not just change that type instead? And you forgot to list the driver name in the subject line and cc: all the right people that scripts/get_maintainer.pl will tell you to cc: Please fix that up and resend a v2. thanks, greg k-h