[PATCH] drm/amdkfd: Integer overflows in ioctl

Dan Carpenter dan.carpenter at oracle.com
Wed Apr 25 09:21:55 UTC 2018


On Tue, Apr 24, 2018 at 02:58:10PM -0400, Felix Kuehling wrote:
> Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>
> 
> We could probably add a sanity check for n_devices to avoid user mode
> causing excessive memory allocations in the kernel. There is no good
> reason for this to be bigger than the number of GPUs in the system. The
> maximum number of GPUs supported due to device minor limit in DRM is 128.
> 

128 is sort of a magic number.  Is there a MAX_GPU define or something?

regards,
dan carpenter



More information about the dri-devel mailing list