[PATCH AUTOSEL for 4.9 250/293] ntb_transport: Fix bug with max_mw_size parameter

2018-04-08 Thread Sasha Levin
From: Logan Gunthorpe [ Upstream commit cbd27448faff4843ac4b66cc71445a10623ff48d ] When using the max_mw_size parameter of ntb_transport to limit the size of the Memory windows, communication cannot be established and the queues freeze. This is because the mw_size that's reported to the peer is

[PATCH AUTOSEL for 4.9 259/293] asm-generic: provide generic_pmdp_establish()

2018-04-08 Thread Sasha Levin
From: "Kirill A. Shutemov" [ Upstream commit c58f0bb77ed8bf93dfdde762b01cb67eebbdfc29 ] Patch series "Do not lose dirty bit on THP pages", v4. Vlastimil noted that pmdp_invalidate() is not atomic and we can lose dirty and access bits if CPU sets them after pmdp dereference, but before set_pmd_a

[PATCH AUTOSEL for 4.9 261/293] mm: thp: use down_read_trylock() in khugepaged to avoid long block

2018-04-08 Thread Sasha Levin
From: Yang Shi [ Upstream commit 3b454ad35043dfbd3b5d2bb92b0991d6342afb44 ] In the current design, khugepaged needs to acquire mmap_sem before scanning an mm. But in some corner cases, khugepaged may scan a process which is modifying its memory mapping, so khugepaged blocks in uninterruptible s

[PATCH AUTOSEL for 4.9 245/293] device property: Define type of PROPERTY_ENRTY_*() macros

2018-04-08 Thread Sasha Levin
From: Andy Shevchenko [ Upstream commit c505cbd45f6e9c539d57dd171d95ec7e5e9f9cd0 ] Some of the drivers may use the macro at runtime flow, like struct property_entry p[10]; ... p[index++] = PROPERTY_ENTRY_U8("u8 property", u8_data); In that case and absence of the data type compiler fails t

[PATCH AUTOSEL for 4.9 257/293] mm/mempolicy: fix the check of nodemask from user

2018-04-08 Thread Sasha Levin
From: Yisheng Xie [ Upstream commit 56521e7a02b7b84a5e72691a1fb15570e6055545 ] As Xiaojun reported the ltp of migrate_pages01 will fail on arm64 system which has 4 nodes[0...3], all have memory and CONFIG_NODES_SHIFT=2: migrate_pages010 TINFO : test_invalid_nodes migrate_pages01 14

[PATCH AUTOSEL for 4.9 247/293] powerpc/numa: Use ibm,max-associativity-domains to discover possible nodes

2018-04-08 Thread Sasha Levin
From: Michael Bringmann [ Upstream commit a346137e9142b039fd13af2e59696e3d40c487ef ] On powerpc systems which allow 'hot-add' of CPU or memory resources, it may occur that the new resources are to be inserted into nodes that were not used for these resources at bootup. In the kernel, any node th

[PATCH AUTOSEL for 4.9 256/293] ocfs2: return error when we attempt to access a dirty bh in jbd2

2018-04-08 Thread Sasha Levin
From: piaojun [ Upstream commit d984187e3a1ad7d12447a7ab2c43ce3717a2b5b3 ] We should not reuse the dirty bh in jbd2 directly due to the following situation: 1. When removing extent rec, we will dirty the bhs of extent rec and truncate log at the same time, and hand them over to jbd2. 2. The

[PATCH AUTOSEL for 4.9 260/293] sparc64: update pmdp_invalidate() to return old pmd value

2018-04-08 Thread Sasha Levin
From: Nitin Gupta [ Upstream commit a8e654f01cb725d0bfd741ebca1bf4c9337969cc ] It's required to avoid losing dirty and accessed bits. [a...@linux-foundation.org: add a `do' to the do-while loop] Link: http://lkml.kernel.org/r/20171213105756.69879-9-kirill.shute...@linux.intel.com Signed-off-by

[PATCH AUTOSEL for 4.9 249/293] RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure

2018-04-08 Thread Sasha Levin
From: Leon Romanovsky [ Upstream commit b081808a66345ba725b77ecd8d759bee874cd937 ] Failure in XRCD FW deallocation command leaves memory leaked and returns error to the user which he can't do anything about it. This patch changes behavior to always free memory and always return success to the u

[PATCH AUTOSEL for 4.9 246/293] jffs2: Fix use-after-free bug in jffs2_iget()'s error handling path

2018-04-08 Thread Sasha Levin
From: Jake Daryll Obina [ Upstream commit 5bdd0c6f89fba430e18d636493398389dadc3b17 ] If jffs2_iget() fails for a newly-allocated inode, jffs2_do_clear_inode() can get called twice in the error handling path, the first call in jffs2_iget() itself and the second through iget_failed(). This can res

[PATCH AUTOSEL for 4.9 255/293] ocfs2/acl: use 'ip_xattr_sem' to protect getting extended attribute

2018-04-08 Thread Sasha Levin
From: piaojun [ Upstream commit 16c8d569f5704a84164f30ff01b29879f3438065 ] The race between *set_acl and *get_acl will cause getting incomplete xattr data as below: processAprocessB ocfs2_set_acl ocfs2_xattr_set __ocfs2_xattr_set_handle

[PATCH AUTOSEL for 4.9 254/293] ocfs2: return -EROFS to mount.ocfs2 if inode block is invalid

2018-04-08 Thread Sasha Levin
From: piaojun [ Upstream commit 025bcbde3634b2c9b316f227fed13ad6ad6817fb ] If metadata is corrupted such as 'invalid inode block', we will get failed by calling 'mount()' and then set filesystem readonly as below: ocfs2_mount ocfs2_initialize_super ocfs2_init_global_system_inodes

[PATCH AUTOSEL for 4.9 253/293] kvm: Map PFN-type memory regions as writable (if possible)

2018-04-08 Thread Sasha Levin
From: KarimAllah Ahmed [ Upstream commit a340b3e229b24a56f1c7f5826b15a3af0f4b13e5 ] For EPT-violations that are triggered by a read, the pages are also mapped with write permissions (if their memory region is also writable). That would avoid getting yet another fault on the same page when a writ

[PATCH AUTOSEL for 4.9 251/293] gianfar: prevent integer wrapping in the rx handler

2018-04-08 Thread Sasha Levin
From: Andy Spencer [ Upstream commit 202a0a70e445caee1d0ec7aae814e64b1189fa4d ] When the frame check sequence (FCS) is split across the last two frames of a fragmented packet, part of the FCS gets counted twice, once when subtracting the FCS, and again when subtracting the previously received da

[PATCH AUTOSEL for 4.9 252/293] tcp_nv: fix potential integer overflow in tcpnv_acked

2018-04-08 Thread Sasha Levin
From: "Gustavo A. R. Silva" [ Upstream commit e4823fbd229bfbba368b40cdadb8f4eeb20604cc ] Add suffix ULL to constant 8 in order to avoid a potential integer overflow and give the compiler complete information about the proper arithmetic to use. Notice that this constant is used in a context t

[PATCH AUTOSEL for 4.9 243/293] HID: roccat: prevent an out of bounds read in kovaplus_profile_activated()

2018-04-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 7ad81482cad67cbe1ec808490d1ddfc420c42008 ] We get the "new_profile_index" value from the mouse device when we're handling raw events. Smatch taints it as untrusted data and complains that we need a bounds check. This seems like a reasonable warning otherwi

[PATCH AUTOSEL for 4.9 248/293] powerpc/numa: Ensure nodes initialized for hotplug

2018-04-08 Thread Sasha Levin
From: Michael Bringmann [ Upstream commit ea05ba7c559c8e5a5946c3a94a2a266e9a6680a6 ] This patch fixes some problems encountered at runtime with configurations that support memory-less nodes, or that hot-add CPUs into nodes that are memoryless during system execution after boot. The problems of i

[PATCH AUTOSEL for 4.9 244/293] fm10k: fix "failed to kill vid" message for VF

2018-04-08 Thread Sasha Levin
From: Ngai-Mint Kwan [ Upstream commit cf315ea596ec26d7aa542a9ce354990875a920c0 ] When a VF is under PF VLAN assignment: ip link set vf <#> vlan This will remove all previous entries in the VLAN table including those generated by VLAN interfaces created on the VF. The issue arises when the V

[PATCH AUTOSEL for 4.9 242/293] scsi: fas216: fix sense buffer initialization

2018-04-08 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 96d5eaa9bb74d299508d811d865c2c41b38b0301 ] While testing with the ARM specific memset() macro removed, I ran into a compiler warning that shows an old bug: drivers/scsi/arm/fas216.c: In function 'fas216_rq_sns_done': drivers/scsi/arm/fas216.c:2014:40: error

[PATCH AUTOSEL for 4.9 241/293] scsi: devinfo: fix format of the device list

2018-04-08 Thread Sasha Levin
From: Xose Vazquez Perez [ Upstream commit 3f884a0a8bdf28cfd1e9987d54d83350096cdd46 ] Replace "" with NULL for product revision level, and merge TEXEL duplicate entries. Cc: Hannes Reinecke Cc: Martin K. Petersen Cc: James E.J. Bottomley Cc: SCSI ML Signed-off-by: Xose Vazquez Perez Signed

[PATCH AUTOSEL for 4.9 233/293] kconfig: Fix automatic menu creation mem leak

2018-04-08 Thread Sasha Levin
From: Ulf Magnusson [ Upstream commit ae7440ef0c8013d68c00dad6900e7cce5311bb1c ] expr_trans_compare() always allocates and returns a new expression, giving the following leak outline: ... *Allocate* basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no); ..

[PATCH AUTOSEL for 4.9 230/293] clk: ingenic: Fix recalc_rate for clocks with fixed divider

2018-04-08 Thread Sasha Levin
From: Paul Cercueil [ Upstream commit e6cfa64375d34a6c8c1861868a381013b2d3b921 ] Previously, the clocks with a fixed divider would report their rate as being the same as the one of their parent, independently of the divider in use. This commit fixes this behaviour. This went unnoticed as neithe

[PATCH AUTOSEL for 4.9 231/293] watchdog: sp5100_tco: Fix watchdog disable bit

2018-04-08 Thread Sasha Levin
From: Guenter Roeck [ Upstream commit f541c09ebfc61697b586b38c9ebaf4b70defb278 ] According to all published information, the watchdog disable bit for SB800 compatible controllers is bit 1 of PM register 0x48, not bit 2. For the most part that doesn't matter in practice, since the bit has to be c

[PATCH AUTOSEL for 4.9 239/293] Btrfs: fix scrub to repair raid6 corruption

2018-04-08 Thread Sasha Levin
From: Liu Bo [ Upstream commit 762221f095e3932669093466aaf4b85ed9ad2ac1 ] The raid6 corruption is that, suppose that all disks can be read without problems and if the content that was read out doesn't match its checksum, currently for raid6 btrfs at most retries twice, - the 1st retry is to reb

[PATCH AUTOSEL for 4.9 238/293] btrfs: Fix out of bounds access in btrfs_search_slot

2018-04-08 Thread Sasha Levin
From: Nikolay Borisov [ Upstream commit 9ea2c7c9da13c9073e371c046cbbc45481ecb459 ] When modifying a tree where the root is at BTRFS_MAX_LEVEL - 1 then the level variable is going to be 7 (this is the max height of the tree). On the other hand btrfs_cow_block is always called with "level + 1" as

[PATCH AUTOSEL for 4.9 236/293] ipmi/powernv: Fix error return code in ipmi_powernv_probe()

2018-04-08 Thread Sasha Levin
From: Wei Yongjun [ Upstream commit e749d328b0b450aa78d562fa26a0cd8872325dd9 ] Fix to return a negative error code from the request_irq() error handling case instead of 0, as done elsewhere in this function. Fixes: dce143c3381c ("ipmi/powernv: Convert to irq event interface") Signed-off-by: Wei

[PATCH AUTOSEL for 4.9 234/293] kconfig: Fix expr_free() E_NOT leak

2018-04-08 Thread Sasha Levin
From: Ulf Magnusson [ Upstream commit 5b1374b3b3c2fc4f63a398adfa446fb8eff791a4 ] Only the E_NOT operand and not the E_NOT node itself was freed, due to accidentally returning too early in expr_free(). Outline of leak: switch (e->type) { ... case E_NOT: ex

[PATCH AUTOSEL for 4.9 229/293] nfs: Do not convert nfs_idmap_cache_timeout to jiffies

2018-04-08 Thread Sasha Levin
From: Jan Chochol [ Upstream commit cbebc6ef4fc830f4040d4140bf53484812d5d5d9 ] Since commit 57e62324e469 ("NFS: Store the legacy idmapper result in the keyring") nfs_idmap_cache_timeout changed units from jiffies to seconds. Unfortunately sysctl interface was not updated accordingly. As a effec

[PATCH AUTOSEL for 4.9 235/293] mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()

2018-04-08 Thread Sasha Levin
From: "weiyongjun (A)" [ Upstream commit 0ddcff49b672239dda94d70d0fcf50317a9f4b51 ] 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NA

[PATCH AUTOSEL for 4.9 225/293] iommu/vt-d: Use domain instead of cache fetching

2018-04-08 Thread Sasha Levin
From: Peter Xu [ Upstream commit 9d2e6505f6d6934e681aed502f566198cb25c74a ] after commit a1ddcbe93010 ("iommu/vt-d: Pass dmar_domain directly into iommu_flush_iotlb_psi", 2015-08-12), we have domain pointer as parameter to iommu_flush_iotlb_psi(), so no need to fetch it from cache again. More i

[PATCH AUTOSEL for 4.9 226/293] dm thin: fix documentation relative to low water mark threshold

2018-04-08 Thread Sasha Levin
From: mulhern [ Upstream commit 9b28a1102efc75d81298198166ead87d643a29ce ] Fixes: 1. The use of "exceeds" when the opposite of exceeds, falls below, was meant. 2. Properly speaking, a table can not exceed a threshold. It emphasizes the important point, which is that it is the userspace daemon's

[PATCH AUTOSEL for 4.9 228/293] net: stmmac: dwmac-meson8b: propagate rate changes to the parent clock

2018-04-08 Thread Sasha Levin
From: Martin Blumenstingl [ Upstream commit fb7d38a70e1d8ffd54f7a7464dcc4889d7e490ad ] On Meson8b the only valid input clock is MPLL2. The bootloader configures that to run at 52394Hz which cannot be divided evenly down to 125MHz using the m250_div clock. Currently the common clock framework

[PATCH AUTOSEL for 4.9 223/293] tools lib traceevent: Fix get_field_str() for dynamic strings

2018-04-08 Thread Sasha Levin
From: "Steven Rostedt (VMware)" [ Upstream commit d777f8de99b05d399c0e4e51cdce016f26bd971b ] If a field is a dynamic string, get_field_str() returned just the offset/size value and not the string. Have it parse the offset/size correctly to return the actual string. Otherwise filtering fails when

[PATCH AUTOSEL for 4.9 220/293] i40iw: Zero-out consumer key on allocate stag for FMR

2018-04-08 Thread Sasha Levin
From: Shiraz Saleem [ Upstream commit 6376e926af1a8661dd1b2e6d0896e07f84a35844 ] If the application invalidates the MR before the FMR WR, HW parses the consumer key portion of the stag and returns an invalid stag key Asynchronous Event (AE) that tears down the QP. Fix this by zeroing-out the co

[PATCH AUTOSEL for 4.9 224/293] perf record: Fix failed memory allocation for get_cpuid_str

2018-04-08 Thread Sasha Levin
From: Thomas Richter [ Upstream commit 81fccd6ca507d3b2012eaf1edeb9b1dbf4bd22db ] In x86 architecture dependend part function get_cpuid_str() mallocs a 128 byte buffer, but does not check if the memory allocation succeeded or not. When the memory allocation fails, function __get_cpuid() is call

[PATCH AUTOSEL for 4.9 221/293] tools lib traceevent: Simplify pointer print logic and fix %pF

2018-04-08 Thread Sasha Levin
From: "Steven Rostedt (VMware)" [ Upstream commit 38d70b7ca1769f26c0b79f3c08ff2cc949712b59 ] When processing %pX in pretty_print(), simplify the logic slightly by incrementing the ptr to the format string if isalnum(ptr[1]) is true. This follows the logic a bit more closely to what is in the ker

[PATCH AUTOSEL for 4.9 216/293] netfilter: ipv6: nf_defrag: Pass on packets to stack per RFC2460

2018-04-08 Thread Sasha Levin
From: Subash Abhinov Kasiviswanathan [ Upstream commit 83f1999caeb14e15df205e80d210699951733287 ] ipv6_defrag pulls network headers before fragment header. In case of an error, the netfilter layer is currently dropping these packets. This results in failure of some IPv6 standards tests which pas

[PATCH AUTOSEL for 4.9 222/293] perf callchain: Fix attr.sample_max_stack setting

2018-04-08 Thread Sasha Levin
From: Arnaldo Carvalho de Melo [ Upstream commit 249d98e567e25dd03e015e2d31e1b7b9648f34df ] When setting the "dwarf" unwinder for a specific event and not specifying the max-stack, the attr.sample_max_stack ended up using an uninitialized callchain_param.max_stack, fix it by using designated ini

[PATCH AUTOSEL for 4.9 218/293] PCI: Add function 1 DMA alias quirk for Marvell 9128

2018-04-08 Thread Sasha Levin
From: Alex Williamson [ Upstream commit aa008206634363ef800fbd5f0262016c9ff81dea ] The Marvell 9128 is the original device generating bug 42679, from which many other Marvell DMA alias quirks have been sourced, but we didn't have positive confirmation of the fix on 9128 until now. Link: https:/

[PATCH AUTOSEL for 4.9 211/293] x86/tsc: Allow TSC calibration without PIT

2018-04-08 Thread Sasha Levin
From: Peter Zijlstra [ Upstream commit 30c7e5b123673d5e570e238dbada2fb68a87212c ] Zhang Rui reported that a Surface Pro 4 will fail to boot with lapic=notscdeadline. Part of the problem is that that machine doesn't have a PIT. If, for some reason, the TSC init has to fall back to TSC calibratio

[PATCH AUTOSEL for 4.9 217/293] tracing/hrtimer: Fix tracing bugs by taking all clock bases and modes into account

2018-04-08 Thread Sasha Levin
From: Anna-Maria Gleixner [ Upstream commit 91633eed73a3ac37aaece5c8c1f93a18bae616a9 ] So far only CLOCK_MONOTONIC and CLOCK_REALTIME were taken into account as well as HRTIMER_MODE_ABS/REL in the hrtimer_init tracepoint. The query for detecting the ABS or REL timer modes is not valid anymore, i

[PATCH AUTOSEL for 4.9 215/293] kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl

2018-04-08 Thread Sasha Levin
From: Paolo Bonzini [ Upstream commit 51776043afa415435c7e4636204fbe4f7edc4501 ] This ioctl is obsolete (it was used by Xenner as far as I know) but still let's not break it gratuitously... Its handler is copying directly into struct kvm. Go through a bounce buffer instead, with the added bene

[PATCH] mm: workingset: fix NULL ptr dereference

2018-04-08 Thread Minchan Kim
Recently, I got a report like below. [ 7858.792946] [] __list_del_entry+0x30/0xd0 [ 7858.792951] [] list_lru_del+0xac/0x1ac [ 7858.792957] [] page_cache_tree_insert+0xd8/0x110 [ 7858.792962] [] __add_to_page_cache_locked+0xf8/0x4e0 [ 7858.792967] [] add_to_page_cache_lru+0x50/0x1ac [ 7858.792972]

[PATCH AUTOSEL for 4.9 212/293] NFSv4: always set NFS_LOCK_LOST when a lock is lost.

2018-04-08 Thread Sasha Levin
From: NeilBrown [ Upstream commit dce2630c7da73b0634686bca557cc8945cc450c8 ] There are 2 comments in the NFSv4 code which suggest that SIGLOST should possibly be sent to a process. In these cases a lock has been lost. The current practice is to set NFS_LOCK_LOST so that read/write returns EIO w

[PATCH AUTOSEL for 4.9 213/293] ALSA: hda - Use IS_REACHABLE() for dependency on input

2018-04-08 Thread Sasha Levin
From: Takashi Iwai [ Upstream commit c469652bb5e8fb715db7d152f46d33b3740c9b87 ] The commit ffcd28d88e4f ("ALSA: hda - Select INPUT for Realtek HD-audio codec") introduced the reverse-selection of CONFIG_INPUT for Realtek codec in order to avoid the mess with dependency between built-in and modul

[PATCH AUTOSEL for 4.9 214/293] ASoC: au1x: Fix timeout tests in au1xac97c_ac97_read()

2018-04-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 123af9043e93cb6f235207d260d50f832cdb5439 ] The loop timeout doesn't work because it's a post op and ends with "tmo" set to -1. I changed it from a post-op to a pre-op and I changed the initial the starting value from 5 to 6 so we still iterate 5 times. I l

Re: linux-next: manual merge of the scsi-mkp tree with the efi-lock-down tree

2018-04-08 Thread Stephen Rothwell
Hi all, On Fri, 6 Apr 2018 09:22:16 +1000 Stephen Rothwell wrote: > > On Thu, 15 Mar 2018 18:34:12 +1100 Stephen Rothwell > wrote: > > > > Today's linux-next merge of the scsi-mkp tree got a conflict in: > > > > drivers/scsi/eata.c > > > > between commit: > > > > 5b76b160badb ("scsi: Lo

[PATCH AUTOSEL for 4.9 198/293] powerpc64/elfv1: Only dereference function descriptor for non-text symbols

2018-04-08 Thread Sasha Levin
From: "Naveen N. Rao" [ Upstream commit 83e840c770f2c578bbbff478d62a4403c073b438 ] Currently, we assume that the function pointer we receive in ppc_function_entry() points to a function descriptor. However, this is not always the case. In particular, assembly symbols without the right annotation

[PATCH AUTOSEL for 4.9 208/293] perf unwind: Do not fail due to missing unwind support

2018-04-08 Thread Sasha Levin
From: Jiri Olsa [ Upstream commit 1934adf78e33fa69570a763c7ac5353212416bb0 ] We currently fail the MMAP event processing if we don't have the MMAP event's specific arch unwind support compiled in. That's wrong and can lead to unresolved mmaps in report output for 32bit binaries on 64bit server,

[PATCH AUTOSEL for 4.9 207/293] perf evsel: Set attr.exclude_kernel when probing max attr.precise_ip

2018-04-08 Thread Sasha Levin
From: Arnaldo Carvalho de Melo [ Upstream commit 97365e81366f5ca16a9ce66cff4dd4c5b0d9f4db ] We should set attr.exclude_kernel when probing for attr.precise_ip level, otherwise !CAP_SYS_ADMIN users will not default to skidless samples in capable hardware. The increase in the paranoid level in co

[PATCH AUTOSEL for 4.9 205/293] irqchip/gic-v3: Report failures in gic_irq_domain_alloc

2018-04-08 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit 63c16c6eacb69d0cbdaee5dea0dd56d238375fe6 ] If the GIC cannot map an IRQ via irq_domain_ops->alloc(), it doesn't return an error code. This can cause a problem with drivers, where it thinks it has successfully got an IRQ for the device, but requesting the

[PATCH AUTOSEL for 4.9 203/293] f2fs: fix to avoid panic when encountering corrupt node

2018-04-08 Thread Sasha Levin
From: Chao Yu [ Upstream commit 1f258ec13b82d3d947b515a007a748ffcbe29f9a ] With fault_injection option, generic/361 of fstests will complain us with below message: Call Trace: get_node_page+0x12/0x20 [f2fs] f2fs_iget+0x92/0x7d0 [f2fs] f2fs_fill_super+0x10fb/0x15e0 [f2fs] mount_bdev+0x184/0x

[PATCH AUTOSEL for 4.9 206/293] irqchip/gic-v3: Honor forced affinity setting

2018-04-08 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit 65a30f8b300107266f316d550f060ccc186201a3 ] Honor the 'force' flag for set_affinity, by selecting a CPU from the given mask (which may not be reported "online" by the cpu_online_mask). Some drivers, like ARM PMU, rely on it. Cc: Marc Zyngier Reported-by:

[PATCH AUTOSEL for 4.9 202/293] bridge: allow ext learned entries to change ports

2018-04-08 Thread Sasha Levin
From: Nikolay Aleksandrov [ Upstream commit 7597b266c56feaad7d4e6e65822766e929407da2 ] current code silently ignores change of port in the request message. This patch makes sure the port is modified and notification is sent to userspace. Fixes: cf6b8e1eedff ("bridge: add API to notify bridge dr

[PATCH AUTOSEL for 4.9 204/293] irqchip/gic-v2: Report failures in gic_irq_domain_alloc

2018-04-08 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit 456c59c31c5126fe31c64956c43670060ea9debd ] If the GIC cannot map an IRQ via irq_domain_ops->alloc(), it doesn't return an error code. This can cause a problem with drivers, where it thinks it has successfully got an IRQ for the device, but requesting the

[PATCH AUTOSEL for 4.9 201/293] net: ethernet: mediatek: fixed deadlock captured by lockdep

2018-04-08 Thread Sasha Levin
From: Sean Wang [ Upstream commit 8d32e0624392bb4abfbe122f754757a4cb326d7f ] Lockdep found an inconsistent lock state when mtk_get_stats64 is called in user context while NAPI updates MAC statistics in softirq. Use spin_trylock_bh/spin_unlock_bh fix following lockdep warning. [ 81.321030] WA

[PATCH AUTOSEL for 4.9 199/293] block: guard bvec iteration logic

2018-04-08 Thread Sasha Levin
From: Dmitry Monakhov [ Upstream commit b1fb2c52b2d85f51f36f1661409f9aeef94265ff ] Currently if some one try to advance bvec beyond it's size we simply dump WARN_ONCE and continue to iterate beyond bvec array boundaries. This simply means that we endup dereferencing/corrupting random memory regi

[PATCH AUTOSEL for 4.9 210/293] firewire-ohci: work around oversized DMA reads on JMicron controllers

2018-04-08 Thread Sasha Levin
From: Hector Martin [ Upstream commit 188775181bc05f29372b305ef96485840e351fde ] At least some JMicron controllers issue buggy oversized DMA reads when fetching context descriptors, always fetching 0x20 bytes at once for descriptors which are only 0x10 bytes long. This is often harmless, but can

[PATCH AUTOSEL for 4.9 195/293] powerpc/perf/hv-24x7: Fix off-by-one error in request_buffer check

2018-04-08 Thread Sasha Levin
From: Thiago Jung Bauermann [ Upstream commit 36c8fb2c616d9373758b155d9723774353067a87 ] request_buffer can hold 254 requests, so if it already has that number of entries we can't add a new one. Also, define constant to show where the number comes from. Fixes: e3ee15dc5d19 ("powerpc/perf/hv-24

[PATCH AUTOSEL for 4.9 194/293] powerpc/perf/hv-24x7: Fix passing of catalog version number

2018-04-08 Thread Sasha Levin
From: Thiago Jung Bauermann [ Upstream commit 12bf85a71000af7419b19b5e90910919f36f336c ] H_GET_24X7_CATALOG_PAGE needs to be passed the version number obtained from the first catalog page obtained previously. This is a 64 bit number, but create_events_from_catalog truncates it to 32-bit. This w

[PATCH AUTOSEL for 4.9 197/293] net: cdc_mbim: apply "NDP to end" quirk to HP lt4132

2018-04-08 Thread Sasha Levin
From: Tore Anderson [ Upstream commit a68491f895a937778bb25b0795830797239de31f ] The HP lt4132 LTE/HSPA+ 4G Module (03f0:a31d) is a rebranded Huawei ME906s-158 device. It, like the ME906s-158, requires the "NDP to end" quirk for correct operation. Signed-off-by: Tore Anderson Signed-off-by: Da

[PATCH AUTOSEL for 4.9 193/293] datapath: Avoid using stack larger than 1024.

2018-04-08 Thread Sasha Levin
From: Tonghao Zhang [ Upstream commit 9cc9a5cb176ccb4f2cda5ac34da5a659926f125f ] When compiling OvS-master on 4.4.0-81 kernel, there is a warning: CC [M] /root/ovs/datapath/linux/datapath.o /root/ovs/datapath/linux/datapath.c: In function 'ovs_flow_cmd_set': /root/ovs/datapath/

[PATCH AUTOSEL for 4.9 183/293] iwlwifi: mvm: don't send fetch the TID from a non-QoS packet in TSO

2018-04-08 Thread Sasha Levin
From: Emmanuel Grumbach [ Upstream commit 4f555e602b42826b3d79081c9ef8b8e8fe29fc49 ] Getting the TID of a packet before we know it is a QoS data packet isn't a good idea. Delay the TID retrieval until we know the packet is a QoS data packet. Fixes: bb81bb68f472 ("iwlwifi: mvm: add Tx A-MSDU ins

[PATCH AUTOSEL for 4.9 196/293] dmaengine: qcom_hidma: correct API violation for submit

2018-04-08 Thread Sasha Levin
From: Sinan Kaya [ Upstream commit 99efdb3e48fb2fa84addb3102946d3eca341192b ] Current code is violating the DMA Engine API by putting the submitted requests directly into the HW queue. This causes queued transactions to be started by another thread as soon as the first one finishes. The DMA Eng

[PATCH AUTOSEL for 4.9 190/293] clk: scpi: error when clock fails to register

2018-04-08 Thread Sasha Levin
From: Jerome Brunet [ Upstream commit 2b286b09a048df80fd5f7dfc5057c2837679a1ab ] Current implementation of scpi_clk_add just print a warning when clock fails to register but then keep going as if nothing happened. The provider is then registered with bogus data. This may latter lead to an Oops

[PATCH AUTOSEL for 4.9 192/293] PCI/PM: Avoid using device_may_wakeup() for runtime PM

2018-04-08 Thread Sasha Levin
From: "Rafael J. Wysocki" [ Upstream commit 666ff6f83e1db6ed847abf44eb5e3402d82b9350 ] pci_target_state() calls device_may_wakeup() which checks whether or not the device may wake up the system from sleep states, but pci_target_state() is used for runtime PM too. Since runtime PM is expected to

[PATCH AUTOSEL for 4.9 189/293] fs/dcache: init in_lookup_hashtable

2018-04-08 Thread Sasha Levin
From: Sebastian Andrzej Siewior [ Upstream commit 6916363f3083837ed5adb3df2dd90d6b97017dff ] in_lookup_hashtable was introduced in commit 94bdd655caba ("parallel lookups machinery, part 3") and never initialized but since it is in the data it is all zeros. But we need this for -RT. Cc: Alexande

[PATCH AUTOSEL for 4.9 181/293] arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set()

2018-04-08 Thread Sasha Levin
From: Dave Martin [ Upstream commit 5fbd5fc49fc39ac8433da62d16682a1d0217ea4f ] Now that compat_vfp_get() uses the regset API to copy the FPSCR value out to userspace, compat_vfp_set() looks inconsistent. In particular, compat_vfp_set() will fail if called with kbuf != NULL && ubuf == NULL (whic

[PATCH AUTOSEL for 4.9 191/293] perf intel-pt: Do not use TSC packets for calculating CPU cycles to TSC

2018-04-08 Thread Sasha Levin
From: Adrian Hunter [ Upstream commit 38b65b0891dc129dc0a5ce148a21c481e667b395 ] CBR (core-to-bus ratio) packets provide an indication of CPU frequency. A more accurate measure can be made by counting the cycles (given by CYC packets) in between other timing packets (either MTC or TSC). Using TS

[PATCH AUTOSEL for 4.9 186/293] arcnet: change irq handler to lock irqsave

2018-04-08 Thread Sasha Levin
From: Michael Grzeschik [ Upstream commit 5b85840320151f61e04d83a23ef2567a07094503 ] This patch prevents the arcnet driver from the following deadlock. [ 41.273910] == [ 41.280397] [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected

[PATCH AUTOSEL for 4.9 188/293] fs: warn in case userspace lied about modprobe return

2018-04-08 Thread Sasha Levin
From: "Luis R. Rodriguez" [ Upstream commit 41124db869b7e00e12052555f8987867ac01d70c ] kmod <= v19 was broken -- it could return 0 to modprobe calls, incorrectly assuming that a kernel module was built-in, whereas in reality the module was just forming in the kernel. The reason for this is an in

[PATCH AUTOSEL for 4.9 187/293] x86/um: thin archives build fix

2018-04-08 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 827880ec260ba048f95fe646b96a205c394fa0f0 ] The linker does not like vdso-syms.lds in input archive files. Make it an extra-y instead. Cc: Jeff Dike Cc: Richard Weinberger Cc: user-mode-linux-de...@lists.sourceforge.net Signed-off-by: Nicholas Piggin Si

[PATCH AUTOSEL for 4.9 184/293] iwlwifi: mvm: don't mess the SNAP header in TSO for non-QoS packets

2018-04-08 Thread Sasha Levin
From: Emmanuel Grumbach [ Upstream commit 6344436e9d3f4fb4878c12169477d4beb5b825ea ] When we get large sends on non-QoS association, we had a bug that mangled the SNAP header. Fix that. Fixes: a6d5e32f247c ("iwlwifi: mvm: send large SKBs to the transport") Signed-off-by: Emmanuel Grumbach Sign

[PATCH AUTOSEL for 4.9 185/293] Btrfs: always account pinned bytes when dropping a tree block ref

2018-04-08 Thread Sasha Levin
From: Omar Sandoval [ Upstream commit 0a16c7d7aecfae8987197e50116ebfc338cbe0a2 ] Currently, we only increment total_bytes_pinned in btrfs_free_tree_block() when dropping the last reference on the block. However, when the delayed ref is run later, we will decrement total_bytes_pinned regardless o

[PATCH AUTOSEL for 4.9 173/293] MIPS: Handle tlbex-tlbp race condition

2018-04-08 Thread Sasha Levin
From: Paul Burton [ Upstream commit f39878cc5b09c75d35eaf52131e920b872e3feb4 ] In systems where there are multiple actors updating the TLB, the potential exists for a race condition wherein a CPU hits a TLB exception but by the time it reaches a TLBP instruction the affected TLB entry may have b

[PATCH AUTOSEL for 4.9 180/293] arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails

2018-04-08 Thread Sasha Levin
From: Dave Martin [ Upstream commit 53b1a742ed251780267a57415bc955bd50f40c3d ] If get_user() fails when reading the new FPSCR value from userspace in compat_vfp_get(), then garbage* will be written to the task's FPSR and FPCR registers. This patch prevents this by checking the return from get_u

[PATCH AUTOSEL for 4.9 178/293] Bluetooth: hci_bcm: Add active_low irq polarity quirk for Asus T100CHI

2018-04-08 Thread Sasha Levin
From: Hans de Goede [ Upstream commit c4c285da1ee18582ace366f07e56e355c20ebc49 ] Just like the T100TA the host-wake irq on the Asus T100CHI is active low. Having a quirk for this is actually extra important on the T100CHI as it ships with a bluetooth keyboard dock, which does not work properly w

[PATCH AUTOSEL for 4.9 179/293] serial: 8250: 8250_omap: Fix race b/w dma completion and RX timeout

2018-04-08 Thread Sasha Levin
From: Vignesh R [ Upstream commit a1bfb6eb300d008decfbcdf13b0fda536d22dea9 ] DMA RX completion handler for UART is called from a tasklet and hence may be delayed depending on the system load. In meanwhile, there may be RX timeout interrupt which can get serviced first before DMA RX completion ha

[PATCH AUTOSEL for 4.9 167/293] PCI: Enable ECRC only if device supports it

2018-04-08 Thread Sasha Levin
From: Bjorn Helgaas [ Upstream commit 675734baa361cf044033bb60594dea33d8d8da36 ] John reported that an Intel QuickAssist crypto accelerator didn't work in a Dell PowerEdge R730. The problem seems to be that we enabled ECRC when the device doesn't support it: 85:00.0 Co-processor [0b40]: Inte

[PATCH AUTOSEL for 4.9 169/293] MIPS: CPS: Prevent multi-core with dcache aliasing

2018-04-08 Thread Sasha Levin
From: Paul Burton [ Upstream commit 5570ba2ee920de4e7760a2802b842771845b2c32 ] Systems using the MIPS Coherence Manager (CM) cannot support multi-core SMP with dcache aliasing. This is because CPU caches are VIPT, but interventions in CM-based systems provide only the physical address to remote

[PATCH AUTOSEL for 4.9 174/293] MIPS: VDSO: Add implementation of clock_gettime() fallback

2018-04-08 Thread Sasha Levin
From: Goran Ferenc [ Upstream commit 180902e08f051f72c89ffa366f4e4f7a8e9c753e ] This patch adds clock_gettime_fallback() function that wraps assembly invocation of clock_gettime() syscall using __NR_clock_gettime. This function is used if pure VDSO implementation of clock_gettime() does not suc

[PATCH AUTOSEL for 4.9 170/293] MIPS: VDSO: Fix conversions in do_monotonic()/do_monotonic_coarse()

2018-04-08 Thread Sasha Levin
From: Goran Ferenc [ Upstream commit 8ec7f15b8cca4f790df5cdf33f26e2926d4ee2fd ] Fix incorrect calculation in do_monotonic() and do_monotonic_coarse() function that in turn caused incorrect values returned by the vdso version of system call clock_gettime() on mips64 if its system clock ID paramet

Re: [PATCH v3 4/4] mm/sparse: Optimize memmap allocation during sparse_init()

2018-04-08 Thread Baoquan He
On 04/08/18 at 04:20pm, Baoquan He wrote: > On 04/06/18 at 07:50am, Dave Hansen wrote: > > I'm having a really hard time tying all the pieces back together. Let > > me give it a shot and you can tell me where I go wrong. > > > > On 02/27/2018 07:26 PM, Baoquan He wrote: > > > In sparse_init(), tw

[PATCH AUTOSEL for 4.9 171/293] MIPS: CPS: Handle spurious VP starts more gracefully

2018-04-08 Thread Sasha Levin
From: Paul Burton [ Upstream commit fa7a3b4a7217b40bf58c4f38e5ee573b43a8aa2f ] On pre-r6 systems with the MT ASE the CPS SMP code included checks to halt the VPE running mips_cps_boot_vpes() if its bit in the struct core_boot_config vpe_mask field is clear. This was largely done in order to allo

[PATCH AUTOSEL for 4.9 176/293] iwlwifi: mvm: unconditionally stop device after init

2018-04-08 Thread Sasha Levin
From: Johannes Berg [ Upstream commit b092c9f25d45972cf401ad8bcfee2429bf189e2b ] In commit b93b1fe3b532 ("iwlwifi: mvm: fix init_dbg flow to work as expected"), the code was changed to make the stop conditional on not having failed (and on not having init_dbg), which doesn't make sense - we shou

[PATCH AUTOSEL for 4.9 168/293] ACPI / EC: Add support to skip boot stage DSDT probe

2018-04-08 Thread Sasha Levin
From: Lv Zheng [ Upstream commit c712bb58d8278465b1a91f362a08f5c79ad077e4 ] We prepared _INI/_STA methods for \_SB, \_SB.PCI0, \_SB.LID0 and \_SB.EC, _HID(PNP0C09)/_CRS/_GPE for \_SB.EC to poke Windows behavior with qemu, we got the following execution sequence: \_SB._INI \_SB.PCI0._STA \_SB

[PATCH AUTOSEL for 4.9 166/293] spi: rockchip: Disable Runtime PM when chip select is asserted

2018-04-08 Thread Sasha Levin
From: Jeffy Chen [ Upstream commit aa099382ac0cda27e10fa8f45bf91edea0d1d35e ] The rockchip spi would stop driving pins when runtime suspended, which might break slave's xfer(for example cros_ec). Since we have pullups on those pins, we only need to care about this when the CS asserted. So let'

[PATCH AUTOSEL for 4.9 172/293] MIPS: CPS: Handle cores not powering down more gracefully

2018-04-08 Thread Sasha Levin
From: Paul Burton [ Upstream commit 4ad755c9e39c0eeae16f96b97602f1954f582c66 ] If we get into a state where a core that ought to power down isn't doing so then the current result is that another CPU gets stuck inside cps_cpu_die() waiting for CPU that ought to be powering down to do so. The best

[PATCH AUTOSEL for 4.9 158/293] s390/pci: improve unreg_ioat error handling

2018-04-08 Thread Sasha Levin
From: Sebastian Ott [ Upstream commit 725708349172f00b86e2bac5c03de360b79aaf65 ] DMA tables are freed in zpci_dma_exit_device regardless of the return code of zpci_unregister_ioat. This could lead to a use after free. On the other hand during function hot-unplug, zpci_unregister_ioat will always

[PATCH AUTOSEL for 4.9 165/293] libertas: Fix lbs_prb_rsp_limit_set()

2018-04-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 69551f5f370cc20342fab17ca54716b6ec7e332d ] The kstrtoul() test was reversed so this always returned -ENOTSUPP. Fixes: 27d7f47756f4 ("net: wireless: replace strict_strtoul() with kstrtoul()") Signed-off-by: Dan Carpenter Reviewed-by: James Cameron Signed-o

[PATCH AUTOSEL for 4.9 164/293] sunrpc: Disable splice for krb5i

2018-04-08 Thread Sasha Levin
From: Chuck Lever [ Upstream commit 06eb8a56af23ae32e90fdd6b27fec30930364b52 ] Running a multi-threaded 8KB fio test (70/30 mix), three or four out of twelve of the jobs fail when using krb5i. The failure is an EIO on a read. Troubleshooting confirmed the EIO results when the client fails to ve

[PATCH AUTOSEL for 4.9 151/293] powercap/RAPL: prevent overridding bits outside of the mask

2018-04-08 Thread Sasha Levin
From: Adam Lessnau [ Upstream commit edbdabc62328ec0ac98d83ca384bf9fd5251ade6 ] Fixes wrong bits shift operation in the rapl_write_data_raw function, which might cause overridding bits outside of the mask. For example, writing new TIME_WINDOW1 value can override POWER_LIMIT1. Signed-off-by: Ad

[PATCH AUTOSEL for 4.9 163/293] drivers: dma-coherent: Account dma_pfn_offset when used with device tree

2018-04-08 Thread Sasha Levin
From: Vladimir Murzin [ Upstream commit c41f9ea998f3ba61f38fa350eef28ec6caf0a07d ] dma_declare_coherent_memory() and friends are designed to account difference in CPU and device addresses. However, when it is used with reserved memory regions there is assumption that CPU and device have the same

[PATCH AUTOSEL for 4.9 162/293] dma: Take into account dma_pfn_offset

2018-04-08 Thread Sasha Levin
From: Vladimir Murzin [ Upstream commit 25f1e18870881f3366a5abec27b651983ce9032c ] Even though dma-noop-ops assumes 1:1 memory mapping DMA memory range can be different to RAM. For example, ARM STM32F4 MCU offers the possibility to remap SDRAM from 0xc000_ to 0x0 to get CPU performance boost

[PATCH AUTOSEL for 4.9 154/293] ACPI: EC: Fix EC command visibility for dynamic debug

2018-04-08 Thread Sasha Levin
From: Lv Zheng [ Upstream commit 4625d752e600c116e6327f9d7fc16e8f5be107e9 ] acpi_ec_cmd_string() currently is only enabled for "DEBUG" macro, but users trend to use CONFIG_DYNAMIC_DEBUG and enable ec.c pr_debug() print-outs by "dyndbg='file ec.c +p'". In this use case, all command names are turn

[PATCH AUTOSEL for 4.9 160/293] MIPS: Give __secure_computing() access to syscall arguments.

2018-04-08 Thread Sasha Levin
From: David Daney [ Upstream commit 669c4092225f0ed5df12ebee654581b558a5e3ed ] KProbes of __seccomp_filter() are not very useful without access to the syscall arguments. Do what x86 does, and populate a struct seccomp_data to be passed to __secure_computing(). This allows samples/bpf/tracex5 t

[PATCH AUTOSEL for 4.9 152/293] libnvdimm, pmem: fix persistence warning

2018-04-08 Thread Sasha Levin
From: Dan Williams [ Upstream commit c00b396ef782cb2296200d868a0013d8ca1d615e ] The pmem driver assumes if platform firmware describes the memory devices associated with a persistent memory range and CONFIG_ARCH_HAS_PMEM_API=y that it has all the mechanism necessary to flush data to a power-fail

[PATCH AUTOSEL for 4.9 159/293] MIPS: module: Ensure we always clean up r_mips_hi16_list

2018-04-08 Thread Sasha Levin
From: Paul Burton [ Upstream commit 351b0940d473146923711bc943fc881354a4c1f3 ] If we hit an error whilst processing a reloc then we would return early from apply_relocate & potentially not free entries in r_mips_hi16_list, thereby leaking memory. Fix this by ensuring that we always run the code

[PATCH AUTOSEL for 4.9 161/293] MIPS: SEAD-3: Set interrupt-parent per-device, not at root node

2018-04-08 Thread Sasha Levin
From: Paul Burton [ Upstream commit fbdc674ba33c3791b315a546019e570e3e94e599 ] The SEAD-3 board may be configured with or without a MIPS Global Interrupt Controller (GIC). Because of this we have a device tree with a default case of a GIC present, and code to fixup the device tree based upon a c

[PATCH v5 0/2] staging: typec: rt1711h typec driver and dt-bindings

2018-04-08 Thread ShuFan Lee
From: ShuFan Lee This patch series add rt1711h typec chip driver and dt-bindings changelogs between v1 & v2 - use gpiod_* instead of gpio_* changelogs between v2 & v3 - add dt-bindings for rt1711h typec driver changelogs between v3 & v4 - add definition of RT1711H_VID and RT1711H_PID - modify

<    2   3   4   5   6   7   8   9   10   11   >