Merge tag 's390-6.0-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fix from Vasily Gorbik:

- Fix potential hangs in VFIO AP driver

* tag 's390-6.0-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/vfio-ap: bypass unnecessary processing of AP resources

Changed files
+30
drivers
s390
crypto
+30
drivers/s390/crypto/vfio_ap_ops.c
··· 984 984 goto done; 985 985 } 986 986 987 + if (test_bit_inv(apid, matrix_mdev->matrix.apm)) { 988 + ret = count; 989 + goto done; 990 + } 991 + 987 992 set_bit_inv(apid, matrix_mdev->matrix.apm); 988 993 989 994 ret = vfio_ap_mdev_validate_masks(matrix_mdev); ··· 1114 1109 goto done; 1115 1110 } 1116 1111 1112 + if (!test_bit_inv(apid, matrix_mdev->matrix.apm)) { 1113 + ret = count; 1114 + goto done; 1115 + } 1116 + 1117 1117 clear_bit_inv((unsigned long)apid, matrix_mdev->matrix.apm); 1118 1118 vfio_ap_mdev_hot_unplug_adapter(matrix_mdev, apid); 1119 1119 ret = count; ··· 1190 1180 1191 1181 if (apqi > matrix_mdev->matrix.aqm_max) { 1192 1182 ret = -ENODEV; 1183 + goto done; 1184 + } 1185 + 1186 + if (test_bit_inv(apqi, matrix_mdev->matrix.aqm)) { 1187 + ret = count; 1193 1188 goto done; 1194 1189 } 1195 1190 ··· 1301 1286 goto done; 1302 1287 } 1303 1288 1289 + if (!test_bit_inv(apqi, matrix_mdev->matrix.aqm)) { 1290 + ret = count; 1291 + goto done; 1292 + } 1293 + 1304 1294 clear_bit_inv((unsigned long)apqi, matrix_mdev->matrix.aqm); 1305 1295 vfio_ap_mdev_hot_unplug_domain(matrix_mdev, apqi); 1306 1296 ret = count; ··· 1346 1326 1347 1327 if (id > matrix_mdev->matrix.adm_max) { 1348 1328 ret = -ENODEV; 1329 + goto done; 1330 + } 1331 + 1332 + if (test_bit_inv(id, matrix_mdev->matrix.adm)) { 1333 + ret = count; 1349 1334 goto done; 1350 1335 } 1351 1336 ··· 1400 1375 1401 1376 if (domid > matrix_mdev->matrix.adm_max) { 1402 1377 ret = -ENODEV; 1378 + goto done; 1379 + } 1380 + 1381 + if (!test_bit_inv(domid, matrix_mdev->matrix.adm)) { 1382 + ret = count; 1403 1383 goto done; 1404 1384 } 1405 1385