Re: [PATCH 1/3] staging: ccree: copy IV to DMAable memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 31, 2017 at 11:56:15AM +0000, Gilad Ben-Yossef wrote:
> +
> +	/* The IV we are handed may be allocted from the stack so
> +	 * we must copy it to a DMAable buffer before use.
> +	 */
> +	req_ctx->iv = kmalloc(ivsize, GFP_KERNEL);
> +	memcpy(req_ctx->iv, info, ivsize);

We need to check if kmalloc() fails.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux