Re: [PATCH] scsi: scsi_debug: fix return checks for kcalloc

From: Greg KH
Date: Thu Nov 04 2021 - 02:25:33 EST


On Wed, Nov 03, 2021 at 02:01:42PM -0500, George Kennedy wrote:
> Change return checks from kcalloc() to now check for NULL and
> ZERO_SIZE_PTR using the ZERO_OR_NULL_PTR macro or the following
> crash can occur if ZERO_SIZE_PTR indicator is returned.

That seems really broken in the api, why is kcalloc() returning
ZERO_SIZE_PTR?

Please fix that, otherwise you need to fix all callers in the kernel
tree.

thanks,

greg k-h