Merge 4.9.31 into android-4.9

Changes in 4.9.31
	dccp/tcp: do not inherit mc_list from parent
	driver: vrf: Fix one possible use-after-free issue
	ipv6/dccp: do not inherit ipv6_mc_list from parent
	s390/qeth: handle sysfs error during initialization
	s390/qeth: unbreak OSM and OSN support
	s390/qeth: avoid null pointer dereference on OSN
	s390/qeth: add missing hash table initializations
	bpf, arm64: fix faulty emission of map access in tail calls
	netem: fix skb_orphan_partial()
	net: fix compile error in skb_orphan_partial()
	tcp: avoid fragmenting peculiar skbs in SACK
	sctp: fix src address selection if using secondary addresses for ipv6
	sctp: do not inherit ipv6_{mc|ac|fl}_list from parent
	net/packet: fix missing net_device reference release
	net/mlx5e: Use the correct pause values for ethtool advertising
	net/mlx5e: Fix ethtool pause support and advertise reporting
	tcp: eliminate negative reordering in tcp_clean_rtx_queue
	net: Improve handling of failures on link and route dumps
	ipv6: Prevent overrun when parsing v6 header options
	ipv6: Check ip6_find_1stfragopt() return value properly.
	bridge: netlink: check vlan_default_pvid range
	qmi_wwan: add another Lenovo EM74xx device ID
	bridge: start hello_timer when enabling KERNEL_STP in br_stp_start
	ipv6: fix out of bound writes in __ip6_append_data()
	bonding: fix accounting of active ports in 3ad
	net/mlx5: Avoid using pending command interface slots
	net: phy: marvell: Limit errata to 88m1101
	vlan: Fix tcp checksum offloads in Q-in-Q vlans
	be2net: Fix offload features for Q-in-Q packets
	virtio-net: enable TSO/checksum offloads for Q-in-Q vlans
	tcp: avoid fastopen API to be used on AF_UNSPEC
	sctp: fix ICMP processing if skb is non-linear
	ipv4: add reference counting to metrics
	bpf: add bpf_clone_redirect to bpf_helper_changes_pkt_data
	sparc: Fix -Wstringop-overflow warning
	sparc/ftrace: Fix ftrace graph time measurement
	fs/ufs: Set UFS default maximum bytes per file
	powerpc/spufs: Fix hash faults for kernel regions
	drivers/tty: 8250: only call fintek_8250_probe when doing port I/O
	i2c: i2c-tiny-usb: fix buffer not being DMA capable
	crypto: skcipher - Add missing API setkey checks
	x86/MCE: Export memory_error()
	acpi, nfit: Fix the memory error check in nfit_handle_mce()
	Revert "ACPI / button: Change default behavior to lid_init_state=open"
	mmc: sdhci-iproc: suppress spurious interrupt with Multiblock read
	iscsi-target: Always wait for kthread_should_stop() before kthread exit
	ibmvscsis: Clear left-over abort_cmd pointers
	ibmvscsis: Fix the incorrect req_lim_delta
	HID: wacom: Have wacom_tpc_irq guard against possible NULL dereference
	nvme-rdma: support devices with queue size < 32
	nvme: use blk_mq_start_hw_queues() in nvme_kill_queues()
	nvme: avoid to use blk_mq_abort_requeue_list()
	scsi: mpt3sas: Force request partial completion alignment
	drm/radeon/ci: disable mclk switching for high refresh rates (v2)
	drm/radeon: Unbreak HPD handling for r600+
	drm/radeon: Fix vram_size/visible values in DRM_RADEON_GEM_INFO ioctl
	pcmcia: remove left-over %Z format
	ALSA: hda - apply STAC_9200_DELL_M22 quirk for Dell Latitude D430
	mm/migrate: fix refcount handling when !hugepage_migration_supported()
	mlock: fix mlock count can not decrease in race condition
	mm: consider memblock reservations for deferred memory initialization sizing
	RDMA/qib,hfi1: Fix MR reference count leak on write with immediate
	x86/boot: Use CROSS_COMPILE prefix for readelf
	ksm: prevent crash after write_protect_page fails
	slub/memcg: cure the brainless abuse of sysfs attributes
	mm/slub.c: trace free objects at KERN_INFO
	drm/gma500/psb: Actually use VBT mode when it is found
	xfs: Fix missed holes in SEEK_HOLE implementation
	xfs: use ->b_state to fix buffer I/O accounting release race
	xfs: fix off-by-one on max nr_pages in xfs_find_get_desired_pgoff()
	xfs: verify inline directory data forks
	xfs: rework the inline directory verifiers
	xfs: fix kernel memory exposure problems
	xfs: use dedicated log worker wq to avoid deadlock with cil wq
	xfs: fix over-copying of getbmap parameters from userspace
	xfs: actually report xattr extents via iomap
	xfs: drop iolock from reclaim context to appease lockdep
	xfs: fix integer truncation in xfs_bmap_remap_alloc
	xfs: handle array index overrun in xfs_dir2_leaf_readbuf()
	xfs: prevent multi-fsb dir readahead from reading random blocks
	xfs: fix up quotacheck buffer list error handling
	xfs: support ability to wait on new inodes
	xfs: update ag iterator to support wait on new inodes
	xfs: wait on new inodes during quotaoff dquot release
	xfs: reserve enough blocks to handle btree splits when remapping
	xfs: fix use-after-free in xfs_finish_page_writeback
	xfs: fix indlen accounting error on partial delalloc conversion
	xfs: BMAPX shouldn't barf on inline-format directories
	xfs: bad assertion for delalloc an extent that start at i_size
	xfs: xfs_trans_alloc_empty
	xfs: avoid mount-time deadlock in CoW extent recovery
	xfs: fix unaligned access in xfs_btree_visit_blocks
	xfs: Fix off-by-in in loop termination in xfs_find_get_desired_pgoff()
	Linux 4.9.31

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2017-06-07 12:37:47 +02:00
119 changed files with 1109 additions and 446 deletions
+1 -2
View File
@@ -1002,8 +1002,7 @@ static int try_to_merge_one_page(struct vm_area_struct *vma,
goto out;
if (PageTransCompound(page)) {
err = split_huge_page(page);
if (err)
if (split_huge_page(page))
goto out_unlock;
}
+23
View File
@@ -1696,6 +1696,29 @@ static void __init_memblock memblock_dump(struct memblock_type *type, char *name
}
}
extern unsigned long __init_memblock
memblock_reserved_memory_within(phys_addr_t start_addr, phys_addr_t end_addr)
{
struct memblock_region *rgn;
unsigned long size = 0;
int idx;
for_each_memblock_type((&memblock.reserved), rgn) {
phys_addr_t start, end;
if (rgn->base + rgn->size < start_addr)
continue;
if (rgn->base > end_addr)
continue;
start = rgn->base;
end = start + rgn->size;
size += end - start;
}
return size;
}
void __init_memblock __memblock_dump_all(void)
{
pr_info("MEMBLOCK configuration:\n");
+2 -6
View File
@@ -1587,12 +1587,8 @@ static int soft_offline_huge_page(struct page *page, int flags)
if (ret) {
pr_info("soft offline: %#lx: migration failed %d, type %lx\n",
pfn, ret, page->flags);
/*
* We know that soft_offline_huge_page() tries to migrate
* only one hugepage pointed to by hpage, so we need not
* run through the pagelist here.
*/
putback_active_hugepage(hpage);
if (!list_empty(&pagelist))
putback_movable_pages(&pagelist);
if (ret > 0)
ret = -EIO;
} else {
+3 -2
View File
@@ -285,7 +285,7 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)
{
int i;
int nr = pagevec_count(pvec);
int delta_munlocked;
int delta_munlocked = -nr;
struct pagevec pvec_putback;
int pgrescued = 0;
@@ -305,6 +305,8 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)
continue;
else
__munlock_isolation_failed(page);
} else {
delta_munlocked++;
}
/*
@@ -316,7 +318,6 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)
pagevec_add(&pvec_putback, pvec->pages[i]);
pvec->pages[i] = NULL;
}
delta_munlocked = -nr + pagevec_count(&pvec_putback);
__mod_zone_page_state(zone, NR_MLOCK, delta_munlocked);
spin_unlock_irq(zone_lru_lock(zone));
+22 -11
View File
@@ -286,6 +286,26 @@ int page_group_by_mobility_disabled __read_mostly;
#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
static inline void reset_deferred_meminit(pg_data_t *pgdat)
{
unsigned long max_initialise;
unsigned long reserved_lowmem;
/*
* Initialise at least 2G of a node but also take into account that
* two large system hashes that can take up 1GB for 0.25TB/node.
*/
max_initialise = max(2UL << (30 - PAGE_SHIFT),
(pgdat->node_spanned_pages >> 8));
/*
* Compensate the all the memblock reservations (e.g. crash kernel)
* from the initial estimation to make sure we will initialize enough
* memory to boot.
*/
reserved_lowmem = memblock_reserved_memory_within(pgdat->node_start_pfn,
pgdat->node_start_pfn + max_initialise);
max_initialise += reserved_lowmem;
pgdat->static_init_size = min(max_initialise, pgdat->node_spanned_pages);
pgdat->first_deferred_pfn = ULONG_MAX;
}
@@ -308,20 +328,11 @@ static inline bool update_defer_init(pg_data_t *pgdat,
unsigned long pfn, unsigned long zone_end,
unsigned long *nr_initialised)
{
unsigned long max_initialise;
/* Always populate low zones for address-contrained allocations */
if (zone_end < pgdat_end_pfn(pgdat))
return true;
/*
* Initialise at least 2G of a node but also take into account that
* two large system hashes that can take up 1GB for 0.25TB/node.
*/
max_initialise = max(2UL << (30 - PAGE_SHIFT),
(pgdat->node_spanned_pages >> 8));
(*nr_initialised)++;
if ((*nr_initialised > max_initialise) &&
if ((*nr_initialised > pgdat->static_init_size) &&
(pfn & (PAGES_PER_SECTION - 1)) == 0) {
pgdat->first_deferred_pfn = pfn;
return false;
@@ -5911,7 +5922,6 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
/* pg_data_t should be reset to zero when it's allocated */
WARN_ON(pgdat->nr_zones || pgdat->kswapd_classzone_idx);
reset_deferred_meminit(pgdat);
pgdat->node_id = nid;
pgdat->node_start_pfn = node_start_pfn;
pgdat->per_cpu_nodestats = NULL;
@@ -5933,6 +5943,7 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
(unsigned long)pgdat->node_mem_map);
#endif
reset_deferred_meminit(pgdat);
free_area_init_core(pgdat);
}
+17 -12
View File
@@ -496,10 +496,11 @@ static inline int check_valid_pointer(struct kmem_cache *s,
return 1;
}
static void print_section(char *text, u8 *addr, unsigned int length)
static void print_section(char *level, char *text, u8 *addr,
unsigned int length)
{
metadata_access_enable();
print_hex_dump(KERN_ERR, text, DUMP_PREFIX_ADDRESS, 16, 1, addr,
print_hex_dump(level, text, DUMP_PREFIX_ADDRESS, 16, 1, addr,
length, 1);
metadata_access_disable();
}
@@ -636,14 +637,15 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p)
p, p - addr, get_freepointer(s, p));
if (s->flags & SLAB_RED_ZONE)
print_section("Redzone ", p - s->red_left_pad, s->red_left_pad);
print_section(KERN_ERR, "Redzone ", p - s->red_left_pad,
s->red_left_pad);
else if (p > addr + 16)
print_section("Bytes b4 ", p - 16, 16);
print_section(KERN_ERR, "Bytes b4 ", p - 16, 16);
print_section("Object ", p, min_t(unsigned long, s->object_size,
PAGE_SIZE));
print_section(KERN_ERR, "Object ", p,
min_t(unsigned long, s->object_size, PAGE_SIZE));
if (s->flags & SLAB_RED_ZONE)
print_section("Redzone ", p + s->object_size,
print_section(KERN_ERR, "Redzone ", p + s->object_size,
s->inuse - s->object_size);
if (s->offset)
@@ -658,7 +660,8 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p)
if (off != size_from_object(s))
/* Beginning of the filler is the free pointer */
print_section("Padding ", p + off, size_from_object(s) - off);
print_section(KERN_ERR, "Padding ", p + off,
size_from_object(s) - off);
dump_stack();
}
@@ -820,7 +823,7 @@ static int slab_pad_check(struct kmem_cache *s, struct page *page)
end--;
slab_err(s, page, "Padding overwritten. 0x%p-0x%p", fault, end - 1);
print_section("Padding ", end - remainder, remainder);
print_section(KERN_ERR, "Padding ", end - remainder, remainder);
restore_bytes(s, "slab padding", POISON_INUSE, end - remainder, end);
return 0;
@@ -973,7 +976,7 @@ static void trace(struct kmem_cache *s, struct page *page, void *object,
page->freelist);
if (!alloc)
print_section("Object ", (void *)object,
print_section(KERN_INFO, "Object ", (void *)object,
s->object_size);
dump_stack();
@@ -5452,6 +5455,7 @@ static void memcg_propagate_slab_attrs(struct kmem_cache *s)
char mbuf[64];
char *buf;
struct slab_attribute *attr = to_slab_attr(slab_attrs[i]);
ssize_t len;
if (!attr || !attr->store || !attr->show)
continue;
@@ -5476,8 +5480,9 @@ static void memcg_propagate_slab_attrs(struct kmem_cache *s)
buf = buffer;
}
attr->show(root_cache, buf);
attr->store(s, buf, strlen(buf));
len = attr->show(root_cache, buf);
if (len > 0)
attr->store(s, buf, len);
}
if (buffer)