Hello Alexey Kardashevskiy, The patch d9c728949ddc: "vfio/spapr: Postpone default window creation" from Nov 30, 2016, leads to the following static checker warning: drivers/vfio/vfio_iommu_spapr_tce.c:1180 tce_iommu_ioctl() warn: inconsistent returns 'mutex:&container->lock'. drivers/vfio/vfio_iommu_spapr_tce.c 1114 if (copy_from_user(&create, (void __user *)arg, minsz)) 1115 return -EFAULT; 1116 1117 if (create.argsz < minsz) 1118 return -EINVAL; 1119 1120 if (create.flags) 1121 return -EINVAL; 1122 1123 mutex_lock(&container->lock); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1124 1125 ret = tce_iommu_create_default_window(container); 1126 if (ret) 1127 return ret; We can't return directly while holding the lock. 1128 1129 ret = tce_iommu_create_window(container, create.page_shift, 1130 create.window_size, create.levels, 1131 &create.start_addr); 1132 1133 mutex_unlock(&container->lock); 1134 1135 if (!ret && copy_to_user((void __user *)arg, &create, minsz)) 1136 ret = -EFAULT; 1137 1138 return ret; 1139 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html