diff for duplicates of <202202151635.DiGY2FPj-lkp@intel.com> diff --git a/a/1.txt b/N1/1.txt index 64ae69d..4c589f7 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,14 +1,6 @@ -CC: kbuild-all(a)lists.01.org -CC: linux-kernel(a)vger.kernel.org -TO: Zack Rusin <zackr@vmware.com> -CC: Martin Krastev <krastevm@vmware.com> - tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: d567f5db412ed52de0b3b3efca4a451263de6108 commit: 8afa13a0583f94c14607e3041c02f068ac8fb628 drm/vmwgfx: Implement DRIVER_GEM -date: 10 weeks ago -:::::: branch date: 15 hours ago -:::::: commit date: 10 weeks ago config: i386-randconfig-m021-20220214 (https://download.01.org/0day-ci/archive/20220215/202202151635.DiGY2FPj-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 @@ -22,27 +14,6 @@ drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1231 vmw_translate_guest_ptr() warn: pas vim +/PTR_ERR +1177 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c -e2fa3a76839ada Thomas Hellstrom 2011-10-04 1142 -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1143 /** -2cd80dbd35518d Zack Rusin 2021-05-05 1144 * vmw_translate_mob_ptr - Prepare to translate a user-space buffer handle -680360a4d3f695 Deepak Rawat 2019-02-13 1145 * to a MOB id. -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1146 * -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1147 * @dev_priv: Pointer to a device private structure. -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1148 * @sw_context: The software context used for this command batch validation. -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1149 * @id: Pointer to the user-space handle to be translated. -680360a4d3f695 Deepak Rawat 2019-02-13 1150 * @vmw_bo_p: Points to a location that, on successful return will carry a -680360a4d3f695 Deepak Rawat 2019-02-13 1151 * non-reference-counted pointer to the buffer object identified by the -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1152 * user-space handle in @id. -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1153 * -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1154 * This function saves information needed to translate a user-space buffer -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1155 * handle to a MOB id. The translation does not take place immediately, but -680360a4d3f695 Deepak Rawat 2019-02-13 1156 * during a call to vmw_apply_relocations(). -680360a4d3f695 Deepak Rawat 2019-02-13 1157 * -680360a4d3f695 Deepak Rawat 2019-02-13 1158 * This function builds a relocation list and a list of buffers to validate. The -680360a4d3f695 Deepak Rawat 2019-02-13 1159 * former needs to be freed using either vmw_apply_relocations() or -680360a4d3f695 Deepak Rawat 2019-02-13 1160 * vmw_free_relocations(). The latter needs to be freed using -680360a4d3f695 Deepak Rawat 2019-02-13 1161 * vmw_clear_validations. -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1162 */ ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1163 static int vmw_translate_mob_ptr(struct vmw_private *dev_priv, ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1164 struct vmw_sw_context *sw_context, ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1165 SVGAMobId *id, @@ -56,8 +27,21 @@ ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1172 b139d43dacef68 Thomas Hellstrom 2018-09-26 1173 vmw_validation_preload_bo(sw_context->ctx); 8afa13a0583f94 Zack Rusin 2021-12-06 1174 vmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle); 8afa13a0583f94 Zack Rusin 2021-12-06 1175 if (IS_ERR_OR_NULL(vmw_bo)) { + +Originally this was just IS_ERR(vmw_bo) and that's the correct check. +When a function returns both error pointers and NULL the NULL means that +there isn't an error but the feature is optional and has been +deliberately disabled. + +vmw_user_bo_noref_lookup() is not optional. + 5724f899ed8265 Deepak Rawat 2019-02-11 1176 VMW_DEBUG_USER("Could not find or use MOB buffer.\n"); b139d43dacef68 Thomas Hellstrom 2018-09-26 @1177 return PTR_ERR(vmw_bo); + +If vmw_user_bo_noref_lookup() were optional then this returns +PTR_ERR(NULL) which is success. Returning success here leads to a crash +in the caller because *vmw_bo_p is not initialized. + ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1178 } b139d43dacef68 Thomas Hellstrom 2018-09-26 1179 ret = vmw_validation_add_bo(sw_context->ctx, vmw_bo, true, false); 8afa13a0583f94 Zack Rusin 2021-12-06 1180 ttm_bo_put(&vmw_bo->base); @@ -110,6 +94,9 @@ fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1226 b139d43dacef68 Thomas Hellstrom 2018-09-26 1227 vmw_validation_preload_bo(sw_context->ctx); 8afa13a0583f94 Zack Rusin 2021-12-06 1228 vmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle); 8afa13a0583f94 Zack Rusin 2021-12-06 1229 if (IS_ERR_OR_NULL(vmw_bo)) { + +Same. + 5724f899ed8265 Deepak Rawat 2019-02-11 1230 VMW_DEBUG_USER("Could not find or use GMR region.\n"); b139d43dacef68 Thomas Hellstrom 2018-09-26 @1231 return PTR_ERR(vmw_bo); fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1232 } @@ -131,12 +118,6 @@ fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1246 4e4ddd47774313 Thomas Hellstrom 2010-02-21 1248 } 4e4ddd47774313 Thomas Hellstrom 2010-02-21 1249 -:::::: The code at line 1177 was first introduced by commit -:::::: b139d43dacef688a4f46f29eef34409e950f7cef drm/vmwgfx: Make buffer object lookups reference-free during validation - -:::::: TO: Thomas Hellstrom <thellstrom@vmware.com> -:::::: CC: Thomas Hellstrom <thellstrom@vmware.com> - --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org diff --git a/a/content_digest b/N1/content_digest index 9d4c01b..1dd3e95 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,20 +1,12 @@ - "From\0kernel test robot <lkp@intel.com>\0" + "From\0Dan Carpenter <dan.carpenter@oracle.com>\0" "Subject\0drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1177 vmw_translate_mob_ptr() warn: passing zero to 'PTR_ERR'\0" - "Date\0Tue, 15 Feb 2022 16:48:24 +0800\0" - "To\0kbuild@lists.01.org\0" + "Date\0Thu, 17 Feb 2022 16:42:16 +0300\0" + "To\0kbuild-all@lists.01.org\0" "\01:1\0" "b\0" - "CC: kbuild-all(a)lists.01.org\n" - "CC: linux-kernel(a)vger.kernel.org\n" - "TO: Zack Rusin <zackr@vmware.com>\n" - "CC: Martin Krastev <krastevm@vmware.com>\n" - "\n" "tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master\n" "head: d567f5db412ed52de0b3b3efca4a451263de6108\n" "commit: 8afa13a0583f94c14607e3041c02f068ac8fb628 drm/vmwgfx: Implement DRIVER_GEM\n" - "date: 10 weeks ago\n" - ":::::: branch date: 15 hours ago\n" - ":::::: commit date: 10 weeks ago\n" "config: i386-randconfig-m021-20220214 (https://download.01.org/0day-ci/archive/20220215/202202151635.DiGY2FPj-lkp(a)intel.com/config)\n" "compiler: gcc-9 (Debian 9.3.0-22) 9.3.0\n" "\n" @@ -28,27 +20,6 @@ "\n" "vim +/PTR_ERR +1177 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c\n" "\n" - "e2fa3a76839ada Thomas Hellstrom 2011-10-04 1142 \n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1143 /**\n" - "2cd80dbd35518d Zack Rusin 2021-05-05 1144 * vmw_translate_mob_ptr - Prepare to translate a user-space buffer handle\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1145 * to a MOB id.\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1146 *\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1147 * @dev_priv: Pointer to a device private structure.\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1148 * @sw_context: The software context used for this command batch validation.\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1149 * @id: Pointer to the user-space handle to be translated.\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1150 * @vmw_bo_p: Points to a location that, on successful return will carry a\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1151 * non-reference-counted pointer to the buffer object identified by the\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1152 * user-space handle in @id.\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1153 *\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1154 * This function saves information needed to translate a user-space buffer\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1155 * handle to a MOB id. The translation does not take place immediately, but\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1156 * during a call to vmw_apply_relocations().\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1157 *\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1158 * This function builds a relocation list and a list of buffers to validate. The\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1159 * former needs to be freed using either vmw_apply_relocations() or\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1160 * vmw_free_relocations(). The latter needs to be freed using\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1161 * vmw_clear_validations.\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1162 */\n" "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1163 static int vmw_translate_mob_ptr(struct vmw_private *dev_priv,\n" "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1164 \t\t\t\t struct vmw_sw_context *sw_context,\n" "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1165 \t\t\t\t SVGAMobId *id,\n" @@ -62,8 +33,21 @@ "b139d43dacef68 Thomas Hellstrom 2018-09-26 1173 \tvmw_validation_preload_bo(sw_context->ctx);\n" "8afa13a0583f94 Zack Rusin 2021-12-06 1174 \tvmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle);\n" "8afa13a0583f94 Zack Rusin 2021-12-06 1175 \tif (IS_ERR_OR_NULL(vmw_bo)) {\n" + "\n" + "Originally this was just IS_ERR(vmw_bo) and that's the correct check.\n" + "When a function returns both error pointers and NULL the NULL means that\n" + "there isn't an error but the feature is optional and has been\n" + "deliberately disabled.\n" + "\n" + "vmw_user_bo_noref_lookup() is not optional.\n" + "\n" "5724f899ed8265 Deepak Rawat 2019-02-11 1176 \t\tVMW_DEBUG_USER(\"Could not find or use MOB buffer.\\n\");\n" "b139d43dacef68 Thomas Hellstrom 2018-09-26 @1177 \t\treturn PTR_ERR(vmw_bo);\n" + "\n" + "If vmw_user_bo_noref_lookup() were optional then this returns\n" + "PTR_ERR(NULL) which is success. Returning success here leads to a crash\n" + "in the caller because *vmw_bo_p is not initialized.\n" + "\n" "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1178 \t}\n" "b139d43dacef68 Thomas Hellstrom 2018-09-26 1179 \tret = vmw_validation_add_bo(sw_context->ctx, vmw_bo, true, false);\n" "8afa13a0583f94 Zack Rusin 2021-12-06 1180 \tttm_bo_put(&vmw_bo->base);\n" @@ -116,6 +100,9 @@ "b139d43dacef68 Thomas Hellstrom 2018-09-26 1227 \tvmw_validation_preload_bo(sw_context->ctx);\n" "8afa13a0583f94 Zack Rusin 2021-12-06 1228 \tvmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle);\n" "8afa13a0583f94 Zack Rusin 2021-12-06 1229 \tif (IS_ERR_OR_NULL(vmw_bo)) {\n" + "\n" + "Same.\n" + "\n" "5724f899ed8265 Deepak Rawat 2019-02-11 1230 \t\tVMW_DEBUG_USER(\"Could not find or use GMR region.\\n\");\n" "b139d43dacef68 Thomas Hellstrom 2018-09-26 @1231 \t\treturn PTR_ERR(vmw_bo);\n" "fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1232 \t}\n" @@ -137,14 +124,8 @@ "4e4ddd47774313 Thomas Hellstrom 2010-02-21 1248 }\n" "4e4ddd47774313 Thomas Hellstrom 2010-02-21 1249 \n" "\n" - ":::::: The code at line 1177 was first introduced by commit\n" - ":::::: b139d43dacef688a4f46f29eef34409e950f7cef drm/vmwgfx: Make buffer object lookups reference-free during validation\n" - "\n" - ":::::: TO: Thomas Hellstrom <thellstrom@vmware.com>\n" - ":::::: CC: Thomas Hellstrom <thellstrom@vmware.com>\n" - "\n" "---\n" "0-DAY CI Kernel Test Service, Intel Corporation\n" https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org -b08fae07ba5578a179bc57fb6b450219ac6b839931c551100839c417f8a1bef7 +b7d7b83518b879f45d455cc07fcbed78120207c74c8ec97587516bf0bdfbcd21
diff --git a/a/1.txt b/N2/1.txt index 64ae69d..4e26ec7 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -1,15 +1,7 @@ -CC: kbuild-all(a)lists.01.org -CC: linux-kernel(a)vger.kernel.org -TO: Zack Rusin <zackr@vmware.com> -CC: Martin Krastev <krastevm@vmware.com> - tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: d567f5db412ed52de0b3b3efca4a451263de6108 commit: 8afa13a0583f94c14607e3041c02f068ac8fb628 drm/vmwgfx: Implement DRIVER_GEM -date: 10 weeks ago -:::::: branch date: 15 hours ago -:::::: commit date: 10 weeks ago -config: i386-randconfig-m021-20220214 (https://download.01.org/0day-ci/archive/20220215/202202151635.DiGY2FPj-lkp(a)intel.com/config) +config: i386-randconfig-m021-20220214 (https://download.01.org/0day-ci/archive/20220215/202202151635.DiGY2FPj-lkp@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate @@ -22,27 +14,6 @@ drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1231 vmw_translate_guest_ptr() warn: pas vim +/PTR_ERR +1177 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c -e2fa3a76839ada Thomas Hellstrom 2011-10-04 1142 -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1143 /** -2cd80dbd35518d Zack Rusin 2021-05-05 1144 * vmw_translate_mob_ptr - Prepare to translate a user-space buffer handle -680360a4d3f695 Deepak Rawat 2019-02-13 1145 * to a MOB id. -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1146 * -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1147 * @dev_priv: Pointer to a device private structure. -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1148 * @sw_context: The software context used for this command batch validation. -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1149 * @id: Pointer to the user-space handle to be translated. -680360a4d3f695 Deepak Rawat 2019-02-13 1150 * @vmw_bo_p: Points to a location that, on successful return will carry a -680360a4d3f695 Deepak Rawat 2019-02-13 1151 * non-reference-counted pointer to the buffer object identified by the -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1152 * user-space handle in @id. -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1153 * -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1154 * This function saves information needed to translate a user-space buffer -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1155 * handle to a MOB id. The translation does not take place immediately, but -680360a4d3f695 Deepak Rawat 2019-02-13 1156 * during a call to vmw_apply_relocations(). -680360a4d3f695 Deepak Rawat 2019-02-13 1157 * -680360a4d3f695 Deepak Rawat 2019-02-13 1158 * This function builds a relocation list and a list of buffers to validate. The -680360a4d3f695 Deepak Rawat 2019-02-13 1159 * former needs to be freed using either vmw_apply_relocations() or -680360a4d3f695 Deepak Rawat 2019-02-13 1160 * vmw_free_relocations(). The latter needs to be freed using -680360a4d3f695 Deepak Rawat 2019-02-13 1161 * vmw_clear_validations. -ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1162 */ ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1163 static int vmw_translate_mob_ptr(struct vmw_private *dev_priv, ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1164 struct vmw_sw_context *sw_context, ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1165 SVGAMobId *id, @@ -56,8 +27,21 @@ ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1172 b139d43dacef68 Thomas Hellstrom 2018-09-26 1173 vmw_validation_preload_bo(sw_context->ctx); 8afa13a0583f94 Zack Rusin 2021-12-06 1174 vmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle); 8afa13a0583f94 Zack Rusin 2021-12-06 1175 if (IS_ERR_OR_NULL(vmw_bo)) { + +Originally this was just IS_ERR(vmw_bo) and that's the correct check. +When a function returns both error pointers and NULL the NULL means that +there isn't an error but the feature is optional and has been +deliberately disabled. + +vmw_user_bo_noref_lookup() is not optional. + 5724f899ed8265 Deepak Rawat 2019-02-11 1176 VMW_DEBUG_USER("Could not find or use MOB buffer.\n"); b139d43dacef68 Thomas Hellstrom 2018-09-26 @1177 return PTR_ERR(vmw_bo); + +If vmw_user_bo_noref_lookup() were optional then this returns +PTR_ERR(NULL) which is success. Returning success here leads to a crash +in the caller because *vmw_bo_p is not initialized. + ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1178 } b139d43dacef68 Thomas Hellstrom 2018-09-26 1179 ret = vmw_validation_add_bo(sw_context->ctx, vmw_bo, true, false); 8afa13a0583f94 Zack Rusin 2021-12-06 1180 ttm_bo_put(&vmw_bo->base); @@ -110,6 +94,9 @@ fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1226 b139d43dacef68 Thomas Hellstrom 2018-09-26 1227 vmw_validation_preload_bo(sw_context->ctx); 8afa13a0583f94 Zack Rusin 2021-12-06 1228 vmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle); 8afa13a0583f94 Zack Rusin 2021-12-06 1229 if (IS_ERR_OR_NULL(vmw_bo)) { + +Same. + 5724f899ed8265 Deepak Rawat 2019-02-11 1230 VMW_DEBUG_USER("Could not find or use GMR region.\n"); b139d43dacef68 Thomas Hellstrom 2018-09-26 @1231 return PTR_ERR(vmw_bo); fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1232 } @@ -131,12 +118,6 @@ fc18afcf5fb2d8 Thomas Hellstrom 2018-09-26 1246 4e4ddd47774313 Thomas Hellstrom 2010-02-21 1248 } 4e4ddd47774313 Thomas Hellstrom 2010-02-21 1249 -:::::: The code at line 1177 was first introduced by commit -:::::: b139d43dacef688a4f46f29eef34409e950f7cef drm/vmwgfx: Make buffer object lookups reference-free during validation - -:::::: TO: Thomas Hellstrom <thellstrom@vmware.com> -:::::: CC: Thomas Hellstrom <thellstrom@vmware.com> - --- 0-DAY CI Kernel Test Service, Intel Corporation -https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org +https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org diff --git a/a/content_digest b/N2/content_digest index 9d4c01b..2504e34 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -1,21 +1,18 @@ - "From\0kernel test robot <lkp@intel.com>\0" + "From\0Dan Carpenter <dan.carpenter@oracle.com>\0" "Subject\0drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1177 vmw_translate_mob_ptr() warn: passing zero to 'PTR_ERR'\0" - "Date\0Tue, 15 Feb 2022 16:48:24 +0800\0" - "To\0kbuild@lists.01.org\0" - "\01:1\0" + "Date\0Thu, 17 Feb 2022 16:42:16 +0300\0" + "To\0kbuild@lists.01.org" + " Zack Rusin <zackr@vmware.com>\0" + "Cc\0lkp@intel.com" + kbuild-all@lists.01.org + linux-kernel@vger.kernel.org + " Martin Krastev <krastevm@vmware.com>\0" + "\00:1\0" "b\0" - "CC: kbuild-all(a)lists.01.org\n" - "CC: linux-kernel(a)vger.kernel.org\n" - "TO: Zack Rusin <zackr@vmware.com>\n" - "CC: Martin Krastev <krastevm@vmware.com>\n" - "\n" "tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master\n" "head: d567f5db412ed52de0b3b3efca4a451263de6108\n" "commit: 8afa13a0583f94c14607e3041c02f068ac8fb628 drm/vmwgfx: Implement DRIVER_GEM\n" - "date: 10 weeks ago\n" - ":::::: branch date: 15 hours ago\n" - ":::::: commit date: 10 weeks ago\n" - "config: i386-randconfig-m021-20220214 (https://download.01.org/0day-ci/archive/20220215/202202151635.DiGY2FPj-lkp(a)intel.com/config)\n" + "config: i386-randconfig-m021-20220214 (https://download.01.org/0day-ci/archive/20220215/202202151635.DiGY2FPj-lkp@intel.com/config)\n" "compiler: gcc-9 (Debian 9.3.0-22) 9.3.0\n" "\n" "If you fix the issue, kindly add following tag as appropriate\n" @@ -28,27 +25,6 @@ "\n" "vim +/PTR_ERR +1177 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c\n" "\n" - "e2fa3a76839ada Thomas Hellstrom 2011-10-04 1142 \n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1143 /**\n" - "2cd80dbd35518d Zack Rusin 2021-05-05 1144 * vmw_translate_mob_ptr - Prepare to translate a user-space buffer handle\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1145 * to a MOB id.\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1146 *\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1147 * @dev_priv: Pointer to a device private structure.\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1148 * @sw_context: The software context used for this command batch validation.\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1149 * @id: Pointer to the user-space handle to be translated.\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1150 * @vmw_bo_p: Points to a location that, on successful return will carry a\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1151 * non-reference-counted pointer to the buffer object identified by the\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1152 * user-space handle in @id.\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1153 *\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1154 * This function saves information needed to translate a user-space buffer\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1155 * handle to a MOB id. The translation does not take place immediately, but\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1156 * during a call to vmw_apply_relocations().\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1157 *\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1158 * This function builds a relocation list and a list of buffers to validate. The\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1159 * former needs to be freed using either vmw_apply_relocations() or\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1160 * vmw_free_relocations(). The latter needs to be freed using\n" - "680360a4d3f695 Deepak Rawat 2019-02-13 1161 * vmw_clear_validations.\n" - "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1162 */\n" "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1163 static int vmw_translate_mob_ptr(struct vmw_private *dev_priv,\n" "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1164 \t\t\t\t struct vmw_sw_context *sw_context,\n" "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1165 \t\t\t\t SVGAMobId *id,\n" @@ -62,8 +38,21 @@ "b139d43dacef68 Thomas Hellstrom 2018-09-26 1173 \tvmw_validation_preload_bo(sw_context->ctx);\n" "8afa13a0583f94 Zack Rusin 2021-12-06 1174 \tvmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle);\n" "8afa13a0583f94 Zack Rusin 2021-12-06 1175 \tif (IS_ERR_OR_NULL(vmw_bo)) {\n" + "\n" + "Originally this was just IS_ERR(vmw_bo) and that's the correct check.\n" + "When a function returns both error pointers and NULL the NULL means that\n" + "there isn't an error but the feature is optional and has been\n" + "deliberately disabled.\n" + "\n" + "vmw_user_bo_noref_lookup() is not optional.\n" + "\n" "5724f899ed8265 Deepak Rawat 2019-02-11 1176 \t\tVMW_DEBUG_USER(\"Could not find or use MOB buffer.\\n\");\n" "b139d43dacef68 Thomas Hellstrom 2018-09-26 @1177 \t\treturn PTR_ERR(vmw_bo);\n" + "\n" + "If vmw_user_bo_noref_lookup() were optional then this returns\n" + "PTR_ERR(NULL) which is success. Returning success here leads to a crash\n" + "in the caller because *vmw_bo_p is not initialized.\n" + "\n" "ddcda24e3bec1d Thomas Hellstrom 2012-11-21 1178 \t}\n" "b139d43dacef68 Thomas Hellstrom 2018-09-26 1179 \tret = vmw_validation_add_bo(sw_context->ctx, vmw_bo, true, false);\n" "8afa13a0583f94 Zack Rusin 2021-12-06 1180 \tttm_bo_put(&vmw_bo->base);\n" @@ -116,6 +105,9 @@ "b139d43dacef68 Thomas Hellstrom 2018-09-26 1227 \tvmw_validation_preload_bo(sw_context->ctx);\n" "8afa13a0583f94 Zack Rusin 2021-12-06 1228 \tvmw_bo = vmw_user_bo_noref_lookup(sw_context->filp, handle);\n" "8afa13a0583f94 Zack Rusin 2021-12-06 1229 \tif (IS_ERR_OR_NULL(vmw_bo)) {\n" + "\n" + "Same.\n" + "\n" "5724f899ed8265 Deepak Rawat 2019-02-11 1230 \t\tVMW_DEBUG_USER(\"Could not find or use GMR region.\\n\");\n" "b139d43dacef68 Thomas Hellstrom 2018-09-26 @1231 \t\treturn PTR_ERR(vmw_bo);\n" "fb1d9738ca053e Jakob Bornecrantz 2009-12-10 1232 \t}\n" @@ -137,14 +129,8 @@ "4e4ddd47774313 Thomas Hellstrom 2010-02-21 1248 }\n" "4e4ddd47774313 Thomas Hellstrom 2010-02-21 1249 \n" "\n" - ":::::: The code at line 1177 was first introduced by commit\n" - ":::::: b139d43dacef688a4f46f29eef34409e950f7cef drm/vmwgfx: Make buffer object lookups reference-free during validation\n" - "\n" - ":::::: TO: Thomas Hellstrom <thellstrom@vmware.com>\n" - ":::::: CC: Thomas Hellstrom <thellstrom@vmware.com>\n" - "\n" "---\n" "0-DAY CI Kernel Test Service, Intel Corporation\n" - https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org + https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org -b08fae07ba5578a179bc57fb6b450219ac6b839931c551100839c417f8a1bef7 +38eeb94f5da0d711834d70712d7171b7027f1f08d12bc7c83d298eb6b83f19c1
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.