Re: [PATCH v4 16/17] iommufd: Add some fault injection points

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

 



On Mon, Nov 07, 2022 at 08:49:09PM -0400, Jason Gunthorpe wrote:
 
> diff --git a/drivers/iommu/iommufd/main.c b/drivers/iommu/iommufd/main.c

> @@ -489,6 +494,15 @@ static int pages_to_xarray(struct xarray *xa, unsigned long start_index,
>  
>  		xas_lock(&xas);
>  		while (pages != end_pages) {
> +			/* xarray does not participate in fault injection */
> +			if (pages == half_pages && iommufd_should_fail()) {
> +				xas_set_err(&xas, -EINVAL);
> +				xas_unlock(&xas);
> +				/* aka xas_destroy() */
> +				xas_nomem(&xas, GFP_KERNEL);
> +				goto err_clear;

Coverity reports an "unchecked return value" at xas_nomem()...

> +err_clear:
>  	if (xas_error(&xas)) {

...yet, I think we should be fine since we do xas_error here?



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux