All of lore.kernel.org
 help / color / mirror / Atom feed
* [luxis1999-iommufd:vsva-iommufd-v5.18-rc4-joerg-branch 37/42] drivers/iommu/iommufd/vfio_compat.c:503 vfio_group_unset_iommufd() warn: inconsistent returns '&ictx->vfio_compat'.
@ 2022-05-11  9:37 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-05-09 18:50 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2619 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
TO: Liu Yi L <yi.l.liu@intel.com>

tree:   https://github.com/luxis1999/iommufd vsva-iommufd-v5.18-rc4-joerg-branch
head:   1da48fc20a9603c05ac0e88aa4bc063cc426b232
commit: f3c739aa1a7a8ff80f9997f02d36f2a63f53a251 [37/42] iommufd: Add vfio_group_set/unset_iommufd helpers
:::::: branch date: 13 hours ago
:::::: commit date: 7 days ago
config: x86_64-randconfig-m001-20220509 (https://download.01.org/0day-ci/archive/20220510/202205100226.1PLMwvAu-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/iommu/iommufd/vfio_compat.c:503 vfio_group_unset_iommufd() warn: inconsistent returns '&ictx->vfio_compat'.

vim +503 drivers/iommu/iommufd/vfio_compat.c

f3c739aa1a7a8f Nicolin Chen 2022-01-31  481  
f3c739aa1a7a8f Nicolin Chen 2022-01-31  482  void vfio_group_unset_iommufd(void *iommufd, struct list_head *device_list)
f3c739aa1a7a8f Nicolin Chen 2022-01-31  483  {
f3c739aa1a7a8f Nicolin Chen 2022-01-31  484  	struct iommufd_ctx *ictx = (struct iommufd_ctx *)iommufd;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  485  	struct iommufd_ioas *ioas;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  486  	struct vfio_device *device;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  487  	unsigned int ioas_id;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  488  
f3c739aa1a7a8f Nicolin Chen 2022-01-31  489  	if (!ictx)
f3c739aa1a7a8f Nicolin Chen 2022-01-31  490  		return;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  491  	mutex_lock(&ictx->vfio_compat);
f3c739aa1a7a8f Nicolin Chen 2022-01-31  492  	ioas = get_compat_ioas(ictx);
f3c739aa1a7a8f Nicolin Chen 2022-01-31  493  	if (IS_ERR(ioas))
f3c739aa1a7a8f Nicolin Chen 2022-01-31  494  		return;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  495  
f3c739aa1a7a8f Nicolin Chen 2022-01-31  496  	ioas_id = ioas->obj.id;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  497  	iommufd_put_object(&ioas->obj);
f3c739aa1a7a8f Nicolin Chen 2022-01-31  498  
f3c739aa1a7a8f Nicolin Chen 2022-01-31  499  	vfio_device_detach_unbind(ictx, ioas_id, device, device_list);
f3c739aa1a7a8f Nicolin Chen 2022-01-31  500  	if (--ictx->groups == 0)
f3c739aa1a7a8f Nicolin Chen 2022-01-31  501  		iommufd_ioas_destroy(&ioas->obj);
f3c739aa1a7a8f Nicolin Chen 2022-01-31  502  	mutex_unlock(&ictx->vfio_compat);
f3c739aa1a7a8f Nicolin Chen 2022-01-31 @503  	fput(ictx->filp);

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [luxis1999-iommufd:vsva-iommufd-v5.18-rc4-joerg-branch 37/42] drivers/iommu/iommufd/vfio_compat.c:503 vfio_group_unset_iommufd() warn: inconsistent returns '&ictx->vfio_compat'.
@ 2022-05-11  9:37 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2022-05-11  9:37 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2474 bytes --]

tree:   https://github.com/luxis1999/iommufd vsva-iommufd-v5.18-rc4-joerg-branch
head:   1da48fc20a9603c05ac0e88aa4bc063cc426b232
commit: f3c739aa1a7a8ff80f9997f02d36f2a63f53a251 [37/42] iommufd: Add vfio_group_set/unset_iommufd helpers
config: x86_64-randconfig-m001-20220509 (https://download.01.org/0day-ci/archive/20220510/202205100226.1PLMwvAu-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/iommu/iommufd/vfio_compat.c:503 vfio_group_unset_iommufd() warn: inconsistent returns '&ictx->vfio_compat'.

vim +503 drivers/iommu/iommufd/vfio_compat.c

f3c739aa1a7a8f Nicolin Chen 2022-01-31  482  void vfio_group_unset_iommufd(void *iommufd, struct list_head *device_list)
f3c739aa1a7a8f Nicolin Chen 2022-01-31  483  {
f3c739aa1a7a8f Nicolin Chen 2022-01-31  484  	struct iommufd_ctx *ictx = (struct iommufd_ctx *)iommufd;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  485  	struct iommufd_ioas *ioas;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  486  	struct vfio_device *device;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  487  	unsigned int ioas_id;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  488  
f3c739aa1a7a8f Nicolin Chen 2022-01-31  489  	if (!ictx)
f3c739aa1a7a8f Nicolin Chen 2022-01-31  490  		return;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  491  	mutex_lock(&ictx->vfio_compat);
f3c739aa1a7a8f Nicolin Chen 2022-01-31  492  	ioas = get_compat_ioas(ictx);
f3c739aa1a7a8f Nicolin Chen 2022-01-31  493  	if (IS_ERR(ioas))
f3c739aa1a7a8f Nicolin Chen 2022-01-31  494  		return;

mutex_unlock(&ictx->vfio_compat) before returning?

f3c739aa1a7a8f Nicolin Chen 2022-01-31  495  
f3c739aa1a7a8f Nicolin Chen 2022-01-31  496  	ioas_id = ioas->obj.id;
f3c739aa1a7a8f Nicolin Chen 2022-01-31  497  	iommufd_put_object(&ioas->obj);
f3c739aa1a7a8f Nicolin Chen 2022-01-31  498  
f3c739aa1a7a8f Nicolin Chen 2022-01-31  499  	vfio_device_detach_unbind(ictx, ioas_id, device, device_list);
f3c739aa1a7a8f Nicolin Chen 2022-01-31  500  	if (--ictx->groups == 0)
f3c739aa1a7a8f Nicolin Chen 2022-01-31  501  		iommufd_ioas_destroy(&ioas->obj);
f3c739aa1a7a8f Nicolin Chen 2022-01-31  502  	mutex_unlock(&ictx->vfio_compat);
f3c739aa1a7a8f Nicolin Chen 2022-01-31 @503  	fput(ictx->filp);

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-11  9:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09 18:50 [luxis1999-iommufd:vsva-iommufd-v5.18-rc4-joerg-branch 37/42] drivers/iommu/iommufd/vfio_compat.c:503 vfio_group_unset_iommufd() warn: inconsistent returns '&ictx->vfio_compat' kernel test robot
2022-05-11  9:37 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.