mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + proc-fix-incorrect-pde_is_permanent-check.patch added to -mm tree
@ 2021-03-19 23:18 akpm
  2021-03-20  8:37 ` Alexey Dobriyan
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2021-03-19 23:18 UTC (permalink / raw)
  To: adobriyan, christian.brauner, colin.king, gregkh, mm-commits


The patch titled
     Subject: fs/proc/generic.c: fix incorrect pde_is_permanent check
has been added to the -mm tree.  Its filename is
     proc-fix-incorrect-pde_is_permanent-check.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/proc-fix-incorrect-pde_is_permanent-check.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/proc-fix-incorrect-pde_is_permanent-check.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Colin Ian King <colin.king@canonical.com>
Subject: fs/proc/generic.c: fix incorrect pde_is_permanent check

Currently the pde_is_permanent() check is being run on root multiple times
rather than on the next proc directory entry.  This looks like a
copy-paste error.  Fix this by replacing root with next.

Addresses-Coverity: ("Copy-paste error")
Link: https://lkml.kernel.org/r/20210318122633.14222-1-colin.king@canonical.com
Fixes: d919b33dafb3 ("proc: faster open/read/close with "permanent" files")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Greg Kroah-Hartman <gregkh@google.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/proc/generic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/proc/generic.c~proc-fix-incorrect-pde_is_permanent-check
+++ a/fs/proc/generic.c
@@ -756,7 +756,7 @@ int remove_proc_subtree(const char *name
 	while (1) {
 		next = pde_subdir_first(de);
 		if (next) {
-			if (unlikely(pde_is_permanent(root))) {
+			if (unlikely(pde_is_permanent(next))) {
 				write_unlock(&proc_subdir_lock);
 				WARN(1, "removing permanent /proc entry '%s/%s'",
 					next->parent->name, next->name);
_

Patches currently in -mm which might be from colin.king@canonical.com are

mm-slab-fix-spelling-mistake-disired-desired.patch
mm-vmalloc-hugepage-vmalloc-mappings-fix.patch
mm-cma-support-sysfs-fix.patch
proc-fix-incorrect-pde_is_permanent-check.patch


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: + proc-fix-incorrect-pde_is_permanent-check.patch added to -mm tree
  2021-03-19 23:18 + proc-fix-incorrect-pde_is_permanent-check.patch added to -mm tree akpm
@ 2021-03-20  8:37 ` Alexey Dobriyan
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Dobriyan @ 2021-03-20  8:37 UTC (permalink / raw)
  To: akpm; +Cc: mm-commits

On Fri, Mar 19, 2021 at 04:18:14PM -0700, akpm@linux-foundation.org wrote:
>      proc-fix-incorrect-pde_is_permanent-check.patch

> Currently the pde_is_permanent() check is being run on root multiple times
> rather than on the next proc directory entry.  This looks like a
> copy-paste error.  Fix this by replacing root with next.
> 
> Addresses-Coverity: ("Copy-paste error")
> Link: https://lkml.kernel.org/r/20210318122633.14222-1-colin.king@canonical.com
> Fixes: d919b33dafb3 ("proc: faster open/read/close with "permanent" files")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: Christian Brauner <christian.brauner@ubuntu.com>

Doesn't hurt to check more entries.

Reviewed-by: Alexey Dobriyan <adobriyan@gmail.com>

> -			if (unlikely(pde_is_permanent(root))) {
> +			if (unlikely(pde_is_permanent(next))) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-20 11:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 23:18 + proc-fix-incorrect-pde_is_permanent-check.patch added to -mm tree akpm
2021-03-20  8:37 ` Alexey Dobriyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).