Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0ab773f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
 "13 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  rbtree: include rcu.h
  scripts/faddr2line: fix error when addr2line output contains discriminator
  ocfs2: take inode cluster lock before moving reflinked inode from orphan dir
  mm, oom: fix concurrent munlock and oom reaper unmap, v3
  mm: migrate: fix double call of radix_tree_replace_slot()
  proc/kcore: don't bounds check against address 0
  mm: don't show nr_indirectly_reclaimable in /proc/vmstat
  mm: sections are not offlined during memory hotremove
  z3fold: fix reclaim lock-ups
  init: fix false positives in W+X checking
  lib/find_bit_benchmark.c: avoid soft lockup in test_find_first_bit()
  KASAN: prohibit KASAN+STRUCTLEAK combination
  MAINTAINERS: update Shuah's email address
parents 4bc87198 2075b16e
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -3691,7 +3691,6 @@ F: drivers/cpufreq/arm_big_little_dt.c

CPU POWER MONITORING SUBSYSTEM
M:	Thomas Renninger <trenn@suse.com>
M:	Shuah Khan <shuahkh@osg.samsung.com>
M:	Shuah Khan <shuah@kernel.org>
L:	linux-pm@vger.kernel.org
S:	Maintained
@@ -7696,7 +7695,6 @@ F: include/linux/sunrpc/
F:	include/uapi/linux/sunrpc/

KERNEL SELFTEST FRAMEWORK
M:	Shuah Khan <shuahkh@osg.samsung.com>
M:	Shuah Khan <shuah@kernel.org>
L:	linux-kselftest@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
@@ -14650,7 +14648,6 @@ F: drivers/usb/common/usb-otg-fsm.c

USB OVER IP DRIVER
M:	Valentina Manea <valentina.manea.m@gmail.com>
M:	Shuah Khan <shuahkh@osg.samsung.com>
M:	Shuah Khan <shuah@kernel.org>
L:	linux-usb@vger.kernel.org
S:	Maintained
+4 −0
Original line number Diff line number Diff line
@@ -464,6 +464,10 @@ config GCC_PLUGIN_LATENT_ENTROPY
config GCC_PLUGIN_STRUCTLEAK
	bool "Force initialization of variables containing userspace addresses"
	depends on GCC_PLUGINS
	# Currently STRUCTLEAK inserts initialization out of live scope of
	# variables from KASAN point of view. This leads to KASAN false
	# positive reports. Prohibit this combination for now.
	depends on !KASAN_EXTRA
	help
	  This plugin zero-initializes any structures containing a
	  __user attribute. This can prevent some classes of information
+12 −2
Original line number Diff line number Diff line
@@ -4250,10 +4250,11 @@ static int __ocfs2_reflink(struct dentry *old_dentry,
static int ocfs2_reflink(struct dentry *old_dentry, struct inode *dir,
			 struct dentry *new_dentry, bool preserve)
{
	int error;
	int error, had_lock;
	struct inode *inode = d_inode(old_dentry);
	struct buffer_head *old_bh = NULL;
	struct inode *new_orphan_inode = NULL;
	struct ocfs2_lock_holder oh;

	if (!ocfs2_refcount_tree(OCFS2_SB(inode->i_sb)))
		return -EOPNOTSUPP;
@@ -4295,6 +4296,14 @@ static int ocfs2_reflink(struct dentry *old_dentry, struct inode *dir,
		goto out;
	}

	had_lock = ocfs2_inode_lock_tracker(new_orphan_inode, NULL, 1,
					    &oh);
	if (had_lock < 0) {
		error = had_lock;
		mlog_errno(error);
		goto out;
	}

	/* If the security isn't preserved, we need to re-initialize them. */
	if (!preserve) {
		error = ocfs2_init_security_and_acl(dir, new_orphan_inode,
@@ -4302,14 +4311,15 @@ static int ocfs2_reflink(struct dentry *old_dentry, struct inode *dir,
		if (error)
			mlog_errno(error);
	}
out:
	if (!error) {
		error = ocfs2_mv_orphaned_inode_to_new(dir, new_orphan_inode,
						       new_dentry);
		if (error)
			mlog_errno(error);
	}
	ocfs2_inode_unlock_tracker(new_orphan_inode, 1, &oh, had_lock);

out:
	if (new_orphan_inode) {
		/*
		 * We need to open_unlock the inode no matter whether we
+16 −7
Original line number Diff line number Diff line
@@ -209,25 +209,34 @@ kclist_add_private(unsigned long pfn, unsigned long nr_pages, void *arg)
{
	struct list_head *head = (struct list_head *)arg;
	struct kcore_list *ent;
	struct page *p;

	if (!pfn_valid(pfn))
		return 1;

	p = pfn_to_page(pfn);
	if (!memmap_valid_within(pfn, p, page_zone(p)))
		return 1;

	ent = kmalloc(sizeof(*ent), GFP_KERNEL);
	if (!ent)
		return -ENOMEM;
	ent->addr = (unsigned long)__va((pfn << PAGE_SHIFT));
	ent->addr = (unsigned long)page_to_virt(p);
	ent->size = nr_pages << PAGE_SHIFT;

	/* Sanity check: Can happen in 32bit arch...maybe */
	if (ent->addr < (unsigned long) __va(0))
	if (!virt_addr_valid(ent->addr))
		goto free_out;

	/* cut not-mapped area. ....from ppc-32 code. */
	if (ULONG_MAX - ent->addr < ent->size)
		ent->size = ULONG_MAX - ent->addr;

	/* cut when vmalloc() area is higher than direct-map area */
	if (VMALLOC_START > (unsigned long)__va(0)) {
		if (ent->addr > VMALLOC_START)
			goto free_out;
	/*
	 * We've already checked virt_addr_valid so we know this address
	 * is a valid pointer, therefore we can check against it to determine
	 * if we need to trim
	 */
	if (VMALLOC_START > ent->addr) {
		if (VMALLOC_START - ent->addr < ent->size)
			ent->size = VMALLOC_START - ent->addr;
	}
+2 −0
Original line number Diff line number Diff line
@@ -95,6 +95,8 @@ static inline int check_stable_address_space(struct mm_struct *mm)
	return 0;
}

void __oom_reap_task_mm(struct mm_struct *mm);

extern unsigned long oom_badness(struct task_struct *p,
		struct mem_cgroup *memcg, const nodemask_t *nodemask,
		unsigned long totalpages);
Loading