lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 2 Jun 2021 08:00:57 -0700
From:   Dave Jiang <dave.jiang@...el.com>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc:     vkoul@...nel.org, dmaengine@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dmaengine: idxd: Fix missing error code in
 idxd_cdev_open()


On 6/2/2021 3:07 AM, Jiapeng Chong wrote:
> The error code is missing in this code scenario, add the error code
> '-EINVAL' to the return value 'rc'.
>
> Eliminate the follow smatch warning:
>
> drivers/dma/idxd/cdev.c:113 idxd_cdev_open() warn: missing error code
> 'rc'.
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>

Acked-by: Dave Jiang <dave.jiang@...el.com>


> ---
>   drivers/dma/idxd/cdev.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
> index 302cba5..d4419bf 100644
> --- a/drivers/dma/idxd/cdev.c
> +++ b/drivers/dma/idxd/cdev.c
> @@ -110,6 +110,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
>   		pasid = iommu_sva_get_pasid(sva);
>   		if (pasid == IOMMU_PASID_INVALID) {
>   			iommu_sva_unbind_device(sva);
> +			rc = -EINVAL;
>   			goto failed;
>   		}
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ