Skip to contentSkip to conversation

mm-non-atomically-mark-page-accessed-during-page-cache-allocation-where-possiblefix-2.patch removed from -mm tree

folded-merged [email protected] 1 participant 1 message Jun 4, 2014

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [folded-merged] mm-non-atomically-mark-page-accessed-during-page-cache-allocation-where-possiblefix-2.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 04 Jun 2014 15:47:00 -0700

The patch titled
Subject: mm/shmem.c: don't run init_page_accessed() against an uninitialised pointer
has been removed from the -mm tree. Its filename was
mm-non-atomically-mark-page-accessed-during-page-cache-allocation-where-possiblefix-2.patch

This patch was dropped because it was folded into mm-non-atomically-mark-page-accessed-during-page-cache-allocation-where-possible.patch

------------------------------------------------------
From: Andrew Morton <[email protected]>
Subject: mm/shmem.c: don't run init_page_accessed() against an uninitialised pointer

If shmem_getpage() returned an error then it didn't necessarily initialise *pagep. So shmem_write_begin() shouldn't be playing with *pagep in this situation.

Fixes an oops when "mm: non-atomically mark page accessed during page cache allocation where possible" (quite reasonably) left *pagep uninitialized.

Cc Johannes Weiner <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Jan Kara <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Dave Hansen <[email protected]>

---

 mm/shmem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/shmem.c renamed from mm/shmem.c~mm-non-atomically-mark-page-accessed-during-page-cache-allocation-where-possiblefix-2 +1 -1
diff -puN mm/shmem.c~mm-non-atomically-mark-page-accessed-during-page-cache-allocation-where-possiblefix-2 mm/shmem.c
@@ -1376,7 +1376,7 @@ shmem_write_begin(struct file *file, str
 	struct inode *inode = mapping->host;
 	pgoff_t index = pos >> PAGE_CACHE_SHIFT;
 	ret = shmem_getpage(inode, index, pagep, SGP_WRITE, NULL);
-	if (*pagep)
+	if (ret == 0 && *pagep)
 		init_page_accessed(*pagep);
 	return ret;
 }

_

Patches currently in -mm which might be from [email protected] are

origin.patch
arch-unicore32-mm-ioremapc-convert-printk-warn_on-to-warn1.patch arch-unicore32-mm-ioremapc-return-null-on-invalid-pfn.patch ocfs2-limit-printk-when-journal-is-aborted.patch fs-add-generic-data-flush-to-fsync.patch mm-huge_memoryc-complete-conversion-to-pr_foo.patch include-linux-mmdebugh-add-vm_warn_on-and-vm_warn_on_once.patch mm-mempool-warn-about-__gfp_zero-usage.patch mm-pass-vm_bug_on-reason-to-dump_page.patch hugetlb-add-support-for-gigantic-page-allocation-at-runtime.patch fs-hugetlbfs-inodec-complete-conversion-to-pr_foo.patch mm-compaction-cleanup-isolate_freepages.patch arc-call-find_vma-with-the-mmap_sem-held.patch mm-vmscan-do-not-throttle-based-on-pfmemalloc-reserves-if-node-has-no-zone_normal.patch swap-use-bdev_read_page-bdev_write_page.patch mm-update-comment-for-default_max_map_count.patch memcg-fold-mem_cgroup_stolen.patch mm-compaction-embed-migration-mode-in-compact_control.patch mm-add-comment-for-__mod_zone_page_stat.patch mm-fold-mlocked_vma_newpage-into-its-only-call-site.patch fs-buffer-do-not-use-unnecessary-atomic-operations-when-discarding-buffers.patch mm-non-atomically-mark-page-accessed-during-page-cache-allocation-where-possible.patch mm-compaction-properly-signal-and-act-upon-lock-and-need_sched-contention-fix.patch mm-document-do_fault_around-feature-fix.patch mm-memory-failurec-support-dedicated-thread-to-handle-sigbusbus_mceerr_ao-checkpatch-fixes.patch kernel-res_counterc-replace-simple_strtoull-by-kstrtoull-fix.patch printk-release-lockbuf_lock-before-calling-console_trylock_for_printk-fix.patch lib-btreec-fix-leak-of-whole-btree-nodes-fix.patch init-mainc-dont-use-pr_debug.patch init-mainc-add-initcall_blacklist-kernel-parameter-fix.patch init-mainc-remove-an-ifdef.patch