Commit 7514c036 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
 "19 patches.

  Subsystems affected by this patch series: MAINTAINERS, ipc, fork,
  checkpatch, lib, and mm (memcg, slub, pagemap, madvise, migration,
  hugetlb)"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  include/linux/log2.h: add missing () around n in roundup_pow_of_two()
  mm/khugepaged.c: fix khugepaged's request size in collapse_file
  mm/hugetlb: fix a race between hugetlb sysctl handlers
  mm/hugetlb: try preferred node first when alloc gigantic page from cma
  mm/migrate: preserve soft dirty in remove_migration_pte()
  mm/migrate: remove unnecessary is_zone_device_page() check
  mm/rmap: fixup copying of soft dirty and uffd ptes
  mm/migrate: fixup setting UFFD_WP flag
  mm: madvise: fix vma user-after-free
  checkpatch: fix the usage of capture group ( ... )
  fork: adjust sysctl_max_threads definition to match prototype
  ipc: adjust proc_ipc_sem_dointvec definition to match prototype
  mm: track page table modifications in __apply_to_page_range()
  MAINTAINERS: IA64: mark Status as Odd Fixes only
  MAINTAINERS: add LLVM maintainers
  MAINTAINERS: update Cavium/Marvell entries
  mm: slub: fix conversion of freelist_corrupted()
  mm: memcg: fix memcg reclaim soft lockup
  memcg: fix use-after-free in uncharge_batch
parents 9322c47b 428fc0af
Loading
Loading
Loading
Loading
+16 −16
Original line number Diff line number Diff line
@@ -1694,7 +1694,6 @@ F: arch/arm/mach-cns3xxx/
ARM/CAVIUM THUNDER NETWORK DRIVER
M:	Sunil Goutham <sgoutham@marvell.com>
M:	Robert Richter <rrichter@marvell.com>
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Supported
F:	drivers/net/ethernet/cavium/thunder/
@@ -3948,8 +3947,8 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/carl9170
F:	drivers/net/wireless/ath/carl9170/
CAVIUM I2C DRIVER
M:	Robert Richter <rrichter@marvell.com>
S:	Supported
M:	Robert Richter <rric@kernel.org>
S:	Odd Fixes
W:	http://www.marvell.com
F:	drivers/i2c/busses/i2c-octeon*
F:	drivers/i2c/busses/i2c-thunderx*
@@ -3964,8 +3963,8 @@ W: http://www.marvell.com
F:	drivers/net/ethernet/cavium/liquidio/
CAVIUM MMC DRIVER
M:	Robert Richter <rrichter@marvell.com>
S:	Supported
M:	Robert Richter <rric@kernel.org>
S:	Odd Fixes
W:	http://www.marvell.com
F:	drivers/mmc/host/cavium*
@@ -3977,9 +3976,9 @@ W: http://www.marvell.com
F:	drivers/crypto/cavium/cpt/
CAVIUM THUNDERX2 ARM64 SOC
M:	Robert Richter <rrichter@marvell.com>
M:	Robert Richter <rric@kernel.org>
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Maintained
S:	Odd Fixes
F:	Documentation/devicetree/bindings/arm/cavium-thunder2.txt
F:	arch/arm64/boot/dts/cavium/thunder2-99xx*
@@ -4258,6 +4257,8 @@ S: Maintained
F:	.clang-format
CLANG/LLVM BUILD SUPPORT
M:	Nathan Chancellor <natechancellor@gmail.com>
M:	Nick Desaulniers <ndesaulniers@google.com>
L:	clang-built-linux@googlegroups.com
S:	Supported
W:	https://clangbuiltlinux.github.io/
@@ -6191,16 +6192,15 @@ F: drivers/edac/highbank*
EDAC-CAVIUM OCTEON
M:	Ralf Baechle <ralf@linux-mips.org>
M:	Robert Richter <rrichter@marvell.com>
L:	linux-edac@vger.kernel.org
L:	linux-mips@vger.kernel.org
S:	Supported
F:	drivers/edac/octeon_edac*
EDAC-CAVIUM THUNDERX
M:	Robert Richter <rrichter@marvell.com>
M:	Robert Richter <rric@kernel.org>
L:	linux-edac@vger.kernel.org
S:	Supported
S:	Odd Fixes
F:	drivers/edac/thunderx_edac*
EDAC-CORE
@@ -6208,7 +6208,7 @@ M: Borislav Petkov <bp@alien8.de>
M:	Mauro Carvalho Chehab <mchehab@kernel.org>
M:	Tony Luck <tony.luck@intel.com>
R:	James Morse <james.morse@arm.com>
R:	Robert Richter <rrichter@marvell.com>
R:	Robert Richter <rric@kernel.org>
L:	linux-edac@vger.kernel.org
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac-for-next
@@ -8272,7 +8272,7 @@ IA64 (Itanium) PLATFORM
M:	Tony Luck <tony.luck@intel.com>
M:	Fenghua Yu <fenghua.yu@intel.com>
L:	linux-ia64@vger.kernel.org
S:	Maintained
S:	Odd Fixes
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
F:	Documentation/ia64/
F:	arch/ia64/
@@ -13446,10 +13446,10 @@ F: Documentation/devicetree/bindings/pci/axis,artpec*
F:	drivers/pci/controller/dwc/*artpec*
PCIE DRIVER FOR CAVIUM THUNDERX
M:	Robert Richter <rrichter@marvell.com>
M:	Robert Richter <rric@kernel.org>
L:	linux-pci@vger.kernel.org
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Supported
S:	Odd Fixes
F:	drivers/pci/controller/pci-thunder-*
PCIE DRIVER FOR HISILICON
@@ -17237,8 +17237,8 @@ S: Maintained
F:	drivers/net/thunderbolt.c
THUNDERX GPIO DRIVER
M:	Robert Richter <rrichter@marvell.com>
S:	Maintained
M:	Robert Richter <rric@kernel.org>
S:	Odd Fixes
F:	drivers/gpio/gpio-thunderx.c
TI AM437X VPFE DRIVER
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
#define roundup_pow_of_two(n)			\
(						\
	__builtin_constant_p(n) ? (		\
		(n == 1) ? 1 :			\
		((n) == 1) ? 1 :		\
		(1UL << (ilog2((n) - 1) + 1))	\
				   ) :		\
	__roundup_pow_of_two(n)			\
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ static int proc_ipc_auto_msgmni(struct ctl_table *table, int write,
}

static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
	void __user *buffer, size_t *lenp, loff_t *ppos)
	void *buffer, size_t *lenp, loff_t *ppos)
{
	int ret, semmni;
	struct ipc_namespace *ns = current->nsproxy->ipc_ns;
+1 −1
Original line number Diff line number Diff line
@@ -3014,7 +3014,7 @@ int unshare_files(struct files_struct **displaced)
}

int sysctl_max_threads(struct ctl_table *table, int write,
		       void __user *buffer, size_t *lenp, loff_t *ppos)
		       void *buffer, size_t *lenp, loff_t *ppos)
{
	struct ctl_table t;
	int ret;
+37 −12
Original line number Diff line number Diff line
@@ -1250,14 +1250,24 @@ static struct page *alloc_gigantic_page(struct hstate *h, gfp_t gfp_mask,
		int nid, nodemask_t *nodemask)
{
	unsigned long nr_pages = 1UL << huge_page_order(h);
	if (nid == NUMA_NO_NODE)
		nid = numa_mem_id();

#ifdef CONFIG_CMA
	{
		struct page *page;
		int node;

		if (hugetlb_cma[nid]) {
			page = cma_alloc(hugetlb_cma[nid], nr_pages,
					huge_page_order(h), true);
			if (page)
				return page;
		}

		if (!(gfp_mask & __GFP_THISNODE)) {
			for_each_node_mask(node, *nodemask) {
			if (!hugetlb_cma[node])
				if (node == nid || !hugetlb_cma[node])
					continue;

				page = cma_alloc(hugetlb_cma[node], nr_pages,
@@ -1266,6 +1276,7 @@ static struct page *alloc_gigantic_page(struct hstate *h, gfp_t gfp_mask,
					return page;
			}
		}
	}
#endif

	return alloc_contig_pages(nr_pages, gfp_mask, nid, nodemask);
@@ -3454,6 +3465,22 @@ static unsigned int allowed_mems_nr(struct hstate *h)
}

#ifdef CONFIG_SYSCTL
static int proc_hugetlb_doulongvec_minmax(struct ctl_table *table, int write,
					  void *buffer, size_t *length,
					  loff_t *ppos, unsigned long *out)
{
	struct ctl_table dup_table;

	/*
	 * In order to avoid races with __do_proc_doulongvec_minmax(), we
	 * can duplicate the @table and alter the duplicate of it.
	 */
	dup_table = *table;
	dup_table.data = out;

	return proc_doulongvec_minmax(&dup_table, write, buffer, length, ppos);
}

static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
			 struct ctl_table *table, int write,
			 void *buffer, size_t *length, loff_t *ppos)
@@ -3465,9 +3492,8 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
	if (!hugepages_supported())
		return -EOPNOTSUPP;

	table->data = &tmp;
	table->maxlen = sizeof(unsigned long);
	ret = proc_doulongvec_minmax(table, write, buffer, length, ppos);
	ret = proc_hugetlb_doulongvec_minmax(table, write, buffer, length, ppos,
					     &tmp);
	if (ret)
		goto out;

@@ -3510,9 +3536,8 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
	if (write && hstate_is_gigantic(h))
		return -EINVAL;

	table->data = &tmp;
	table->maxlen = sizeof(unsigned long);
	ret = proc_doulongvec_minmax(table, write, buffer, length, ppos);
	ret = proc_hugetlb_doulongvec_minmax(table, write, buffer, length, ppos,
					     &tmp);
	if (ret)
		goto out;

Loading