diff for duplicates of <20200929105939.657828029@linuxfoundation.org> diff --git a/a/1.txt b/N1/1.txt index 833fd7f..e3f4f73 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -39,7 +39,7 @@ index f93846edc1e0d..827d844f4efb1 100644 /* get the highest possible cpu number for a sparse allocation */ ret = snprintf(path, PATH_MAX, "%s/devices/system/cpu/possible", mnt); -- if (ret = PATH_MAX) { +- if (ret == PATH_MAX) { + if (ret >= PATH_MAX) { pr_err("sysfs path crossed PATH_MAX(%d) size\n", PATH_MAX); goto out; @@ -48,7 +48,7 @@ index f93846edc1e0d..827d844f4efb1 100644 /* get the highest present cpu number for a sparse allocation */ ret = snprintf(path, PATH_MAX, "%s/devices/system/cpu/present", mnt); -- if (ret = PATH_MAX) { +- if (ret == PATH_MAX) { + if (ret >= PATH_MAX) { pr_err("sysfs path crossed PATH_MAX(%d) size\n", PATH_MAX); goto out; @@ -57,7 +57,7 @@ index f93846edc1e0d..827d844f4efb1 100644 /* get the highest possible cpu number for a sparse allocation */ ret = snprintf(path, PATH_MAX, "%s/devices/system/node/possible", mnt); -- if (ret = PATH_MAX) { +- if (ret == PATH_MAX) { + if (ret >= PATH_MAX) { pr_err("sysfs path crossed PATH_MAX(%d) size\n", PATH_MAX); goto out; @@ -66,7 +66,7 @@ index f93846edc1e0d..827d844f4efb1 100644 return 0; n = snprintf(path, PATH_MAX, "%s/devices/system/node", mnt); -- if (n = PATH_MAX) { +- if (n == PATH_MAX) { + if (n >= PATH_MAX) { pr_err("sysfs path crossed PATH_MAX(%d) size\n", PATH_MAX); return -1; @@ -75,7 +75,7 @@ index f93846edc1e0d..827d844f4efb1 100644 continue; n = snprintf(buf, PATH_MAX, "%s/%s", path, dent1->d_name); -- if (n = PATH_MAX) { +- if (n == PATH_MAX) { + if (n >= PATH_MAX) { pr_err("sysfs path crossed PATH_MAX(%d) size\n", PATH_MAX); continue; diff --git a/a/content_digest b/N1/content_digest index b3c300e..1338288 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\020200929105935.184737111@linuxfoundation.org\0" "From\0Greg Kroah-Hartman <gregkh@linuxfoundation.org>\0" "Subject\0[PATCH 4.14 089/166] perf cpumap: Fix snprintf overflow check\0" - "Date\0Tue, 29 Sep 2020 11:00:01 +0000\0" + "Date\0Tue, 29 Sep 2020 13:00:01 +0200\0" "To\0linux-kernel@vger.kernel.org\0" "Cc\0Greg Kroah-Hartman <gregkh@linuxfoundation.org>" stable@vger.kernel.org @@ -62,7 +62,7 @@ " \n" " \t/* get the highest possible cpu number for a sparse allocation */\n" " \tret = snprintf(path, PATH_MAX, \"%s/devices/system/cpu/possible\", mnt);\n" - "-\tif (ret = PATH_MAX) {\n" + "-\tif (ret == PATH_MAX) {\n" "+\tif (ret >= PATH_MAX) {\n" " \t\tpr_err(\"sysfs path crossed PATH_MAX(%d) size\\n\", PATH_MAX);\n" " \t\tgoto out;\n" @@ -71,7 +71,7 @@ " \n" " \t/* get the highest present cpu number for a sparse allocation */\n" " \tret = snprintf(path, PATH_MAX, \"%s/devices/system/cpu/present\", mnt);\n" - "-\tif (ret = PATH_MAX) {\n" + "-\tif (ret == PATH_MAX) {\n" "+\tif (ret >= PATH_MAX) {\n" " \t\tpr_err(\"sysfs path crossed PATH_MAX(%d) size\\n\", PATH_MAX);\n" " \t\tgoto out;\n" @@ -80,7 +80,7 @@ " \n" " \t/* get the highest possible cpu number for a sparse allocation */\n" " \tret = snprintf(path, PATH_MAX, \"%s/devices/system/node/possible\", mnt);\n" - "-\tif (ret = PATH_MAX) {\n" + "-\tif (ret == PATH_MAX) {\n" "+\tif (ret >= PATH_MAX) {\n" " \t\tpr_err(\"sysfs path crossed PATH_MAX(%d) size\\n\", PATH_MAX);\n" " \t\tgoto out;\n" @@ -89,7 +89,7 @@ " \t\treturn 0;\n" " \n" " \tn = snprintf(path, PATH_MAX, \"%s/devices/system/node\", mnt);\n" - "-\tif (n = PATH_MAX) {\n" + "-\tif (n == PATH_MAX) {\n" "+\tif (n >= PATH_MAX) {\n" " \t\tpr_err(\"sysfs path crossed PATH_MAX(%d) size\\n\", PATH_MAX);\n" " \t\treturn -1;\n" @@ -98,7 +98,7 @@ " \t\t\tcontinue;\n" " \n" " \t\tn = snprintf(buf, PATH_MAX, \"%s/%s\", path, dent1->d_name);\n" - "-\t\tif (n = PATH_MAX) {\n" + "-\t\tif (n == PATH_MAX) {\n" "+\t\tif (n >= PATH_MAX) {\n" " \t\t\tpr_err(\"sysfs path crossed PATH_MAX(%d) size\\n\", PATH_MAX);\n" " \t\t\tcontinue;\n" @@ -106,4 +106,4 @@ "-- \n" 2.25.1 -74ed7f59713dc53df49858c7fdf38013e052ebd731ea59e831d65ce5fd2141c9 +fc685ca5e3ae0125c1d208663a50ff0412c337b9f99e9d1d42474d302b601b93
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.