From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 641951867 for ; Wed, 20 Apr 2022 16:41:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A163C385A1; Wed, 20 Apr 2022 16:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650472889; bh=0jGEShzA7BDA9BjXcsM5j4+M5Zwl/bVzaAJeee2fzBU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OvPM998HcXX5mBLfEzmQvOhTZekvLEGIPiTRfgKKsP+immVQ06fieB7sqLGyiMhHv c3o9rXVNIeHbRyKktX3416YEJskhMn1qA2bP9yaafW5zwCm7SQoLm90j5fxlvsK5KV 9etObSS1A3QUfI62GkKYKk3VHlDp22hmR+u4HCjA= Date: Wed, 20 Apr 2022 18:41:26 +0200 From: Greg Kroah-Hartman To: Haowen Bai Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH V4] staging: rtl8192e: Fix signedness bug in rtllib_rx_assoc_resp() Message-ID: References: <20220415065810.GQ3293@kadam> <1650007296-31508-1-git-send-email-baihaowen@meizu.com> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1650007296-31508-1-git-send-email-baihaowen@meizu.com> On Fri, Apr 15, 2022 at 03:21:35PM +0800, Haowen Bai wrote: > The rtllib_rx_assoc_resp() function has a signedness bug because it's > a declared as a u16 but it return -ENOMEM. When you look at it more > closely it returns a mix of error codes including 0xcafe, -ENOMEM, and > a->status which is WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG. This is a mess. > > Clean it up to just return standard kernel error codes. We can print > out the a->status before returning a regular error code. The printks > in the caller need to be adjusted as well. > > Signed-off-by: Haowen Bai > --- > V1->V2: reduce return random value; print its own error message. > V2->V3: change commit message; change s16 -> int. > V3->V4: add message suggested by Dan Carpenter. If you look up what > a->status is, it can only be WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG which > is not worth preserving really. I see 3 different v4 patches. Obviously something went wrong, please submit a new one, and properly number it and say what changed between them all. thanks, greg k-h