[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zrgy1TDikPSkzaYP@gondor.apana.org.au>
Date: Sun, 11 Aug 2024 11:41:09 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Waiman Long <longman@...hat.com>
Cc: steffen.klassert@...unet.com, daniel.m.jordan@...cle.com,
akpm@...ux-foundation.org, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] padata: Fix possible divide-by-0 panic in
padata_mt_helper()
On Sat, Aug 10, 2024 at 11:27:55PM -0400, Waiman Long wrote:
>
> Now I see what you mean. Yes, we can probably change that to a DIV_ROUND_UP
> operation to make sure that chunk_size is at least one unless job->size is
> 0. I still think the current patch is a bit more fail-safe.
The very first thing the function does is check that job->size is
not zero. So this should be all that is necessary.
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists