diff for duplicates of <20200324125001.GA21569@kernel.org> diff --git a/a/1.txt b/N1/1.txt index 2a5d1b6..36ead69 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -35,7 +35,7 @@ Ok? > > /* 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; @@ -44,7 +44,7 @@ Ok? > > /* 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; @@ -53,7 +53,7 @@ Ok? > > /* 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; @@ -62,7 +62,7 @@ Ok? > 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; @@ -71,7 +71,7 @@ Ok? > 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 303c176..936226f 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\020200324070319.10901-1-christophe.jaillet@wanadoo.fr\0" "From\0Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>\0" "Subject\0Re: [PATCH V2] perf cpumap: Fix snprintf overflow check\0" - "Date\0Tue, 24 Mar 2020 12:50:01 +0000\0" + "Date\0Tue, 24 Mar 2020 09:50:01 -0300\0" "To\0Christophe JAILLET <christophe.jaillet@wanadoo.fr>\0" "Cc\0peterz@infradead.org" mingo@redhat.com @@ -55,7 +55,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" @@ -64,7 +64,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" @@ -73,7 +73,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" @@ -82,7 +82,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" @@ -91,7 +91,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" @@ -104,4 +104,4 @@ "\n" - Arnaldo -0f9faea24fb1e5efd38a264aacabf9f7c7c0243c0c5810d5e2a479014c895994 +a5463e605577ed995284f594665b86177a196056f35123a45944bacaa41aaafe
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.