mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + fs-proc-kcorec-remove-check-of-list-iterator-against-head-past-the-loop-body-fix.patch added to -mm tree
@ 2022-03-31 23:48 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-03-31 23:48 UTC (permalink / raw)
  To: mm-commits, rppt, osalvador, jakobkoschel, h.j.bos, david,
	c.giuffrida, bjohannesmeyer, adobriyan, akpm, akpm


The patch titled
     Subject: fs-proc-kcorec-remove-check-of-list-iterator-against-head-past-the-loop-body-fix
has been added to the -mm tree.  Its filename is
     fs-proc-kcorec-remove-check-of-list-iterator-against-head-past-the-loop-body-fix.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/fs-proc-kcorec-remove-check-of-list-iterator-against-head-past-the-loop-body-fix.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/fs-proc-kcorec-remove-check-of-list-iterator-against-head-past-the-loop-body-fix.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: Andrew Morton <akpm@linux-foundation.org>
Subject: fs-proc-kcorec-remove-check-of-list-iterator-against-head-past-the-loop-body-fix

reduce scope of `iter'

Cc: "Bos, H.J." <h.j.bos@vu.nl>
Cc: "Brian Johannesmeyer" <bjohannesmeyer@gmail.com>
Cc: Cristiano Giuffrida <c.giuffrida@vu.nl>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jakob Koschel <jakobkoschel@gmail.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/proc/kcore.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/proc/kcore.c~fs-proc-kcorec-remove-check-of-list-iterator-against-head-past-the-loop-body-fix
+++ a/fs/proc/kcore.c
@@ -316,7 +316,6 @@ read_kcore(struct file *file, char __use
 	size_t page_offline_frozen = 1;
 	size_t phdrs_len, notes_len;
 	struct kcore_list *m;
-	struct kcore_list *iter;
 	size_t tsz;
 	int nphdr;
 	unsigned long start;
@@ -480,6 +479,8 @@ read_kcore(struct file *file, char __use
 		 * the previous entry, search for a matching entry.
 		 */
 		if (!m || start < m->addr || start >= m->addr + m->size) {
+			struct kcore_list *iter;
+
 			m = NULL;
 			list_for_each_entry(iter, &kclist_head, list) {
 				if (start >= iter->addr &&
_

Patches currently in -mm which might be from akpm@linux-foundation.org are

mm.patch
arm64-implement-stack_trace_save_shadow-fix.patch
mm-shmem-make-shmem_init-return-void-fix.patch
ksm-count-ksm-merging-pages-for-each-process-fix.patch
mm-memory_hotplug-refactor-hotadd_init_pgdat-and-try_online_node-checkpatch-fixes.patch
proc-fix-dentry-inode-overinstantiating-under-proc-pid-net-checkpatch-fixes.patch
fs-proc-kcorec-remove-check-of-list-iterator-against-head-past-the-loop-body-fix.patch
add-fat-messages-to-printk-index-checkpatch-fixes.patch
linux-next-rejects.patch
linux-next-git-rejects.patch
mm-oom_killc-fix-vm_oom_kill_table-ifdeffery.patch
b.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-31 23:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 23:48 + fs-proc-kcorec-remove-check-of-list-iterator-against-head-past-the-loop-body-fix.patch added to -mm tree Andrew Morton

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).