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 2B8F2433C0; Thu, 22 Aug 2024 06:59:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724309979; cv=none; b=BMwauaxyGilNQOoWa0H+TKRiDOFZCP20JN7xCYUddELEnY9IQksaAlMX9tXSqOBcc1fqfXLb9Qr3+zUzJIsZK8eEXRtkzDQ8fSSG6mYRI7pKSDCEPGRuUaU9I7XHMyeyvtM9Kz1RA2Fe57+A3vqY2r8JXjC5Nl2BIkrCkWpWszY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724309979; c=relaxed/simple; bh=2qZ/xyt22ragi8wSuwhm2UcSOKI5NzMeXCDrpL6eQzk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=WCnnwAUpKgopoqDW/wKrL5E4cJzvC18XWbQDP9D5J6vtz/dFlDHzFyuyjGGm3qJ34pS0OtfVA+1081r83sR2LA8MDWwe7pi0VOyeDViS8y3AcSbYlpOqua/Y0qtcYAYzqJLv/no0pukbZzVx3HdFoEQLQw9qu6KCaBKO4XppCBA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iMh67uhm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iMh67uhm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F87FC4AF09; Thu, 22 Aug 2024 06:59:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724309979; bh=2qZ/xyt22ragi8wSuwhm2UcSOKI5NzMeXCDrpL6eQzk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=iMh67uhmlpaxip8cyftA1iQu6RPl2Olb8RZpWNLJdLaBvntZ8a8H4KjZ8q967Rsnw CdzHGAZfJLP/azhbB22yMStrbcD44xuaKUcLOrxHI0/+S1oSyjGz4ZAkp0nREq+l+j TFBKhurOfYNaA/7cWGJeEtJ2eeTJ+ASkzaFHY5GuINWVEx0RuK9EaJQlfY7YyQtKV1 Jdzdu3Pvq+0dqPDePDshOFOaEmcfVENimeBsPLcbtHP3D64UXG6jM7a3VlYxilXEpL CmLtZypcBJxC51/T0TaL8DsJDeuH+eZniQp0YvLBZwajWi0nTzQf9YvKiLOqaohj7o Kt1jm49IV7qtA== From: Kalle Valo To: Yu Jiaoliang Cc: Johannes Berg , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, opensource.kernel@vivo.com Subject: Re: [PATCH v3] wifi: cfg80211: Use kmemdup_array instead of kmemdup for multiple allocation References: <20240822024242.1203161-1-yujiaoliang@vivo.com> Date: Thu, 22 Aug 2024 09:59:35 +0300 In-Reply-To: <20240822024242.1203161-1-yujiaoliang@vivo.com> (Yu Jiaoliang's message of "Thu, 22 Aug 2024 10:42:42 +0800") Message-ID: <871q2hgi08.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Yu Jiaoliang writes: > Let the kememdup_array() take care about multiplication and possible > overflows. > > --- > v2: > -Change sizeof(limits[0]) to sizeof(*limits) > -Fix title prefix > > v3: > -Fix R-b tag > -Leave --- above this information > > Signed-off-by: Yu Jiaoliang > Reviewed-by: Christophe JAILLET Now Signed-off-by and Reviewed-by are in the wrong location. Please carefully read the wiki page below how to submit patches. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches