950 Commits

Author SHA1 Message Date
Michael Bestas
939cd445fc Merge tag 'v4.4.263' into android-msm-wahoo-4.4
This is the 4.4.263 stable release

# gpg: Signature made Wed Mar 24 11:57:59 2021 EET
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Good signature from "Greg Kroah-Hartman <gregkh@kernel.org>" [full]
# gpg: gregkh@kernel.org: Verified 14 signatures in the past 2 hours.  Encrypted
#      0 messages.

# By Jan Kara (3) and others
# Via Greg Kroah-Hartman
* tag 'v4.4.263':
  Linux 4.4.263
  genirq: Disable interrupts for force threaded handlers
  ext4: fix potential error in ext4_do_update_inode
  ext4: find old entry again if failed to rename whiteout
  x86/ioapic: Ignore IRQ2 again
  PCI: rpadlpar: Fix potential drc_name corruption in store functions
  usb: gadget: configfs: Fix KASAN use-after-free
  USB: replace hardcode maximum usb string length by definition
  scsi: lpfc: Fix some error codes in debugfs
  NFSD: Repair misuse of sv_lock in 5.10.16-rt30.
  btrfs: fix race when cloning extent buffer during rewind of an old root
  platform/chrome: cros_ec_dev - Fix security issue
  ext4: check journal inode extents more carefully
  ext4: don't allow overlapping system zones
  ext4: handle error of ext4_setup_system_zone() on remount

 Conflicts:
	drivers/usb/gadget/configfs.c
	fs/ext4/super.c

Change-Id: I6e76de1ac22b32bca9380faa4a44d914c7e45d49
2021-07-24 19:24:49 +03:00
Thomas Gleixner
dd652c6ab4 genirq: Disable interrupts for force threaded handlers
commit 81e2073c175b887398e5bca6c004efa89983f58d upstream.

With interrupt force threading all device interrupt handlers are invoked
from kernel threads. Contrary to hard interrupt context the invocation only
disables bottom halfs, but not interrupts. This was an oversight back then
because any code like this will have an issue:

thread(irq_A)
  irq_handler(A)
    spin_lock(&foo->lock);

interrupt(irq_B)
  irq_handler(B)
    spin_lock(&foo->lock);

This has been triggered with networking (NAPI vs. hrtimers) and console
drivers where printk() happens from an interrupt which interrupted the
force threaded handler.

Now people noticed and started to change the spin_lock() in the handler to
spin_lock_irqsave() which affects performance or add IRQF_NOTHREAD to the
interrupt request which in turn breaks RT.

Fix the root cause and not the symptom and disable interrupts before
invoking the force threaded handler which preserves the regular semantics
and the usefulness of the interrupt force threading as a general debugging
tool.

For not RT this is not changing much, except that during the execution of
the threaded handler interrupts are delayed until the handler
returns. Vs. scheduling and softirq processing there is no difference.

For RT kernels there is no issue.

Fixes: 8d32a307e4 ("genirq: Provide forced interrupt threading")
Reported-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Johan Hovold <johan@kernel.org>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20210317143859.513307808@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-24 10:57:01 +01:00
Nathan Chancellor
c300b8611f Merge 4.4.226 into android-msm-wahoo-4.4
Changes in 4.4.226: (48 commits)
        ax25: fix setsockopt(SO_BINDTODEVICE)
        net: revert "net: get rid of an signed integer overflow in ip_idents_reserve()"
        sctp: Start shutdown on association restart if in SHUTDOWN-SENT state and socket is closed
        net/mlx5: Add command entry handling completion
        net: sun: fix missing release regions in cas_init_one().
        net/mlx4_core: fix a memory leak bug.
        uapi: fix linux/if_pppol2tp.h userspace compilation errors
        IB/cma: Fix reference count leak when no ipv4 addresses are set
        cachefiles: Fix race between read_waiter and read_copier involving op->to_do
        usb: gadget: legacy: fix redundant initialization warnings
        cifs: Fix null pointer check in cifs_read
        Input: usbtouchscreen - add support for BonXeon TP
        Input: evdev - call input_flush_device() on release(), not flush()
        Input: xpad - add custom init packet for Xbox One S controllers
        Input: i8042 - add ThinkPad S230u to i8042 reset list
        IB/qib: Call kobject_put() when kobject_init_and_add() fails
        ALSA: hwdep: fix a left shifting 1 by 31 UB bug
        ALSA: usb-audio: mixer: volume quirk for ESS Technology Asus USB DAC
        exec: Always set cap_ambient in cap_bprm_set_creds
        fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info()
        include/asm-generic/topology.h: guard cpumask_of_node() macro argument
        iommu: Fix reference count leak in iommu_group_alloc.
        parisc: Fix kernel panic in mem_init()
        x86/dma: Fix max PFN arithmetic overflow on 32 bit systems
        xfrm: allow to accept packets with ipv6 NEXTHDR_HOP in xfrm_input
        xfrm: fix a warning in xfrm_policy_insert_list
        xfrm: fix a NULL-ptr deref in xfrm_local_error
        vti4: eliminated some duplicate code.
        ip_vti: receive ipip packet by calling ip_tunnel_rcv
        netfilter: nft_reject_bridge: enable reject with bridge vlan
        netfilter: ipset: Fix subcounter update skip
        netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code
        qlcnic: fix missing release in qlcnic_83xx_interrupt_test.
        bonding: Fix reference count leak in bond_sysfs_slave_add.
        netfilter: nf_conntrack_pptp: fix compilation warning with W=1 build
        mm: remove VM_BUG_ON(PageSlab()) from page_mapcount()
        drm/fb-helper: Use proper plane mask for fb cleanup
        genirq/generic_pending: Do not lose pending affinity update
        usb: renesas_usbhs: gadget: fix spin_lock_init() for &uep->lock
        mac80211: fix memory leak
        net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags
        mm/vmalloc.c: don't dereference possible NULL pointer in __vunmap()
        asm-prototypes: Clear any CPP defines before declaring the functions
        sc16is7xx: move label 'err_spi' to correct section
        drm/msm: Fix possible null dereference on failure of get_pages()
        printk: help pr_debug and pr_devel to optimize out arguments
        scsi: zfcp: fix request object use-after-free in send path causing wrong traces
        Linux 4.4.226

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Conflicts:
	drivers/gpu/drm/msm/msm_gem.c
2020-06-03 00:07:58 -07:00
Thomas Gleixner
9628577067 genirq/generic_pending: Do not lose pending affinity update
commit a33a5d2d16cb84bea8d5f5510f3a41aa48b5c467 upstream.

The generic pending interrupt mechanism moves interrupts from the interrupt
handler on the original target CPU to the new destination CPU. This is
required for x86 and ia64 due to the way the interrupt delivery and
acknowledge works if the interrupts are not remapped.

However that update can fail for various reasons. Some of them are valid
reasons to discard the pending update, but the case, when the previous move
has not been fully cleaned up is not a legit reason to fail.

Check the return value of irq_do_set_affinity() for -EBUSY, which indicates
a pending cleanup, and rearm the pending move in the irq dexcriptor so it's
tried again when the next interrupt arrives.

Fixes: 996c591227 ("x86/irq: Plug vector cleanup race")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Song Liu <songliubraving@fb.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <liu.song.a23@gmail.com>
Cc: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: stable@vger.kernel.org
Cc: Mike Travis <mike.travis@hpe.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Tariq Toukan <tariqt@mellanox.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Link: https://lkml.kernel.org/r/20180604162224.386544292@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-03 08:12:14 +02:00
Nathan Chancellor
728bce2243 Merge 4.4.218 into android-msm-wahoo-4.4
Changes in 4.4.218: (92 commits)
        spi: qup: call spi_qup_pm_resume_runtime before suspending
        powerpc: Include .BTF section
        ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes
        spi/zynqmp: remove entry that causes a cs glitch
        drm/exynos: dsi: propagate error value and silence meaningless warning
        drm/exynos: dsi: fix workaround for the legacy clock name
        altera-stapl: altera_get_note: prevent write beyond end of 'key'
        USB: Disable LPM on WD19's Realtek Hub
        usb: quirks: add NO_LPM quirk for RTL8153 based ethernet adapters
        USB: serial: option: add ME910G1 ECM composition 0x110b
        usb: host: xhci-plat: add a shutdown
        USB: serial: pl2303: add device-id for HP LD381
        ALSA: line6: Fix endless MIDI read loop
        ALSA: seq: virmidi: Fix running status after receiving sysex
        ALSA: seq: oss: Fix running status after receiving sysex
        ALSA: pcm: oss: Avoid plugin buffer overflow
        ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks
        staging: rtl8188eu: Add device id for MERCUSYS MW150US v2
        staging/speakup: fix get_word non-space look-ahead
        intel_th: Fix user-visible error codes
        rtc: max8907: add missing select REGMAP_IRQ
        memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event
        mm: slub: be more careful about the double cmpxchg of freelist
        mm, slub: prevent kmalloc_node crashes and memory leaks
        x86/mm: split vmalloc_sync_all()
        USB: cdc-acm: fix close_delay and closing_wait units in TIOCSSERIAL
        USB: cdc-acm: fix rounding error in TIOCSSERIAL
        kbuild: Disable -Wpointer-to-enum-cast
        futex: Fix inode life-time issue
        futex: Unbreak futex hashing
        ALSA: hda/realtek: Fix pop noise on ALC225
        arm64: smp: fix smp_send_stop() behaviour
        Revert "drm/dp_mst: Skip validating ports during destruction, just ref"
        hsr: fix general protection fault in hsr_addr_is_self()
        net: dsa: Fix duplicate frames flooded by learning
        net_sched: cls_route: remove the right filter from hashtable
        net_sched: keep alloc_hash updated after hash allocation
        NFC: fdp: Fix a signedness bug in fdp_nci_send_patch()
        slcan: not call free_netdev before rtnl_unlock in slcan_open
        vxlan: check return value of gro_cells_init()
        hsr: use rcu_read_lock() in hsr_get_node_{list/status}()
        hsr: add restart routine into hsr_get_node_list()
        hsr: set .netnsok flag
        vhost: Check docket sk_family instead of call getname
        IB/ipoib: Do not warn if IPoIB debugfs doesn't exist
        uapi glibc compat: fix outer guard of net device flags enum
        KVM: VMX: Do not allow reexecute_instruction() when skipping MMIO instr
        drivers/hwspinlock: use correct radix tree API
        net: ipv4: don't let PMTU updates increase route MTU
        cpupower: avoid multiple definition with gcc -fno-common
        dt-bindings: net: FMan erratum A050385
        scsi: ipr: Fix softlockup when rescanning devices in petitboot
        mac80211: Do not send mesh HWMP PREQ if HWMP is disabled
        sxgbe: Fix off by one in samsung driver strncpy size arg
        i2c: hix5hd2: add missed clk_disable_unprepare in remove
        perf probe: Do not depend on dwfl_module_addrsym()
        scripts/dtc: Remove redundant YYLOC global declaration
        scsi: sd: Fix optimal I/O size for devices that change reported values
        mac80211: mark station unauthorized before key removal
        genirq: Fix reference leaks on irq affinity notifiers
        vti[6]: fix packet tx through bpf_redirect() in XinY cases
        xfrm: fix uctx len check in verify_sec_ctx_len
        xfrm: add the missing verify_sec_ctx_len check in xfrm_add_acquire
        xfrm: policy: Fix doulbe free in xfrm_policy_timer
        vti6: Fix memory leak of skb if input policy check fails
        tools: Let O= makes handle a relative path with -C option
        USB: serial: option: add support for ASKEY WWHC050
        USB: serial: option: add BroadMobi BM806U
        USB: serial: option: add Wistron Neweb D19Q1
        USB: cdc-acm: restore capability check order
        USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback
        usb: musb: fix crash with highmen PIO and usbmon
        media: flexcop-usb: fix endpoint sanity check
        media: usbtv: fix control-message timeouts
        staging: rtl8188eu: Add ASUS USB-N10 Nano B1 to device table
        staging: wlan-ng: fix use-after-free Read in hfa384x_usbin_callback
        libfs: fix infoleak in simple_attr_read()
        media: ov519: add missing endpoint sanity checks
        media: dib0700: fix rc endpoint lookup
        media: stv06xx: add missing descriptor sanity checks
        media: xirlink_cit: add missing descriptor sanity checks
        vt: selection, introduce vc_is_sel
        vt: ioctl, switch VT_IS_IN_USE and VT_BUSY to inlines
        vt: switch vt_dont_switch to bool
        vt: vt_ioctl: remove unnecessary console allocation checks
        vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
        locking/atomic, kref: Add kref_read()
        vt: vt_ioctl: fix use-after-free in vt_in_use()
        bpf: Explicitly memset the bpf_attr structure
        net: ks8851-ml: Fix IO operations, again
        perf map: Fix off by one in strncpy() size argument
        Linux 4.4.218

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Conflicts:
	arch/arm64/kernel/smp.c
	drivers/scsi/sd.c
2020-04-02 11:27:31 -07:00
Edward Cree
b0b9907a35 genirq: Fix reference leaks on irq affinity notifiers
commit df81dfcfd6991d547653d46c051bac195cd182c1 upstream.

The handling of notify->work did not properly maintain notify->kref in two
 cases:
1) where the work was already scheduled, another irq_set_affinity_locked()
   would get the ref and (no-op-ly) schedule the work.  Thus when
   irq_affinity_notify() ran, it would drop the original ref but not the
   additional one.
2) when cancelling the (old) work in irq_set_affinity_notifier(), if there
   was outstanding work a ref had been got for it but was never put.
Fix both by checking the return values of the work handling functions
 (schedule_work() for (1) and cancel_work_sync() for (2)) and put the
 extra ref if the return value indicates preexisting work.

Fixes: cd7eab44e9 ("genirq: Add IRQ affinity notifiers")
Fixes: 59c39840f5ab ("genirq: Prevent use-after-free and work list corruption")
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ben Hutchings <ben@decadent.org.uk>
Link: https://lkml.kernel.org/r/24f5983f-2ab5-e83a-44ee-a45b5f9300f5@solarflare.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-02 19:02:36 +02:00
Nathan Chancellor
2c9203de9f Merge 4.4.194 into android-msm-wahoo-4.4
Changes in 4.4.194: (58 commits)
        bridge/mdb: remove wrong use of NLM_F_MULTI
        cdc_ether: fix rndis support for Mediatek based smartphones
        ipv6: Fix the link time qualifier of 'ping_v6_proc_exit_net()'
        isdn/capi: check message length in capi_write()
        net: Fix null de-reference of device refcount
        sch_hhf: ensure quantum and hhf_non_hh_weight are non-zero
        sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'
        sctp: use transport pf_retrans in sctp_do_8_2_transport_strike
        tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR
        tipc: add NULL pointer check before calling kfree_rcu
        tun: fix use-after-free when register netdev failed
        Revert "MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur"
        Btrfs: fix assertion failure during fsync and use of stale transaction
        genirq: Prevent NULL pointer dereference in resend_irqs()
        KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl
        KVM: x86: work around leak of uninitialized stack contents
        KVM: nVMX: handle page fault in vmread
        MIPS: VDSO: Prevent use of smp_processor_id()
        MIPS: VDSO: Use same -m%-float cflag as the kernel proper
        clk: rockchip: Don't yell about bad mmc phases when getting
        driver core: Fix use-after-free and double free on glue directory
        crypto: talitos - check AES key size
        crypto: talitos - check data blocksize in ablkcipher.
        x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning
        MIPS: netlogic: xlr: Remove erroneous check in nlm_fmn_send()
        ARC: configs: Remove CONFIG_INITRAMFS_SOURCE from defconfigs
        USB: usbcore: Fix slab-out-of-bounds bug during device reset
        media: tm6000: double free if usb disconnect while streaming
        x86/boot: Add missing bootparam that breaks boot on some platforms
        xen-netfront: do not assume sk_buff_head list is empty in error handling
        KVM: coalesced_mmio: add bounds checking
        serial: sprd: correct the wrong sequence of arguments
        tty/serial: atmel: reschedule TX after RX was started
        mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings
        s390/bpf: fix lcgr instruction encoding
        ARM: OMAP2+: Fix omap4 errata warning on other SoCs
        s390/bpf: use 32-bit index for tail calls
        NFSv4: Fix return values for nfs4_file_open()
        NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup
        Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105
        ARM: 8874/1: mm: only adjust sections of valid mm structures
        r8152: Set memory to all 0xFFs on failed reg reads
        x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines
        netfilter: nf_conntrack_ftp: Fix debug output
        NFSv2: Fix eof handling
        NFSv2: Fix write regression
        cifs: set domainName when a domain-key is used in multiuser
        cifs: Use kzfree() to zero out the password
        sky2: Disable MSI on yet another ASUS boards (P6Xxxx)
        tools/power turbostat: fix buffer overrun
        net: seeq: Fix the function used to release some memory in an error handling path
        dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe()
        keys: Fix missing null pointer check in request_key_auth_describe()
        floppy: fix usercopy direction
        media: technisat-usb2: break out of loop at end of buffer
        ARC: export "abort" for modules
        net_sched: let qdisc_put() accept NULL pointer
        Linux 4.4.194

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2019-09-21 08:28:04 -07:00
Yunfeng Ye
eac850cc07 genirq: Prevent NULL pointer dereference in resend_irqs()
commit eddf3e9c7c7e4d0707c68d1bb22cc6ec8aef7d4a upstream.

The following crash was observed:

  Unable to handle kernel NULL pointer dereference at 0000000000000158
  Internal error: Oops: 96000004 [#1] SMP
  pc : resend_irqs+0x68/0xb0
  lr : resend_irqs+0x64/0xb0
  ...
  Call trace:
   resend_irqs+0x68/0xb0
   tasklet_action_common.isra.6+0x84/0x138
   tasklet_action+0x2c/0x38
   __do_softirq+0x120/0x324
   run_ksoftirqd+0x44/0x60
   smpboot_thread_fn+0x1ac/0x1e8
   kthread+0x134/0x138
   ret_from_fork+0x10/0x18

The reason for this is that the interrupt resend mechanism happens in soft
interrupt context, which is a asynchronous mechanism versus other
operations on interrupts. free_irq() does not take resend handling into
account. Thus, the irq descriptor might be already freed before the resend
tasklet is executed. resend_irqs() does not check the return value of the
interrupt descriptor lookup and derefences the return value
unconditionally.

  1):
  __setup_irq
    irq_startup
      check_irq_resend  // activate softirq to handle resend irq
  2):
  irq_domain_free_irqs
    irq_free_descs
      free_desc
        call_rcu(&desc->rcu, delayed_free_desc)
  3):
  __do_softirq
    tasklet_action
      resend_irqs
        desc = irq_to_desc(irq)
        desc->handle_irq(desc)  // desc is NULL --> Ooops

Fix this by adding a NULL pointer check in resend_irqs() before derefencing
the irq descriptor.

Fixes: a4633adcdb ("[PATCH] genirq: add genirq sw IRQ-retrigger")
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1630ae13-5c8e-901e-de09-e740b6a426a7@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-21 07:12:43 +02:00
Nathan Chancellor
06d423a807 Merge 4.4.180 into android-msm-wahoo-4.4
Changes in 4.4.180: (267 commits)
        kbuild: simplify ld-option implementation
        KVM: fail KVM_SET_VCPU_EVENTS with invalid exception number
        cifs: do not attempt cifs operation on smb2+ rename error
        MIPS: scall64-o32: Fix indirect syscall number load
        trace: Fix preempt_enable_no_resched() abuse
        sched/numa: Fix a possible divide-by-zero
        ceph: ensure d_name stability in ceph_dentry_hash()
        ceph: fix ci->i_head_snapc leak
        nfsd: Don't release the callback slot unless it was actually held
        sunrpc: don't mark uninitialised items as VALID.
        USB: Add new USB LPM helpers
        USB: Consolidate LPM checks to avoid enabling LPM twice
        powerpc/xmon: Add RFI flush related fields to paca dump
        powerpc/64s: Improve RFI L1-D cache flush fallback
        powerpc/pseries: Support firmware disable of RFI flush
        powerpc/powernv: Support firmware disable of RFI flush
        powerpc/rfi-flush: Move the logic to avoid a redo into the debugfs code
        powerpc/rfi-flush: Make it possible to call setup_rfi_flush() again
        powerpc/rfi-flush: Always enable fallback flush on pseries
        powerpc/rfi-flush: Differentiate enabled and patched flush types
        powerpc/pseries: Add new H_GET_CPU_CHARACTERISTICS flags
        powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration
        powerpc: Add security feature flags for Spectre/Meltdown
        powerpc/pseries: Set or clear security feature flags
        powerpc/powernv: Set or clear security feature flags
        powerpc/64s: Move cpu_show_meltdown()
        powerpc/64s: Enhance the information in cpu_show_meltdown()
        powerpc/powernv: Use the security flags in pnv_setup_rfi_flush()
        powerpc/pseries: Use the security flags in pseries_setup_rfi_flush()
        powerpc/64s: Wire up cpu_show_spectre_v1()
        powerpc/64s: Wire up cpu_show_spectre_v2()
        powerpc/pseries: Fix clearing of security feature flags
        powerpc: Move default security feature flags
        powerpc/pseries: Restore default security feature flags on setup
        powerpc/64s: Fix section mismatch warnings from setup_rfi_flush()
        powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit
        powerpc/64s: Add barrier_nospec
        powerpc/64s: Add support for ori barrier_nospec patching
        powerpc/64s: Patch barrier_nospec in modules
        powerpc/64s: Enable barrier_nospec based on firmware settings
        powerpc/64: Use barrier_nospec in syscall entry
        powerpc: Use barrier_nospec in copy_from_user()
        powerpc/64s: Enhance the information in cpu_show_spectre_v1()
        powerpc64s: Show ori31 availability in spectre_v1 sysfs file not v2
        powerpc/64: Disable the speculation barrier from the command line
        powerpc/64: Make stf barrier PPC_BOOK3S_64 specific.
        powerpc/64: Add CONFIG_PPC_BARRIER_NOSPEC
        powerpc/64: Call setup_barrier_nospec() from setup_arch()
        powerpc/64: Make meltdown reporting Book3S 64 specific
        powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E
        powerpc/asm: Add a patch_site macro & helpers for patching instructions
        powerpc/64s: Add new security feature flags for count cache flush
        powerpc/64s: Add support for software count cache flush
        powerpc/pseries: Query hypervisor for count cache flush settings
        powerpc/powernv: Query firmware for count cache flush settings
        powerpc: Avoid code patching freed init sections
        powerpc/fsl: Add infrastructure to fixup branch predictor flush
        powerpc/fsl: Add macro to flush the branch predictor
        powerpc/fsl: Fix spectre_v2 mitigations reporting
        powerpc/fsl: Add nospectre_v2 command line argument
        powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)
        powerpc/fsl: Update Spectre v2 reporting
        powerpc/security: Fix spectre_v2 reporting
        powerpc/fsl: Fix the flush of branch predictor.
        tipc: handle the err returned from cmd header function
        slip: make slhc_free() silently accept an error pointer
        intel_th: gth: Fix an off-by-one in output unassigning
        fs/proc/proc_sysctl.c: Fix a NULL pointer dereference
        NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family.
        netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON
        tipc: check bearer name with right length in tipc_nl_compat_bearer_enable
        tipc: check link name with right length in tipc_nl_compat_link_set
        bpf: reject wrong sized filters earlier
        Revert "block/loop: Use global lock for ioctl() operation."
        ipv4: add sanity checks in ipv4_link_failure()
        team: fix possible recursive locking when add slaves
        net: stmmac: move stmmac_check_ether_addr() to driver probe
        ipv4: set the tcp_min_rtt_wlen range from 0 to one day
        powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used
        powerpc/fsl: Flush branch predictor when entering KVM
        powerpc/fsl: Emulate SPRN_BUCSR register
        powerpc/fsl: Flush the branch predictor at each kernel entry (32 bit)
        powerpc/fsl: Sanitize the syscall table for NXP PowerPC 32 bit platforms
        powerpc/fsl: Fixed warning: orphan section `__btb_flush_fixup'
        powerpc/fsl: Add FSL_PPC_BOOK3E as supported arch for nospectre_v2 boot arg
        Documentation: Add nospectre_v1 parameter
        usbnet: ipheth: prevent TX queue timeouts when device not ready
        usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set
        qlcnic: Avoid potential NULL pointer dereference
        netfilter: bridge: set skb transport_header before entering NF_INET_PRE_ROUTING
        sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()
        usb: gadget: net2280: Fix overrun of OUT messages
        usb: gadget: net2280: Fix net2280_dequeue()
        usb: gadget: net2272: Fix net2272_dequeue()
        ARM: dts: pfla02: increase phy reset duration
        net: ks8851: Dequeue RX packets explicitly
        net: ks8851: Reassert reset pin if chip ID check fails
        net: ks8851: Delay requesting IRQ until opened
        net: ks8851: Set initial carrier state to down
        net: xilinx: fix possible object reference leak
        net: ibm: fix possible object reference leak
        net: ethernet: ti: fix possible object reference leak
        scsi: qla4xxx: fix a potential NULL pointer dereference
        usb: u132-hcd: fix resource leak
        ceph: fix use-after-free on symlink traversal
        scsi: zfcp: reduce flood of fcrscn1 trace records on multi-element RSCN
        libata: fix using DMA buffers on stack
        kconfig/[mn]conf: handle backspace (^H) key
        vfio/type1: Limit DMA mappings per container
        ALSA: line6: use dynamic buffers
        ipv4: ip_do_fragment: Preserve skb_iif during fragmentation
        ipv6/flowlabel: wait rcu grace period before put_pid()
        ipv6: invert flowlabel sharing check in process and user mode
        bnxt_en: Improve multicast address setup logic.
        packet: validate msg_namelen in send directly
        USB: yurex: Fix protection fault after device removal
        USB: w1 ds2490: Fix bug caused by improper use of altsetting array
        USB: core: Fix unterminated string returned by usb_string()
        USB: core: Fix bug caused by duplicate interface PM usage counter
        HID: debug: fix race condition with between rdesc_show() and device removal
        rtc: sh: Fix invalid alarm warning for non-enabled alarm
        igb: Fix WARN_ONCE on runtime suspend
        bonding: show full hw address in sysfs for slave entries
        jffs2: fix use-after-free on symlink traversal
        debugfs: fix use-after-free on symlink traversal
        rtc: da9063: set uie_unsupported when relevant
        vfio/pci: use correct format characters
        scsi: storvsc: Fix calculation of sub-channel count
        net: hns: Use NAPI_POLL_WEIGHT for hns driver
        net: hns: Fix WARNING when remove HNS driver with SMMU enabled
        hugetlbfs: fix memory leak for resv_map
        xsysace: Fix error handling in ace_setup
        ARM: orion: don't use using 64-bit DMA masks
        ARM: iop: don't use using 64-bit DMA masks
        usb: usbip: fix isoc packet num validation in get_pipe
        staging: iio: adt7316: allow adt751x to use internal vref for all dacs
        staging: iio: adt7316: fix the dac read calculation
        staging: iio: adt7316: fix the dac write calculation
        Input: snvs_pwrkey - initialize necessary driver data before enabling IRQ
        selinux: never allow relabeling on context mounts
        x86/mce: Improve error message when kernel cannot recover, p2
        media: v4l2: i2c: ov7670: Fix PLL bypass register values
        scsi: libsas: fix a race condition when smp task timeout
        ASoC:soc-pcm:fix a codec fixup issue in TDM case
        ASoC: cs4270: Set auto-increment bit for register writes
        ASoC: tlv320aic32x4: Fix Common Pins
        perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS
        scsi: csiostor: fix missing data copy in csio_scsi_err_handler()
        iommu/amd: Set exclusion range correctly
        genirq: Prevent use-after-free and work list corruption
        usb: dwc3: Fix default lpm_nyet_threshold value
        scsi: qla2xxx: Fix incorrect region-size setting in optrom SYSFS routines
        Bluetooth: hidp: fix buffer overflow
        Bluetooth: Align minimum encryption key size for LE and BR/EDR connections
        UAS: fix alignment of scatter/gather segments
        ipv6: fix a potential deadlock in do_ipv6_setsockopt()
        ASoC: Intel: avoid Oops if DMA setup fails
        timer/debug: Change /proc/timer_stats from 0644 to 0600
        netfilter: compat: initialize all fields in xt_init
        platform/x86: sony-laptop: Fix unintentional fall-through
        iio: adc: xilinx: fix potential use-after-free on remove
        HID: input: add mapping for Expose/Overview key
        HID: input: add mapping for keyboard Brightness Up/Down/Toggle keys
        libnvdimm/btt: Fix a kmemdup failure check
        s390/dasd: Fix capacity calculation for large volumes
        s390/3270: fix lockdep false positive on view->lock
        KVM: x86: avoid misreporting level-triggered irqs as edge-triggered in tracing
        tools lib traceevent: Fix missing equality check for strcmp
        init: initialize jump labels before command line option parsing
        ipvs: do not schedule icmp errors from tunnels
        s390: ctcm: fix ctcm_new_device error return code
        selftests/net: correct the return value for run_netsocktests
        gpu: ipu-v3: dp: fix CSC handling
        cw1200: fix missing unlock on error in cw1200_hw_scan()
        x86/vdso: Pass --eh-frame-hdr to the linker
        Don't jump to compute_result state from check_result state
        locking/static_keys: Provide DECLARE and well as DEFINE macros
        x86/microcode/intel: Add a helper which gives the microcode revision
        x86: stop exporting msr-index.h to userland
        bitops: avoid integer overflow in GENMASK(_ULL)
        x86/microcode/intel: Check microcode revision before updating sibling threads
        x86/MCE: Save microcode revision in machine check records
        x86/cpufeatures: Hide AMD-specific speculation flags
        x86/speculation: Support Enhanced IBRS on future CPUs
        x86/speculation: Simplify the CPU bug detection logic
        x86/bugs: Add AMD's variant of SSB_NO
        x86/bugs: Add AMD's SPEC_CTRL MSR usage
        x86/bugs: Switch the selection of mitigation from CPU vendor to CPU features
        locking/atomics, asm-generic: Move some macros from <linux/bitops.h> to a new <linux/bits.h> file
        x86/bugs: Fix the AMD SSBD usage of the SPEC_CTRL MSR
        x86/speculation: Remove SPECTRE_V2_IBRS in enum spectre_v2_mitigation
        x86/microcode: Make sure boot_cpu_data.microcode is up-to-date
        x86/microcode: Update the new microcode revision unconditionally
        x86/cpu: Sanitize FAM6_ATOM naming
        KVM: x86: SVM: Call x86_spec_ctrl_set_guest/host() with interrupts disabled
        x86/mm: Use WRITE_ONCE() when setting PTEs
        x86/speculation: Apply IBPB more strictly to avoid cross-process data leak
        x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation
        x86/speculation: Propagate information about RSB filling mitigation to sysfs
        x86/speculation: Update the TIF_SSBD comment
        x86/speculation: Clean up spectre_v2_parse_cmdline()
        x86/speculation: Remove unnecessary ret variable in cpu_show_common()
        x86/speculation: Move STIPB/IBPB string conditionals out of cpu_show_common()
        x86/speculation: Disable STIBP when enhanced IBRS is in use
        x86/speculation: Rename SSBD update functions
        x86/speculation: Reorganize speculation control MSRs update
        x86/Kconfig: Select SCHED_SMT if SMP enabled
        sched: Add sched_smt_active()
        x86/speculation: Rework SMT state change
        x86/speculation: Reorder the spec_v2 code
        x86/speculation: Mark string arrays const correctly
        x86/speculataion: Mark command line parser data __initdata
        x86/speculation: Unify conditional spectre v2 print functions
        x86/speculation: Add command line control for indirect branch speculation
        x86/speculation: Prepare for per task indirect branch speculation control
        x86/process: Consolidate and simplify switch_to_xtra() code
        x86/speculation: Avoid __switch_to_xtra() calls
        x86/speculation: Prepare for conditional IBPB in switch_mm()
        x86/speculation: Split out TIF update
        x86/speculation: Prepare arch_smt_update() for PRCTL mode
        x86/speculation: Prevent stale SPEC_CTRL msr content
        x86/speculation: Add prctl() control for indirect branch speculation
        x86/speculation: Enable prctl mode for spectre_v2_user
        x86/speculation: Add seccomp Spectre v2 user space protection mode
        x86/speculation: Provide IBPB always command line options
        kvm: x86: Report STIBP on GET_SUPPORTED_CPUID
        x86/msr-index: Cleanup bit defines
        x86/speculation: Consolidate CPU whitelists
        x86/speculation/mds: Add basic bug infrastructure for MDS
        x86/speculation/mds: Add BUG_MSBDS_ONLY
        x86/kvm: Expose X86_FEATURE_MD_CLEAR to guests
        x86/speculation/mds: Add mds_clear_cpu_buffers()
        x86/speculation/mds: Clear CPU buffers on exit to user
        x86/speculation/mds: Conditionally clear CPU buffers on idle entry
        x86/speculation/mds: Add mitigation control for MDS
        x86/speculation/l1tf: Document l1tf in sysfs
        x86/speculation/mds: Add sysfs reporting for MDS
        x86/speculation/mds: Add mitigation mode VMWERV
        Documentation: Move L1TF to separate directory
        Documentation: Add MDS vulnerability documentation
        x86/cpu/bugs: Use __initconst for 'const' init data
        x86/speculation: Move arch_smt_update() call to after mitigation decisions
        x86/speculation/mds: Add SMT warning message
        x86/speculation/mds: Fix comment
        x86/speculation/mds: Print SMT vulnerable on MSBDS with mitigations off
        cpu/speculation: Add 'mitigations=' cmdline option
        x86/speculation: Support 'mitigations=' cmdline option
        x86/speculation/mds: Add 'mitigations=' support for MDS
        x86/mds: Add MDSUM variant to the MDS documentation
        Documentation: Correct the possible MDS sysfs values
        x86/speculation/mds: Fix documentation typo
        x86/bugs: Change L1TF mitigation string to match upstream
        USB: serial: use variable for status
        USB: serial: fix unthrottle races
        powerpc/64s: Include cpu header
        bridge: Fix error path for kobject_init_and_add()
        net: ucc_geth - fix Oops when changing number of buffers in the ring
        packet: Fix error path in packet_init
        vlan: disable SIOCSHWTSTAMP in container
        vrf: sit mtu should not be updated when vrf netdev is the link
        ipv4: Fix raw socket lookup for local traffic
        bonding: fix arp_validate toggling in active-backup mode
        drivers/virt/fsl_hypervisor.c: dereferencing error pointers in ioctl
        drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl
        powerpc/booke64: set RI in default MSR
        powerpc/lib: fix book3s/32 boot failure due to code patching
        Linux 4.4.180

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Conflicts:
	arch/powerpc/include/asm/uaccess.h
	include/linux/cpu.h
	kernel/cpu.c
	kernel/irq/manage.c
	net/ipv4/sysctl_net_ipv4.c
2019-05-16 13:34:46 -07:00
Prasad Sodagudi
1aec586c25 genirq: Prevent use-after-free and work list corruption
[ Upstream commit 59c39840f5abf4a71e1810a8da71aaccd6c17d26 ]

When irq_set_affinity_notifier() replaces the notifier, then the
reference count on the old notifier is dropped which causes it to be
freed. But nothing ensures that the old notifier is not longer queued
in the work list. If it is queued this results in a use after free and
possibly in work list corruption.

Ensure that the work is canceled before the reference is dropped.

Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: marc.zyngier@arm.com
Link: https://lkml.kernel.org/r/1553439424-6529-1-git-send-email-psodagud@codeaurora.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-05-16 19:45:04 +02:00
Nathan Chancellor
79a097e001 Merge 4.4.179 into android-msm-wahoo-4.4
Changes in 4.4.179: (170 commits)
        arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug signals
        arm64: debug: Ensure debug handlers check triggering exception level
        ext4: cleanup bh release code in ext4_ind_remove_space()
        lib/int_sqrt: optimize initial value compute
        tty/serial: atmel: Add is_half_duplex helper
        mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified
        i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA
        Bluetooth: Fix decrementing reference count twice in releasing socket
        tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped
        CIFS: fix POSIX lock leak and invalid ptr deref
        h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
        tracing: kdb: Fix ftdump to not sleep
        gpio: gpio-omap: fix level interrupt idling
        sysctl: handle overflow for file-max
        enic: fix build warning without CONFIG_CPUMASK_OFFSTACK
        mm/cma.c: cma_declare_contiguous: correct err handling
        mm/page_ext.c: fix an imbalance with kmemleak
        mm/vmalloc.c: fix kernel BUG at mm/vmalloc.c:512!
        mm/slab.c: kmemleak no scan alien caches
        ocfs2: fix a panic problem caused by o2cb_ctl
        f2fs: do not use mutex lock in atomic context
        fs/file.c: initialize init_files.resize_wait
        cifs: use correct format characters
        dm thin: add sanity checks to thin-pool and external snapshot creation
        cifs: Fix NULL pointer dereference of devname
        fs: fix guard_bio_eod to check for real EOD errors
        tools lib traceevent: Fix buffer overflow in arg_eval
        usb: chipidea: Grab the (legacy) USB PHY by phandle first
        scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c
        coresight: etm4x: Add support to enable ETMv4.2
        ARM: 8840/1: use a raw_spinlock_t in unwind
        mmc: omap: fix the maximum timeout setting
        e1000e: Fix -Wformat-truncation warnings
        IB/mlx4: Increase the timeout for CM cache
        scsi: megaraid_sas: return error when create DMA pool failed
        perf test: Fix failure of 'evsel-tp-sched' test on s390
        SoC: imx-sgtl5000: add missing put_device()
        media: sh_veu: Correct return type for mem2mem buffer helpers
        media: s5p-jpeg: Correct return type for mem2mem buffer helpers
        media: s5p-g2d: Correct return type for mem2mem buffer helpers
        media: mx2_emmaprp: Correct return type for mem2mem buffer helpers
        leds: lp55xx: fix null deref on firmware load failure
        kprobes: Prohibit probing on bsearch()
        ARM: 8833/1: Ensure that NEON code always compiles with Clang
        ALSA: PCM: check if ops are defined before suspending PCM
        bcache: fix input overflow to cache set sysfs file io_error_halflife
        bcache: fix input overflow to sequential_cutoff
        bcache: improve sysfs_strtoul_clamp()
        fbdev: fbmem: fix memory access if logo is bigger than the screen
        cdrom: Fix race condition in cdrom_sysctl_register
        ASoC: fsl-asoc-card: fix object reference leaks in fsl_asoc_card_probe
        soc: qcom: gsbi: Fix error handling in gsbi_probe()
        mt7601u: bump supported EEPROM version
        ARM: avoid Cortex-A9 livelock on tight dmb loops
        tty: increase the default flip buffer limit to 2*640K
        media: mt9m111: set initial frame size other than 0x0
        hwrng: virtio - Avoid repeated init of completion
        soc/tegra: fuse: Fix illegal free of IO base address
        hpet: Fix missing '=' character in the __setup() code of hpet_mmap_enable
        dmaengine: imx-dma: fix warning comparison of distinct pointer types
        netfilter: physdev: relax br_netfilter dependency
        media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration
        regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting
        wlcore: Fix memory leak in case wl12xx_fetch_firmware failure
        x86/build: Mark per-CPU symbols as absolute explicitly for LLD
        dmaengine: tegra: avoid overflow of byte tracking
        drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers
        binfmt_elf: switch to new creds when switching to new mm
        kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD
        x86/build: Specify elf_i386 linker emulation explicitly for i386 objects
        x86: vdso: Use $LD instead of $CC to link
        x86/vdso: Drop implicit common-page-size linker flag
        lib/string.c: implement a basic bcmp
        tty: mark Siemens R3964 line discipline as BROKEN
        tty: ldisc: add sysctl to prevent autoloading of ldiscs
        ipv6: Fix dangling pointer when ipv6 fragment
        ipv6: sit: reset ip header pointer in ipip6_rcv
        net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock().
        openvswitch: fix flow actions reallocation
        qmi_wwan: add Olicard 600
        sctp: initialize _pad of sockaddr_in before copying to user memory
        tcp: Ensure DCTCP reacts to losses
        netns: provide pure entropy for net_hash_mix()
        net: ethtool: not call vzalloc for zero sized memory request
        ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type
        ALSA: seq: Fix OOB-reads from strlcpy
        include/linux/bitrev.h: fix constant bitrev
        ASoC: fsl_esai: fix channel swap issue when stream starts
        block: do not leak memory in bio_copy_user_iov()
        genirq: Respect IRQCHIP_SKIP_SET_WAKE in irq_chip_set_wake_parent()
        ARM: dts: at91: Fix typo in ISC_D0 on PC9
        arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value
        xen: Prevent buffer overflow in privcmd ioctl
        sched/fair: Do not re-read ->h_load_next during hierarchical load calculation
        xtensa: fix return_address
        PCI: Add function 1 DMA alias quirk for Marvell 9170 SATA controller
        perf/core: Restore mmap record type correctly
        ext4: add missing brelse() in add_new_gdb_meta_bg()
        ext4: report real fs size after failed resize
        ALSA: echoaudio: add a check for ioremap_nocache
        ALSA: sb8: add a check for request_region
        IB/mlx4: Fix race condition between catas error reset and aliasguid flows
        mmc: davinci: remove extraneous __init annotation
        ALSA: opl3: fix mismatch between snd_opl3_drum_switch definition and declaration
        thermal/int340x_thermal: Add additional UUIDs
        thermal/int340x_thermal: fix mode setting
        tools/power turbostat: return the exit status of a command
        perf top: Fix error handling in cmd_top()
        perf evsel: Free evsel->counts in perf_evsel__exit()
        perf tests: Fix a memory leak of cpu_map object in the openat_syscall_event_on_all_cpus test
        perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test()
        x86/hpet: Prevent potential NULL pointer dereference
        x86/cpu/cyrix: Use correct macros for Cyrix calls on Geode processors
        iommu/vt-d: Check capability before disabling protected memory
        x86/hw_breakpoints: Make default case in hw_breakpoint_arch_parse() return an error
        fix incorrect error code mapping for OBJECTID_NOT_FOUND
        ext4: prohibit fstrim in norecovery mode
        rsi: improve kernel thread handling to fix kernel panic
        9p: do not trust pdu content for stat item size
        9p locks: add mount option for lock retry interval
        f2fs: fix to do sanity check with current segment number
        serial: uartps: console_setup() can't be placed to init section
        ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms
        ACPI / SBS: Fix GPE storm on recent MacBookPro's
        cifs: fallback to older infolevels on findfirst queryinfo retry
        crypto: sha256/arm - fix crash bug in Thumb2 build
        crypto: sha512/arm - fix crash bug in Thumb2 build
        iommu/dmar: Fix buffer overflow during PCI bus notification
        ARM: 8839/1: kprobe: make patch_lock a raw_spinlock_t
        appletalk: Fix use-after-free in atalk_proc_exit
        lib/div64.c: off by one in shift
        include/linux/swap.h: use offsetof() instead of custom __swapoffset macro
        tpm/tpm_crb: Avoid unaligned reads in crb_recv()
        ovl: fix uid/gid when creating over whiteout
        appletalk: Fix compile regression
        bonding: fix event handling for stacked bonds
        net: atm: Fix potential Spectre v1 vulnerabilities
        net: bridge: multicast: use rcu to access port list from br_multicast_start_querier
        net: fou: do not use guehdr after iptunnel_pull_offloads in gue_udp_recv
        tcp: tcp_grow_window() needs to respect tcp_space()
        ipv4: recompile ip options in ipv4_link_failure
        ipv4: ensure rcu_read_lock() in ipv4_link_failure()
        crypto: crypto4xx - properly set IV after de- and encrypt
        modpost: file2alias: go back to simple devtable lookup
        modpost: file2alias: check prototype of handler
        tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is incomplete
        KVM: x86: Don't clear EFER during SMM transitions for 32-bit vCPU
        iio/gyro/bmg160: Use millidegrees for temperature scale
        iio: ad_sigma_delta: select channel when reading register
        iio: adc: at91: disable adc channel interrupt in timeout case
        io: accel: kxcjk1013: restore the range after resume.
        staging: comedi: vmk80xx: Fix use of uninitialized semaphore
        staging: comedi: vmk80xx: Fix possible double-free of ->usb_rx_buf
        staging: comedi: ni_usb6501: Fix use of uninitialized mutex
        staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf
        ALSA: core: Fix card races between register and disconnect
        crypto: x86/poly1305 - fix overflow during partial reduction
        arm64: futex: Restore oldval initialization to work around buggy compilers
        x86/kprobes: Verify stack frame on kretprobe
        kprobes: Mark ftrace mcount handler functions nokprobe
        kprobes: Fix error check when reusing optimized probes
        mac80211: do not call driver wake_tx_queue op during reconfig
        Revert "kbuild: use -Oz instead of -Os when using clang"
        sched/fair: Limit sched_cfs_period_timer() loop to avoid hard lockup
        device_cgroup: fix RCU imbalance in error case
        mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
        ALSA: info: Fix racy addition/deletion of nodes
        Revert "locking/lockdep: Add debug_locks check in __lock_downgrade()"
        kernel/sysctl.c: fix out-of-bounds access when setting file-max
        Linux 4.4.179

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Conflicts:
	Makefile
	fs/ext4/ioctl.c
2019-04-27 09:07:11 -07:00
Stephen Boyd
39aecae01d genirq: Respect IRQCHIP_SKIP_SET_WAKE in irq_chip_set_wake_parent()
commit 325aa19598e410672175ed50982f902d4e3f31c5 upstream.

If a child irqchip calls irq_chip_set_wake_parent() but its parent irqchip
has the IRQCHIP_SKIP_SET_WAKE flag set an error is returned.

This is inconsistent behaviour vs. set_irq_wake_real() which returns 0 when
the irqchip has the IRQCHIP_SKIP_SET_WAKE flag set. It doesn't attempt to
walk the chain of parents and set irq wake on any chips that don't have the
flag set either. If the intent is to call the .irq_set_wake() callback of
the parent irqchip, then we expect irqchip implementations to omit the
IRQCHIP_SKIP_SET_WAKE flag and implement an .irq_set_wake() function that
calls irq_chip_set_wake_parent().

The problem has been observed on a Qualcomm sdm845 device where set wake
fails on any GPIO interrupts after applying work in progress wakeup irq
patches to the GPIO driver. The chain of chips looks like this:

     QCOM GPIO -> QCOM PDC (SKIP) -> ARM GIC (SKIP)

The GPIO controllers parent is the QCOM PDC irqchip which in turn has ARM
GIC as parent.  The QCOM PDC irqchip has the IRQCHIP_SKIP_SET_WAKE flag
set, and so does the grandparent ARM GIC.

The GPIO driver doesn't know if the parent needs to set wake or not, so it
unconditionally calls irq_chip_set_wake_parent() causing this function to
return a failure because the parent irqchip (PDC) doesn't have the
.irq_set_wake() callback set. Returning 0 instead makes everything work and
irqs from the GPIO controller can be configured for wakeup.

Make it consistent by returning 0 (success) from irq_chip_set_wake_parent()
when a parent chip has IRQCHIP_SKIP_SET_WAKE set.

[ tglx: Massaged changelog ]

Fixes: 08b55e2a92 ("genirq: Add irqchip_set_wake_parent")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-gpio@vger.kernel.org
Cc: Lina Iyer <ilina@codeaurora.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20190325181026.247796-1-swboyd@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-27 09:33:55 +02:00
Nathan Chancellor
728a7fad8a Merge 4.4.164 into android-msm-wahoo-4.4
Changes in 4.4.164: (161 commits)
        bcache: fix miss key refill->end in writeback
        hwmon: (pmbus) Fix page count auto-detection.
        jffs2: free jffs2_sb_info through jffs2_kill_sb()
        pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges
        ipmi: Fix timer race with module unload
        parisc: Fix address in HPMC IVA
        parisc: Fix map_pages() to not overwrite existing pte entries
        ALSA: hda - Add mic quirk for the Lenovo G50-30 (17aa:3905)
        ALSA: ca0106: Disable IZD on SB0570 DAC to fix audio pops
        x86/corruption-check: Fix panic in memory_corruption_check() when boot option without value is provided
        x86/kconfig: Fall back to ticket spinlocks
        sparc: Fix single-pcr perf event counter management.
        x86/fpu: Remove second definition of fpu in __fpu__restore_sig()
        net: qla3xxx: Remove overflowing shift statement
        selftests: ftrace: Add synthetic event syntax testcase
        locking/lockdep: Fix debug_locks off performance problem
        ataflop: fix error handling during setup
        swim: fix cleanup on setup error
        tun: Consistently configure generic netdev params via rtnetlink
        perf tools: Free temporary 'sys' string in read_event_files()
        perf tools: Cleanup trace-event-info 'tdata' leak
        mmc: sdhci-pci-o2micro: Add quirk for O2 Micro dev 0x8620 rev 0x01
        Bluetooth: btbcm: Add entry for BCM4335C0 UART bluetooth
        x86: boot: Fix EFI stub alignment
        pinctrl: qcom: spmi-mpp: Fix err handling of pmic_mpp_set_mux
        kprobes: Return error if we fail to reuse kprobe instead of BUG_ON()
        ACPI / LPSS: Add alternative ACPI HIDs for Cherry Trail DMA controllers
        pinctrl: qcom: spmi-mpp: Fix drive strength setting
        pinctrl: spmi-mpp: Fix pmic_mpp_config_get() to be compliant
        pinctrl: ssbi-gpio: Fix pm8xxx_pin_config_get() to be compliant
        ath10k: schedule hardware restart if WMI command times out
        scsi: esp_scsi: Track residual for PIO transfers
        scsi: megaraid_sas: fix a missing-check bug
        tpm: suppress transmit cmd error logs when TPM 1.2 is disabled/deactivated
        ext4: fix argument checking in EXT4_IOC_MOVE_EXT
        MD: fix invalid stored role for a disk
        usb: chipidea: Prevent unbalanced IRQ disable
        driver/dma/ioat: Call del_timer_sync() without holding prep_lock
        uio: ensure class is registered before devices
        scsi: lpfc: Correct soft lockup when running mds diagnostics
        signal: Always deliver the kernel's SIGKILL and SIGSTOP to a pid namespace init
        dmaengine: dma-jz4780: Return error if not probed from DT
        ALSA: hda: Check the non-cached stream buffers more explicitly
        xen-swiotlb: use actually allocated size on check physical continuous
        tpm: Restore functionality to xen vtpm driver.
        xen: fix race in xen_qlock_wait()
        xen: make xen_qlock_wait() nestable
        net/ipv4: defensive cipso option parsing
        libnvdimm: Hold reference on parent while scheduling async init
        jbd2: fix use after free in jbd2_log_do_checkpoint()
        gfs2_meta: ->mount() can get NULL dev_name
        ext4: initialize retries variable in ext4_da_write_inline_data_begin()
        HID: hiddev: fix potential Spectre v1
        PCI: Add Device IDs for Intel GPU "spurious interrupt" quirk
        signal/GenWQE: Fix sending of SIGKILL
        crypto: lrw - Fix out-of bounds access on counter overflow
        ima: fix showing large 'violations' or 'runtime_measurements_count'
        hugetlbfs: dirty pages as they are added to pagecache
        kbuild: fix kernel/bounds.c 'W=1' warning
        iio: adc: at91: fix acking DRDY irq on simple conversions
        iio: adc: at91: fix wrong channel number in triggered buffer mode
        w1: omap-hdq: fix missing bus unregister at removal
        smb3: allow stats which track session and share reconnects to be reset
        smb3: do not attempt cifs operation in smb3 query info error path
        smb3: on kerberos mount if server doesn't specify auth type use krb5
        printk: Fix panic caused by passing log_buf_len to command line
        genirq: Fix race on spurious interrupt detection
        NFSv4.1: Fix the r/wsize checking
        nfsd: Fix an Oops in free_session()
        lockd: fix access beyond unterminated strings in prints
        dm ioctl: harden copy_params()'s copy_from_user() from malicious users
        powerpc/msi: Fix compile error on mpc83xx
        MIPS: OCTEON: fix out of bounds array access on CN68XX
        TC: Set DMA masks for devices
        kgdboc: Passing ekgdboc to command line causes panic
        xen: fix xen_qlock_wait()
        media: em28xx: use a default format if TRY_FMT fails
        media: em28xx: fix input name for Terratec AV 350
        media: em28xx: make v4l2-compliance happier by starting sequence on zero
        ext4: avoid running out of journal credits when appending to an inline file
        Cramfs: fix abad comparison when wrap-arounds occur
        arm64: dts: stratix10: Correct System Manager register size
        soc/tegra: pmc: Fix child-node lookup
        btrfs: Handle owner mismatch gracefully when walking up tree
        btrfs: locking: Add extra check in btrfs_init_new_buffer() to avoid deadlock
        btrfs: iterate all devices during trim, instead of fs_devices::alloc_list
        btrfs: don't attempt to trim devices that don't support it
        btrfs: wait on caching when putting the bg cache
        btrfs: reset max_extent_size on clear in a bitmap
        btrfs: make sure we create all new block groups
        Btrfs: fix wrong dentries after fsync of file that got its parent replaced
        btrfs: qgroup: Dirty all qgroups before rescan
        Btrfs: fix null pointer dereference on compressed write path error
        btrfs: set max_extent_size properly
        MD: fix invalid stored role for a disk - try2
        tty: check name length in tty_find_polling_driver()
        powerpc/nohash: fix undefined behaviour when testing page size support
        drm/omap: fix memory barrier bug in DMM driver
        media: pci: cx23885: handle adding to list failure
        MIPS: kexec: Mark CPU offline before disabling local IRQ
        powerpc/boot: Ensure _zimage_start is a weak symbol
        sc16is7xx: Fix for multi-channel stall
        media: tvp5150: fix width alignment during set_selection()
        9p locks: fix glock.client_id leak in do_lock
        9p: clear dangling pointers in p9stat_free
        cdrom: fix improper type cast, which can leat to information leak.
        scsi: qla2xxx: Fix incorrect port speed being set for FC adapters
        fuse: Fix use-after-free in fuse_dev_do_read()
        fuse: Fix use-after-free in fuse_dev_do_write()
        fuse: fix blocked_waitq wakeup
        fuse: set FR_SENT while locked
        mm, elf: handle vm_brk error
        binfmt_elf: fix calculations for bss padding
        mm: refuse wrapped vm_brk requests
        fs, elf: make sure to page align bss in load_elf_library
        mm: do not bug_on on incorrect length in __mm_populate()
        e1000: avoid null pointer dereference on invalid stat type
        e1000: fix race condition between e1000_down() and e1000_watchdog
        bna: ethtool: Avoid reading past end of buffer
        MIPS: Loongson-3: Fix CPU UART irq delivery problem
        MIPS: Loongson-3: Fix BRIDGE irq delivery problem
        xtensa: add NOTES section to the linker script
        xtensa: make sure bFLT stack is 16 byte aligned
        xtensa: fix boot parameters address translation
        clk: s2mps11: Fix matching when built as module and DT node contains compatible
        libceph: bump CEPH_MSG_MAX_DATA_LEN
        mach64: fix display corruption on big endian machines
        mach64: fix image corruption due to reading accelerator registers
        vhost/scsi: truncate T10 PI iov_iter to prot_bytes
        ocfs2: fix a misuse a of brelse after failing ocfs2_check_dir_entry
        mm: thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings
        mtd: docg3: don't set conflicting BCH_CONST_PARAMS option
        termios, tty/tty_baudrate.c: fix buffer overrun
        arch/alpha, termios: implement BOTHER, IBSHIFT and termios2
        Btrfs: fix data corruption due to cloning of eof block
        clockevents/drivers/i8253: Add support for PIT shutdown quirk
        ext4: add missing brelse() update_backups()'s error path
        ext4: add missing brelse() in set_flexbg_block_bitmap()'s error path
        ext4: add missing brelse() add_new_gdb_meta_bg()'s error path
        ext4: avoid potential extra brelse in setup_new_flex_group_blocks()
        ext4: fix possible inode leak in the retry loop of ext4_resize_fs()
        ext4: avoid buffer leak in ext4_orphan_add() after prior errors
        ext4: fix missing cleanup if ext4_alloc_flex_bg_array() fails while resizing
        ext4: avoid possible double brelse() in add_new_gdb() on error path
        ext4: fix possible leak of sbi->s_group_desc_leak in error path
        ext4: release bs.bh before re-using in ext4_xattr_block_find()
        ext4: fix buffer leak in ext4_xattr_move_to_block() on error path
        ext4: fix buffer leak in __ext4_read_dirblock() on error path
        mount: Retest MNT_LOCKED in do_umount
        mount: Don't allow copying MNT_UNBINDABLE|MNT_LOCKED mounts
        mount: Prevent MNT_DETACH from disconnecting locked mounts
        sunrpc: correct the computation for page_ptr when truncating
        rtc: hctosys: Add missing range error reporting
        fuse: fix leaked notify reply
        configfs: replace strncpy with memcpy
        hugetlbfs: fix kernel BUG at fs/hugetlbfs/inode.c:444!
        mm: migration: fix migration of huge PMD shared pages
        drm/rockchip: Allow driver to be shutdown on reboot/kexec
        drm/dp_mst: Check if primary mstb is null
        drm/i915/hdmi: Add HDMI 2.0 audio clock recovery N values
        Linux 4.4.164

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2018-11-21 09:31:32 -07:00
Lukas Wunner
59ba12331e genirq: Fix race on spurious interrupt detection
commit 746a923b863a1065ef77324e1e43f19b1a3eab5c upstream.

Commit 1e77d0a1ed ("genirq: Sanitize spurious interrupt detection of
threaded irqs") made detection of spurious interrupts work for threaded
handlers by:

a) incrementing a counter every time the thread returns IRQ_HANDLED, and
b) checking whether that counter has increased every time the thread is
   woken.

However for oneshot interrupts, the commit unmasks the interrupt before
incrementing the counter.  If another interrupt occurs right after
unmasking but before the counter is incremented, that interrupt is
incorrectly considered spurious:

time
 |  irq_thread()
 |    irq_thread_fn()
 |      action->thread_fn()
 |      irq_finalize_oneshot()
 |        unmask_threaded_irq()            /* interrupt is unmasked */
 |
 |                  /* interrupt fires, incorrectly deemed spurious */
 |
 |    atomic_inc(&desc->threads_handled); /* counter is incremented */
 v

This is observed with a hi3110 CAN controller receiving data at high volume
(from a separate machine sending with "cangen -g 0 -i -x"): The controller
signals a huge number of interrupts (hundreds of millions per day) and
every second there are about a dozen which are deemed spurious.

In theory with high CPU load and the presence of higher priority tasks, the
number of incorrectly detected spurious interrupts might increase beyond
the 99,900 threshold and cause disablement of the interrupt.

In practice it just increments the spurious interrupt count. But that can
cause people to waste time investigating it over and over.

Fix it by moving the accounting before the invocation of
irq_finalize_oneshot().

[ tglx: Folded change log update ]

Fixes: 1e77d0a1ed ("genirq: Sanitize spurious interrupt detection of threaded irqs")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mathias Duckeck <m.duckeck@kunbus.de>
Cc: Akshay Bhat <akshay.bhat@timesys.com>
Cc: Casey Fitzpatrick <casey.fitzpatrick@timesys.com>
Cc: stable@vger.kernel.org # v3.16+
Link: https://lkml.kernel.org/r/1dfd8bbd16163940648045495e3e9698e63b50ad.1539867047.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21 09:27:35 +01:00
Nathan Chancellor
f7862b044c Merge 4.4.156 into android-msm-wahoo-4.4
Changes in 4.4.156: (61 commits)
        x86/speculation/l1tf: Fix up pte->pfn conversion for PAE
        staging: android: ion: fix ION_IOC_{MAP,SHARE} use-after-free
        net: bcmgenet: use MAC link status for fixed phy
        qlge: Fix netdev features configuration.
        tcp: do not restart timewait timer on rst reception
        vti6: remove !skb->ignore_df check from vti6_xmit()
        cifs: check if SMB2 PDU size has been padded and suppress the warning
        hfsplus: don't return 0 when fill_super() failed
        hfs: prevent crash on exit from failed search
        fork: don't copy inconsistent signal handler state to child
        reiserfs: change j_timestamp type to time64_t
        hfsplus: fix NULL dereference in hfsplus_lookup()
        fat: validate ->i_start before using
        scripts: modpost: check memory allocation results
        mm/fadvise.c: fix signed overflow UBSAN complaint
        fs/dcache.c: fix kmemcheck splat at take_dentry_name_snapshot()
        ipvs: fix race between ip_vs_conn_new() and ip_vs_del_dest()
        mfd: sm501: Set coherent_dma_mask when creating subdevices
        platform/x86: asus-nb-wmi: Add keymap entry for lid flip action on UX360
        irqchip/bcm7038-l1: Hide cpu offline callback when building for !SMP
        net/9p: fix error path of p9_virtio_probe
        powerpc: Fix size calculation using resource_size()
        s390/dasd: fix hanging offline processing due to canceled worker
        scsi: aic94xx: fix an error code in aic94xx_init()
        PCI: mvebu: Fix I/O space end address calculation
        dm kcopyd: avoid softlockup in run_complete_job
        staging: comedi: ni_mio_common: fix subdevice flags for PFI subdevice
        selftests/powerpc: Kill child processes on SIGINT
        smb3: fix reset of bytes read and written stats
        SMB3: Number of requests sent should be displayed for SMB3 not just CIFS
        powerpc/pseries: Avoid using the size greater than RTAS_ERROR_LOG_MAX.
        btrfs: replace: Reset on-disk dev stats value after replace
        btrfs: relocation: Only remove reloc rb_trees if reloc control has been initialized
        btrfs: Don't remove block group that still has pinned down bytes
        debugobjects: Make stack check warning more informative
        x86/pae: use 64 bit atomic xchg function in native_ptep_get_and_clear
        kbuild: make missing $DEPMOD a Warning instead of an Error
        irda: Fix memory leak caused by repeated binds of irda socket
        irda: Only insert new objects into the global database via setsockopt
        Revert "ARM: imx_v6_v7_defconfig: Select ULPI support"
        enic: do not call enic_change_mtu in enic_probe
        Fixes: Commit cdbf92675f ("mm: numa: avoid waiting on freed migrated pages")
        genirq: Delay incrementing interrupt count if it's disabled/pending
        irqchip/gic-v3-its: Recompute the number of pages on page size change
        irqchip/gicv3-its: Fix memory leak in its_free_tables()
        irqchip/gicv3-its: Avoid cache flush beyond ITS_BASERn memory size
        irqchip/gic-v3: Add missing barrier to 32bit version of gic_read_iar()
        irqchip/gic: Make interrupt ID 1020 invalid
        ovl: rename is_merge to is_lowest
        ovl: override creds with the ones from the superblock mounter
        ovl: proper cleanup of workdir
        sch_htb: fix crash on init failure
        sch_multiq: fix double free on init failure
        sch_hhf: fix null pointer dereference on init failure
        sch_netem: avoid null pointer deref on init failure
        sch_tbf: fix two null pointer dereferences on init failure
        mei: me: allow runtime pm for platform with D0i3
        s390/lib: use expoline for all bcr instructions
        ASoC: wm8994: Fix missing break in switch
        btrfs: use correct compare function of dirty_metadata_bytes
        Linux 4.4.156

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2018-09-15 00:50:44 -07:00
Sudeep Holla
27e83f7dd9 genirq: Delay incrementing interrupt count if it's disabled/pending
commit a946e8c717f9355d1abd5408ed0adc0002d1aed1 upstream.

In case of a wakeup interrupt, irq_pm_check_wakeup disables the interrupt
and marks it pending and suspended, disables it and notifies the pm core
about the wake event. The interrupt gets handled later once the system
is resumed.

However the irq stats is updated twice: once when it's disabled waiting
for the system to resume and later when it's handled, resulting in wrong
counting of the wakeup interrupt when waking up the system.

This patch updates the interrupt count so that it's updated only when
the interrupt gets handled. It's already handled correctly in
handle_edge_irq and handle_edge_eoi_irq.

Reported-by: Manoil Claudiu <claudiu.manoil@freescale.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/1446661957-1019-1-git-send-email-sudeep.holla@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-15 09:40:40 +02:00
Nathan Chancellor
879bbe15b3 Merge 4.4.147 into android-msm-wahoo-4.4
Changes in 4.4.147: (13 commits)
        scsi: qla2xxx: Fix ISP recovery on unload
        scsi: qla2xxx: Return error when TMF returns
        genirq: Make force irq threading setup more robust
        nohz: Fix local_timer_softirq_pending()
        netlink: Do not subscribe to non-existent groups
        netlink: Don't shift with UB on nlk->ngroups
        netlink: Don't shift on 64 for ngroups
        ext4: fix false negatives *and* false positives in ext4_check_descriptors()
        ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle
        ring_buffer: tracing: Inherit the tracing setting to next ring buffer
        i2c: imx: Fix reinit_completion() use
        jfs: Fix inconsistency between memory allocation and ea_buf->max_size
        Linux 4.4.147

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2018-08-09 08:57:36 -07:00
Thomas Gleixner
09a0de491c genirq: Make force irq threading setup more robust
commit d1f0301b3333eef5efbfa1fe0f0edbea01863d5d upstream.

The support of force threading interrupts which are set up with both a
primary and a threaded handler wreckaged the setup of regular requested
threaded interrupts (primary handler == NULL).

The reason is that it does not check whether the primary handler is set to
the default handler which wakes the handler thread. Instead it replaces the
thread handler with the primary handler as it would do with force threaded
interrupts which have been requested via request_irq(). So both the primary
and the thread handler become the same which then triggers the warnon that
the thread handler tries to wakeup a not configured secondary thread.

Fortunately this only happens when the driver omits the IRQF_ONESHOT flag
when requesting the threaded interrupt, which is normaly caught by the
sanity checks when force irq threading is disabled.

Fix it by skipping the force threading setup when a regular threaded
interrupt is requested. As a consequence the interrupt request which lacks
the IRQ_ONESHOT flag is rejected correctly instead of silently wreckaging
it.

Fixes: 2a1d3ab898 ("genirq: Handle force threading of irqs with primary and thread handler")
Reported-by: Kurt Kanzenbach <kurt.kanzenbach@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Kurt Kanzenbach <kurt.kanzenbach@linutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-09 12:19:27 +02:00
Nathan Chancellor
a204867e40 Merge tag 'android-9.0.0_r0.5' into android-msm-wahoo-4.4
Android 9.0.0 Release 0.5 (PPR1.180610.011,taimen/walleye)

* tag 'android-9.0.0_r0.5': (611 commits)
  scsi: ufs: call single_release to avoid memory leak
  kernel: initialize and free cpufreq stats properly
  kernel: Fix massive cpufreq stats memory leaks
  scsi: ufs: revise commit ecd2676bd513 ("disallow SECURITY_PROTOCOL_IN without _OUT")
  FROMLIST: binder: fix proc->files use-after-free
  Revert "Add timeout and panic when __scm_call_armv8_64 takes too long."
  scsi: ufs: disallow SECURITY_PROTOCOL_IN without _OUT
  qcacld-3.0: Fix potential buffer overflow in radio stats event handler
  packet: in packet_do_bind, test fanout with bind_lock held
  packet: hold bind lock when rebinding to fanout hook
  qcacld-3.0: Fix OOB write in WMA TX power level stats handler
  msm: mdss: Fix for wrong length in copy_to_user
  fbdev: msm: check buffer size before writing to user buffer
  qcacld-3.0: Add vdev_id sanity check in wma_vdev_stop_resp_handler
  msm: sde: check buffer size before writing to user buffer
  diag: Protect the decrement of number of diag clients
  drivers: qcom: lpm-stats: Fix undefined access error
  input: touch: ftm4: Fix length of memset() to avoid using uninitialized memory
  input: touch: ftm4: Fix memory overflow
  netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets
  msm: camera: Fix for Possible information leak issue
  ASoC: msm-lsm-client: use kzalloc instead of kmalloc
  Revert "arch/arm64/wahoo_defconfig: enable DEADLINE I/O scheduler"
  Wifi: Store unstripped  wlan.ko image
  Release 5.2.1.1J.1
  qcacld-3.0: Enable support to send packet fate stats
  Revert "serial: msm_serial_hs: Protect spurious irqs after wakeup irq enablement"
  pinctrl: qcom: Add irq_enable callback for msm gpio
  arm64: dts: taimen: Move DISPLAY_ON command to post-panel-on
  Revert "qcom: scm: reduce the timeout to trigger panic from 10mins to 10s."
  Revert "arm64/configs: wahoo: Enable RTB logging"
  FROMLIST: arm64: vdso32: Use full path to Clang instead of relying on PATH
  msm: ipa: rmnet: Make code changes with respect to CR#2046006
  qcacld-3.0: Not to be hard to make high order page
  arm64/configs: wahoo: Enable RTB logging
  qcom: scm: reduce the timeout to trigger panic from 10mins to 10s.
  Release 5.2.1.1J
  qcacld-3.0: Fix race condition in resetting vdev and using it
  qcacld-3.0: Acquire SME lock before csr_roam_offload_scan from SME
  qcacld-3.0: Call vdev resp and hold req queue cleanup from MC thread
  qcacmn: Fix debugfs issue for DPTRACE
  tcpm: Ignore CC and vbus changes in PORT_RESET change
  arm64: dts: taimen-pm: set LOW_BATT_THRESHOLD to 2.7V
  smb-lib: add DT to set BATIF_LOW_BATT_THRESHOLD
  arm64: dts: taimen: set low voltage thresholds
  msm: mdss: read status register in case of error detection
  msm: mdss: add post panel on command debug node
  msm-dwc3: Add debug logs around suspend/resume
  BACKPORT: irq: Make the irqentry text section unconditional
  UPSTREAM: kasan: make get_wild_bug_type() static
  UPSTREAM: kasan: separate report parts by empty lines
  UPSTREAM: kasan: improve double-free report format
  UPSTREAM: kasan: print page description after stacks
  UPSTREAM: kasan: improve slab object description
  UPSTREAM: kasan: change report header
  UPSTREAM: kasan: simplify address description logic
  UPSTREAM: kasan: change allocation and freeing stack traces headers
  UPSTREAM: kasan: unify report headers
  UPSTREAM: kasan: introduce helper functions for determining bug type
  BACKPORT: kasan: report only the first error by default
  UPSTREAM: kasan: fix races in quarantine_remove_cache()
  UPSTREAM: kasan: resched in quarantine_remove_cache()
  BACKPORT: kasan, sched/headers: Uninline kasan_enable/disable_current()
  BACKPORT: kasan: drain quarantine of memcg slab objects
  UPSTREAM: x86/suspend: fix false positive KASAN warning on suspend/resume
  UPSTREAM: kasan: support use-after-scope detection
  UPSTREAM: kasan/tests: add tests for user memory access functions
  UPSTREAM: mm, kasan: add a ksize() test
  BACKPORT: kprobes: Unpoison stack in jprobe_return() for KASAN
  UPSTREAM: arm64: setup: introduce kaslr_offset()
  UPSTREAM: kcov: fix comparison callback signature
  UPSTREAM: kcov: support comparison operands collection
  UPSTREAM: kcov: remove pointless current != NULL check
  UPSTREAM: kcov: support compat processes
  UPSTREAM: kcov: simplify interrupt check
  UPSTREAM: kcov: make kcov work properly with KASLR enabled
  UPSTREAM: kcov: add more missing includes
  UPSTREAM: kcov: add missing #include <linux/sched.h>
  UPSTREAM: kcov: properly check if we are in an interrupt
  UPSTREAM: kcov: don't profile branches in kcov
  UPSTREAM: kcov: don't trace the code coverage code
  Add timeout and panic when __scm_call_armv8_64 takes too long.
  Release 5.2.1.1I.1
  qcacld-3.0: Ignore the csa event when roaming is in progress
  htc_battery: Add Vbus output status in log
  smb-lib: Export Vbus output status
  power_supply: Add property of OTG status
  scsi: ufs: disable clock scaling
  Release 5.2.1.1I
  qcacld-3.0: Revive the WoW wakeup logs to appear in kmsg
  qcacld-3.0: Log netdev tx queue state at user triggered disconnect
  qcacld-3.0: Don't fill any WMA request if target is not ready
  msm: adsprpc: Use unsigned integer for length values
  FROMLIST: ARM: amba: Fix race condition with driver_override
  msm: sensor: ois: add conditional check for ioctl
  drivers: cpuidle: lpm-levels: Fix untrusted pointer dereference.
  ASoC: msm: check payload size before memory allocation
  UPSTREAM: scsi: sg: don't return bogus Sg_requests
  netfilter: add back stackpointer size checks
  qcacld-3.0: Fix integer underflow and buffer over-read in fwlog
  ASoC: msm: qdsp6v2: check for buffer size before read
  usb: gadget: f_hid: fix: Prevent accessing released memory
  usb: gadget: define free_ep_req as universal function
  [BACKPORT] xfrm_user: fix return value from xfrm_user_rcv_msg
  soc: qcom: fix race condition while freeing private data
  msm: vidc: Addition of enums for HLG and HDR10
  defconfig: arm64: Enable UFSHCD_CMD_LOGGING flag
  scsi: ufs: Fix compilation error in ufs cmd logging
  scsi: ufs: add support for logging custom events
  scsi: ufs: fix the UFS command tracing events
  scsi: ufs: update ufs command logging infrastructure
  scsi: ufs: add command logging infrastructure
  power: qpnp-fg-gen3: make CHARGE_FULL property writable by user
  Revert "USB: set hub's default autosuspend delay as 0"
  Revert "usb: hub: Prevent hub autosuspend if usbcore.autosuspend is -1"
  msm: ipa: Fix to handle NULL pointer dereference
  msm: ipa: Prevent deletion of the default route rule
  msm: ipa: Fix to add string NULL terminator
  msm: ipa: dynamic memory leak fix
  msm: ipa: dynamic memory leak fix
  msm: ipa: return the wifi stats when reset is set
  msm: ipa: Return error -ENODEV for set data quota failure
  msm: ipa: Change error value for set quota
  msm: ipa: Fix to validate routing table index for filter exception
  msm:ipa: Fix to slab out of bounds access
  msm: ipa3: Fix IPA aggregation force close call
  msm: ipa: ipa_usb: teth_prot and ttype validation
  msm: ipa: Fix to use after free issue
  msm: ipa: fix ipacm_client usage
  msm: ipa3: Verify IPA client id before using it
  msm: ipa3: Protect access to ipa3_qmi_ctx variable by lock
  msm: ipa: using rate limit api for ioctl calls
  msm: ipa: Fix to IPA static analysis constant null deferenced
  msm: ipa: Fix to use GFP_DMA and add check for dma_map_single
  Release 5.2.1.1H.1
  qcacld-3.0: update the adapter->rssi from fw
  qcacld-3.0: Fix null pointer dereference in sending probe req
  Release 5.2.1.1H
  qcacld-3.0: Fix OOB write in wma_extscan_change_results_event_handler
  qcacld-3.0: Fix Use after free in wma_del_tdls_sta
  qcacld-3.0: Fix race vdev down and tx_desc->vdev access
  qcacld-3.0: Fix race vdev down and tx_desc->vdev access
  qcacld-3.0: Fix OOB write in wma_unified_debug_print_event_handler
  qcacld-3.0: Probe request sent with corrupted IE
  qcacmn: Validate nbuf in dp trace function
  qcacmn: Check for TSO packet in release_skb
  build.config: enforce trace_printk check
  msm: mdss: improve performance coming out of idle pc
  Revert "qcacld-3.0: Treat ARP/ICMP/ICMPV6 packets as high priority"
  pd_engine: Add support for TYPEC_CC_RP_1_5
  tcpm: set rp tp 1.5A once PD contract is negotiated
  smb-lib: Add support for POWER_SUPPLY_TYPEC_PR_SOURCE_1_5
  qcacld-3.0: Enable wiphy RxLDPC for 5G band
  Release 5.2.1.1G
  qcacld-3.0: Enable ct tracker for external ctrl mode after tdls link enable
  qcacld-3.0: Hold wakelock till connection completion
  qcacld-3.0: Reset txrx connectivity stats after SSR
  qcacld-3.0: Prevent access to rx thread after thread shutdown
  qcacld-3.0: Flush packets in datapath error case
  qcacld-3.0: Remove CSR dot11f IE RSN max len
  qcacld-3.0: Fix OOB write in wma_unified_debug_print_event_handler
  qcacld-3.0: Return -EGAIAN and not -ENODEV if FW is down
  qcacld-3.0: Fix check condition after taking lock
  qcacld-3.0: Fix OOB write in wma_roam_synch_event_handler
  qcacld-3.0: Fix issue in connection to WAPI AP
  ASoC: msm: qdsp6v2: Add volume control for capture streams
  cpufreq: stats: use seq iterator for large uid-related files
  cpufreq: stats: update uid data in acct_update_power
  htc_battery: Control stop/start charge level by charging_disabled
  proc: add null check in proc_uid_init
  Release 5.2.1.1E
  qcacld-3.0: Remove duplicate block of code due to auto merge
  qcacld-3.0: Reset is_acs_allowed variable when chan count is 0
  qcacld-3.0: Avoid double free in drv_cmd_get_ibss_peer_info_all()
  qcacld-3.0: Fail channel sap channel change request for channel 0
  qcacld-3.0: Fix buf overflow in __wlan_hdd_cfg80211_update_connect_params
  icnss: Consider recovery as FW down
  usb: pd_engine: Turn off Vbus and Vconn during shutdown
  VTS: Fix test for supplicant deprecated commands
  Revert "xhci: plat: Register shutdown for xhci_plat"
  Revert "f_fs: set maxburst to one before enabling endpoints"
  dwc3: resize txfifo of IN/INT endpoint before enabling it
  scsi: ufs: Avoid dead lock during error recovery
  power: qcom/bcl_peripheral: fix READ_OPTIONAL_PROP
  icnss: Avoid wlan driver remove during modem graceful shutdown
  lge_battery: add parameters to control stop/start charge level
  ext4: handle errors on ext4_commit_super
  qcacld-3.0: WLAN upgrade to 5.2.1.1D
  arm64: dts: Add tcpc configs for taimen
  usb: to recognize vbus_present from attribute "present"
  Revert "Revert "f_fs: set maxburst to one before enabling endpoints""
  Revert "ANDROID: usb: gadget: accessory: Lower protocol version"
  qcacld-3.0: WLAN upgrade to 5.2.1.1C.1
  qcacld-3.0: Fix issue while handling ndp response without iface name
  726b68f Release 5.2.1.1C
  arm64: wahoo_defconfig: set CONFIG_QCA_CLD_WLAN=m
  ANDROID: usb: gadget: accessory: Lower protocol version
  usb: typec: Import tcpc configs from device tree
  arm64: dts: Add tcpc configs for walleye
  dt-bindings: usb: Add typec bindings
  Revert "f_fs: set maxburst to one before enabling endpoints"
  staging: bcm15602: use async probe
  init/main.c: add sync point between each level
  Revert "Revert "select: use freezable blocking call""
  input: misc: stmvl53L0: use async probe
  arm64:configs:wahoo: disable CONFIG_QPNP_FG_GEN3_LEGACY_CYCLE_COUNT
  qpnp: fg+smb-lib: implement Linux cycle count
  htc_battery: add parameters to control stop/start charge level
  misc: mnh: use async probe
  FROMLIST: ALSA: usb-audio: fix memory leak on cval
  ALSA: usb-audio: fix error in backport
  qpnp-fg-gen3: add cycle_counts_bins device driver attribute
  qcacld-3.0: WLAN upgrade to 5.2.1.1B
  qcacld-3.0: WLAN upgrade to 5.2.1.1A
  BACKPORT: ALSA: usb-audio: UAC2 jack detection
  BACKPORT: ALSA: usb-audio: fix uac control query argument
  scsi: ufs: Add discard command support to ufs debugfs req. stats
  scsi: ufs: Adding io_stats to UFS debugfs
  blkdev: Refactoring block io latency histogram codes
  msm: wlan: Update regulatory database
  msm: wlan: Update regulatory database
  msm: wlan: Update regulatory database
  ANDROID: initramfs: call free_initrd() when skipping init
  pd_engine:Notify smblib when no suspend is allowed
  typec: PD: Add callback to support no usb suspend
  smb-lib: support separate current settings from usb and pd
  arm64: dts: msm8998-htc-common: set imem-restart_info
  reset/msm-poweroff: setting reboot message
  qcacld-3.0: WLAN upgrade to 5.1.1.47F.2
  qcacld-3.0: Validate opmode update req before sending to FW
  scsi: ufs: fix req_stats debugfs entry
  gower: smb138x-charger: changed buck freq from 700 to 900 kHz
  power: smb-lib: Skip enable DRP when chg->typec_pr_disabled is true
  Revert "msm: ipc_logging: Disable ipc_log_string"
  BACKPORT: mm, procfs: breakdown RSS for anon, shmem and file in /proc/pid/status
  BACKPORT: mm, shmem: add internal shmem resident memory accounting
  power/supply qpnp-smb2: remove POWER_SUPPLY_PROP_PORT_TEMP
  net: replace dst_cache ip6_tunnel implementation with the generic one
  Make DST_CACHE a silent config option
  net: add dst_cache support
  scsi: ufs: fix wrong order for slow io
  scsi: ufs: ufs-qcom-ice: Initialize local variable in ice_cfg_start()
  scsi: ufs: Serialise ufs clock gating and ungating
  scsi: ufs: Add UFS slow I/O monitoring.
  Revert "qcacld-3.0: Fix potential OOB read in dot11f.c"
  Revert "qcacld-3.0: Check the length of IE's before appending"
  Revert "qcacld-3.0: Check ie_len against 255 in function get_container_ies_len"
  msm: mdss: set err detect irq to disable on init
  msm: ADSPRPC: Change SSC VMID from 5 to 38
  Disable kASLR for KASAN builds.
  msm: ipc_logging: Disable ipc_log_string
  UPSTREAM: block: silently forbid sending any ioctl to a partition
  Revert "Revert "qcacld-3.0: WLAN upgrade to 5.1.1.47F.1""
  arm64: dts: lge: taimen: max touch coordinates
  thermal: qcom: tracing: add clock_set_rate tracing for lmh
  arm64: dts: taimen: To avoid AOD blinking issues, changed some related commands
  Revert "soc: qcom: glink: Move ctx initialization of xprt ptr"
  Revert "soc: qcom: glink: Move tx_info allocation in beginning"
  Revert "soc: qcom: glink: Move get reference to valid location"
  Revert "soc: qcom: initialize glink link state"
  Revert "soc: qcom: avoid calling sleeping functions in interrupt context"
  Revert "qcacld-3.0: WLAN upgrade to 5.1.1.47F.1"
  Revert "qcacld-3.0: Check for SRD channels in sap_get_channel_list"
  Revert "qcacld-3.0: Update bss count based on channel offset only for same band"
  Revert "qcacld-3.0: Trim ACS channel list based on the concurrent connections"
  Revert "qcacld-3.0: Avoid 2.4Ghz channel in 40Mhz for SAP start"
  Revert "qcacld-3.0: WLAN upgrade to 5.1.1.47F.2"
  Revert "qcacld-3.0: Treat ARP/ICMP/ICMPV6 packets as high priority"
  arch/arm64/wahoo_defconfig: set default readahead to 2048KB
  ANDROID: mm: add config for default readahead size
  power: lge_battery: Enable bm_check_therm_charging when not charging
  Revert "arm64: dts: taimen: set fg-empty-voltage to 3.2V"
  Revert "arm64: dts: walleye: set fg-empty-voltage to 3.2V"
  Revert "arm64: dts: taimen: set fg-empty-voltage to 3.2V"
  Revert "arm64: dts: walleye: set fg-empty-voltage to 3.2V"
  Revert "arm64: dts: taimen: lower FG empty and cutoff voltages"
  Revert "arm64: dts: taimen: set vbat-too-low-threshold to 2.8V"
  scsi: ufs: fix wrong pointer for enabled latency_hist
  misc: mnh-ddr: Allocate memory for driver once
  scsi: ufs: nullify lrbp->cmd inside of valid tag period
  arch/arm64/wahoo_defconfig: enable DEADLINE I/O scheduler
  qcacld-3.0: Treat ARP/ICMP/ICMPV6 packets as high priority
  qcacld-3.0: WLAN upgrade to 5.1.1.47F.2
  qcacld-3.0: Avoid 2.4Ghz channel in 40Mhz for SAP start
  qcacld-3.0: Trim ACS channel list based on the concurrent connections
  qcacld-3.0: Update bss count based on channel offset only for same band
  qcacld-3.0: Check for SRD channels in sap_get_channel_list
  qcacld-3.0: WLAN upgrade to 5.1.1.47F.1
  soc: qcom: avoid calling sleeping functions in interrupt context
  soc: qcom: initialize glink link state
  soc: qcom: glink: Move get reference to valid location
  soc: qcom: glink: Move tx_info allocation in beginning
  soc: qcom: glink: Move ctx initialization of xprt ptr
  ANDROID: usb: gadget: f_accessory: Also zero out rx_req on unbind
  soc: qcom: service-locator: Update incorrect usage of qmi_send_req_wait
  soc: qcom: service-locator: Fix error message prints for receiving messages
  ANDROID: usb: gadget: f_accessory: Fix double-free
  msm: ipa3: add lock for num_q6_rule
  msm: ipa: fix security issues in ipa wan driver
  nl80211: Define policy for packet pattern attributes
  netlink: Add netns check on taps
  qcacld-3.0: Add sanity check for vdev_id in wma_wow_wakeup_host_event
  qcacld-3.0: Add sanity check for vdev id to prevent OOB access
  qcacld-3.0: Calculate buf_len properly for extscan hotlist event buffer
  msm: ipa: add null terminator
  misc: mnh: mipi: change variable type to check for error
  qcacld-3.0: Validate packet length, before processing PTT commands
  qcacld-3.0: Use after free in hdd_debugfs_stats_update api
  qcacld-3.0: Fix potential OOB read in dot11f.c
  BACKPORT: USB: core: harden cdc_parse_cdc_header
  PCI: Fix race condition with driver_override
  qcacld-3.0: Fix potential buffer overwrite in wma_unified_link_iface_stats_event_handler
  FROMGIT: soc: qcom: initialize glink link state
  qcacld-3.0: Check the length of IE's before appending
  UPSTREAM: KEYS: encrypted: fix buffer overread in valid_master_desc()
  UPSTREAM: net: ipv4: fix for a race condition in raw_sendmsg
  qcacld-3.0: Add sanity check in wma_process_rmf_frame
  diag: dci: Add validity check for dci client's process descriptor
  qcacld-3.0: Add sanity check for num_hw_modes and num_phy
  qcacld-3.0: WLAN upgrade to 5.1.1.44V.4
  qcacld-3.0: Enhance logging levels for some SAP ACS messages
  qcacld-3.0: Do 11ac override only if channel list has 5Ghz channel(s)
  qcacld-3.0: Assign acs_cfg->end_ch before use
  qcacld-3.0: Avoid selection of irrelevant channel in 80/160MHz config
  qcacld-3.0: Set ACS weight to max for channels not in scan list
  qcacld-3.0: Fix an ACS hw mode mapping discrepancy
  qcacld-3.0: Check for valid vdev ID in SWBA event handler
  ASoC: apr: Add validity check to APR port
  msm: ipa: Fix the handling of default IPA header
  qcacld-3.0: Fix buffer overread in wma_extscan_hotlist_match_event_handler
  qcacld-3.0: Remove unused function proc_set_req_internal
  qcacld-3.0: Fix potential buffer overflow in htt_t2h_lp_msg_handler
  qcacld-3.0: Fix potential buffer overflow in ol_rx_flush_handler
  qcacld-3.0: Fix buffer overflow in wma radio_tx_power_level_stats handler
  qcacld-3.0: Fix potential buffer overflow in process_tx_info
  ANDROID: usb: gadget: f_accessory: Increase buffer size and max burst
  Revert "arm64: dts: taimen: To avoid AOD flickering, changed AOD in/out init.code"
  qcacld-3.0: Check ie_len against 255 in function get_container_ies_len
  arm64: dts: taimen: To avoid AOD flickering, changed AOD in/out init.code
  msm: wlan: Remove channel 14 from Japan
  ANDROID: cpufreq: change uid_cpupower to use u32
  qcacld-3.0: Support NDP Confirm with channel info and Schedule Update
  UPSTREAM: ext4: don't allow encrypted operations without keys
  UPSTREAM: typec: tcpm: Only request matching pdos
  UPSTREAM: typec: tcpm: Validate source and sink caps
  ANDROID: sdcardfs: Protect set_top
  ANDROID: fsnotify: Notify lower fs of open
  Revert "ANDROID: sdcardfs: notify lower file of opens"
  ANDROID: sdcardfs: Use lower getattr times/size
  qcacld-3.0: WLAN upgrade to 5.1.1.44V.3
  qcacld-3.0: Validate CSA WBW IE before processing channel switch
  Revert "arm64/configs: wahoo: remove CONFIG_IPC_LOGGING"
  nl80211: Add the missing nl80211 enums
  Revert "scsi: ufs: Change power mode on line reset"
  Revert "Revert "scsi: ufs: disable auto hibern8""
  KEYS: prevent KEYCTL_READ on negative key
  hrtimer: Reset hrtimer cpu base proper on CPU hotplug
  qcacld-3.0: WLAN upgrade to 5.1.1.44V.2
  qcacld-3.0: Avoid panic during HDD resume failure if FW is down
  qcacld-3.0: WLAN upgrade to 5.1.1.44V.1
  qcacld-3.0: Send per chain rssi to upper layer
  qcacld-3.0: Modify dwell time and DBS scan based on scan request
  qcacmn: Send per chain rssi to upper layer
  qcacld-3.0: Add support for HW mode info vendor command
  nl80211: Introduce scan flags to emphasize requested scan behavior
  cfg80211: Scan results to also report the per chain signal strength
  qcacld-3.0: WLAN upgrade to 5.1.1.44V
  msm: wlan: Remove DSRC channels from US reg-domain
  icnss: Update icnss platform driver
  USB: fix buffer overflows with parsing CDC headers
  scsi/ufs: use 16 queue depth for Samsung UFS part
  BACKPORT: USB: core: harden cdc_parse_cdc_header
  ANDROID: clock_gettime(CLOCK_BOOTTIME,) slows down >20x
  qcacld-3.0: Update host driver version to 5.1.1.41W.1
  Revert "scsi: ufs: disable auto hibern8"
  qcacld-3.0: Trim the ACS scan channel list as per acs config
  ANDROID: xattr: Pass EOPNOTSUPP to permission2
  STOPSHIP: ANDROID: cpufreq: concurrent_*_time P/H experiment
  ANDROID: cpufreq: Remove seq_printf from critical path
  ANDROID: sdcardfs: Move default_normal to superblock
  qcacld-3.0: Check the channel width value in CSA processing
  arm64: dts: htc: usb-xa: Lower USB-C temp and hysteresis thresholds
  arm64: dts: lge: Lower USB-C temp and hysteresis thresholds
  wlan_mac: Change from icnss to cnss_utils api
  cnss_utils: Zero out cnss_utils priv structure during initialization
  cnss_utils: Add support for derived MAC address
  cnss_utils: Add support of cnss_utils for WLAN
  arm64: dts: taimen: lower FG empty and cutoff voltages
  arm64: dts: taimen: set vbat-too-low-threshold to 2.8V
  power: qcom: bcl_peripheral: allow setting vbat-too-low from DT
  msm: bus_arb: disable debug logging
  arm64/configs: wahoo: remove CONFIG_IPC_LOGGING
  input: touchscreen: stm: enable touch after unblank
  Add VTI support to Wahoo Kernel
  arm64: dts: taimen: set fg-empty-voltage to 3.2V
  arm64: dts: walleye: set fg-empty-voltage to 3.2V
  power: lge-battery: remove debugging FG log message
  qcacld-3.0: WLAN upgrade to 5.1.1.41W
  wireless: wlan: Remove DSRC channels from ETSI countries
  soc: qcom: ssr: Remove ramdump enabled limitation for crash_reason
  STOPSHIP: ANDROID: vdso: add disable switch for experiments
  ANDROID: wahoo: turn on VDSO
  ANDROID: arm64: vdso32: fix CC=clang build
  ANDROID: wahoo: add CROSS_COMPILE_ARM32 to build configs
  ANDROID: CROSS_COMPILE_ARM32 must work if CONFIG_COMPAT_VDSO
  FROMLIST: BACKPORT: [PATCH 6/6] arm64: Wire up and expose the new compat vDSO
  FROMLIST: BACKPORT: [PATCH 5/6] arm64: compat: 32-bit vDSO setup
  FROMLIST: [PATCH 4/6] arm64: compat: Add a 32-bit vDSO
  FROMLIST: [PATCH 3/6] arm64: Refactor vDSO init/setup
  FROMLIST: [PATCH 2/6] arm64: elf: Set AT_SYSINFO_EHDR in compat processes
  FROMLIST: [PATCH 1/6] arm64: compat: Use vDSO sigreturn trampolines if available
  FROMLIST: lib: vdso: add support for time
  FROMLIST: [PATCH] arm64: compat: Expose offset to registers in sigframes
  FROMLIST: [PATCH v5 12/12] lib: vdso: do not expose gettimeofday, if no arch supported timer
  FROMLIST: [PATCH v5 11/12] lib: vdso: Add support for CLOCK_BOOTTIME
  FROMLIST: [PATCH v5 10/12] arm64: vdso: replace gettimeofday.S with global vgettimeofday.C
  FROMLIST: [PATCH v5 09/12] arm: vdso: move vgettimeofday.c to lib/vdso/
  FROMLIST: [PATCH v5 08/12] arm: vdso: Add ARCH_CLOCK_FIXED_MASK
  FROMLIST: [PATCH v5 07/12] arm: vdso: disable profiling
  FROMLIST: [PATCH v5 06/12] arm: vdso: add support for clock_getres
  FROMLIST: [PATCH v6 05/12] arm: vdso: Add support for CLOCK_MONOTONIC_RAW
  FROMLIST: [PATCH v5 04/12] arm: vdso: do calculations outside reader loops
  FROMLIST: [PATCH v5 03/12] arm: vdso: inline assembler operations to compiler.h
  FROMLIST: [PATCH v5 02/12] arm: vdso: add include file defining __get_datapage()
  FROMLIST: [PATCH v5 01/12] arm: vdso: rename vdso_datapage variables
  FROMLIST: [PATCH v2 3/3] arm64: compat: Add CONFIG_KUSER_HELPERS
  FROMLIST: [PATCH v2 2/3] arm64: compat: Split the sigreturn trampolines and kuser helpers (assembler sources)
  FROMLIST: [PATCH v2 1/3] arm64: compat: Split the sigreturn trampolines and kuser helpers (C sources)
  msm: ipc_logging: fix missing header
  ANDROID: sdcardfs: Fix missing break on default_normal
  mm: skip swap readahead when process is exiting
  ANDROID: sdcardfs: Add default_normal option
  ANDROID: sdcardfs: notify lower file of opens
  UPSTREAM: net: xfrm: allow clearing socket xfrm policies.
  qcacld-3.0: wlan driver upgrade to 5.1.1.38X
  diag: Add timer to make sure wakelock no stuck
  misc: mnh: fix pcie suspend sequence for power down from suspend
  misc: mnh: prevent double ready irq disables
  ANDROID: cpufreq: update conditions for recording cputime
  BACKPORT: arm64: Use __pa_symbol for empty_zero_page
  BACKPORT: arm64: Use __pa_symbol for kernel symbols
  UPSTREAM: mm: Introduce lm_alias
  BACKPORT: time: Clean up CLOCK_MONOTONIC_RAW time handling
  BACKPORT: time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting
  UPSTREAM: arm64: compat: Remove leftover variable declaration
  UPSTREAM: arm64: vdso: constify vm_special_mapping used for aarch32 vectors page
  UPSTREAM: arm64: vdso: add __init section marker to alloc_vectors_page
  UPSTREAM: ARM: 8597/1: VDSO: put RO and RO after init objects into proper sections
  UPSTREAM: arm64: Add support for CLOCK_MONOTONIC_RAW in clock_gettime() vDSO
  UPSTREAM: arm64: Refactor vDSO time functions
  UPSTREAM: arm64: fix vdso-offsets.h dependency
  UPSTREAM: kbuild: drop FORCE from PHONY targets
  UPSTREAM: mm: add PHYS_PFN, use it in __phys_to_pfn()
  UPSTREAM: ARM: 8476/1: VDSO: use PTR_ERR_OR_ZERO for vma check
  Revert "soc: qcom: pil: Dump whole subsystem region"
  misc: mnh: Free firmware buf on download failure
  Revert "arm64: dts: taimen: add delay after sleep out and post panel on cmd"
  ANDROID: cpufreq: uid_concurrent_policy_time
  ANDROID: cpufreq: uid_concurrent_active_time
  ANDROID: cpufreq: concurrent_policy_time by pid
  ANDROID: cpufreq: concurrent_active_time by pid
  PM: wakeup_reasons: Fix formatting for printk
  ufs: show ufs part info in error case
  msm: mdss: ensure mdp transfer before post panel on commands
  spmi-pmic-arb: add support to dispatch interrupt based on IRQ status
  input: ftm4: sync only between repeated touch events
  msm: kgsl: Stop slab shrinker when no more pages can be reclaimed
  UPSTREAM: arm64: vdso: fix clock_getres for 4GiB-aligned res
  build.config.clang.lto: fix LD_LIBRARY_PATH
  soc: qcom: pil: Dump whole subsystem region
  easelcomm: Avoid retries when sending wrap marker
  FROMLIST: arm64: Avoid aligning normal memory pointers in __memcpy_{to,from}io
  misc: easelcomm: Convert service spinlock to mutex
  msm: mdss: enable err_detect irq after post panel on
  misc: easelcomm: Fix signed and unsigned comparison
  drv2624: use regmap_write_bit() for updating bits for volatile registers
  genirq: Add generic action name for chained IRQs
  input: touchscreen: stm: add decoding for additional events
  clk: msm: clock-gpu-8998: Remove 180MHz perf level for gfx3d clock
  arm64: configs: wahoo: enable MNH_PCIE_MULTIPLE_MSI
  misc: mnh: pcie: fix compile error for multiple msi config
  pci: msm: add support for multiple msi interrupts
  ANDROID: Revert "arm64: move ELF_ET_DYN_BASE to 4GB / 4MB"
  sched: rate-limit sched_timing printk
  usb: gadget: f_fs: Fix sleeping while atomic in ffs_epfile_io
  power: Adjust learned capacity max decrement to 0.5%
  arm64: dtbo: muskie: Remove muskie dtbo from build
  ANDROID: cpufreq: Add time_in_state to /proc/uid directories
  ANDROID: proc: Add /proc/uid directory
  input: misc: Fixed LDAF PerformRefSpadManagement
  soc: qcom: glink: Add downvote of transport during SSR
  input: touchscreen: stm: faster touch i2c reads
  ANDROID: binder: show high watermark of alloc->pages.
  ANDROID: binder: Add thread->process_todo flag.
  qpnp-fg-gen3: Move getting battery id and profile to profile_load_work
  input: ftm4: reflash firmware when config or cx is corrupt
  diag: Flush control workqueue immediately on channel close
  BACKPORT: xfrm: Clear sk_dst_cache when applying per-socket policy.
  msm: vidc: Fix issue with regulator node reordering
  staging: bcm15602: add vsel sysfs for all bcm15602 rails
  ...

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Conflicts:
	arch/arm/include/asm/kvm_arm.h
	arch/arm64/boot/dts/lge/dsi-panel-sw43402-dsc-qhd-cmd.dtsi
	arch/x86/include/asm/thread_info.h
	arch/x86/kernel/kprobes/core.c
	drivers/gpu/drm/msm/msm_gem_submit.c
	drivers/md/dm-bufio.c
	drivers/media/v4l2-core/v4l2-compat-ioctl32.c
	drivers/mmc/core/bus.c
	drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
	include/linux/compiler-clang.h
	kernel/time/timekeeping.c
	net/bridge/netfilter/ebtables.c
	net/core/dst_cache.c
	net/ipv4/raw.c
	net/xfrm/xfrm_state.c
	sound/usb/card.c
	sound/usb/mixer.c
2018-08-06 12:37:31 -07:00
Nathan Chancellor
706f056db1 Merge 4.4.127 into android-msm-wahoo-4.4-oreo-m2
Changes in 4.4.127: (73 commits)
        mtd: jedec_probe: Fix crash in jedec_read_mfr()
        ALSA: pcm: Use dma_bytes as size parameter in dma_mmap_coherent()
        ALSA: pcm: potential uninitialized return values
        perf/hwbp: Simplify the perf-hwbp code, fix documentation
        partitions/msdos: Unable to mount UFS 44bsd partitions
        usb: gadget: define free_ep_req as universal function
        usb: gadget: change len to size_t on alloc_ep_req()
        usb: gadget: fix usb_ep_align_maybe endianness and new usb_ep_align
        usb: gadget: align buffer size when allocating for OUT endpoint
        usb: gadget: f_hid: fix: Prevent accessing released memory
        kprobes/x86: Fix to set RWX bits correctly before releasing trampoline
        ACPI, PCI, irq: remove redundant check for null string pointer
        writeback: fix the wrong congested state variable definition
        PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant
        dm ioctl: remove double parentheses
        Input: mousedev - fix implicit conversion warning
        netfilter: nf_nat_h323: fix logical-not-parentheses warning
        genirq: Use cpumask_available() for check of cpumask variable
        cpumask: Add helper cpumask_available()
        selinux: Remove unnecessary check of array base in selinux_set_mapping()
        fs: compat: Remove warning from COMPATIBLE_IOCTL
        jiffies.h: declare jiffies and jiffies_64 with ____cacheline_aligned_in_smp
        frv: declare jiffies to be located in the .data section
        audit: add tty field to LOGIN event
        tty: provide tty_name() even without CONFIG_TTY
        netfilter: ctnetlink: Make some parameters integer to avoid enum mismatch
        selinux: Remove redundant check for unknown labeling behavior
        arm64: avoid overflow in VA_START and PAGE_OFFSET
        xfrm_user: uncoditionally validate esn replay attribute struct
        RDMA/ucma: Check AF family prior resolving address
        RDMA/ucma: Fix use-after-free access in ucma_close
        RDMA/ucma: Ensure that CM_ID exists prior to access it
        RDMA/ucma: Check that device is connected prior to access it
        RDMA/ucma: Check that device exists prior to accessing it
        RDMA/ucma: Don't allow join attempts for unsupported AF family
        RDMA/ucma: Introduce safer rdma_addr_size() variants
        net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms()
        xfrm: Refuse to insert 32 bit userspace socket policies on 64 bit systems
        netfilter: bridge: ebt_among: add more missing match size checks
        netfilter: x_tables: add and use xt_check_proc_name
        Bluetooth: Fix missing encryption refresh on Security Request
        llist: clang: introduce member_address_is_nonnull()
        scsi: virtio_scsi: always read VPD pages for multiqueue too
        usb: dwc2: Improve gadget state disconnection handling
        USB: serial: ftdi_sio: add RT Systems VX-8 cable
        USB: serial: ftdi_sio: add support for Harman FirmwareHubEmulator
        USB: serial: cp210x: add ELDAT Easywave RX09 id
        mei: remove dev_err message on an unsupported ioctl
        media: usbtv: prevent double free in error case
        parport_pc: Add support for WCH CH382L PCI-E single parallel port card.
        crypto: ahash - Fix early termination in hash walk
        crypto: x86/cast5-avx - fix ECB encryption when long sg follows short one
        fs/proc: Stop trying to report thread stacks
        staging: comedi: ni_mio_common: ack ai fifo error interrupts.
        Input: i8042 - add Lenovo ThinkPad L460 to i8042 reset list
        Input: i8042 - enable MUX on Sony VAIO VGN-CS series to fix touchpad
        vt: change SGR 21 to follow the standards
        Documentation: pinctrl: palmas: Add ti,palmas-powerhold-override property definition
        ARM: dts: dra7: Add power hold and power controller properties to palmas
        ARM: dts: am57xx-beagle-x15-common: Add overide powerhold property
        md/raid10: reset the 'first' at the end of loop
        net: hns: Fix ethtool private flags
        nospec: Move array_index_nospec() parameter checking into separate macro
        nospec: Kill array_index_nospec_mask_check()
        Revert "PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown()"
        Revert "ARM: dts: am335x-pepper: Fix the audio CODEC's reset pin"
        Revert "ARM: dts: omap3-n900: Fix the audio CODEC's reset pin"
        Revert "cpufreq: Fix governor module removal race"
        Revert "mtip32xx: use runtime tag to initialize command header"
        spi: davinci: fix up dma_mapping_error() incorrect patch
        net: cavium: liquidio: fix up "Avoid dma_unmap_single on uninitialized ndata"
        Revert "ip6_vti: adjust vti mtu according to mtu of lower device"
        Linux 4.4.127

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Conflicts:
	arch/arm64/include/asm/memory.h
	fs/proc/task_mmu.c
	include/linux/jiffies.h
	net/ipv4/netfilter/nf_nat_h323.c
2018-04-08 03:36:57 -07:00
Matthias Kaehlcke
ce4f4ffc62 genirq: Use cpumask_available() for check of cpumask variable
commit d170fe7dd992b313d4851ae5ab77ee7a51ed8c72 upstream.

This fixes the following clang warning when CONFIG_CPUMASK_OFFSTACK=n:

kernel/irq/manage.c:839:28: error: address of array
'desc->irq_common_data.affinity' will always evaluate to 'true'
[-Werror,-Wpointer-bool-conversion]

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Cc: Grant Grundler <grundler@chromium.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Greg Hackmann <ghackmann@google.com>
Cc: Michael Davidson <md@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20170412182030.83657-2-mka@chromium.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-08 11:51:57 +02:00
Nathan Chancellor
c64cd33a11 Merge 4.4.126 into android-msm-wahoo-4.4-oreo-mr1
Changes in 4.4.126: (21 commits)
        scsi: sg: don't return bogus Sg_requests
        Revert "genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs"
        net: Fix hlist corruptions in inet_evict_bucket()
        dccp: check sk for closed state in dccp_sendmsg()
        ipv6: fix access to non-linear packet in ndisc_fill_redirect_hdr_option()
        l2tp: do not accept arbitrary sockets
        net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred
        net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface
        net/iucv: Free memory obtained by kzalloc
        netlink: avoid a double skb free in genlmsg_mcast()
        net: Only honor ifindex in IP_PKTINFO if non-0
        skbuff: Fix not waking applications when errors are enqueued
        team: Fix double free in error path
        s390/qeth: free netdevice when removing a card
        s390/qeth: when thread completes, wake up all waiters
        s390/qeth: lock read device while queueing next buffer
        s390/qeth: on channel error, reject further cmd requests
        ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event()
        net: fec: Fix unbalanced PM runtime calls
        net: systemport: Rewrite __bcm_sysport_tx_reclaim()
        Linux 4.4.126

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2018-03-31 10:03:50 -07:00
Greg Kroah-Hartman
6f879697d6 Revert "genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs"
This reverts commit 9d0273bb1c which is
commit 382bd4de61827dbaaf5fb4fb7b1f4be4a86505e7 upstream.

It causes too many problems with the stable tree, and would require too
many other things to be backported, so just revert it.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-31 18:12:32 +02:00
Nathan Chancellor
b7a937127e Merge 4.4.124 into android-msm-wahoo-4.4-oreo-mr1
Changes in 4.4.124: (98 commits)
        tpm: fix potential buffer overruns caused by bit glitches on the bus
        tpm_tis: fix potential buffer overruns caused by bit glitches on the bus
        SMB3: Validate negotiate request must always be signed
        CIFS: Enable encryption during session setup phase
        staging: android: ashmem: Fix possible deadlock in ashmem_ioctl
        platform/x86: asus-nb-wmi: Add wapf4 quirk for the X302UA
        regulator: anatop: set default voltage selector for pcie
        x86: i8259: export legacy_pic symbol
        rtc: cmos: Do not assume irq 8 for rtc when there are no legacy irqs
        Input: ar1021_i2c - fix too long name in driver's device table
        time: Change posix clocks ops interfaces to use timespec64
        ACPI/processor: Fix error handling in __acpi_processor_start()
        ACPI/processor: Replace racy task affinity logic
        cpufreq/sh: Replace racy task affinity logic
        genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs
        i2c: i2c-scmi: add a MS HID
        net: ipv6: send unsolicited NA on admin up
        media/dvb-core: Race condition when writing to CAM
        spi: dw: Disable clock after unregistering the host
        ath: Fix updating radar flags for coutry code India
        clk: ns2: Correct SDIO bits
        scsi: virtio_scsi: Always try to read VPD pages
        KVM: PPC: Book3S PR: Exit KVM on failed mapping
        ARM: 8668/1: ftrace: Fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER
        iommu/omap: Register driver before setting IOMMU ops
        md/raid10: wait up frozen array in handle_write_completed
        NFS: Fix missing pg_cleanup after nfs_pageio_cond_complete()
        tcp: remove poll() flakes with FastOpen
        e1000e: fix timing for 82579 Gigabit Ethernet controller
        ALSA: hda - Fix headset microphone detection for ASUS N551 and N751
        IB/ipoib: Fix deadlock between ipoib_stop and mcast join flow
        IB/ipoib: Update broadcast object if PKey value was changed in index 0
        HSI: ssi_protocol: double free in ssip_pn_xmit()
        IB/mlx4: Take write semaphore when changing the vma struct
        IB/mlx4: Change vma from shared to private
        ASoC: Intel: Skylake: Uninitialized variable in probe_codec()
        Fix driver usage of 128B WQEs when WQ_CREATE is V1.
        netfilter: xt_CT: fix refcnt leak on error path
        openvswitch: Delete conntrack entry clashing with an expectation.
        mmc: host: omap_hsmmc: checking for NULL instead of IS_ERR()
        wan: pc300too: abort path on failure
        qlcnic: fix unchecked return value
        scsi: mac_esp: Replace bogus memory barrier with spinlock
        infiniband/uverbs: Fix integer overflows
        NFS: don't try to cross a mountpount when there isn't one there.
        iio: st_pressure: st_accel: Initialise sensor platform data properly
        mt7601u: check return value of alloc_skb
        rndis_wlan: add return value validation
        Btrfs: send, fix file hole not being preserved due to inline extent
        mac80211: don't parse encrypted management frames in ieee80211_frame_acked
        mfd: palmas: Reset the POWERHOLD mux during power off
        mtip32xx: use runtime tag to initialize command header
        staging: unisys: visorhba: fix s-Par to boot with option CONFIG_VMAP_STACK set to y
        staging: wilc1000: fix unchecked return value
        mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a
        ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP
        ipmi/watchdog: fix wdog hang on panic waiting for ipmi response
        ACPI / PMIC: xpower: Fix power_table addresses
        drm/nouveau/kms: Increase max retries in scanout position queries.
        bnx2x: Align RX buffers
        power: supply: pda_power: move from timer to delayed_work
        Input: twl4030-pwrbutton - use correct device for irq request
        md/raid10: skip spare disk as 'first' disk
        ia64: fix module loading for gcc-5.4
        tcm_fileio: Prevent information leak for short reads
        video: fbdev: udlfb: Fix buffer on stack
        sm501fb: don't return zero on failure path in sm501fb_start()
        net: hns: fix ethtool_get_strings overflow in hns driver
        cifs: small underflow in cnvrtDosUnixTm()
        rtc: ds1374: wdt: Fix issue with timeout scaling from secs to wdt ticks
        rtc: ds1374: wdt: Fix stop/start ioctl always returning -EINVAL
        perf tests kmod-path: Don't fail if compressed modules aren't supported
        Bluetooth: hci_qca: Avoid setup failure on missing rampatch
        media: c8sectpfe: fix potential NULL pointer dereference in c8sectpfe_timer_interrupt
        drm/msm: fix leak in failed get_pages
        RDMA/iwpm: Fix uninitialized error code in iwpm_send_mapinfo()
        rtlwifi: rtl_pci: Fix the bug when inactiveps is enabled.
        media: bt8xx: Fix err 'bt878_probe()'
        media: [RESEND] media: dvb-frontends: Add delay to Si2168 restart
        cros_ec: fix nul-termination for firmware build info
        platform/chrome: Use proper protocol transfer function
        mmc: avoid removing non-removable hosts during suspend
        IB/ipoib: Avoid memory leak if the SA returns a different DGID
        RDMA/cma: Use correct size when writing netlink stats
        IB/umem: Fix use of npages/nmap fields
        vgacon: Set VGA struct resource types
        drm/omap: DMM: Check for DMM readiness after successful transaction commit
        pty: cancel pty slave port buf's work in tty_release
        coresight: Fix disabling of CoreSight TPIU
        pinctrl: Really force states during suspend/resume
        iommu/vt-d: clean up pr_irq if request_threaded_irq fails
        ip6_vti: adjust vti mtu according to mtu of lower device
        RDMA/ocrdma: Fix permissions for OCRDMA_RESET_STATS
        nfsd4: permit layoutget of executable-only files
        clk: si5351: Rename internal plls to avoid name collisions
        dmaengine: ti-dma-crossbar: Fix event mapping for TPCC_EVT_MUX_60_63
        RDMA/ucma: Fix access to non-initialized CM_ID object
        Linux 4.4.124

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Conflicts:
	drivers/gpu/drm/msm/msm_gem.c
2018-03-25 00:48:47 -07:00
Hans de Goede
9d0273bb1c genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs
[ Upstream commit 382bd4de61827dbaaf5fb4fb7b1f4be4a86505e7 ]

When requesting a shared irq with IRQF_TRIGGER_NONE then the irqaction
flags get filled with the trigger type from the irq_data:

        if (!(new->flags & IRQF_TRIGGER_MASK))
                new->flags |= irqd_get_trigger_type(&desc->irq_data);

On the first setup_irq() the trigger type in irq_data is NONE when the
above code executes, then the irq is started up for the first time and
then the actual trigger type gets established, but that's too late to fix
up new->flags.

When then a second user of the irq requests the irq with IRQF_TRIGGER_NONE
its irqaction's triggertype gets set to the actual trigger type and the
following check fails:

        if (!((old->flags ^ new->flags) & IRQF_TRIGGER_MASK))

Resulting in the request_irq failing with -EBUSY even though both
users requested the irq with IRQF_SHARED | IRQF_TRIGGER_NONE

Fix this by comparing the new irqaction's trigger type to the trigger type
stored in the irq_data which correctly reflects the actual trigger type
being used for the irq.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/20170415100831.17073-1-hdegoede@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-24 10:58:41 +01:00
Kelly Rossmoyer
c14d789def genirq: Add generic action name for chained IRQs
Chained IRQs (the local device IRQs for chips that relay other IRQs)
are all initialized in the kernel using a shared generic irqaction
struct called "chained_action".  Since the action is shared, the API
for registering chained IRQ handlers does not allow a unique name to
be specified, whereas non-chained IRQ handlers can have unique names.

Unfortunately, the name of an IRQ handler action is included in resume
logging, both in the kernel and in batterystats, and the name of the
shared action for chained IRQ handlers is left null.  So when a chained
IRQ is detected as part of the wakeup reason during resume flow, we
currently see log content like "10 triggered null" and "Resume caused
by IRQ 10" in the kernel log and wakeup reason substrings like ":10:"
in batterystats.

To reduce confusion when troubleshooting and improve the clarity of
logs, this change adds a generic name ("chained-irq") to the shared
action.  This name will show up in resume logging whenever any chained
IRQ handler is part of the wakeup reason.  In the kernel log:
"10 triggered null" will become "10 triggered chained-irq"
"... caused by IRQ 199" will become "... caused by IRQ 199 chained-irq"
And in batterystats wakeup reasons:
":10:" will become ":10:chained-irq"

This change does not (and cannot) provide any clarity in the logs
about which chip is associated with which chained IRQ number; that
information - if needed - must be obtained through other means.

Bug: 63899519
Test:Ran on walleye and taimen devices and observed kernel logging
and dumpsys batterystats logging changes.
Signed-off-by: Kelly Rossmoyer <krossmo@google.com>

Change-Id: I807f385fe64573cb3962cd25089fbc8e270a2377
2017-11-21 19:36:52 +00:00
Thierry Strudel
75c8bc7183 Merged linux-4.4.80 into android-msm-wahoo-4.4
Linux 4.4.80
    ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused
    scsi: snic: Return error code on memory allocation failure
    scsi: fnic: Avoid sending reset to firmware when another reset is in progress
    HID: ignore Petzl USB headlamp
    ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion
    sh_eth: enable RX descriptor word 0 shift on SH7734
    nvmem: imx-ocotp: Fix wrong register size
    arm64: mm: fix show_pte KERN_CONT fallout
    vfio-pci: Handle error from pci_iomap
    video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap
    perf symbols: Robustify reading of build-id from sysfs
    perf tools: Install tools/lib/traceevent plugins with install-bin
    xfrm: Don't use sk_family for socket policy lookups
    tools lib traceevent: Fix prev/next_prio for deadline tasks
    Btrfs: adjust outstanding_extents counter properly when dio write is split
    usb: gadget: Fix copy/pasted error message
    ACPI / scan: Prefer devices without _HID/_CID for _ADR matching
    ARM: s3c2410_defconfig: Fix invalid values for NF_CT_PROTO_*
    ARM64: zynqmp: Fix i2c node's compatible string
    ARM64: zynqmp: Fix W=1 dtc 1.4 warnings
    dmaengine: ti-dma-crossbar: Add some 'of_node_put()' in error path.
    dmaengine: ioatdma: workaround SKX ioatdma version
    dmaengine: ioatdma: Add Skylake PCI Dev ID
    openrisc: Add _text symbol to fix ksym build error
    irqchip/mxs: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND
    ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL
    spi: dw: Make debugfs name unique between instances
    ASoC: tlv320aic3x: Mark the RESET register as volatile
    irqchip/keystone: Fix "scheduling while atomic" on rt
    vfio-pci: use 32-bit comparisons for register address for gcc-4.5
    drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set
    drm/msm: Ensure that the hardware write pointer is valid
    net/mlx4: Remove BUG_ON from ICM allocation routine
    ipv6: Should use consistent conditional judgement for ip6 fragment between __ip6_append_data and ip6_finish_output
    ARM: dts: n900: Mark eMMC slot with no-sdio and no-sd flags
    r8169: add support for RTL8168 series add-on card.
    x86/mce/AMD: Make the init code more robust
    tpm: Replace device number bitmap with IDR
    tpm: fix a kernel memory leak in tpm-sysfs.c
    xen/blkback: don't use xen_blkif_get() in xen-blkback kthread
    xen/blkback: don't free be structure too early
    sched/cputime: Fix prev steal time accouting during CPU hotplug
    net: skb_needs_check() accepts CHECKSUM_NONE for tx
    pstore: Use dynamic spinlock initializer
    pstore: Correctly initialize spinlock and flags
    pstore: Allow prz to control need for locking
    vlan: Propagate MAC address to VLANs
    /proc/iomem: only expose physical resource addresses to privileged users
    Make file credentials available to the seqfile interfaces
    v4l: s5c73m3: fix negation operator
    dentry name snapshots
    ipmi/watchdog: fix watchdog timeout set on reboot
    libnvdimm, btt: fix btt_rw_page not returning errors
    RDMA/uverbs: Fix the check for port number
    PM / Domains: defer dev_pm_domain_set() until genpd->attach_dev succeeds if present
    sched/cgroup: Move sched_online_group() back into css_online() to fix crash
    kaweth: fix oops upon failed memory allocation
    kaweth: fix firmware download
    mpt3sas: Don't overreach ioc->reply_post[] during initialization
    mailbox: handle empty message in tx_tick
    mailbox: skip complete wait event if timer expired
    mailbox: always wait in mbox_send_message for blocking Tx mode
    wil6210: fix deadlock when using fw_no_recovery option
    ath10k: fix null deref on wmi-tlv when trying spectral scan
    isdn/i4l: fix buffer overflow
    isdn: Fix a sleep-in-atomic bug
    net: phy: Do not perform software reset for Generic PHY
    nfc: fdp: fix NULL pointer dereference
    xfs: don't BUG() on mixed direct and mapped I/O
    perf intel-pt: Ensure never to set 'last_ip' when packet 'count' is zero
    perf intel-pt: Use FUP always when scanning for an IP
    perf intel-pt: Fix last_ip usage
    perf intel-pt: Fix ip compression
    drm: rcar-du: Simplify and fix probe error handling
    drm: rcar-du: Perform initialization/cleanup at probe/remove time
    drm/rcar: Nuke preclose hook
    Staging: comedi: comedi_fops: Avoid orphaned proc entry
    Revert "powerpc/numa: Fix percpu allocations to be NUMA aware"
    KVM: PPC: Book3S HV: Save/restore host values of debug registers
    KVM: PPC: Book3S HV: Reload HTM registers explicitly
    KVM: PPC: Book3S HV: Restore critical SPRs to host values on guest exit
    KVM: PPC: Book3S HV: Context-switch EBB registers properly
    drm/nouveau/bar/gf100: fix access to upper half of BAR2
    drm/vmwgfx: Fix gcc-7.1.1 warning
    md/raid5: add thread_group worker async_tx_issue_pending_all
    crypto: authencesn - Fix digest_null crash
    powerpc/pseries: Fix of_node_put() underflow during reconfig remove
    net: reduce skb_warn_bad_offload() noise
    pstore: Make spinlock per zone instead of global
    af_key: Add lock to key dump
Linux 4.4.79
    alarmtimer: don't rate limit one-shot timers
    tracing: Fix kmemleak in instance_rmdir
    spmi: Include OF based modalias in device uevent
    of: device: Export of_device_{get_modalias, uvent_modalias} to modules
    drm/mst: Avoid processing partially received up/down message transactions
    drm/mst: Avoid dereferencing a NULL mstb in drm_dp_mst_handle_up_req()
    drm/mst: Fix error handling during MST sideband message reception
    RDMA/core: Initialize port_num in qp_attr
    ceph: fix race in concurrent readdir
    staging: rtl8188eu: add TL-WN722N v2 support
    Revert "perf/core: Drop kernel samples even though :u is specified"
    perf annotate: Fix broken arrow at row 0 connecting jmp instruction to its target
    target: Fix COMPARE_AND_WRITE caw_sem leak during se_cmd quiesce
    udf: Fix deadlock between writeback and udf_setsize()
    NFS: only invalidate dentrys that are clearly invalid.
    Input: i8042 - fix crash at boot time
    MIPS: Fix a typo: s/preset/present/ in r2-to-r6 emulation error message
    MIPS: Send SIGILL for linked branches in `__compute_return_epc_for_insn'
    MIPS: Rename `sigill_r6' to `sigill_r2r6' in `__compute_return_epc_for_insn'
    MIPS: Send SIGILL for BPOSGE32 in `__compute_return_epc_for_insn'
    MIPS: math-emu: Prevent wrong ISA mode instruction emulation
    MIPS: Fix unaligned PC interpretation in `compute_return_epc'
    MIPS: Actually decode JALX in `__compute_return_epc_for_insn'
    MIPS: Save static registers before sysmips
    MIPS: Fix MIPS I ISA /proc/cpuinfo reporting
    x86/ioapic: Pass the correct data to unmask_ioapic_irq()
    x86/acpi: Prevent out of bound access caused by broken ACPI tables
    MIPS: Negate error syscall return in trace
    MIPS: Fix mips_atomic_set() with EVA
    MIPS: Fix mips_atomic_set() retry condition
    ftrace: Fix uninitialized variable in match_records()
    vfio: New external user group/file match
    vfio: Fix group release deadlock
    f2fs: Don't clear SGID when inheriting ACLs
    ipmi:ssif: Add missing unlock in error branch
    ipmi: use rcu lock around call to intf->handlers->sender()
    drm/radeon: Fix eDP for single-display iMac10,1 (v2)
    drm/radeon/ci: disable mclk switching for high refresh rates (v2)
    drm/amd/amdgpu: Return error if initiating read out of range on vram
    s390/syscalls: Fix out of bounds arguments access
    Raid5 should update rdev->sectors after reshape
    cx88: Fix regression in initial video standard setting
    x86/xen: allow userspace access during hypercalls
    md: don't use flush_signals in userspace processes
    usb: renesas_usbhs: gadget: disable all eps when the driver stops
    usb: renesas_usbhs: fix usbhsc_resume() for !USBHSF_RUNTIME_PWCTRL
    USB: cdc-acm: add device-id for quirky printer
    usb: storage: return on error to avoid a null pointer dereference
    xhci: Fix NULL pointer dereference when cleaning up streams for removed host
    xhci: fix 20000ms port resume timeout
    ipvs: SNAT packet replies only for NATed connections
    PCI/PM: Restore the status of PCI devices across hibernation
    af_key: Fix sadb_x_ipsecrequest parsing
    powerpc/asm: Mark cr0 as clobbered in mftb()
    powerpc: Fix emulation of mfocrf in emulate_step()
    powerpc: Fix emulation of mcrf in emulate_step()
    powerpc/64: Fix atomic64_inc_not_zero() to return an int
    iscsi-target: Add login_keys_workaround attribute for non RFC initiators
    scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails.
    PM / Domains: Fix unsafe iteration over modified list of domain providers
    PM / Domains: Fix unsafe iteration over modified list of device links
    ASoC: compress: Derive substream from stream based on direction
    wlcore: fix 64K page support
    Bluetooth: use constant time memory comparison for secret values
    perf intel-pt: Clear FUP flag on error
    perf intel-pt: Ensure IP is zero when state is INTEL_PT_STATE_NO_IP
    perf intel-pt: Fix missing stack clear
    perf intel-pt: Improve sample timestamp
    perf intel-pt: Move decoder error setting into one condition
    NFC: Add sockaddr length checks before accessing sa_family in bind handlers
    nfc: Fix the sockaddr length sanitization in llcp_sock_connect
    nfc: Ensure presence of required attributes in the activate_target handler
    NFC: nfcmrvl: fix firmware-management initialisation
    NFC: nfcmrvl: use nfc-device for firmware download
    NFC: nfcmrvl: do not use device-managed resources
    NFC: nfcmrvl_uart: add missing tty-device sanity check
    NFC: fix broken device allocation
    ath9k: fix tx99 bus error
    ath9k: fix tx99 use after free
    thermal: cpu_cooling: Avoid accessing potentially freed structures
    s5p-jpeg: don't return a random width/height
    ir-core: fix gcc-7 warning on bool arithmetic
    disable new gcc-7.1.1 warnings for now
Linux 4.4.78
    kvm: vmx: allow host to access guest MSR_IA32_BNDCFGS
    kvm: vmx: Check value written to IA32_BNDCFGS
    kvm: x86: Guest BNDCFGS requires guest MPX support
    kvm: vmx: Do not disable intercepts for BNDCFGS
    KVM: x86: disable MPX if host did not enable MPX XSAVE features
    tracing: Use SOFTIRQ_OFFSET for softirq dectection for more accurate results
    PM / QoS: return -EINVAL for bogus strings
    PM / wakeirq: Convert to SRCU
    sched/topology: Optimize build_group_mask()
    sched/topology: Fix overlapping sched_group_mask
    crypto: caam - fix signals handling
    crypto: sha1-ssse3 - Disable avx2
    crypto: atmel - only treat EBUSY as transient if backlog
    crypto: talitos - Extend max key length for SHA384/512-HMAC and AEAD
    mm: fix overflow check in expand_upwards()
    tpm: Issue a TPM2_Shutdown for TPM2 devices.
    Add "shutdown" to "struct class".
    tpm: Provide strong locking for device removal
    tpm: Get rid of chip->pdev
    selftests/capabilities: Fix the test_execve test
    mnt: Make propagate_umount less slow for overlapping mount propagation trees
    mnt: In propgate_umount handle visiting mounts in any order
    mnt: In umount propagation reparent in a separate pass
    vt: fix unchecked __put_user() in tioclinux ioctls
    exec: Limit arg stack to at most 75% of _STK_LIM
    s390: reduce ELF_ET_DYN_BASE
    powerpc: move ELF_ET_DYN_BASE to 4GB / 4MB
    arm64: move ELF_ET_DYN_BASE to 4GB / 4MB
    arm: move ELF_ET_DYN_BASE to 4MB
    binfmt_elf: use ELF_ET_DYN_BASE only for PIE
    checkpatch: silence perl 5.26.0 unescaped left brace warnings
    fs/dcache.c: fix spin lockup issue on nlru->lock
    mm/list_lru.c: fix list_lru_count_node() to be race free
    kernel/extable.c: mark core_kernel_text notrace
    tools/lib/lockdep: Reduce MAX_LOCK_DEPTH to avoid overflowing lock_chain/: Depth
    parisc/mm: Ensure IRQs are off in switch_mm()
    parisc: DMA API: return error instead of BUG_ON for dma ops on non dma devs
    parisc: use compat_sys_keyctl()
    parisc: Report SIGSEGV instead of SIGBUS when running out of stack
    irqchip/gic-v3: Fix out-of-bound access in gic_set_affinity
    cfg80211: Check if PMKID attribute is of expected size
    cfg80211: Validate frequencies nested in NL80211_ATTR_SCAN_FREQUENCIES
    cfg80211: Define nla_policy for NL80211_ATTR_LOCAL_MESH_POWER_MODE
    brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx()
    rds: tcp: use sock_create_lite() to create the accept socket
    vrf: fix bug_on triggered by rx when destroying a vrf
    net: ipv6: Compare lwstate in detecting duplicate nexthops
    ipv6: dad: don't remove dynamic addresses if link is down
    net: handle NAPI_GRO_FREE_STOLEN_HEAD case also in napi_frags_finish()
    bpf: prevent leaking pointer via xadd on unpriviledged
    net: prevent sign extension in dev_get_stats()
    tcp: reset sk_rx_dst in tcp_disconnect()
    net: dp83640: Avoid NULL pointer dereference.
    ipv6: avoid unregistering inet6_dev for loopback
    net/phy: micrel: configure intterupts after autoneg workaround
    net: sched: Fix one possible panic when no destroy callback
    net_sched: fix error recovery at qdisc creation
Linux 4.4.77
    saa7134: fix warm Medion 7134 EEPROM read
    x86/mm/pat: Don't report PAT on CPUs that don't support it
    ext4: check return value of kstrtoull correctly in reserved_clusters_store
    staging: comedi: fix clean-up of comedi_class in comedi_init()
    staging: vt6556: vnt_start Fix missing call to vnt_key_init_table.
    tcp: fix tcp_mark_head_lost to check skb len before fragmenting
    md: fix super_offset endianness in super_1_rdev_size_change
    md: fix incorrect use of lexx_to_cpu in does_sb_need_changing
    perf tools: Use readdir() instead of deprecated readdir_r() again
    perf tests: Remove wrong semicolon in while loop in CQM test
    perf trace: Do not process PERF_RECORD_LOST twice
    perf dwarf: Guard !x86_64 definitions under #ifdef else clause
    perf pmu: Fix misleadingly indented assignment (whitespace)
    perf annotate browser: Fix behaviour of Shift-Tab with nothing focussed
    perf tools: Remove duplicate const qualifier
    perf script: Use readdir() instead of deprecated readdir_r()
    perf thread_map: Use readdir() instead of deprecated readdir_r()
    perf tools: Use readdir() instead of deprecated readdir_r()
    perf bench numa: Avoid possible truncation when using snprintf()
    perf tests: Avoid possible truncation with dirent->d_name + snprintf
    perf scripting perl: Fix compile error with some perl5 versions
    perf thread_map: Correctly size buffer used with dirent->dt_name
    perf intel-pt: Use __fallthrough
    perf top: Use __fallthrough
    tools strfilter: Use __fallthrough
    tools string: Use __fallthrough in perf_atoll()
    tools include: Add a __fallthrough statement
    mqueue: fix a use-after-free in sys_mq_notify()
    RDMA/uverbs: Check port number supplied by user verbs cmds
    KEYS: Fix an error code in request_master_key()
    ath10k: override CE5 config for QCA9377
    x86/uaccess: Optimize copy_user_enhanced_fast_string() for short strings
    x86/tools: Fix gcc-7 warning in relocs.c
    gfs2: Fix glock rhashtable rcu bug
    USB: serial: qcserial: new Sierra Wireless EM7305 device ID
    USB: serial: option: add two Longcheer device ids
    pinctrl: sh-pfc: Update info pointer after SoC-specific init
    pinctrl: mxs: atomically switch mux and drive strength config
    pinctrl: sunxi: Fix SPDIF function name for A83T
    pinctrl: meson: meson8b: fix the NAND DQS pins
    pinctrl: sh-pfc: r8a7791: Fix SCIF2 pinmux data
    sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec
    sysctl: don't print negative flag for proc_douintvec
    mac80211_hwsim: Replace bogus hrtimer clockid
    usb: Fix typo in the definition of Endpoint[out]Request
    usb: usbip: set buffer pointers to NULL after free
    Add USB quirk for HVR-950q to avoid intermittent device resets
    USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick
    usb: dwc3: replace %p with %pK
    drm/virtio: don't leak bo on drm_gem_object_init failure
    tracing/kprobes: Allow to create probe with a module name starting with a digit
    mm: fix classzone_idx underflow in shrink_zones()
    bgmac: reset & enable Ethernet core before using it
    driver core: platform: fix race condition with driver_override
    fs: completely ignore unknown open flags
    fs: add a VALID_OPEN_FLAGS
Linux 4.4.76
    KVM: nVMX: Fix exception injection
    KVM: x86: zero base3 of unusable segments
    KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh()
    KVM: x86: fix emulation of RSM and IRET instructions
    cpufreq: s3c2416: double free on driver init error path
    iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid()
    iommu: Handle default domain attach failure
    iommu/vt-d: Don't over-free page table directories
    ocfs2: o2hb: revert hb threshold to keep compatible
    x86/mm: Fix flush_tlb_page() on Xen
    x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space
    ARM: 8685/1: ensure memblock-limit is pmd-aligned
    ARM64/ACPI: Fix BAD_MADT_GICC_ENTRY() macro implementation
    sched/loadavg: Avoid loadavg spikes caused by delayed NO_HZ accounting
    watchdog: bcm281xx: Fix use of uninitialized spinlock.
    xfrm: Oops on error in pfkey_msg2xfrm_state()
    xfrm: NULL dereference on allocation failure
    xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY
    jump label: fix passing kbuild_cflags when checking for asm goto support
    ravb: Fix use-after-free on `ifconfig eth0 down`
    sctp: check af before verify address in sctp_addr_id2transport
    net/mlx4_core: Eliminate warning messages for SRQ_LIMIT under SRIOV
    perf probe: Fix to show correct locations for events on modules
    be2net: fix status check in be_cmd_pmac_add()
    s390/ctl_reg: make __ctl_load a full memory barrier
    swiotlb: ensure that page-sized mappings are page-aligned
    coredump: Ensure proper size of sparse core files
    x86/mpx: Use compatible types in comparison to fix sparse error
    mac80211: initialize SMPS field in HT capabilities
    spi: davinci: use dma_mapping_error()
    scsi: lpfc: avoid double free of resource identifiers
    HID: i2c-hid: Add sleep between POWER ON and RESET
    kernel/panic.c: add missing \n
    ibmveth: Add a proper check for the availability of the checksum features
    vxlan: do not age static remote mac entries
    virtio_net: fix PAGE_SIZE > 64k
    vfio/spapr: fail tce_iommu_attach_group() when iommu_data is null
    drm/amdgpu: check ring being ready before using
    net: dsa: Check return value of phy_connect_direct()
    amd-xgbe: Check xgbe_init() return code
    platform/x86: ideapad-laptop: handle ACPI event 1
    scsi: virtio_scsi: Reject commands when virtqueue is broken
    xen-netfront: Fix Rx stall during network stress and OOM
    swiotlb-xen: update dev_addr after swapping pages
    virtio_console: fix a crash in config_work_handler
    Btrfs: fix truncate down when no_holes feature is enabled
    gianfar: Do not reuse pages from emergency reserve
    powerpc/eeh: Enable IO path on permanent error
    net: bgmac: Remove superflous netif_carrier_on()
    net: bgmac: Start transmit queue in bgmac_open
    net: bgmac: Fix SOF bit checking
    bgmac: Fix reversed test of build_skb() return value.
    mtd: bcm47xxpart: don't fail because of bit-flips
    bgmac: fix a missing check for build_skb
    mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS) only
    MIPS: ralink: fix MT7628 wled_an pinmux gpio
    MIPS: ralink: fix MT7628 pinmux typos
    MIPS: ralink: Fix invalid assignment of SoC type
    MIPS: ralink: fix USB frequency scaling
    MIPS: ralink: MT7688 pinmux fixes
    net: korina: Fix NAPI versus resources freeing
    MIPS: ath79: fix regression in PCI window initialization
    net: mvneta: Fix for_each_present_cpu usage
    ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags
    qla2xxx: Fix erroneous invalid handle message
    scsi: lpfc: Set elsiocb contexts to NULL after freeing it
    scsi: sd: Fix wrong DPOFUA disable in sd_read_cache_type
    KVM: x86: fix fixing of hypercalls
    mm: numa: avoid waiting on freed migrated pages
    block: fix module reference leak on put_disk() call for cgroups throttle
    sysctl: enable strict writes
    usb: gadget: f_fs: Fix possibe deadlock
    drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr
    ALSA: hda - set input_path bitmap to zero after moving it to new place
    ALSA: hda - Fix endless loop of codec configure
    MIPS: Fix IRQ tracing & lockdep when rescheduling
    MIPS: pm-cps: Drop manual cache-line alignment of ready_count
    MIPS: Avoid accidental raw backtrace
    mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff()
    drm/ast: Handle configuration without P2A bridge
    NFSv4: fix a reference leak caused WARNING messages
    netfilter: synproxy: fix conntrackd interaction
    netfilter: xt_TCPMSS: add more sanity tests on tcph->doff
    rtnetlink: add IFLA_GROUP to ifla_policy
    ipv6: Do not leak throw route references
    sfc: provide dummy definitions of vswitch functions
    net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev
    decnet: always not take dst->__refcnt when inserting dst into hash table
    net/mlx5: Wait for FW readiness before initializing command interface
    ipv6: fix calling in6_ifa_hold incorrectly for dad work
    igmp: add a missing spin_lock_init()
    igmp: acquire pmc lock for ip_mc_clear_src()
    net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx
    Fix an intermittent pr_emerg warning about lo becoming free.
    af_unix: Add sockaddr length checks before accessing sa_family in bind and connect handlers
    net: Zero ifla_vf_info in rtnl_fill_vfinfo()
    decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb
    net: don't call strlen on non-terminated string in dev_set_alias()
    ipv6: release dst on error in ip6_dst_lookup_tail
Linux 4.4.75
    nvme: apply DELAY_BEFORE_CHK_RDY quirk at probe time too
    nvme/quirk: Add a delay before checking for adapter readiness
    net: phy: fix marvell phy status reading
    net: phy: Initialize mdio clock at probe function
    usb: gadget: f_fs: avoid out of bounds access on comp_desc
    powerpc/slb: Force a full SLB flush when we insert for a bad EA
    mtd: spi-nor: fix spansion quad enable
    of: Add check to of_scan_flat_dt() before accessing initial_boot_params
    rxrpc: Fix several cases where a padded len isn't checked in ticket decode
    USB: usbip: fix nonconforming hub descriptor
    drm/amdgpu: adjust default display clock
    drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating
    drm/radeon: add a quirk for Toshiba Satellite L20-183
    drm/radeon: add a PX quirk for another K53TK variant
    iscsi-target: Reject immediate data underflow larger than SCSI transfer length
    target: Fix kref->refcount underflow in transport_cmd_finish_abort
    time: Fix clock->read(clock) race around clocksource changes
    Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list
    powerpc/kprobes: Pause function_graph tracing during jprobes handling
    signal: Only reschedule timers on signals timers have sent
    HID: Add quirk for Dell PIXART OEM mouse
    CIFS: Improve readdir verbosity
    KVM: PPC: Book3S HV: Preserve userspace HTM state properly
    lib/cmdline.c: fix get_options() overflow while parsing ranges
    autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL
    fs/exec.c: account for argv/envp pointers
Linux 4.4.74
    mm: fix new crash in unmapped_area_topdown()
    Allow stack to grow up to address space limit
    mm: larger stack guard gap, between vmas
    alarmtimer: Rate limit periodic intervals
    MIPS: Fix bnezc/jialc return address calculation
    usb: dwc3: exynos fix axius clock error path to do cleanup
    alarmtimer: Prevent overflow of relative timers
    genirq: Release resources in __setup_irq() error path
    swap: cond_resched in swap_cgroup_prepare()
    mm/memory-failure.c: use compound_head() flags for huge pages
    USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks
    usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk
    drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR()
    usb: r8a66597-hcd: decrease timeout
    usb: r8a66597-hcd: select a different endpoint on timeout
    USB: gadget: dummy_hcd: fix hub-descriptor removable fields
    pvrusb2: reduce stack usage pvr2_eeprom_analyze()
    usb: core: fix potential memory leak in error path during hcd creation
    USB: hub: fix SS max number of ports
    iio: proximity: as3935: recalibrate RCO after resume
    staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()
    mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
    x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
    serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'
    mac80211: fix IBSS presp allocation size
    mac80211: fix CSA in IBSS mode
    mac80211/wpa: use constant time memory comparison for MACs
    mac80211: don't look at the PM bit of BAR frames
    vb2: Fix an off by one error in 'vb2_plane_vaddr'
    cpufreq: conservative: Allow down_threshold to take values from 1 to 10
    can: gs_usb: fix memory leak in gs_cmd_reset()
    configfs: Fix race between create_link and configfs_rmdir
Linux 4.4.73
    sparc64: make string buffers large enough
    s390/kvm: do not rely on the ILC on kvm host protection fauls
    xtensa: don't use linux IRQ #0
    tipc: ignore requests when the connection state is not CONNECTED
    proc: add a schedule point in proc_pid_readdir()
    romfs: use different way to generate fsid for BLOCK or MTD
    sctp: sctp_addr_id2transport should verify the addr before looking up assoc
    r8152: avoid start_xmit to schedule napi when napi is disabled
    r8152: fix rtl8152_post_reset function
    r8152: re-schedule napi for tx
    nfs: Fix "Don't increment lock sequence ID after NFS4ERR_MOVED"
    ravb: unmap descriptors when freeing rings
    drm/ast: Fixed system hanged if disable P2A
    drm/nouveau: Don't enabling polling twice on runtime resume
    parisc, parport_gsc: Fixes for printk continuation lines
    net: adaptec: starfire: add checks for dma mapping errors
    pinctrl: berlin-bg4ct: fix the value for "sd1a" of pin SCRD0_CRD_PRES
    gianfar: synchronize DMA API usage by free_skb_rx_queue w/ gfar_new_page
    net/mlx4_core: Avoid command timeouts during VF driver device shutdown
    drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers
    drm/nouveau: prevent userspace from deleting client object
    ipv6: fix flow labels when the traffic class is non-0
    FS-Cache: Initialise stores_lock in netfs cookie
    fscache: Clear outstanding writes when disabling a cookie
    fscache: Fix dead object requeue
    ethtool: do not vzalloc(0) on registers dump
    log2: make order_base_2() behave correctly on const input value zero
    kasan: respect /proc/sys/kernel/traceoff_on_warning
    jump label: pass kbuild_cflags when checking for asm goto support
    PM / runtime: Avoid false-positive warnings from might_sleep_if()
    ipv6: Fix IPv6 packet loss in scenarios involving roaming + snooping switches
    i2c: piix4: Fix request_region size
    sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications
    sierra_net: Skip validating irrelevant fields for IDLE LSIs
    net: hns: Fix the device being used for dma mapping during TX
    NET: mkiss: Fix panic
    NET: Fix /proc/net/arp for AX.25
    ipv6: Inhibit IPv4-mapped src address on the wire.
    ipv6: Handle IPv4-mapped src to in6addr_any dst.
    net: xilinx_emaclite: fix receive buffer overflow
    net: xilinx_emaclite: fix freezes due to unordered I/O
    Call echo service immediately after socket reconnect
    staging: rtl8192e: rtl92e_fill_tx_desc fix write to mapped out memory.
    ARM: dts: imx6dl: Fix the VDD_ARM_CAP voltage for 396MHz operation
    partitions/msdos: FreeBSD UFS2 file systems are not recognized
    s390/vmem: fix identity mapping
Linux 4.4.72
    arm64: ensure extension of smp_store_release value
    arm64: armv8_deprecated: ensure extension of addr
    usercopy: Adjust tests to deal with SMAP/PAN
    RDMA/qib,hfi1: Fix MR reference count leak on write with immediate
    arm64: entry: improve data abort handling of tagged pointers
    arm64: hw_breakpoint: fix watchpoint matching for tagged pointers
    Make __xfs_xattr_put_listen preperly report errors.
    NFSv4: Don't perform cached access checks before we've OPENed the file
    NFS: Ensure we revalidate attributes before using execute_ok()
    mm: consider memblock reservations for deferred memory initialization sizing
    net: better skb->sender_cpu and skb->napi_id cohabitation
    serial: sh-sci: Fix panic when serial console and DMA are enabled
    tty: Drop krefs for interrupted tty lock
    drivers: char: mem: Fix wraparound check to allow mappings up to the end
    ASoC: Fix use-after-free at card unregistration
    ALSA: timer: Fix missing queue indices reset at SNDRV_TIMER_IOCTL_SELECT
    ALSA: timer: Fix race between read and ioctl
    drm/nouveau/tmr: fully separate alarm execution/pending lists
    drm/vmwgfx: Make sure backup_handle is always valid
    drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl()
    drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve()
    perf/core: Drop kernel samples even though :u is specified
    powerpc/hotplug-mem: Fix missing endian conversion of aa_index
    powerpc/numa: Fix percpu allocations to be NUMA aware
    powerpc/eeh: Avoid use after free in eeh_handle_special_event()
    scsi: qla2xxx: don't disable a not previously enabled PCI device
    KVM: arm/arm64: Handle possible NULL stage2 pud when ageing pages
    btrfs: fix memory leak in update_space_info failure path
    btrfs: use correct types for page indices in btrfs_page_exists_in_range
    cxl: Fix error path on bad ioctl
    ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path
    ufs_extend_tail(): fix the braino in calling conventions of ufs_new_fragments()
    ufs: set correct ->s_maxsize
    ufs: restore maintaining ->i_blocks
    fix ufs_isblockset()
    ufs: restore proper tail allocation
    fs: add i_blocksize()
    cpuset: consider dying css as offline
    Input: elantech - add Fujitsu Lifebook E546/E557 to force crc_enabled
    drm/msm: Expose our reservation object when exporting a dmabuf.
    target: Re-add check to reject control WRITEs with overflow data
    cpufreq: cpufreq_register_driver() should return -ENODEV if init fails
    stackprotector: Increase the per-task stack canary's random range from 32 bits to 64 bits on 64-bit platforms
    random: properly align get_random_int_hash
    drivers: char: random: add get_random_long()
    iio: proximity: as3935: fix AS3935_INT mask
    iio: light: ltr501 Fix interchanged als/ps register field
    staging/lustre/lov: remove set_fs() call from lov_getstripe()
    usb: chipidea: debug: check before accessing ci_role
    usb: chipidea: udc: fix NULL pointer dereference if udc_start failed
    usb: gadget: f_mass_storage: Serialize wake and sleep execution
    ext4: fix fdatasync(2) after extent manipulation operations
    ext4: keep existing extra fields when inode expands
    ext4: fix SEEK_HOLE
    xen-netfront: cast grant table reference first to type int
    xen-netfront: do not cast grant table reference to signed short
    xen/privcmd: Support correctly 64KB page granularity when mapping memory
    dmaengine: ep93xx: Always start from BASE0
    dmaengine: usb-dmac: Fix DMAOR AE bit definition
    KVM: async_pf: avoid async pf injection when in guest mode
    arm: KVM: Allow unaligned accesses at HYP
    KVM: cpuid: Fix read/write out-of-bounds vulnerability in cpuid emulation
    kvm: async_pf: fix rcu_irq_enter() with irqs enabled
    nfsd: Fix up the "supattr_exclcreat" attributes
    nfsd4: fix null dereference on replay
    drm/amdgpu/ci: disable mclk switching for high refresh rates (v2)
    crypto: gcm - wait for crypto op not signal safe
    KEYS: fix freeing uninitialized memory in key_update()
    KEYS: fix dereferencing NULL payload with nonzero length
    ptrace: Properly initialize ptracer_cred on fork
    serial: ifx6x60: fix use-after-free on module unload
    arch/sparc: support NR_CPUS = 4096
    sparc64: delete old wrap code
    sparc64: new context wrap
    sparc64: add per-cpu mm of secondary contexts
    sparc64: redefine first version
    sparc64: combine activate_mm and switch_mm
    sparc64: reset mm cpumask after wrap
    sparc: Machine description indices can vary
    sparc64: mm: fix copy_tsb to correctly copy huge page TSBs
    net: bridge: start hello timer only if device is up
    net: ethoc: enable NAPI before poll may be scheduled
    net: ping: do not abuse udp_poll()
    ipv6: Fix leak in ipv6_gso_segment().
    vxlan: fix use-after-free on deletion
    tcp: disallow cwnd undo when switching congestion control
    cxgb4: avoid enabling napi twice to the same queue
    ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()
    bnx2x: Fix Multi-Cos
Linux 4.4.71
    xfs: only return -errno or success from attr ->put_listent
    xfs: in _attrlist_by_handle, copy the cursor back to userspace
    xfs: fix unaligned access in xfs_btree_visit_blocks
    xfs: bad assertion for delalloc an extent that start at i_size
    xfs: fix indlen accounting error on partial delalloc conversion
    xfs: wait on new inodes during quotaoff dquot release
    xfs: update ag iterator to support wait on new inodes
    xfs: support ability to wait on new inodes
    xfs: fix up quotacheck buffer list error handling
    xfs: prevent multi-fsb dir readahead from reading random blocks
    xfs: handle array index overrun in xfs_dir2_leaf_readbuf()
    xfs: fix over-copying of getbmap parameters from userspace
    xfs: fix off-by-one on max nr_pages in xfs_find_get_desired_pgoff()
    xfs: Fix missed holes in SEEK_HOLE implementation
    mlock: fix mlock count can not decrease in race condition
    mm/migrate: fix refcount handling when !hugepage_migration_supported()
    drm/gma500/psb: Actually use VBT mode when it is found
    slub/memcg: cure the brainless abuse of sysfs attributes
    ALSA: hda - apply STAC_9200_DELL_M22 quirk for Dell Latitude D430
    pcmcia: remove left-over %Z format
    drm/radeon: Unbreak HPD handling for r600+
    drm/radeon/ci: disable mclk switching for high refresh rates (v2)
    scsi: mpt3sas: Force request partial completion alignment
    HID: wacom: Have wacom_tpc_irq guard against possible NULL dereference
    mmc: sdhci-iproc: suppress spurious interrupt with Multiblock read
    i2c: i2c-tiny-usb: fix buffer not being DMA capable
    vlan: Fix tcp checksum offloads in Q-in-Q vlans
    net: phy: marvell: Limit errata to 88m1101
    netem: fix skb_orphan_partial()
    ipv4: add reference counting to metrics
    sctp: fix ICMP processing if skb is non-linear
    tcp: avoid fastopen API to be used on AF_UNSPEC
    virtio-net: enable TSO/checksum offloads for Q-in-Q vlans
    be2net: Fix offload features for Q-in-Q packets
    ipv6: fix out of bound writes in __ip6_append_data()
    bridge: start hello_timer when enabling KERNEL_STP in br_stp_start
    qmi_wwan: add another Lenovo EM74xx device ID
    bridge: netlink: check vlan_default_pvid range
    ipv6: Check ip6_find_1stfragopt() return value properly.
    ipv6: Prevent overrun when parsing v6 header options
    net: Improve handling of failures on link and route dumps
    tcp: eliminate negative reordering in tcp_clean_rtx_queue
    sctp: do not inherit ipv6_{mc|ac|fl}_list from parent
    sctp: fix src address selection if using secondary addresses for ipv6
    tcp: avoid fragmenting peculiar skbs in SACK
    s390/qeth: avoid null pointer dereference on OSN
    s390/qeth: unbreak OSM and OSN support
    s390/qeth: handle sysfs error during initialization
    ipv6/dccp: do not inherit ipv6_mc_list from parent
    dccp/tcp: do not inherit mc_list from parent
    sparc: Fix -Wstringop-overflow warning

Bug: 62730977
Change-Id: Ifca755d82f9e4b11016f6660298c2c1b073bfb3a
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2017-09-20 16:42:37 -07:00
Thierry Strudel
b11ab24fe6 Merged linux-4.4.70 into android-msm-wahoo-4.4
Linux 4.4.70
    drivers: char: mem: Check for address space wraparound with mmap()
    nfsd: encoders mustn't use unitialized values in error cases
    drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2
    PCI: Freeze PME scan before suspending devices
    PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
    tracing/kprobes: Enforce kprobes teardown after testing
    osf_wait4(): fix infoleak
    genirq: Fix chained interrupt data ordering
    uwb: fix device quirk on big-endian hosts
    metag/uaccess: Check access_ok in strncpy_from_user
    metag/uaccess: Fix access_ok()
    iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings
    staging: rtl8192e: rtl92e_get_eeprom_size Fix read size of EPROM_CMD.
    staging: rtl8192e: fix 2 byte alignment of register BSSIDR.
    mm/huge_memory.c: respect FOLL_FORCE/FOLL_COW for thp
    xc2028: Fix use-after-free bug properly
    arm64: documentation: document tagged pointer stack constraints
    arm64: uaccess: ensure extension of access_ok() addr
    arm64: xchg: hazard against entire exchange variable
    ARM: dts: at91: sama5d3_xplained: not all ADC channels are available
    ARM: dts: at91: sama5d3_xplained: fix ADC vref
    powerpc/64e: Fix hang when debugging programs with relocated kernel
    powerpc/pseries: Fix of_node_put() underflow during DLPAR remove
    powerpc/book3s/mce: Move add_taint() later in virtual mode
    cx231xx-cards: fix NULL-deref at probe
    cx231xx-audio: fix NULL-deref at probe
    cx231xx-audio: fix init error path
    dvb-frontends/cxd2841er: define symbol_rate_min/max in T/C fe-ops
    zr364xx: enforce minimum size when reading header
    dib0700: fix NULL-deref at probe
    s5p-mfc: Fix unbalanced call to clock management
    gspca: konica: add missing endpoint sanity check
    ceph: fix recursion between ceph_set_acl() and __ceph_setattr()
    iio: proximity: as3935: fix as3935_write
    ipx: call ipxitf_put() in ioctl error path
    USB: hub: fix non-SS hub-descriptor handling
    USB: hub: fix SS hub-descriptor handling
    USB: serial: io_ti: fix div-by-zero in set_termios
    USB: serial: mct_u232: fix big-endian baud-rate handling
    USB: serial: qcserial: add more Lenovo EM74xx device IDs
    usb: serial: option: add Telit ME910 support
    USB: iowarrior: fix info ioctl on big-endian hosts
    usb: musb: tusb6010_omap: Do not reset the other direction's packet size
    ttusb2: limit messages to buffer size
    mceusb: fix NULL-deref at probe
    usbvision: fix NULL-deref at probe
    net: irda: irda-usb: fix firmware name on big-endian hosts
    usb: host: xhci-mem: allocate zeroed Scratchpad Buffer
    xhci: apply PME_STUCK_QUIRK and MISSING_CAS quirk for Denverton
    usb: host: xhci-plat: propagate return value of platform_get_irq()
    sched/fair: Initialize throttle_count for new task-groups lazily
    sched/fair: Do not announce throttled next buddy in dequeue_task_fair()
    fscrypt: avoid collisions when presenting long encrypted filenames
    f2fs: check entire encrypted bigname when finding a dentry
    fscrypt: fix context consistency check when key(s) unavailable
    net: qmi_wwan: Add SIMCom 7230E
    ext4 crypto: fix some error handling
    ext4 crypto: don't let data integrity writebacks fail with ENOMEM
    USB: serial: ftdi_sio: add Olimex ARM-USB-TINY(H) PIDs
    USB: serial: ftdi_sio: fix setting latency for unprivileged users
    pid_ns: Fix race between setns'ed fork() and zap_pid_ns_processes()
    pid_ns: Sleep in TASK_INTERRUPTIBLE in zap_pid_ns_processes
    iio: dac: ad7303: fix channel description
    of: fix sparse warning in of_pci_range_parser_one
    proc: Fix unbalanced hard link numbers
    cdc-acm: fix possible invalid access when processing notification
    drm/nouveau/tmr: handle races with hw when updating the next alarm time
    drm/nouveau/tmr: avoid processing completed alarms when adding a new one
    drm/nouveau/tmr: fix corruption of the pending list when rescheduling an alarm
    drm/nouveau/tmr: ack interrupt before processing alarms
    drm/nouveau/therm: remove ineffective workarounds for alarm bugs
    drm/amdgpu: Make display watermark calculations more accurate
    drm/amdgpu: Avoid overflows/divide-by-zero in latency_watermark calculations.
    ath9k_htc: fix NULL-deref at probe
    ath9k_htc: Add support of AirTies 1eda:2315 AR9271 device
    s390/cputime: fix incorrect system time
    s390/kdump: Add final note
    regulator: tps65023: Fix inverted core enable logic.
    KVM: X86: Fix read out-of-bounds vulnerability in kvm pio emulation
    KVM: x86: Fix load damaged SSEx MXCSR register
    ima: accept previously set IMA_NEW_FILE
    mwifiex: pcie: fix cmd_buf use-after-free in remove/reset
    rtlwifi: rtl8821ae: setup 8812ae RFE according to device type
    md: update slab_cache before releasing new stripes when stripes resizing
    dm space map disk: fix some book keeping in the disk space map
    dm thin metadata: call precommit before saving the roots
    dm bufio: make the parameter "retain_bytes" unsigned long
    dm cache metadata: fail operations if fail_io mode has been established
    dm bufio: check new buffer allocation watermark every 30 seconds
    dm bufio: avoid a possible ABBA deadlock
    dm raid: select the Kconfig option CONFIG_MD_RAID0
    dm btree: fix for dm_btree_find_lowest_key()
    infiniband: call ipv6 route lookup via the stub interface
    tpm_crb: check for bad response size
    ARM: tegra: paz00: Mark panel regulator as enabled on boot
    USB: core: replace %p with %pK
    char: lp: fix possible integer overflow in lp_setup()
    watchdog: pcwd_usb: fix NULL-deref at probe
    USB: ene_usb6250: fix DMA to the stack
    usb: misc: legousbtower: Fix memory leak
    usb: misc: legousbtower: Fix buffers on stack
Linux 4.4.69
    ipmi: Fix kernel panic at ipmi_ssif_thread()
    wlcore: Add RX_BA_WIN_SIZE_CHANGE_EVENT event
    wlcore: Pass win_size taken from ieee80211_sta to FW
    mac80211: RX BA support for sta max_rx_aggregation_subframes
    mac80211: pass block ack session timeout to to driver
    mac80211: pass RX aggregation window size to driver
    Bluetooth: hci_intel: add missing tty-device sanity check
    Bluetooth: hci_bcm: add missing tty-device sanity check
    Bluetooth: Fix user channel for 32bit userspace on 64bit kernel
    tty: pty: Fix ldisc flush after userspace become aware of the data already
    serial: omap: suspend device on probe errors
    serial: omap: fix runtime-pm handling on unbind
    serial: samsung: Use right device for DMA-mapping calls
    arm64: KVM: Fix decoding of Rt/Rt2 when trapping AArch32 CP accesses
    padata: free correct variable
    CIFS: add misssing SFM mapping for doublequote
    cifs: fix CIFS_IOC_GET_MNT_INFO oops
    CIFS: fix mapping of SFM_SPACE and SFM_PERIOD
    SMB3: Work around mount failure when using SMB3 dialect to Macs
    Set unicode flag on cifs echo request to avoid Mac error
    fs/block_dev: always invalidate cleancache in invalidate_bdev()
    ceph: fix memory leak in __ceph_setxattr()
    fs/xattr.c: zero out memory copied to userspace in getxattr
    ext4: evict inline data when writing to memory map
    IB/mlx4: Reduce SRIOV multicast cleanup warning message to debug level
    IB/mlx4: Fix ib device initialization error flow
    IB/IPoIB: ibX: failed to create mcg debug file
    IB/core: Fix sysfs registration error flow
    vfio/type1: Remove locked page accounting workqueue
    dm era: save spacemap metadata root after the pre-commit
    crypto: algif_aead - Require setkey before accept(2)
    block: fix blk_integrity_register to use template's interval_exp if not 0
    KVM: arm/arm64: fix races in kvm_psci_vcpu_on
    KVM: x86: fix user triggerable warning in kvm_apic_accept_events()
    um: Fix PTRACE_POKEUSER on x86_64
    x86, pmem: Fix cache flushing for iovec write < 8 bytes
    selftests/x86/ldt_gdt_32: Work around a glibc sigaction() bug
    x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup
    usb: hub: Do not attempt to autosuspend disconnected devices
    usb: hub: Fix error loop seen after hub communication errors
    usb: Make sure usb/phy/of gets built-in
    usb: misc: add missing continue in switch
    staging: comedi: jr3_pci: cope with jiffies wraparound
    staging: comedi: jr3_pci: fix possible null pointer dereference
    staging: gdm724x: gdm_mux: fix use-after-free on module unload
    staging: vt6656: use off stack for out buffer USB transfers.
    staging: vt6656: use off stack for in buffer USB transfers.
    USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously
    USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit
    usb: host: xhci: print correct command ring address
    iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement
    target: Convert ACL change queue_depth se_session reference usage
    target/fileio: Fix zero-length READ and WRITE handling
    target: Fix compare_and_write_callback handling for non GOOD status
    xen: adjust early dom0 p2m handling to xen hypervisor behavior
Linux 4.4.68
    block: get rid of blk_integrity_revalidate()
    drm/ttm: fix use-after-free races in vm fault handling
    f2fs: sanity check segment count
    bnxt_en: allocate enough space for ->ntp_fltr_bmap
    ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf
    ipv6: initialize route null entry in addrconf_init()
    rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string
    ipv4, ipv6: ensure raw socket message is big enough to hold an IP header
    tcp: do not inherit fastopen_req from parent
    tcp: fix wraparound issue in tcp_lp
    bpf, arm64: fix jit branch offset related to ldimm64
    tcp: do not underestimate skb->truesize in tcp_trim_head()
    ALSA: hda - Fix deadlock of controller device lock at unbinding
    staging: emxx_udc: remove incorrect __init annotations
    staging: wlan-ng: add missing byte order conversion
    brcmfmac: Make skb header writable before use
    brcmfmac: Ensure pointer correctly set if skb data location changes
    MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix
    scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m
    serial: 8250_omap: Fix probe and remove for PM runtime
    phy: qcom-usb-hs: Add depends on EXTCON
    USB: serial: io_edgeport: fix descriptor error handling
    USB: serial: mct_u232: fix modem-status error handling
    USB: serial: quatech2: fix control-message error handling
    USB: serial: ftdi_sio: fix latency-timer error handling
    USB: serial: ark3116: fix open error handling
    USB: serial: ti_usb_3410_5052: fix control-message error handling
    USB: serial: io_edgeport: fix epic-descriptor handling
    USB: serial: ssu100: fix control-message error handling
    USB: serial: digi_acceleport: fix incomplete rx sanity check
    USB: serial: keyspan_pda: fix receive sanity checks
    usb: chipidea: Handle extcon events properly
    usb: chipidea: Only read/write OTGSC from one place
    usb: host: ohci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths
    usb: host: ehci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths
    KVM: nVMX: do not leak PML full vmexit to L1
    KVM: nVMX: initialize PML fields in vmcs02
    Revert "KVM: nested VMX: disable perf cpuid reporting"
    x86/platform/intel-mid: Correct MSI IRQ line for watchdog device
    kprobes/x86: Fix kernel panic when certain exception-handling addresses are probed
    clk: Make x86/ conditional on CONFIG_COMMON_CLK
    x86/pci-calgary: Fix iommu_free() comparison of unsigned expression >= 0
    x86/ioapic: Restore IO-APIC irq_chip retrigger callback
    mwifiex: Avoid skipping WEP key deletion for AP
    mwifiex: remove redundant dma padding in AMSDU
    mwifiex: debugfs: Fix (sometimes) off-by-1 SSID print
    ARM: OMAP5 / DRA7: Fix HYP mode boot for thumb2 build
    leds: ktd2692: avoid harmless maybe-uninitialized warning
    power: supply: bq24190_charger: Handle fault before status on interrupt
    power: supply: bq24190_charger: Don't read fault register outside irq_handle_thread()
    power: supply: bq24190_charger: Call power_supply_changed() for relevant component
    power: supply: bq24190_charger: Install irq_handler_thread() at end of probe()
    power: supply: bq24190_charger: Call set_mode_host() on pm_resume()
    power: supply: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING
    powerpc/powernv: Fix opal_exit tracepoint opcode
    cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores
    ARM: 8452/3: PJ4: make coprocessor access sequences buildable in Thumb2 mode
    9p: fix a potential acl leak
Linux 4.4.67
    dm ioctl: prevent stack leak in dm ioctl call
    nfsd: stricter decoding of write-like NFSv2/v3 ops
    nfsd4: minor NFSv2/v3 write decoding cleanup
    ext4/fscrypto: avoid RCU lookup in d_revalidate
    ext4 crypto: use dget_parent() in ext4_d_revalidate()
    ext4 crypto: revalidate dentry after adding or removing the key
    ext4: require encryption feature for EXT4_IOC_SET_ENCRYPTION_POLICY
    IB/ehca: fix maybe-uninitialized warnings
    IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE
    netlink: Allow direct reclaim for fallback allocation
    8250_pci: Fix potential use-after-free in error path
    scsi: cxlflash: Improve EEH recovery time
    scsi: cxlflash: Fix to avoid EEH and host reset collisions
    scsi: cxlflash: Scan host only after the port is ready for I/O
    net: tg3: avoid uninitialized variable warning
    mtd: avoid stack overflow in MTD CFI code
    drbd: avoid redefinition of BITS_PER_PAGE
    ALSA: ppc/awacs: shut up maybe-uninitialized warning
    ASoC: intel: Fix PM and non-atomic crash in bytcr drivers
    Handle mismatched open calls
    timerfd: Protect the might cancel mechanism proper
Linux 4.4.66
    ftrace/x86: Fix triple fault with graph tracing and suspend-to-ram
    ARCv2: save r30 on kernel entry as gcc uses it for code-gen
    nfsd: check for oversized NFSv2/v3 arguments
    Input: i8042 - add Clevo P650RS to the i8042 reset list
    p9_client_readdir() fix
    MIPS: Avoid BUG warning in arch_check_elf
    MIPS: KGDB: Use kernel context for sleeping threads
    ALSA: seq: Don't break snd_use_lock_sync() loop by timeout
    ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type
    ipv6: check raw payload size correctly in ioctl
    ipv6: check skb->protocol before lookup for nexthop
    macvlan: Fix device ref leak when purging bc_queue
    ip6mr: fix notification device destruction
    netpoll: Check for skb->queue_mapping
    net: ipv6: RTF_PCPU should not be settable from userspace
    dp83640: don't recieve time stamps twice
    tcp: clear saved_syn in tcp_disconnect()
    sctp: listen on the sock only when it's state is listening or closed
    net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given
    l2tp: fix PPP pseudo-wire auto-loading
    l2tp: take reference on sessions being dumped
    net/packet: fix overflow in check for tp_reserve
    net/packet: fix overflow in check for tp_frame_nr
    l2tp: purge socket queues in the .destruct() callback
    net: phy: handle state correctly in phy_stop_machine
    net: neigh: guard against NULL solicit() method
    sparc64: Fix kernel panic due to erroneous #ifdef surrounding pmd_write()
    sparc64: kern_addr_valid regression
    xen/x86: don't lose event interrupts
    usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize
    regulator: core: Clear the supply pointer if enabling fails
    RDS: Fix the atomicity for congestion map update
    net_sched: close another race condition in tcf_mirred_release()
    net: cavium: liquidio: Avoid dma_unmap_single on uninitialized ndata
    MIPS: Fix crash registers on non-crashing CPUs
    md:raid1: fix a dead loop when read from a WriteMostly disk
    ext4: check if in-inode xattr is corrupted in ext4_expand_extra_isize_ea()
    drm/amdgpu: fix array out of bounds
    crypto: testmgr - fix out of bound read in __test_aead()
    clk: sunxi: Add apb0 gates for H3
    ARM: OMAP2+: timer: add probe for clocksources
    xc2028: unlock on error in xc2028_set_config()
    f2fs: do more integrity verification for superblock
Linux 4.4.65
    perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
    ping: implement proper locking
    staging/android/ion : fix a race condition in the ion driver
    vfio/pci: Fix integer overflows, bitmask check
    tipc: check minimum bearer MTU
    netfilter: nfnetlink: correctly validate length of batch messages
    xc2028: avoid use after free
    mnt: Add a per mount namespace limit on the number of mounts
    tipc: fix socket timer deadlock
    tipc: fix random link resets while adding a second bearer
    gfs2: avoid uninitialized variable warning
    hostap: avoid uninitialized variable use in hfa384x_get_rid
    tty: nozomi: avoid a harmless gcc warning
    tipc: correct error in node fsm
    tipc: re-enable compensation for socket receive buffer double counting
    tipc: make dist queue pernet
    tipc: make sure IPv6 header fits in skb headroom
Linux 4.4.64
    tipc: fix crash during node removal
    block: fix del_gendisk() vs blkdev_ioctl crash
    x86, pmem: fix broken __copy_user_nocache cache-bypass assumptions
    hv: don't reset hv_context.tsc_page on crash
    Drivers: hv: balloon: account for gaps in hot add regions
    Drivers: hv: balloon: keep track of where ha_region starts
    Tools: hv: kvp: ensure kvp device fd is closed on exec
    kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd
    x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs
    powerpc/kprobe: Fix oops when kprobed on 'stdu' instruction
    ubi/upd: Always flush after prepared for an update
    mac80211: reject ToDS broadcast data frames
    mmc: sdhci-esdhc-imx: increase the pad I/O drive strength for DDR50 card
    ACPI / power: Avoid maybe-uninitialized warning
    Input: elantech - add Fujitsu Lifebook E547 to force crc_enabled
    VSOCK: Detach QP check should filter out non matching QPs.
    Drivers: hv: vmbus: Reduce the delay between retries in vmbus_post_msg()
    Drivers: hv: get rid of timeout in vmbus_open()
    Drivers: hv: don't leak memory in vmbus_establish_gpadl()
    s390/mm: fix CMMA vs KSM vs others
    CIFS: remove bad_network_name flag
    cifs: Do not send echoes before Negotiate is complete
    ring-buffer: Have ring_buffer_iter_empty() return true when empty
    tracing: Allocate the snapshot buffer before enabling probe
    KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings
    KEYS: Change the name of the dead type to ".dead" to prevent user access
    KEYS: Disallow keyrings beginning with '.' to be joined as session keyrings
Linux 4.4.63
    MIPS: fix Select HAVE_IRQ_EXIT_ON_IRQ_STACK patch.
    sctp: deny peeloff operation on asocs with threads sleeping on it
    net: ipv6: check route protocol when deleting routes
    tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done
    SUNRPC: fix refcounting problems with auth_gss messages.
    ibmveth: calculate gso_segs for large packets
    catc: Use heap buffer for memory size test
    catc: Combine failure cleanup code in catc_probe()
    rtl8150: Use heap buffers for all register access
    pegasus: Use heap buffers for all register access
    virtio-console: avoid DMA from stack
    dvb-usb-firmware: don't do DMA on stack
    dvb-usb: don't use stack for firmware load
    mm: Tighten x86 /dev/mem with zeroing reads
    rtc: tegra: Implement clock handling
    platform/x86: acer-wmi: setup accelerometer when machine has appropriate notify event
    ext4: fix inode checksum calculation problem if i_extra_size is small
    dvb-usb-v2: avoid use-after-free
    ath9k: fix NULL pointer dereference
    crypto: ahash - Fix EINPROGRESS notification callback
    powerpc: Disable HFSCR[TM] if TM is not supported
    zram: do not use copy_page with non-page aligned address
    kvm: fix page struct leak in handle_vmon
    Revert "MIPS: Lantiq: Fix cascaded IRQ setup"
    char: lack of bool string made CONFIG_DEVPORT always on
    char: Drop bogus dependency of DEVPORT on !M68K
    ftrace: Fix removing of second function probe
    irqchip/irq-imx-gpcv2: Fix spinlock initialization
    libnvdimm: fix reconfig_mutex, mmap_sem, and jbd2_handle lockdep splat
    xen, fbfront: fix connecting to backend
    scsi: sd: Fix capacity calculation with 32-bit sector_t
    scsi: sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable
    scsi: sr: Sanity check returned mode data
    iscsi-target: Drop work-around for legacy GlobalSAN initiator
    iscsi-target: Fix TMR reference leak during session shutdown
    acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison)
    x86/vdso: Plug race between mapping and ELF header setup
    x86/vdso: Ensure vdso32_enabled gets set to valid values only
    perf/x86: Avoid exposing wrong/stale data in intel_pmu_lbr_read_32()
    Input: xpad - add support for Razer Wildcat gamepad
    CIFS: store results of cifs_reopen_file to avoid infinite wait
    drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one
    drm/nouveau/mpeg: mthd returns true on success now
    thp: fix MADV_DONTNEED vs clear soft dirty race
    cgroup, kthread: close race window where new kthreads can be migrated to non-root cgroups
Linux 4.4.62
    ibmveth: set correct gso_size and gso_type
    net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions
    net/mlx4_core: Fix racy CQ (Completion Queue) free
    net/mlx4_en: Fix bad WQE issue
    usb: hub: Wait for connection to be reestablished after port reset
    blk-mq: Avoid memory reclaim when remapping queues
    net/packet: fix overflow in check for priv area size
    crypto: caam - fix RNG deinstantiation error checking
    MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch
    MIPS: Select HAVE_IRQ_EXIT_ON_IRQ_STACK
    MIPS: Switch to the irq_stack in interrupts
    MIPS: Only change $28 to thread_info if coming from user mode
    MIPS: Stack unwinding while on IRQ stack
    MIPS: Introduce irq_stack
    mtd: bcm47xxpart: fix parsing first block after aligned TRX
    usb: dwc3: gadget: delay unmap of bounced requests
    drm/i915: Stop using RP_DOWN_EI on Baytrail
    drm/i915: Avoid tweaking evaluation thresholds on Baytrail v3
Linux 4.4.61
    mm/mempolicy.c: fix error handling in set_mempolicy and mbind.
    MIPS: Flush wrong invalid FTLB entry for huge page
    MIPS: Lantiq: fix missing xbar kernel panic
    MIPS: End spinlocks with .insn
    MIPS: ralink: Fix typos in rt3883 pinctrl
    MIPS: Force o32 fp64 support on 32bit MIPS64r6 kernels
    s390/uaccess: get_user() should zero on failure (again)
    s390/decompressor: fix initrd corruption caused by bss clear
    nios2: reserve boot memory for device tree
    powerpc: Don't try to fix up misaligned load-with-reservation instructions
    powerpc/mm: Add missing global TLB invalidate if cxl is active
    metag/usercopy: Add missing fixups
    metag/usercopy: Fix src fixup in from user rapf loops
    metag/usercopy: Set flags before ADDZ
    metag/usercopy: Zero rest of buffer from copy_from_user
    metag/usercopy: Add early abort to copy_to_user
    metag/usercopy: Fix alignment error checking
    metag/usercopy: Drop unused macros
    ring-buffer: Fix return value check in test_ringbuffer()
    ptrace: fix PTRACE_LISTEN race corrupting task->state
    Reset TreeId to zero on SMB2 TREE_CONNECT
    iio: bmg160: reset chip when probing
    arm/arm64: KVM: Take mmap_sem in kvm_arch_prepare_memory_region
    arm/arm64: KVM: Take mmap_sem in stage2_unmap_vm
    staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
    sysfs: be careful of error returns from ops->show()
    drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl()
    drm/vmwgfx: Remove getparam error message
    drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces
    drm/vmwgfx: avoid calling vzalloc with a 0 size in vmw_get_cap_3d_ioctl()
    drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl()
    drm/vmwgfx: Type-check lookups of fence objects

Bug: 62730977
Change-Id: I4458200bbc977cf55a134fd9fd08627604e36d95
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2017-09-20 15:50:18 -07:00
Heiner Kallweit
4d4d501cd7 genirq: Release resources in __setup_irq() error path
commit fa07ab72cbb0d843429e61bf179308aed6cbe0dd upstream.

In case __irq_set_trigger() fails the resources requested via
irq_request_resources() are not released.

Add the missing release call into the error handling path.

Fixes: c1bacbae81 ("genirq: Provide irq_request/release_resources chip callbacks")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/655538f5-cb20-a892-ff15-fbd2dd1fa4ec@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 07:13:10 +02:00
Thomas Gleixner
e07db0d720 genirq: Fix chained interrupt data ordering
commit 2c4569ca26986d18243f282dd727da27e9adae4c upstream.

irq_set_chained_handler_and_data() sets up the chained interrupt and then
stores the handler data.

That's racy against an immediate interrupt which gets handled before the
store of the handler data happened. The handler will dereference a NULL
pointer and crash.

Cure it by storing handler data before installing the chained handler.

Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 14:30:17 +02:00
Maggie White
bc3ebb5f11 power: Improved/fixed logs for PM wakeups
PM wakeups were reporting in kernel and BatteryStats logs as abort
suspends due to the PM IRQ handler logging a suspend abort, which
prevented the normal wakeup resume messaging. Suspend abort reasons
are already logged in pm_wakeup_pending() in
drivers/base/power/wakeup.c.

Bug: 34225014
Change-Id: I8b9ab597caef61b0d6f5b853b2947d6afc13d693
Signed-off-by: Maggie White <maggiewhite@google.com>
2017-04-17 15:31:42 -07:00
Maggie White
4c81109ca6 power: Add detailed suspend abort reason
Test: dumpsys batterystats
Bug: 30874086

(cherry picked from commit a9d6bead120dab67e00bfe5500a616f83b94cf44)

Change-Id: I9feae71693b4addd45550b19ecab7dfd7371c378
Signed-off-by: Maggie White <maggiewhite@google.com>
2017-04-17 13:33:37 -07:00
Thierry Strudel
1bfb0526f6 Merge branch 'android-msm-8998-4.4-common' into android-msm-wahoo-4.4
Conflicts:
	Makefile
	arch/arm64/configs/wahoo_defconfig
	arch/arm64/include/asm/cpufeature.h
	arch/arm64/kernel/sleep.S
	arch/arm64/kernel/vmlinux.lds.S
	arch/arm64/mm/fault.c
	drivers/android/binder.c
	drivers/firmware/efi/arm-init.c
	drivers/firmware/efi/efi.c
	drivers/input/keyboard/gpio_keys.c
	drivers/input/misc/Makefile
	drivers/input/misc/vl53L0/Makefile
	drivers/input/misc/vl53L0/inc/vl53l010_api.h
	drivers/input/misc/vl53L0/inc/vl53l010_device.h
	drivers/input/misc/vl53L0/inc/vl53l010_strings.h
	drivers/input/misc/vl53L0/inc/vl53l010_tuning.h
	drivers/input/misc/vl53L0/inc/vl53l0_api.h
	drivers/input/misc/vl53L0/inc/vl53l0_api_calibration.h
	drivers/input/misc/vl53L0/inc/vl53l0_api_core.h
	drivers/input/misc/vl53L0/inc/vl53l0_api_histogram.h
	drivers/input/misc/vl53L0/inc/vl53l0_api_ranging.h
	drivers/input/misc/vl53L0/inc/vl53l0_api_strings.h
	drivers/input/misc/vl53L0/inc/vl53l0_def.h
	drivers/input/misc/vl53L0/inc/vl53l0_device.h
	drivers/input/misc/vl53L0/inc/vl53l0_interrupt_threshold_settings.h
	drivers/input/misc/vl53L0/inc/vl53l0_platform.h
	drivers/input/misc/vl53L0/inc/vl53l0_platform_log.h
	drivers/input/misc/vl53L0/inc/vl53l0_tuning.h
	drivers/input/misc/vl53L0/inc/vl53l0_types.h
	drivers/input/misc/vl53L0/src/vl53l010_api.c
	drivers/input/misc/vl53L0/src/vl53l010_tuning.c
	drivers/input/misc/vl53L0/src/vl53l0_api.c
	drivers/input/misc/vl53L0/src/vl53l0_api_calibration.c
	drivers/input/misc/vl53L0/src/vl53l0_api_core.c
	drivers/input/misc/vl53L0/src/vl53l0_api_histogram.c
	drivers/input/misc/vl53L0/src/vl53l0_api_ranging.c
	drivers/input/misc/vl53L0/src/vl53l0_api_strings.c
	drivers/input/misc/vl53L0/src/vl53l0_i2c_platform.c
	drivers/input/misc/vl53L0/src/vl53l0_platform.c
	drivers/input/misc/vl53L0/src/vl53l0_port_i2c.c
	drivers/input/misc/vl53L0/stmvl53l0-cci.h
	drivers/input/misc/vl53L0/stmvl53l0-i2c.h
	drivers/input/misc/vl53L0/stmvl53l0.h
	drivers/input/misc/vl53L0/stmvl53l0_module-cci.c
	drivers/input/misc/vl53L0/stmvl53l0_module-i2c.c
	drivers/input/misc/vl53L0/stmvl53l0_module.c
	drivers/input/touchscreen/Makefile
	drivers/leds/leds-qpnp.c
	drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c
	drivers/media/platform/msm/camera_v2/msm.c
	drivers/pinctrl/qcom/pinctrl-msm.c
	drivers/platform/msm/ipa/ipa_v3/ipa_client.c
	drivers/platform/msm/mhi/mhi_ssr.c
	drivers/power/supply/qcom/qpnp-smb2.c
	drivers/power/supply/qcom/smb-lib.c
	drivers/power/supply/qcom/smb-lib.h
	drivers/soc/qcom/icnss.c
	drivers/soc/qcom/qdsp6v2/audio_notifier.c
	drivers/soc/qcom/service-notifier.c
	drivers/video/fbdev/msm/mdss_panel.h
	fs/exec.c
	fs/ext4/inode.c
	fs/ext4/readpage.c
	fs/namei.c
	fs/sdcardfs/derived_perm.c
	fs/sdcardfs/file.c
	fs/sdcardfs/inode.c
	fs/sdcardfs/lookup.c
	fs/sdcardfs/main.c
	fs/sdcardfs/multiuser.h
	fs/sdcardfs/packagelist.c
	fs/sdcardfs/sdcardfs.h
	fs/sdcardfs/super.c
	fs/utimes.c
	include/linux/string.h
	lib/kstrtox.c
	lib/string.c
	net/ipv4/tcp_ipv4.c
	net/unix/af_unix.c
	sound/soc/codecs/wcd934x/wcd934x-mbhc.h
	sound/soc/msm/msm8998.c

Change-Id: I918ebad22a5f81d48be07bd2bc2ac435ed9acb0a
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2017-04-07 12:27:45 -07:00
Iliyan Malchev
a4d8c9dd30 PM: wakeup_reasons: fix race condition
log_possible_wakeup_reason() and stop_logging_wakeup_reasons() can race, as the
latter can be called from process context, and both can run on separate cores.

Change-Id: I306441d0be46dd4fe58c55cdc162f9d61a28c27d
Signed-off-by: Iliyan Malchev <malchev@google.com>
2017-04-03 17:44:06 +00:00
Iliyan Malchev
188181633e BACKPORT: PM: wakeup_reason: add functions to query and clear wakeup reasons
The query results are valid until the next PM_SUSPEND_PREPARE.

(cherry picked from commit 76543de14f860ab713114621cb62e8006b7ca952)
Change-Id: I6bc2bd47c830262319576a001d39ac9a994916cf
Signed-off-by: Iliyan Malchev <malchev@google.com>
2017-04-03 17:43:56 +00:00
Thierry Strudel
99608721f2 Merge remote-tracking branch 'msm-qcom/android-msm-8998-4.4-common' into android-msm-muskie-4.4
Conflicts:
	arch/arm64/configs/muskie_defconfig
	arch/arm64/mm/fault.c
	drivers/android/binder.c
	drivers/base/firmware_class.c
	drivers/power/supply/qcom/smb-lib.h
	sound/soc/codecs/wcd9xxx-resmgr-v2.c

Change-Id: I84118445e2c7a1c86b3a2919301d97c7f891b82f
2017-03-06 16:07:54 -08:00
Runmin Wang
4b7c952db6 Merge tag 'lsk-v4.4-16.12-android' into branch 'msm-4.4'
* remotes/origin/tmp-2f0de51:
  Linux 4.4.38
  esp6: Fix integrity verification when ESN are used
  esp4: Fix integrity verification when ESN are used
  ipv4: Set skb->protocol properly for local output
  ipv6: Set skb->protocol properly for local output
  Don't feed anything but regular iovec's to blk_rq_map_user_iov
  constify iov_iter_count() and iter_is_iovec()
  sparc64: fix compile warning section mismatch in find_node()
  sparc64: Fix find_node warning if numa node cannot be found
  sparc32: Fix inverted invalid_frame_pointer checks on sigreturns
  net: ping: check minimum size on ICMP header length
  net: avoid signed overflows for SO_{SND|RCV}BUFFORCE
  geneve: avoid use-after-free of skb->data
  sh_eth: remove unchecked interrupts for RZ/A1
  net: bcmgenet: Utilize correct struct device for all DMA operations
  packet: fix race condition in packet_set_ring
  net/dccp: fix use-after-free in dccp_invalid_packet
  netlink: Do not schedule work from sk_destruct
  netlink: Call cb->done from a worker thread
  net/sched: pedit: make sure that offset is valid
  net, sched: respect rcu grace period on cls destruction
  net: dsa: bcm_sf2: Ensure we re-negotiate EEE during after link change
  l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind()
  rtnetlink: fix FDB size computation
  af_unix: conditionally use freezable blocking calls in read
  net: sky2: Fix shutdown crash
  ip6_tunnel: disable caching when the traffic class is inherited
  net: check dead netns for peernet2id_alloc()
  virtio-net: add a missing synchronize_net()
  Linux 4.4.37
  arm64: suspend: Reconfigure PSTATE after resume from idle
  arm64: mm: Set PSTATE.PAN from the cpu_enable_pan() call
  arm64: cpufeature: Schedule enable() calls instead of calling them via IPI
  pwm: Fix device reference leak
  mwifiex: printk() overflow with 32-byte SSIDs
  PCI: Set Read Completion Boundary to 128 iff Root Port supports it (_HPX)
  PCI: Export pcie_find_root_port
  rcu: Fix soft lockup for rcu_nocb_kthread
  ALSA: pcm : Call kill_fasync() in stream lock
  x86/traps: Ignore high word of regs->cs in early_fixup_exception()
  kasan: update kasan_global for gcc 7
  zram: fix unbalanced idr management at hot removal
  ARC: Don't use "+l" inline asm constraint
  Linux 4.4.36
  scsi: mpt3sas: Unblock device after controller reset
  flow_dissect: call init_default_flow_dissectors() earlier
  mei: fix return value on disconnection
  mei: me: fix place for kaby point device ids.
  mei: me: disable driver on SPT SPS firmware
  drm/radeon: Ensure vblank interrupt is enabled on DPMS transition to on
  mpi: Fix NULL ptr dereference in mpi_powm() [ver #3]
  parisc: Also flush data TLB in flush_icache_page_asm
  parisc: Fix race in pci-dma.c
  parisc: Fix races in parisc_setup_cache_timing()
  NFSv4.x: hide array-bounds warning
  apparmor: fix change_hat not finding hat after policy replacement
  cfg80211: limit scan results cache size
  tile: avoid using clocksource_cyc2ns with absolute cycle count
  scsi: mpt3sas: Fix secure erase premature termination
  Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=y
  USB: serial: ftdi_sio: add support for TI CC3200 LaunchPad
  USB: serial: cp210x: add ID for the Zone DPMX
  usb: chipidea: move the lock initialization to core file
  KVM: x86: check for pic and ioapic presence before use
  KVM: x86: drop error recovery in em_jmp_far and em_ret_far
  iommu/vt-d: Fix IOMMU lookup for SR-IOV Virtual Functions
  iommu/vt-d: Fix PASID table allocation
  sched: tune: Fix lacking spinlock initialization
  UPSTREAM: trace: Update documentation for mono, mono_raw and boot clock
  UPSTREAM: trace: Add an option for boot clock as trace clock
  UPSTREAM: timekeeping: Add a fast and NMI safe boot clock
  ANDROID: goldfish_pipe: fix allmodconfig build
  ANDROID: goldfish: goldfish_pipe: fix locking errors
  ANDROID: video: goldfishfb: fix platform_no_drv_owner.cocci warnings
  ANDROID: goldfish_pipe: fix call_kern.cocci warnings
  arm64: rename ranchu defconfig to ranchu64
  ANDROID: arch: x86: disable pic for Android toolchain
  ANDROID: goldfish_pipe: An implementation of more parallel pipe
  ANDROID: goldfish_pipe: bugfixes and performance improvements.
  ANDROID: goldfish: Add goldfish sync driver
  ANDROID: goldfish: add ranchu defconfigs
  ANDROID: goldfish_audio: Clear audio read buffer status after each read
  ANDROID: goldfish_events: no extra EV_SYN; register goldfish
  ANDROID: goldfish_fb: Set pixclock = 0
  ANDROID: goldfish: Enable ACPI-based enumeration for goldfish audio
  ANDROID: goldfish: Enable ACPI-based enumeration for goldfish framebuffer
  ANDROID: video: goldfishfb: add devicetree bindings
  BACKPORT: staging: goldfish: audio: fix compiliation on arm
  BACKPORT: Input: goldfish_events - enable ACPI-based enumeration for goldfish events
  BACKPORT: goldfish: Enable ACPI-based enumeration for goldfish battery
  BACKPORT: drivers: tty: goldfish: Add device tree bindings
  BACKPORT: tty: goldfish: support platform_device with id -1
  BACKPORT: Input: goldfish_events - add devicetree bindings
  BACKPORT: power: goldfish_battery: add devicetree bindings
  BACKPORT: staging: goldfish: audio: add devicetree bindings
  ANDROID: usb: gadget: function: cleanup: Add blank line after declaration
  cpufreq: sched: Fix kernel crash on accessing sysfs file
  usb: gadget: f_mtp: simplify ptp NULL pointer check
  cgroup: replace unified-hierarchy.txt with a proper cgroup v2 documentation
  cgroup: rename Documentation/cgroups/ to Documentation/cgroup-legacy/
  cgroup: replace __DEVEL__sane_behavior with cgroup2 fs type
  writeback: initialize inode members that track writeback history
  mm: page_alloc: generalize the dirty balance reserve
  block: fix module reference leak on put_disk() call for cgroups throttle
  Linux 4.4.35
  netfilter: nft_dynset: fix element timeout for HZ != 1000
  IB/cm: Mark stale CM id's whenever the mad agent was unregistered
  IB/uverbs: Fix leak of XRC target QPs
  IB/core: Avoid unsigned int overflow in sg_alloc_table
  IB/mlx5: Fix fatal error dispatching
  IB/mlx5: Use cache line size to select CQE stride
  IB/mlx4: Fix create CQ error flow
  IB/mlx4: Check gid_index return value
  PM / sleep: don't suspend parent when async child suspend_{noirq, late} fails
  PM / sleep: fix device reference leak in test_suspend
  uwb: fix device reference leaks
  mfd: core: Fix device reference leak in mfd_clone_cell
  iwlwifi: pcie: fix SPLC structure parsing
  rtc: omap: Fix selecting external osc
  clk: mmp: mmp2: fix return value check in mmp2_clk_init()
  clk: mmp: pxa168: fix return value check in pxa168_clk_init()
  clk: mmp: pxa910: fix return value check in pxa910_clk_init()
  drm/amdgpu: Attach exclusive fence to prime exported bo's. (v5)
  crypto: caam - do not register AES-XTS mode on LP units
  ext4: sanity check the block and cluster size at mount time
  kbuild: Steal gcc's pie from the very beginning
  x86/kexec: add -fno-PIE
  scripts/has-stack-protector: add -fno-PIE
  kbuild: add -fno-PIE
  i2c: mux: fix up dependencies
  can: bcm: fix warning in bcm_connect/proc_register
  mfd: intel-lpss: Do not put device in reset state on suspend
  fuse: fix fuse_write_end() if zero bytes were copied
  KVM: Disable irq while unregistering user notifier
  KVM: x86: fix missed SRCU usage in kvm_lapic_set_vapic_addr
  x86/cpu/AMD: Fix cpu_llc_id for AMD Fam17h systems
  Linux 4.4.34
  sparc64: Delete now unused user copy fixup functions.
  sparc64: Delete now unused user copy assembler helpers.
  sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.
  sparc64: Convert NG2copy_{from,to}_user to accurate exception reporting.
  sparc64: Convert NGcopy_{from,to}_user to accurate exception reporting.
  sparc64: Convert NG4copy_{from,to}_user to accurate exception reporting.
  sparc64: Convert U1copy_{from,to}_user to accurate exception reporting.
  sparc64: Convert GENcopy_{from,to}_user to accurate exception reporting.
  sparc64: Convert copy_in_user to accurate exception reporting.
  sparc64: Prepare to move to more saner user copy exception handling.
  sparc64: Delete __ret_efault.
  sparc64: Handle extremely large kernel TLB range flushes more gracefully.
  sparc64: Fix illegal relative branches in hypervisor patched TLB cross-call code.
  sparc64: Fix instruction count in comment for __hypervisor_flush_tlb_pending.
  sparc64: Fix illegal relative branches in hypervisor patched TLB code.
  sparc64: Handle extremely large kernel TSB range flushes sanely.
  sparc: Handle negative offsets in arch_jump_label_transform
  sparc64 mm: Fix base TSB sizing when hugetlb pages are used
  sparc: serial: sunhv: fix a double lock bug
  sparc: Don't leak context bits into thread->fault_address
  tty: Prevent ldisc drivers from re-using stale tty fields
  tcp: take care of truncations done by sk_filter()
  ipv4: use new_gw for redirect neigh lookup
  net: __skb_flow_dissect() must cap its return value
  sock: fix sendmmsg for partial sendmsg
  fib_trie: Correct /proc/net/route off by one error
  sctp: assign assoc_id earlier in __sctp_connect
  ipv6: dccp: add missing bind_conflict to dccp_ipv6_mapped
  ipv6: dccp: fix out of bound access in dccp_v6_err()
  dccp: fix out of bound access in dccp_v4_err()
  dccp: do not send reset to already closed sockets
  tcp: fix potential memory corruption
  ip6_tunnel: Clear IP6CB in ip6tunnel_xmit()
  bgmac: stop clearing DMA receive control register right after it is set
  net: mangle zero checksum in skb_checksum_help()
  net: clear sk_err_soft in sk_clone_lock()
  dctcp: avoid bogus doubling of cwnd after loss
  ARM: 8485/1: cpuidle: remove cpu parameter from the cpuidle_ops suspend hook
  Linux 4.4.33
  netfilter: fix namespace handling in nf_log_proc_dostring
  btrfs: qgroup: Prevent qgroup->reserved from going subzero
  mmc: mxs: Initialize the spinlock prior to using it
  ASoC: sun4i-codec: return error code instead of NULL when create_card fails
  ACPI / APEI: Fix incorrect return value of ghes_proc()
  i40e: fix call of ndo_dflt_bridge_getlink()
  hwrng: core - Don't use a stack buffer in add_early_randomness()
  lib/genalloc.c: start search from start of chunk
  mei: bus: fix received data size check in NFC fixup
  iommu/vt-d: Fix dead-locks in disable_dmar_iommu() path
  iommu/amd: Free domain id when free a domain of struct dma_ops_domain
  tty/serial: at91: fix hardware handshake on Atmel platforms
  dmaengine: at_xdmac: fix spurious flag status for mem2mem transfers
  drm/i915: Respect alternate_ddc_pin for all DDI ports
  KVM: MIPS: Precalculate MMIO load resume PC
  scsi: mpt3sas: Fix for block device of raid exists even after deleting raid disk
  scsi: qla2xxx: Fix scsi scan hang triggered if adapter fails during init
  iio: orientation: hid-sensor-rotation: Add PM function (fix non working driver)
  iio: hid-sensors: Increase the precision of scale to fix wrong reading interpretation.
  clk: qoriq: Don't allow CPU clocks higher than starting value
  toshiba-wmi: Fix loading the driver on non Toshiba laptops
  drbd: Fix kernel_sendmsg() usage - potential NULL deref
  usb: gadget: u_ether: remove interrupt throttling
  USB: cdc-acm: fix TIOCMIWAIT
  staging: nvec: remove managed resource from PS2 driver
  Revert "staging: nvec: ps2: change serio type to passthrough"
  drivers: staging: nvec: remove bogus reset command for PS/2 interface
  staging: iio: ad5933: avoid uninitialized variable in error case
  pinctrl: cherryview: Prevent possible interrupt storm on resume
  pinctrl: cherryview: Serialize register access in suspend/resume
  ARC: timer: rtc: implement read loop in "C" vs. inline asm
  s390/hypfs: Use get_free_page() instead of kmalloc to ensure page alignment
  coredump: fix unfreezable coredumping task
  swapfile: fix memory corruption via malformed swapfile
  dib0700: fix nec repeat handling
  ASoC: cs4270: fix DAPM stream name mismatch
  ALSA: info: Limit the proc text input size
  ALSA: info: Return error for invalid read/write
  arm64: Enable KPROBES/HIBERNATION/CORESIGHT in defconfig
  arm64: kvm: allows kvm cpu hotplug
  arm64: KVM: Register CPU notifiers when the kernel runs at HYP
  arm64: KVM: Skip HYP setup when already running in HYP
  arm64: hyp/kvm: Make hyp-stub reject kvm_call_hyp()
  arm64: hyp/kvm: Make hyp-stub extensible
  arm64: kvm: Move lr save/restore from do_el2_call into EL1
  arm64: kvm: deal with kernel symbols outside of linear mapping
  arm64: introduce KIMAGE_VADDR as the virtual base of the kernel region
  ANDROID: video: adf: Avoid directly referencing user pointers
  ANDROID: usb: gadget: audio_source: fix comparison of distinct pointer types
  android: binder: support for file-descriptor arrays.
  android: binder: support for scatter-gather.
  android: binder: add extra size to allocator.
  android: binder: refactor binder_transact()
  android: binder: support multiple /dev instances.
  android: binder: deal with contexts in debugfs.
  android: binder: support multiple context managers.
  android: binder: split flat_binder_object.
  disable aio support in recommended configuration
  Linux 4.4.32
  scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression
  drm/radeon: fix DP mode validation
  drm/radeon/dp: add back special handling for NUTMEG
  drm/amdgpu: fix DP mode validation
  drm/amdgpu/dp: add back special handling for NUTMEG
  KVM: MIPS: Drop other CPU ASIDs on guest MMU changes
  Revert KVM: MIPS: Drop other CPU ASIDs on guest MMU changes
  of: silence warnings due to max() usage
  packet: on direct_xmit, limit tso and csum to supported devices
  sctp: validate chunk len before actually using it
  net sched filters: fix notification of filter delete with proper handle
  udp: fix IP_CHECKSUM handling
  net: sctp, forbid negative length
  ipv4: use the right lock for ping_group_range
  ipv4: disable BH in set_ping_group_range()
  net: add recursion limit to GRO
  rtnetlink: Add rtnexthop offload flag to compare mask
  bridge: multicast: restore perm router ports on multicast enable
  net: pktgen: remove rcu locking in pktgen_change_name()
  ipv6: correctly add local routes when lo goes up
  ip6_tunnel: fix ip6_tnl_lookup
  ipv6: tcp: restore IP6CB for pktoptions skbs
  netlink: do not enter direct reclaim from netlink_dump()
  packet: call fanout_release, while UNREGISTERING a netdev
  net: Add netdev all_adj_list refcnt propagation to fix panic
  net/sched: act_vlan: Push skb->data to mac_header prior calling skb_vlan_*() functions
  net: pktgen: fix pkt_size
  net: fec: set mac address unconditionally
  tg3: Avoid NULL pointer dereference in tg3_io_error_detected()
  ipmr, ip6mr: fix scheduling while atomic and a deadlock with ipmr_get_route
  ip6_gre: fix flowi6_proto value in ip6gre_xmit_other()
  tcp: fix a compile error in DBGUNDO()
  tcp: fix wrong checksum calculation on MTU probing
  net: avoid sk_forward_alloc overflows
  tcp: fix overflow in __tcp_retransmit_skb()
  arm64/kvm: fix build issue on kvm debug
  arm64: ptdump: Indicate whether memory should be faulting
  arm64: Add support for ARCH_SUPPORTS_DEBUG_PAGEALLOC
  arm64: Drop alloc function from create_mapping
  arm64: allow vmalloc regions to be set with set_memory_*
  arm64: kernel: implement ACPI parking protocol
  arm64: mm: create new fine-grained mappings at boot
  arm64: ensure _stext and _etext are page-aligned
  arm64: mm: allow passing a pgdir to alloc_init_*
  arm64: mm: allocate pagetables anywhere
  arm64: mm: use fixmap when creating page tables
  arm64: mm: add functions to walk tables in fixmap
  arm64: mm: add __{pud,pgd}_populate
  arm64: mm: avoid redundant __pa(__va(x))
  Linux 4.4.31
  HID: usbhid: add ATEN CS962 to list of quirky devices
  ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap()
  kvm: x86: Check memopp before dereference (CVE-2016-8630)
  tty: vt, fix bogus division in csi_J
  usb: dwc3: Fix size used in dma_free_coherent()
  pwm: Unexport children before chip removal
  UBI: fastmap: scrub PEB when bitflips are detected in a free PEB EC header
  Disable "frame-address" warning
  smc91x: avoid self-comparison warning
  cgroup: avoid false positive gcc-6 warning
  drm/exynos: fix error handling in exynos_drm_subdrv_open
  mm/cma: silence warnings due to max() usage
  ARM: 8584/1: floppy: avoid gcc-6 warning
  powerpc/ptrace: Fix out of bounds array access warning
  x86/xen: fix upper bound of pmd loop in xen_cleanhighmap()
  perf build: Fix traceevent plugins build race
  drm/dp/mst: Check peer device type before attempting EDID read
  drm/radeon: drop register readback in cayman_cp_int_cntl_setup
  drm/radeon/si_dpm: workaround for SI kickers
  drm/radeon/si_dpm: Limit clocks on HD86xx part
  Revert "drm/radeon: fix DP link training issue with second 4K monitor"
  mmc: dw_mmc-pltfm: fix the potential NULL pointer dereference
  scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware
  scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded
  scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
  mac80211: discard multicast and 4-addr A-MSDUs
  firewire: net: fix fragmented datagram_size off-by-one
  firewire: net: guard against rx buffer overflows
  Input: i8042 - add XMG C504 to keyboard reset table
  dm mirror: fix read error on recovery after default leg failure
  virtio: console: Unlock vqs while freeing buffers
  virtio_ring: Make interrupt suppression spec compliant
  parisc: Ensure consistent state when switching to kernel stack at syscall entry
  ovl: fsync after copy-up
  KVM: MIPS: Make ERET handle ERL before EXL
  KVM: x86: fix wbinvd_dirty_mask use-after-free
  dm: free io_barrier after blk_cleanup_queue call
  USB: serial: cp210x: fix tiocmget error handling
  tty: limit terminal size to 4M chars
  xhci: add restart quirk for Intel Wildcatpoint PCH
  hv: do not lose pending heartbeat vmbus packets
  vt: clear selection before resizing
  Fix potential infoleak in older kernels
  GenWQE: Fix bad page access during abort of resource allocation
  usb: increase ohci watchdog delay to 275 msec
  xhci: use default USB_RESUME_TIMEOUT when resuming ports.
  USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7
  USB: serial: fix potential NULL-dereference at probe
  usb: gadget: function: u_ether: don't starve tx request queue
  mei: txe: don't clean an unprocessed interrupt cause.
  ubifs: Fix regression in ubifs_readdir()
  ubifs: Abort readdir upon error
  btrfs: fix races on root_log_ctx lists
  ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct
  ANDROID: binder: Add strong ref checks
  ALSA: hda - Fix headset mic detection problem for two Dell laptops
  ALSA: hda - Adding a new group of pin cfg into ALC295 pin quirk table
  ALSA: hda - allow 40 bit DMA mask for NVidia devices
  ALSA: hda - Raise AZX_DCAPS_RIRB_DELAY handling into top drivers
  ALSA: hda - Merge RIRB_PRE_DELAY into CTX_WORKAROUND caps
  ALSA: usb-audio: Add quirk for Syntek STK1160
  KEYS: Fix short sprintf buffer in /proc/keys show function
  mm: memcontrol: do not recurse in direct reclaim
  mm/list_lru.c: avoid error-path NULL pointer deref
  libxfs: clean up _calc_dquots_per_chunk
  h8300: fix syscall restarting
  drm/dp/mst: Clear port->pdt when tearing down the i2c adapter
  i2c: core: fix NULL pointer dereference under race condition
  i2c: xgene: Avoid dma_buffer overrun
  arm64:cpufeature ARM64_NCAPS is the indicator of last feature
  arm64: hibernate: Refuse to hibernate if the boot cpu is offline
  PM / sleep: Add support for read-only sysfs attributes
  arm64: kernel: Add support for hibernate/suspend-to-disk
  arm64: mm: add functions to walk page tables by PA
  arm64: mm: move pte_* macros
  PM / Hibernate: Call flush_icache_range() on pages restored in-place
  arm64: Add new asm macro copy_page
  arm64: Promote KERNEL_START/KERNEL_END definitions to a header file
  arm64: kernel: Include _AC definition in page.h
  arm64: Change cpu_resume() to enable mmu early then access sleep_sp by va
  arm64: kernel: Rework finisher callback out of __cpu_suspend_enter()
  arm64: Cleanup SCTLR flags
  arm64: Fold proc-macros.S into assembler.h
  arm/arm64: KVM: Add hook for C-based stage2 init
  arm/arm64: KVM: Detect vGIC presence at runtime
  arm64: KVM: Add support for 16-bit VMID
  arm: KVM: Make kvm_arm.h friendly to assembly code
  arm/arm64: KVM: Remove unreferenced S2_PGD_ORDER
  arm64: KVM: debug: Remove spurious inline attributes
  ARM: KVM: Cleanup exception injection
  arm64: KVM: Remove weak attributes
  arm64: KVM: Cleanup asm-offset.c
  arm64: KVM: Turn system register numbers to an enum
  arm64: KVM: VHE: Patch out use of HVC
  arm64: Add ARM64_HAS_VIRT_HOST_EXTN feature
  arm/arm64: Add new is_kernel_in_hyp_mode predicate
  arm64: KVM: Move away from the assembly version of the world switch
  arm64: KVM: Map the kernel RO section into HYP
  arm64: KVM: Add compatibility aliases
  arm64: KVM: Implement vgic-v3 save/restore
  arm64: KVM: Add panic handling
  arm64: KVM: HYP mode entry points
  arm64: KVM: Implement TLB handling
  arm64: KVM: Implement fpsimd save/restore
  arm64: KVM: Implement the core world switch
  arm64: KVM: Add patchable function selector
  arm64: KVM: Implement guest entry
  arm64: KVM: Implement debug save/restore
  arm64: KVM: Implement 32bit system register save/restore
  arm64: KVM: Implement system register save/restore
  arm64: KVM: Implement timer save/restore
  arm64: KVM: Implement vgic-v2 save/restore
  arm64: KVM: Add a HYP-specific header file
  KVM: arm/arm64: vgic-v3: Make the LR indexing macro public
  arm64: Add macros to read/write system registers
  Linux 4.4.30
  Revert "fix minor infoleak in get_user_ex()"
  Revert "x86/mm: Expand the exception table logic to allow new handling options"
  Linux 4.4.29
  ARM: pxa: pxa_cplds: fix interrupt handling
  powerpc/nvram: Fix an incorrect partition merge
  mpt3sas: Don't spam logs if logging level is 0
  perf symbols: Fixup symbol sizes before picking best ones
  perf symbols: Check symbol_conf.allow_aliases for kallsyms loading too
  perf hists browser: Fix event group display
  clk: divider: Fix clk_divider_round_rate() to use clk_readl()
  clk: qoriq: fix a register offset error
  s390/con3270: fix insufficient space padding
  s390/con3270: fix use of uninitialised data
  s390/cio: fix accidental interrupt enabling during resume
  x86/mm: Expand the exception table logic to allow new handling options
  dmaengine: ipu: remove bogus NO_IRQ reference
  power: bq24257: Fix use of uninitialized pointer bq->charger
  staging: r8188eu: Fix scheduling while atomic splat
  ASoC: dapm: Fix kcontrol creation for output driver widget
  ASoC: dapm: Fix value setting for _ENUM_DOUBLE MUX's second channel
  ASoC: dapm: Fix possible uninitialized variable in snd_soc_dapm_get_volsw()
  ASoC: topology: Fix error return code in soc_tplg_dapm_widget_create()
  hwrng: omap - Only fail if pm_runtime_get_sync returns < 0
  crypto: arm/ghash-ce - add missing async import/export
  crypto: gcm - Fix IV buffer size in crypto_gcm_setkey
  mwifiex: correct aid value during tdls setup
  spi: spi-fsl-dspi: Drop extra spi_master_put in device remove function
  ARM: clk-imx35: fix name for ckil clk
  uio: fix dmem_region_start computation
  genirq/generic_chip: Add irq_unmap callback
  perf stat: Fix interval output values
  powerpc/eeh: Null check uses of eeh_pe_bus_get
  tunnels: Remove encapsulation offloads on decap.
  tunnels: Don't apply GRO to multiple layers of encapsulation.
  ipip: Properly mark ipip GRO packets as encapsulated.
  posix_acl: Clear SGID bit when setting file permissions
  brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
  mm/hugetlb: fix memory offline with hugepage size > memory block size
  drm/i915: Unalias obj->phys_handle and obj->userptr
  drm/i915: Account for TSEG size when determining 865G stolen base
  Revert "drm/i915: Check live status before reading edid"
  drm/i915/gen9: fix the WaWmMemoryReadLatency implementation
  xenbus: don't look up transaction IDs for ordinary writes
  drm/vmwgfx: Limit the user-space command buffer size
  drm/radeon: change vblank_time's calculation method to reduce computational error.
  drm/radeon/si/dpm: fix phase shedding setup
  drm/radeon: narrow asic_init for virtualization
  drm/amdgpu: change vblank_time's calculation method to reduce computational error.
  drm/amdgpu/dce11: add missing drm_mode_config_cleanup call
  drm/amdgpu/dce11: disable hpd on local panels
  drm/amdgpu/dce8: disable hpd on local panels
  drm/amdgpu/dce10: disable hpd on local panels
  drm/amdgpu: fix IB alignment for UVD
  drm/prime: Pass the right module owner through to dma_buf_export()
  Linux 4.4.28
  target: Don't override EXTENDED_COPY xcopy_pt_cmd SCSI status code
  target: Make EXTENDED_COPY 0xe4 failure return COPY TARGET DEVICE NOT REACHABLE
  target: Re-add missing SCF_ACK_KREF assignment in v4.1.y
  ubifs: Fix xattr_names length in exit paths
  jbd2: fix incorrect unlock on j_list_lock
  ext4: do not advertise encryption support when disabled
  mmc: rtsx_usb_sdmmc: Handle runtime PM while changing the led
  mmc: rtsx_usb_sdmmc: Avoid keeping the device runtime resumed when unused
  mmc: core: Annotate cmd_hdr as __le32
  powerpc/mm: Prevent unlikely crash in copro_calculate_slb()
  ceph: fix error handling in ceph_read_iter
  arm64: kernel: Init MDCR_EL2 even in the absence of a PMU
  arm64: percpu: rewrite ll/sc loops in assembly
  memstick: rtsx_usb_ms: Manage runtime PM when accessing the device
  memstick: rtsx_usb_ms: Runtime resume the device when polling for cards
  isofs: Do not return EACCES for unknown filesystems
  irqchip/gic-v3-its: Fix entry size mask for GITS_BASER
  s390/mm: fix gmap tlb flush issues
  Using BUG_ON() as an assert() is _never_ acceptable
  mm: filemap: fix mapping->nrpages double accounting in fuse
  mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page()
  acpi, nfit: check for the correct event code in notifications
  net/mlx4_core: Allow resetting VF admin mac to zero
  bnx2x: Prevent false warning for lack of FC NPIV
  PKCS#7: Don't require SpcSpOpusInfo in Authenticode pkcs7 signatures
  hpsa: correct skipping masked peripherals
  sd: Fix rw_max for devices that report an optimal xfer size
  irqchip/gicv3: Handle loop timeout proper
  kvm: x86: memset whole irq_eoi
  x86/e820: Don't merge consecutive E820_PRAM ranges
  blkcg: Unlock blkcg_pol_mutex only once when cpd == NULL
  Fix regression which breaks DFS mounting
  Cleanup missing frees on some ioctls
  Do not send SMB3 SET_INFO request if nothing is changing
  SMB3: GUIDs should be constructed as random but valid uuids
  Set previous session id correctly on SMB3 reconnect
  Display number of credits available
  Clarify locking of cifs file and tcon structures and make more granular
  fs/cifs: keep guid when assigning fid to fileinfo
  cifs: Limit the overall credit acquired
  fs/super.c: fix race between freeze_super() and thaw_super()
  arc: don't leak bits of kernel stack into coredump
  lightnvm: ensure that nvm_dev_ops can be used without CONFIG_NVM
  ipc/sem.c: fix complex_count vs. simple op race
  mm: filemap: don't plant shadow entries without radix tree node
  metag: Only define atomic_dec_if_positive conditionally
  scsi: Fix use-after-free
  NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic
  NFSv4: Open state recovery must account for file permission changes
  NFSv4: nfs4_copy_delegation_stateid() must fail if the delegation is invalid
  NFSv4: Don't report revoked delegations as valid in nfs_have_delegation()
  sunrpc: fix write space race causing stalls
  Input: elantech - add Fujitsu Lifebook E556 to force crc_enabled
  Input: elantech - force needed quirks on Fujitsu H760
  Input: i8042 - skip selftest on ASUS laptops
  lib: add "on"/"off" support to kstrtobool
  lib: update single-char callers of strtobool()
  lib: move strtobool() to kstrtobool()
  MIPS: ptrace: Fix regs_return_value for kernel context
  MIPS: Fix -mabi=64 build of vdso.lds
  ALSA: hda - Fix a failure of micmute led when having multi adcs
  cx231xx: fix GPIOs for Pixelview SBTVD hybrid
  cx231xx: don't return error on success
  mb86a20s: fix demod settings
  mb86a20s: fix the locking logic
  ovl: copy_up_xattr(): use strnlen
  ovl: Fix info leak in ovl_lookup_temp()
  fbdev/efifb: Fix 16 color palette entry calculation
  scsi: zfcp: spin_lock_irqsave() is not nestable
  zfcp: trace full payload of all SAN records (req,resp,iels)
  zfcp: fix payload trace length for SAN request&response
  zfcp: fix D_ID field with actual value on tracing SAN responses
  zfcp: restore tracing of handle for port and LUN with HBA records
  zfcp: trace on request for open and close of WKA port
  zfcp: restore: Dont use 0 to indicate invalid LUN in rec trace
  zfcp: retain trace level for SCSI and HBA FSF response records
  zfcp: close window with unblocked rport during rport gone
  zfcp: fix ELS/GS request&response length for hardware data router
  zfcp: fix fc_host port_type with NPIV
  ubi: Deal with interrupted erasures in WL
  powerpc/pseries: Fix stack corruption in htpe code
  powerpc/64: Fix incorrect return value from __copy_tofrom_user
  powerpc/powernv: Use CPU-endian PEST in pnv_pci_dump_p7ioc_diag_data()
  powerpc/powernv: Use CPU-endian hub diag-data type in pnv_eeh_get_and_dump_hub_diag()
  powerpc/powernv: Pass CPU-endian PE number to opal_pci_eeh_freeze_clear()
  powerpc/vdso64: Use double word compare on pointers
  dm crypt: fix crash on exit
  dm mpath: check if path's request_queue is dying in activate_path()
  dm: return correct error code in dm_resume()'s retry loop
  dm: mark request_queue dead before destroying the DM device
  perf intel-pt: Fix MTC timestamp calculation for large MTC periods
  perf intel-pt: Fix estimated timestamps for cycle-accurate mode
  perf intel-pt: Fix snapshot overlap detection decoder errors
  pstore/ram: Use memcpy_fromio() to save old buffer
  pstore/ram: Use memcpy_toio instead of memcpy
  pstore/core: drop cmpxchg based updates
  pstore/ramoops: fixup driver removal
  parisc: Increase initial kernel mapping size
  parisc: Fix kernel memory layout regarding position of __gp
  parisc: Increase KERNEL_INITIAL_SIZE for 32-bit SMP kernels
  cpufreq: intel_pstate: Fix unsafe HWP MSR access
  platform: don't return 0 from platform_get_irq[_byname]() on error
  PCI: Mark Atheros AR9580 to avoid bus reset
  mmc: sdhci: cast unsigned int to unsigned long long to avoid unexpeted error
  mmc: block: don't use CMD23 with very old MMC cards
  rtlwifi: Fix missing country code for Great Britain
  PM / devfreq: event: remove duplicate devfreq_event_get_drvdata()
  clk: imx6: initialize GPU clocks
  regulator: tps65910: Work around silicon erratum SWCZ010
  mei: me: add kaby point device ids
  gpio: mpc8xxx: Correct irq handler function
  cgroup: Change from CAP_SYS_NICE to CAP_SYS_RESOURCE for cgroup migration permissions
  UPSTREAM: cpu/hotplug: Handle unbalanced hotplug enable/disable
  UPSTREAM: arm64: kaslr: fix breakage with CONFIG_MODVERSIONS=y
  UPSTREAM: arm64: kaslr: keep modules close to the kernel when DYNAMIC_FTRACE=y
  cgroup: Remove leftover instances of allow_attach
  BACKPORT: lib: harden strncpy_from_user
  CHROMIUM: cgroups: relax permissions on moving tasks between cgroups
  CHROMIUM: remove Android's cgroup generic permissions checks
  Linux 4.4.27
  cfq: fix starvation of asynchronous writes
  vfs: move permission checking into notify_change() for utimes(NULL)
  dlm: free workqueues after the connections
  crypto: vmx - Fix memory corruption caused by p8_ghash
  crypto: ghash-generic - move common definitions to a new header file
  ext4: release bh in make_indexed_dir
  ext4: allow DAX writeback for hole punch
  ext4: fix memory leak in ext4_insert_range()
  ext4: reinforce check of i_dtime when clearing high fields of uid and gid
  ext4: enforce online defrag restriction for encrypted files
  scsi: ibmvfc: Fix I/O hang when port is not mapped
  scsi: arcmsr: Simplify user_len checking
  scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
  async_pq_val: fix DMA memory leak
  reiserfs: switch to generic_{get,set,remove}xattr()
  reiserfs: Unlock superblock before calling reiserfs_quota_on_mount()
  ASoC: Intel: Atom: add a missing star in a memcpy call
  brcmfmac: fix memory leak in brcmf_fill_bss_param
  i40e: avoid NULL pointer dereference and recursive errors on early PCI error
  fuse: fix killing s[ug]id in setattr
  fuse: invalidate dir dentry after chmod
  fuse: listxattr: verify xattr list
  drivers: base: dma-mapping: page align the size when unmap_kernel_range
  btrfs: assign error values to the correct bio structs
  serial: 8250_dw: Check the data->pclk when get apb_pclk
  arm64: Use PoU cache instr for I/D coherency
  arm64: mm: add code to safely replace TTBR1_EL1
  arm64: mm: place __cpu_setup in .text
  arm64: add function to install the idmap
  arm64: unmap idmap earlier
  arm64: unify idmap removal
  arm64: mm: place empty_zero_page in bss
  arm64: head.S: use memset to clear BSS
  arm64: mm: specialise pagetable allocators
  arm64: mm: remove pointless PAGE_MASKing
  asm-generic: Fix local variable shadow in __set_fixmap_offset
  arm64: mm: fold alternatives into .init
  ARM: 8511/1: ARM64: kernel: PSCI: move PSCI idle management code to drivers/firmware
  ARM: 8481/2: drivers: psci: replace psci firmware calls
  ARM: 8480/2: arm64: add implementation for arm-smccc
  ARM: 8479/2: add implementation for arm-smccc
  ARM: 8478/2: arm/arm64: add arm-smccc
  ARM: 8510/1: rework ARM_CPU_SUSPEND dependencies
  ARM: 8458/1: bL_switcher: add GIC dependency
  Linux 4.4.26
  mm: remove gup_flags FOLL_WRITE games from __get_user_pages()
  x86/build: Build compressed x86 kernels as PIE
  arm64: Remove stack duplicating code from jprobes
  arm64: kprobes: Add KASAN instrumentation around stack accesses
  arm64: kprobes: Cleanup jprobe_return
  arm64: kprobes: Fix overflow when saving stack
  arm64: kprobes: WARN if attempting to step with PSTATE.D=1
  kprobes: Add arm64 case in kprobe example module
  arm64: Add kernel return probes support (kretprobes)
  arm64: Add trampoline code for kretprobes
  arm64: kprobes instruction simulation support
  arm64: Treat all entry code as non-kprobe-able
  arm64: Blacklist non-kprobe-able symbol
  arm64: Kprobes with single stepping support
  arm64: add conditional instruction simulation support
  arm64: Add more test functions to insn.c
  arm64: Add HAVE_REGS_AND_STACK_ACCESS_API feature
  Linux 4.4.25
  tpm_crb: fix crb_req_canceled behavior
  tpm: fix a race condition in tpm2_unseal_trusted()
  ima: use file_dentry()
  ARM: cpuidle: Fix error return code
  ARM: dts: MSM8064 remove flags from SPMI/MPP IRQs
  ARM: dts: mvebu: armada-390: add missing compatibility string and bracket
  x86/dumpstack: Fix x86_32 kernel_stack_pointer() previous stack access
  x86/irq: Prevent force migration of irqs which are not in the vector domain
  x86/boot: Fix kdump, cleanup aborted E820_PRAM max_pfn manipulation
  KVM: PPC: BookE: Fix a sanity check
  KVM: MIPS: Drop other CPU ASIDs on guest MMU changes
  KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register
  mfd: wm8350-i2c: Make sure the i2c regmap functions are compiled
  mfd: 88pm80x: Double shifting bug in suspend/resume
  mfd: atmel-hlcdc: Do not sleep in atomic context
  mfd: rtsx_usb: Avoid setting ucr->current_sg.status
  ALSA: usb-line6: use the same declaration as definition in header for MIDI manufacturer ID
  ALSA: usb-audio: Extend DragonFly dB scale quirk to cover other variants
  ALSA: ali5451: Fix out-of-bound position reporting
  timekeeping: Fix __ktime_get_fast_ns() regression
  time: Add cycles to nanoseconds translation
  mm: Fix build for hardened usercopy
  ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct
  ANDROID: binder: Add strong ref checks
  UPSTREAM: staging/android/ion : fix a race condition in the ion driver
  ANDROID: android-base: CONFIG_HARDENED_USERCOPY=y
  UPSTREAM: fs/proc/kcore.c: Add bounce buffer for ktext data
  UPSTREAM: fs/proc/kcore.c: Make bounce buffer global for read
  BACKPORT: arm64: Correctly bounds check virt_addr_valid
  Fix a build breakage in IO latency hist code.
  UPSTREAM: efi: include asm/early_ioremap.h not asm/efi.h to get early_memremap
  UPSTREAM: ia64: split off early_ioremap() declarations into asm/early_ioremap.h
  FROMLIST: arm64: Enable CONFIG_ARM64_SW_TTBR0_PAN
  FROMLIST: arm64: xen: Enable user access before a privcmd hvc call
  FROMLIST: arm64: Handle faults caused by inadvertent user access with PAN enabled
  FROMLIST: arm64: Disable TTBR0_EL1 during normal kernel execution
  FROMLIST: arm64: Introduce uaccess_{disable,enable} functionality based on TTBR0_EL1
  FROMLIST: arm64: Factor out TTBR0_EL1 post-update workaround into a specific asm macro
  FROMLIST: arm64: Factor out PAN enabling/disabling into separate uaccess_* macros
  UPSTREAM: arm64: Handle el1 synchronous instruction aborts cleanly
  UPSTREAM: arm64: include alternative handling in dcache_by_line_op
  UPSTREAM: arm64: fix "dc cvau" cache operation on errata-affected core
  UPSTREAM: Revert "arm64: alternatives: add enable parameter to conditional asm macros"
  UPSTREAM: arm64: Add new asm macro copy_page
  UPSTREAM: arm64: kill ESR_LNX_EXEC
  UPSTREAM: arm64: add macro to extract ESR_ELx.EC
  UPSTREAM: arm64: mm: mark fault_info table const
  UPSTREAM: arm64: fix dump_instr when PAN and UAO are in use
  BACKPORT: arm64: Fold proc-macros.S into assembler.h
  UPSTREAM: arm64: choose memstart_addr based on minimum sparsemem section alignment
  UPSTREAM: arm64/mm: ensure memstart_addr remains sufficiently aligned
  UPSTREAM: arm64/kernel: fix incorrect EL0 check in inv_entry macro
  UPSTREAM: arm64: Add macros to read/write system registers
  UPSTREAM: arm64/efi: refactor EFI init and runtime code for reuse by 32-bit ARM
  UPSTREAM: arm64/efi: split off EFI init and runtime code for reuse by 32-bit ARM
  UPSTREAM: arm64/efi: mark UEFI reserved regions as MEMBLOCK_NOMAP
  BACKPORT: arm64: only consider memblocks with NOMAP cleared for linear mapping
  UPSTREAM: mm/memblock: add MEMBLOCK_NOMAP attribute to memblock memory table
  ANDROID: dm: android-verity: Remove fec_header location constraint
  BACKPORT: audit: consistently record PIDs with task_tgid_nr()
  android-base.cfg: Enable kernel ASLR
  UPSTREAM: vmlinux.lds.h: allow arch specific handling of ro_after_init data section
  UPSTREAM: arm64: spinlock: fix spin_unlock_wait for LSE atomics
  UPSTREAM: arm64: avoid TLB conflict with CONFIG_RANDOMIZE_BASE
  UPSTREAM: arm64: Only select ARM64_MODULE_PLTS if MODULES=y
  sched: Add Kconfig option DEFAULT_USE_ENERGY_AWARE to set ENERGY_AWARE feature flag
  sched/fair: remove printk while schedule is in progress
  ANDROID: fs: FS tracepoints to track IO.
  sched/walt: Drop arch-specific timer access
  ANDROID: fiq_debugger: Pass task parameter to unwind_frame()
  eas/sched/fair: Fixing comments in find_best_target.
  input: keyreset: switch to orderly_reboot
  UPSTREAM: tun: fix transmit timestamp support
  UPSTREAM: arch/arm/include/asm/pgtable-3level.h: add pmd_mkclean for THP
  net: inet: diag: expose the socket mark to privileged processes.
  net: diag: make udp_diag_destroy work for mapped addresses.
  net: diag: support SOCK_DESTROY for UDP sockets
  net: diag: allow socket bytecode filters to match socket marks
  net: diag: slightly refactor the inet_diag_bc_audit error checks.
  net: diag: Add support to filter on device index
  UPSTREAM: brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
  Linux 4.4.24
  ALSA: hda - Add the top speaker pin config for HP Spectre x360
  ALSA: hda - Fix headset mic detection problem for several Dell laptops
  ACPICA: acpi_get_sleep_type_data: Reduce warnings
  ALSA: hda - Adding one more ALC255 pin definition for headset problem
  Revert "usbtmc: convert to devm_kzalloc"
  USB: serial: cp210x: Add ID for a Juniper console
  Staging: fbtft: Fix bug in fbtft-core
  usb: misc: legousbtower: Fix NULL pointer deference
  USB: serial: cp210x: fix hardware flow-control disable
  dm log writes: fix bug with too large bios
  clk: xgene: Add missing parenthesis when clearing divider value
  aio: mark AIO pseudo-fs noexec
  batman-adv: remove unused callback from batadv_algo_ops struct
  IB/mlx4: Use correct subnet-prefix in QP1 mads under SR-IOV
  IB/mlx4: Fix code indentation in QP1 MAD flow
  IB/mlx4: Fix incorrect MC join state bit-masking on SR-IOV
  IB/ipoib: Don't allow MC joins during light MC flush
  IB/core: Fix use after free in send_leave function
  IB/ipoib: Fix memory corruption in ipoib cm mode connect flow
  KVM: nVMX: postpone VMCS changes on MSR_IA32_APICBASE write
  dmaengine: at_xdmac: fix to pass correct device identity to free_irq()
  kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd
  ASoC: omap-mcpdm: Fix irq resource handling
  sysctl: handle error writing UINT_MAX to u32 fields
  powerpc/prom: Fix sub-processor option passed to ibm, client-architecture-support
  brcmsmac: Initialize power in brcms_c_stf_ss_algo_channel_get()
  brcmsmac: Free packet if dma_mapping_error() fails in dma_rxfill
  brcmfmac: Fix glob_skb leak in brcmf_sdiod_recv_chain
  ASoC: Intel: Skylake: Fix error return code in skl_probe()
  pNFS/flexfiles: Fix layoutcommit after a commit to DS
  pNFS/files: Fix layoutcommit after a commit to DS
  NFS: Don't drop CB requests with invalid principals
  svc: Avoid garbage replies when pc_func() returns rpc_drop_reply
  dmaengine: at_xdmac: fix debug string
  fnic: pci_dma_mapping_error() doesn't return an error code
  avr32: off by one in at32_init_pio()
  ath9k: Fix programming of minCCA power threshold
  gspca: avoid unused variable warnings
  em28xx-i2c: rt_mutex_trylock() returns zero on failure
  NFC: fdp: Detect errors from fdp_nci_create_conn()
  iwlmvm: mvm: set correct state in smart-fifo configuration
  tile: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO
  pstore: drop file opened reference count
  blk-mq: actually hook up defer list when running requests
  hwrng: omap - Fix assumption that runtime_get_sync will always succeed
  ARM: sa1111: fix pcmcia suspend/resume
  ARM: shmobile: fix regulator quirk for Gen2
  ARM: sa1100: clear reset status prior to reboot
  ARM: sa1100: fix 3.6864MHz clock
  ARM: sa1100: register clocks early
  ARM: sun5i: Fix typo in trip point temperature
  regulator: qcom_smd: Fix voltage ranges for pm8x41
  regulator: qcom_spmi: Update mvs1/mvs2 switches on pm8941
  regulator: qcom_spmi: Add support for get_mode/set_mode on switches
  regulator: qcom_spmi: Add support for S4 supply on pm8941
  tpm: fix byte-order for the value read by tpm2_get_tpm_pt
  printk: fix parsing of "brl=" option
  MIPS: uprobes: fix use of uninitialised variable
  MIPS: Malta: Fix IOCU disable switch read for MIPS64
  MIPS: fix uretprobe implementation
  MIPS: uprobes: remove incorrect set_orig_insn
  arm64: debug: avoid resetting stepping state machine when TIF_SINGLESTEP
  ARM: 8618/1: decompressor: reset ttbcr fields to use TTBR0 on ARMv7
  irqchip/gicv3: Silence noisy DEBUG_PER_CPU_MAPS warning
  gpio: sa1100: fix irq probing for ucb1x00
  usb: gadget: fsl_qe_udc: signedness bug in qe_get_frame()
  ceph: fix race during filling readdir cache
  iwlwifi: mvm: don't use ret when not initialised
  iwlwifi: pcie: fix access to scratch buffer
  spi: sh-msiof: Avoid invalid clock generator parameters
  hwmon: (adt7411) set bit 3 in CFG1 register
  nvmem: Declare nvmem_cell_read() consistently
  ipvs: fix bind to link-local mcast IPv6 address in backup
  tools/vm/slabinfo: fix an unintentional printf
  mmc: pxamci: fix potential oops
  drivers/perf: arm_pmu: Fix leak in error path
  pinctrl: Flag strict is a field in struct pinmux_ops
  pinctrl: uniphier: fix .pin_dbg_show() callback
  i40e: avoid null pointer dereference
  perf/core: Fix pmu::filter_match for SW-led groups
  iwlwifi: mvm: fix a few firmware capability checks
  usb: musb: fix DMA for host mode
  usb: musb: Fix DMA desired mode for Mentor DMA engine
  ARM: 8617/1: dma: fix dma_max_pfn()
  ARM: 8616/1: dt: Respect property size when parsing CPUs
  drm/radeon/si/dpm: add workaround for for Jet parts
  drm/nouveau/fifo/nv04: avoid ramht race against cookie insertion
  x86/boot: Initialize FPU and X86_FEATURE_ALWAYS even if we don't have CPUID
  x86/init: Fix cr4_init_shadow() on CR4-less machines
  can: dev: fix deadlock reported after bus-off
  mm,ksm: fix endless looping in allocating memory when ksm enable
  mtd: nand: davinci: Reinitialize the HW ECC engine in 4bit hwctl
  cpuset: handle race between CPU hotplug and cpuset_hotplug_work
  usercopy: fold builtin_const check into inline function
  Linux 4.4.23
  hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common()
  qxl: check for kmap failures
  power: supply: max17042_battery: fix model download bug.
  power_supply: tps65217-charger: fix missing platform_set_drvdata()
  PM / hibernate: Fix rtree_next_node() to avoid walking off list ends
  PM / hibernate: Restore processor state before using per-CPU variables
  MIPS: paravirt: Fix undefined reference to smp_bootstrap
  MIPS: Add a missing ".set pop" in an early commit
  MIPS: Avoid a BUG warning during prctl(PR_SET_FP_MODE, ...)
  MIPS: Remove compact branch policy Kconfig entries
  MIPS: vDSO: Fix Malta EVA mapping to vDSO page structs
  MIPS: SMP: Fix possibility of deadlock when bringing CPUs online
  MIPS: Fix pre-r6 emulation FPU initialisation
  i2c: qup: skip qup_i2c_suspend if the device is already runtime suspended
  i2c-eg20t: fix race between i2c init and interrupt enable
  btrfs: ensure that file descriptor used with subvol ioctls is a dir
  nl80211: validate number of probe response CSA counters
  can: flexcan: fix resume function
  mm: delete unnecessary and unsafe init_tlb_ubc()
  tracing: Move mutex to protect against resetting of seq data
  fix memory leaks in tracing_buffers_splice_read()
  power: reset: hisi-reboot: Unmap region obtained by of_iomap
  mtd: pmcmsp-flash: Allocating too much in init_msp_flash()
  mtd: maps: sa1100-flash: potential NULL dereference
  fix fault_in_multipages_...() on architectures with no-op access_ok()
  fanotify: fix list corruption in fanotify_get_response()
  fsnotify: add a way to stop queueing events on group shutdown
  xfs: prevent dropping ioend completions during buftarg wait
  autofs: use dentry flags to block walks during expire
  autofs races
  pwm: Mark all devices as "might sleep"
  bridge: re-introduce 'fix parsing of MLDv2 reports'
  net: smc91x: fix SMC accesses
  Revert "phy: IRQ cannot be shared"
  net: dsa: bcm_sf2: Fix race condition while unmasking interrupts
  net/mlx5: Added missing check of msg length in verifying its signature
  tipc: fix NULL pointer dereference in shutdown()
  net/irda: handle iriap_register_lsap() allocation failure
  vti: flush x-netns xfrm cache when vti interface is removed
  af_unix: split 'u->readlock' into two: 'iolock' and 'bindlock'
  Revert "af_unix: Fix splice-bind deadlock"
  bonding: Fix bonding crash
  megaraid: fix null pointer check in megasas_detach_one().
  nouveau: fix nv40_perfctr_next() cleanup regression
  Staging: iio: adc: fix indent on break statement
  iwlegacy: avoid warning about missing braces
  ath9k: fix misleading indentation
  am437x-vfpe: fix typo in vpfe_get_app_input_index
  Add braces to avoid "ambiguous ‘else’" compiler warnings
  net: caif: fix misleading indentation
  Makefile: Mute warning for __builtin_return_address(>0) for tracing only
  Disable "frame-address" warning
  Disable "maybe-uninitialized" warning globally
  gcov: disable -Wmaybe-uninitialized warning
  Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES
  kbuild: forbid kernel directory to contain spaces and colons
  tools: Support relative directory path for 'O='
  Makefile: revert "Makefile: Document ability to make file.lst and file.S" partially
  kbuild: Do not run modules_install and install in paralel
  ocfs2: fix start offset to ocfs2_zero_range_for_truncate()
  ocfs2/dlm: fix race between convert and migration
  crypto: echainiv - Replace chaining with multiplication
  crypto: skcipher - Fix blkcipher walk OOM crash
  crypto: arm/aes-ctr - fix NULL dereference in tail processing
  crypto: arm64/aes-ctr - fix NULL dereference in tail processing
  tcp: properly scale window in tcp_v[46]_reqsk_send_ack()
  tcp: fix use after free in tcp_xmit_retransmit_queue()
  tcp: cwnd does not increase in TCP YeAH
  ipv6: release dst in ping_v6_sendmsg
  ipv4: panic in leaf_walk_rcu due to stale node pointer
  reiserfs: fix "new_insert_key may be used uninitialized ..."
  Fix build warning in kernel/cpuset.c
  include/linux/kernel.h: change abs() macro so it uses consistent return type
  Linux 4.4.22
  openrisc: fix the fix of copy_from_user()
  avr32: fix 'undefined reference to `___copy_from_user'
  ia64: copy_from_user() should zero the destination on access_ok() failure
  genirq/msi: Fix broken debug output
  ppc32: fix copy_from_user()
  sparc32: fix copy_from_user()
  mn10300: copy_from_user() should zero on access_ok() failure...
  nios2: copy_from_user() should zero the tail of destination
  openrisc: fix copy_from_user()
  parisc: fix copy_from_user()
  metag: copy_from_user() should zero the destination on access_ok() failure
  alpha: fix copy_from_user()
  asm-generic: make copy_from_user() zero the destination properly
  mips: copy_from_user() must zero the destination on access_ok() failure
  hexagon: fix strncpy_from_user() error return
  sh: fix copy_from_user()
  score: fix copy_from_user() and friends
  blackfin: fix copy_from_user()
  cris: buggered copy_from_user/copy_to_user/clear_user
  frv: fix clear_user()
  asm-generic: make get_user() clear the destination on errors
  ARC: uaccess: get_user to zero out dest in cause of fault
  s390: get_user() should zero on failure
  score: fix __get_user/get_user
  nios2: fix __get_user()
  sh64: failing __get_user() should zero
  m32r: fix __get_user()
  mn10300: failing __get_user() and get_user() should zero
  fix minor infoleak in get_user_ex()
  microblaze: fix copy_from_user()
  avr32: fix copy_from_user()
  microblaze: fix __get_user()
  fix iov_iter_fault_in_readable()
  irqchip/atmel-aic: Fix potential deadlock in ->xlate()
  genirq: Provide irq_gc_{lock_irqsave,unlock_irqrestore}() helpers
  drm: Only use compat ioctl for addfb2 on X86/IA64
  drm: atmel-hlcdc: Fix vertical scaling
  net: simplify napi_synchronize() to avoid warnings
  kconfig: tinyconfig: provide whole choice blocks to avoid warnings
  soc: qcom/spm: shut up uninitialized variable warning
  pinctrl: at91-pio4: use %pr format string for resource
  mmc: dw_mmc: use resource_size_t to store physical address
  drm/i915: Avoid pointer arithmetic in calculating plane surface offset
  mpssd: fix buffer overflow warning
  gma500: remove annoying deprecation warning
  ipv6: addrconf: fix dev refcont leak when DAD failed
  sched/core: Fix a race between try_to_wake_up() and a woken up task
  Revert "wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel"
  ath9k: fix using sta->drv_priv before initializing it
  md-cluster: make md-cluster also can work when compiled into kernel
  xhci: fix null pointer dereference in stop command timeout function
  fuse: direct-io: don't dirty ITER_BVEC pages
  Btrfs: remove root_log_ctx from ctx list before btrfs_sync_log returns
  crypto: cryptd - initialize child shash_desc on import
  arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()
  pinctrl: sunxi: fix uart1 CTS/RTS pins at PG on A23/A33
  pinctrl: pistachio: fix mfio pll_lock pinmux
  dm crypt: fix error with too large bios
  dm log writes: move IO accounting earlier to fix error path
  dm log writes: fix check of kthread_run() return value
  bus: arm-ccn: Fix XP watchpoint settings bitmask
  bus: arm-ccn: Do not attempt to configure XPs for cycle counter
  bus: arm-ccn: Fix PMU handling of MN
  ARM: dts: STiH407-family: Provide interconnect clock for consumption in ST SDHCI
  ARM: dts: overo: fix gpmc nand on boards with ethernet
  ARM: dts: overo: fix gpmc nand cs0 range
  ARM: dts: imx6qdl: Fix SPDIF regression
  ARM: OMAP3: hwmod data: Add sysc information for DSI
  ARM: kirkwood: ib62x0: fix size of u-boot environment partition
  ARM: imx6: add missing BM_CLPCR_BYPASS_PMIC_READY setting for imx6sx
  ARM: imx6: add missing BM_CLPCR_BYP_MMDC_CH0_LPM_HS setting for imx6ul
  ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
  cpuset: make sure new tasks conform to the current config of the cpuset
  net: thunderx: Fix OOPs with ethtool --register-dump
  USB: change bInterval default to 10 ms
  ARM: dts: STiH410: Handle interconnect clock required by EHCI/OHCI (USB)
  usb: chipidea: udc: fix NULL ptr dereference in isr_setup_status_phase
  usb: renesas_usbhs: fix clearing the {BRDY,BEMP}STS condition
  USB: serial: simple: add support for another Infineon flashloader
  serial: 8250: added acces i/o products quad and octal serial cards
  serial: 8250_mid: fix divide error bug if baud rate is 0
  iio: ensure ret is initialized to zero before entering do loop
  iio:core: fix IIO_VAL_FRACTIONAL sign handling
  iio: accel: kxsd9: Fix scaling bug
  iio: fix pressure data output unit in hid-sensor-attributes
  iio: accel: bmc150: reset chip at init time
  iio: adc: at91: unbreak channel adc channel 3
  iio: ad799x: Fix buffered capture for ad7991/ad7995/ad7999
  iio: adc: ti_am335x_adc: Increase timeout value waiting for ADC sample
  iio: adc: ti_am335x_adc: Protect FIFO1 from concurrent access
  iio: adc: rockchip_saradc: reset saradc controller before programming it
  iio: proximity: as3935: set up buffer timestamps for non-zero values
  iio: accel: kxsd9: Fix raw read return
  kvm-arm: Unmap shadow pagetables properly
  x86/AMD: Apply erratum 665 on machines without a BIOS fix
  x86/paravirt: Do not trace _paravirt_ident_*() functions
  ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS
  IB/uverbs: Fix race between uverbs_close and remove_one
  dm flakey: fix reads to be issued if drop_writes configured
  audit: fix exe_file access in audit_exe_compare
  mm: introduce get_task_exe_file
  kexec: fix double-free when failing to relocate the purgatory
  NFSv4.1: Fix the CREATE_SESSION slot number accounting
  pNFS: Ensure LAYOUTGET and LAYOUTRETURN are properly serialised
  nfsd: Close race between nfsd4_release_lockowner and nfsd4_lock
  NFSv4.x: Fix a refcount leak in nfs_callback_up_net
  pNFS: The client must not do I/O to the DS if it's lease has expired
  kernfs: don't depend on d_find_any_alias() when generating notifications
  powerpc/mm: Don't alias user region to other regions below PAGE_OFFSET
  powerpc/powernv : Drop reference added by kset_find_obj()
  powerpc/tm: do not use r13 for tabort_syscall
  tipc: move linearization of buffers to generic code
  lightnvm: put bio before return
  fscrypto: require write access to mount to set encryption policy
  Revert "KVM: x86: fix missed hardware breakpoints"
  MIPS: KVM: Check for pfn noslot case
  clocksource/drivers/sun4i: Clear interrupts after stopping timer in probe function
  fscrypto: add authorization check for setting encryption policy
  ext4: use __GFP_NOFAIL in ext4_free_blocks()

Conflicts:
	arch/arm/kernel/devtree.c
	arch/arm64/Kconfig
	arch/arm64/kernel/arm64ksyms.c
	arch/arm64/kernel/psci.c
	arch/arm64/mm/fault.c
	drivers/android/binder.c
	drivers/usb/host/xhci-hub.c
	fs/ext4/readpage.c
	include/linux/mmc/core.h
	include/linux/mmzone.h
	mm/memcontrol.c
	net/core/filter.c
	net/netlink/af_netlink.c
	net/netlink/af_netlink.h

Change-Id: I99fe7a0914e83e284b11b33185b71448a8999d1f
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2017-02-28 17:10:49 -08:00
Thierry Strudel
05df0a9e71 Merge branch 'android-msm-8998-4.4-common' into android-msm-muskie-4.4
Merging release LA.UM.5.7.R1.07.01.01.253.064 Pre-CS4 0.0.091.1

Bug: 34911851
Change-Id: Iaaf2a1402940c98a3b36457b5fb99059f4a718f8
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2017-02-09 18:08:53 -08:00
Runmin Wang
778031ccb5 genirq: Add IRQ_AFFINITY_MANAGED flag
Add IRQ_AFFINITY_MANAGED flag and related kernel APIs so that
kernel driver can modify an irq's status in such a way that
user space affinity change will be ignored. Kernel space's
affinity setting will not be changed.

Change-Id: Ib2d5ea651263bff4317562af69079ad950c9e71e
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2017-01-23 16:01:01 -08:00
Thomas Gleixner
1cc869442a genirq: Introduce IRQD_AFFINITY_MANAGED flag
Interupts marked with this flag are excluded from user space interrupt
affinity changes. Contrary to the IRQ_NO_BALANCING flag, the kernel internal
affinity mechanism is not blocked.

This flag will be used for multi-queue device interrupts.

Change-Id: I204c49bb1c8ce87fbcd163119093163b120bfe83
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: linux-block@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Cc: linux-nvme@lists.infradead.org
Cc: axboe@fb.com
Cc: agordeev@redhat.com
Link: http://lkml.kernel.org/r/1467621574-8277-3-git-send-email-hch@lst.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Git-commit: 9c2555835bb3d34dfac52a0be943dcc4bedd650f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[runminw@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2017-01-23 11:23:37 -08:00
Runmin Wang
efbe378b81 Merge branch 'v4.4-16.09-android-tmp' into lsk-v4.4-16.09-android
* v4.4-16.09-android-tmp:
  unsafe_[get|put]_user: change interface to use a error target label
  usercopy: remove page-spanning test for now
  usercopy: fix overlap check for kernel text
  mm/slub: support left redzone
  Linux 4.4.21
  lib/mpi: mpi_write_sgl(): fix skipping of leading zero limbs
  regulator: anatop: allow regulator to be in bypass mode
  hwrng: exynos - Disable runtime PM on probe failure
  cpufreq: Fix GOV_LIMITS handling for the userspace governor
  metag: Fix atomic_*_return inline asm constraints
  scsi: fix upper bounds check of sense key in scsi_sense_key_string()
  ALSA: timer: fix NULL pointer dereference on memory allocation failure
  ALSA: timer: fix division by zero after SNDRV_TIMER_IOCTL_CONTINUE
  ALSA: timer: fix NULL pointer dereference in read()/ioctl() race
  ALSA: hda - Enable subwoofer on Dell Inspiron 7559
  ALSA: hda - Add headset mic quirk for Dell Inspiron 5468
  ALSA: rawmidi: Fix possible deadlock with virmidi registration
  ALSA: fireworks: accessing to user space outside spinlock
  ALSA: firewire-tascam: accessing to user space outside spinlock
  ALSA: usb-audio: Add sample rate inquiry quirk for B850V3 CP2114
  crypto: caam - fix IV loading for authenc (giv)decryption
  uprobes: Fix the memcg accounting
  x86/apic: Do not init irq remapping if ioapic is disabled
  vhost/scsi: fix reuse of &vq->iov[out] in response
  bcache: RESERVE_PRIO is too small by one when prio_buckets() is a power of two.
  ubifs: Fix assertion in layout_in_gaps()
  ovl: fix workdir creation
  ovl: listxattr: use strnlen()
  ovl: remove posix_acl_default from workdir
  ovl: don't copy up opaqueness
  wrappers for ->i_mutex access
  lustre: remove unused declaration
  timekeeping: Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING
  timekeeping: Cap array access in timekeeping_debug
  xfs: fix superblock inprogress check
  ASoC: atmel_ssc_dai: Don't unconditionally reset SSC on stream startup
  drm/msm: fix use of copy_from_user() while holding spinlock
  drm: Reject page_flip for !DRIVER_MODESET
  drm/radeon: fix radeon_move_blit on 32bit systems
  s390/sclp_ctl: fix potential information leak with /dev/sclp
  rds: fix an infoleak in rds_inc_info_copy
  powerpc/tm: Avoid SLB faults in treclaim/trecheckpoint when RI=0
  nvme: Call pci_disable_device on the error path.
  cgroup: reduce read locked section of cgroup_threadgroup_rwsem during fork
  block: make sure a big bio is split into at most 256 bvecs
  block: Fix race triggered by blk_set_queue_dying()
  ext4: avoid modifying checksum fields directly during checksum verification
  ext4: avoid deadlock when expanding inode size
  ext4: properly align shifted xattrs when expanding inodes
  ext4: fix xattr shifting when expanding inodes part 2
  ext4: fix xattr shifting when expanding inodes
  ext4: validate that metadata blocks do not overlap superblock
  net: Use ns_capable_noaudit() when determining net sysctl permissions
  kernel: Add noaudit variant of ns_capable()
  KEYS: Fix ASN.1 indefinite length object parsing
  drivers:hv: Lock access to hyperv_mmio resource tree
  cxlflash: Move to exponential back-off when cmd_room is not available
  netfilter: x_tables: check for size overflow
  drm/amdgpu/cz: enable/disable vce dpm even if vce pg is disabled
  cred: Reject inodes with invalid ids in set_create_file_as()
  fs: Check for invalid i_uid in may_follow_link()
  IB/IPoIB: Do not set skb truesize since using one linearskb
  udp: properly support MSG_PEEK with truncated buffers
  crypto: nx-842 - Mask XERS0 bit in return value
  cxlflash: Fix to avoid virtual LUN failover failure
  cxlflash: Fix to escalate LINK_RESET also on port 1
  tipc: fix nl compat regression for link statistics
  tipc: fix an infoleak in tipc_nl_compat_link_dump
  netfilter: x_tables: check for size overflow
  Bluetooth: Add support for Intel Bluetooth device 8265 [8087:0a2b]
  drm/i915: Check VBT for port presence in addition to the strap on VLV/CHV
  drm/i915: Only ignore eDP ports that are connected
  Input: xpad - move pending clear to the correct location
  net: thunderx: Fix link status reporting
  x86/hyperv: Avoid reporting bogus NMI status for Gen2 instances
  crypto: vmx - IV size failing on skcipher API
  tda10071: Fix dependency to REGMAP_I2C
  crypto: vmx - Fix ABI detection
  crypto: vmx - comply with ABIs that specify vrsave as reserved.
  HID: core: prevent out-of-bound readings
  lpfc: Fix DMA faults observed upon plugging loopback connector
  block: fix blk_rq_get_max_sectors for driver private requests
  irqchip/gicv3-its: numa: Enable workaround for Cavium thunderx erratum 23144
  clocksource: Allow unregistering the watchdog
  btrfs: Continue write in case of can_not_nocow
  blk-mq: End unstarted requests on dying queue
  cxlflash: Fix to resolve dead-lock during EEH recovery
  drm/radeon/mst: fix regression in lane/link handling.
  ecryptfs: fix handling of directory opening
  ALSA: hda: add AMD Polaris-10/11 AZ PCI IDs with proper driver caps
  drm: Balance error path for GEM handle allocation
  ntp: Fix ADJ_SETOFFSET being used w/ ADJ_NANO
  time: Verify time values in adjtimex ADJ_SETOFFSET to avoid overflow
  Input: xpad - correctly handle concurrent LED and FF requests
  net: thunderx: Fix receive packet stats
  net: thunderx: Fix for multiqset not configured upon interface toggle
  perf/x86/cqm: Fix CQM memory leak and notifier leak
  perf/x86/cqm: Fix CQM handling of grouping events into a cache_group
  s390/crypto: provide correct file mode at device register.
  proc: revert /proc/<pid>/maps [stack:TID] annotation
  intel_idle: Support for Intel Xeon Phi Processor x200 Product Family
  cxlflash: Fix to avoid unnecessary scan with internal LUNs
  Drivers: hv: vmbus: don't manipulate with clocksources on crash
  Drivers: hv: vmbus: avoid scheduling in interrupt context in vmbus_initiate_unload()
  Drivers: hv: vmbus: avoid infinite loop in init_vp_index()
  arcmsr: fixes not release allocated resource
  arcmsr: fixed getting wrong configuration data
  s390/pci_dma: fix DMA table corruption with > 4 TB main memory
  net/mlx5e: Don't modify CQ before it was created
  net/mlx5e: Don't try to modify CQ moderation if it is not supported
  mmc: sdhci: Do not BUG on invalid vdd
  UVC: Add support for R200 depth camera
  sched/numa: Fix use-after-free bug in the task_numa_compare
  ALSA: hda - add codec support for Kabylake display audio codec
  drm/i915: Fix hpd live status bits for g4x
  tipc: fix nullptr crash during subscription cancel
  arm64: Add workaround for Cavium erratum 27456
  net: thunderx: Fix for Qset error due to CQ full
  drm/radeon: fix dp link rate selection (v2)
  drm/amdgpu: fix dp link rate selection (v2)
  qla2xxx: Use ATIO type to send correct tmr response
  mmc: sdhci: 64-bit DMA actually has 4-byte alignment
  drm/atomic: Do not unset crtc when an encoder is stolen
  drm/i915/skl: Add missing SKL ids
  drm/i915/bxt: update list of PCIIDs
  hrtimer: Catch illegal clockids
  i40e/i40evf: Fix RSS rx-flow-hash configuration through ethtool
  mpt3sas: Fix for Asynchronous completion of timedout IO and task abort of timedout IO.
  mpt3sas: A correction in unmap_resources
  net: cavium: liquidio: fix check for in progress flag
  arm64: KVM: Configure TCR_EL2.PS at runtime
  irqchip/gic-v3: Make sure read from ICC_IAR1_EL1 is visible on redestributor
  pwm: lpc32xx: fix and simplify duty cycle and period calculations
  pwm: lpc32xx: correct number of PWM channels from 2 to 1
  pwm: fsl-ftm: Fix clock enable/disable when using PM
  megaraid_sas: Add an i/o barrier
  megaraid_sas: Fix SMAP issue
  megaraid_sas: Do not allow PCI access during OCR
  s390/cio: update measurement characteristics
  s390/cio: ensure consistent measurement state
  s390/cio: fix measurement characteristics memleak
  qeth: initialize net_device with carrier off
  lpfc: Fix external loopback failure.
  lpfc: Fix mbox reuse in PLOGI completion
  lpfc: Fix RDP Speed reporting.
  lpfc: Fix crash in fcp command completion path.
  lpfc: Fix driver crash when module parameter lpfc_fcp_io_channel set to 16
  lpfc: Fix RegLogin failed error seen on Lancer FC during port bounce
  lpfc: Fix the FLOGI discovery logic to comply with T11 standards
  lpfc: Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get.
  cxl: Enable PCI device ID for future IBM CXL adapter
  cxl: fix build for GCC 4.6.x
  cxlflash: Enable device id for future IBM CXL adapter
  cxlflash: Resolve oops in wait_port_offline
  cxlflash: Fix to resolve cmd leak after host reset
  cxl: Fix DSI misses when the context owning task exits
  cxl: Fix possible idr warning when contexts are released
  Drivers: hv: vmbus: fix rescind-offer handling for device without a driver
  Drivers: hv: vmbus: serialize process_chn_event() and vmbus_close_internal()
  Drivers: hv: vss: run only on supported host versions
  drivers/hv: cleanup synic msrs if vmbus connect failed
  Drivers: hv: util: catch allocation errors
  tools: hv: report ENOSPC errors in hv_fcopy_daemon
  Drivers: hv: utils: run polling callback always in interrupt context
  Drivers: hv: util: Increase the timeout for util services
  lightnvm: fix missing grown bad block type
  lightnvm: fix locking and mempool in rrpc_lun_gc
  lightnvm: unlock rq and free ppa_list on submission fail
  lightnvm: add check after mempool allocation
  lightnvm: fix incorrect nr_free_blocks stat
  lightnvm: fix bio submission issue
  cxlflash: a couple off by one bugs
  fm10k: Cleanup exception handling for mailbox interrupt
  fm10k: Cleanup MSI-X interrupts in case of failure
  fm10k: reinitialize queuing scheme after calling init_hw
  fm10k: always check init_hw for errors
  fm10k: reset max_queues on init_hw_vf failure
  fm10k: Fix handling of NAPI budget when multiple queues are enabled per vector
  fm10k: Correct MTU for jumbo frames
  fm10k: do not assume VF always has 1 queue
  clk: xgene: Fix divider with non-zero shift value
  e1000e: fix division by zero on jumbo MTUs
  e1000: fix data race between tx_ring->next_to_clean
  ixgbe: Fix handling of NAPI budget when multiple queues are enabled per vector
  igb: fix NULL derefs due to skipped SR-IOV enabling
  igb: use the correct i210 register for EEMNGCTL
  igb: don't unmap NULL hw_addr
  i40e: Fix Rx hash reported to the stack by our driver
  i40e: clean whole mac filter list
  i40evf: check rings before freeing resources
  i40e: don't add zero MAC filter
  i40e: properly delete VF MAC filters
  i40e: Fix memory leaks, sideband filter programming
  i40e: fix: do not sleep in netdev_ops
  i40e/i40evf: Fix RS bit update in Tx path and disable force WB workaround
  i40evf: handle many MAC filters correctly
  i40e: Workaround fix for mss < 256 issue
  UPSTREAM: audit: fix a double fetch in audit_log_single_execve_arg()
  UPSTREAM: ARM: 8494/1: mm: Enable PXN when running non-LPAE kernel on LPAE processor
  FIXUP: sched/tune: update accouting before CPU capacity
  FIXUP: sched/tune: add fixes missing from a previous patch
  arm: Fix #if/#ifdef typo in topology.c
  arm: Fix build error "conflicting types for 'scale_cpu_capacity'"
  sched/walt: use do_div instead of division operator
  DEBUG: cpufreq: fix cpu_capacity tracing build for non-smp systems
  sched/walt: include missing header for arm_timer_read_counter()
  cpufreq: Kconfig: Fixup incorrect selection by CPU_FREQ_DEFAULT_GOV_SCHED
  sched/fair: Avoid redundant idle_cpu() call in update_sg_lb_stats()
  FIXUP: sched: scheduler-driven cpu frequency selection
  sched/rt: Add Kconfig option to enable panicking for RT throttling
  sched/rt: print RT tasks when RT throttling is activated
  UPSTREAM: sched: Fix a race between __kthread_bind() and sched_setaffinity()
  sched/fair: Favor higher cpus only for boosted tasks
  vmstat: make vmstat_updater deferrable again and shut down on idle
  sched/fair: call OPP update when going idle after migration
  sched/cpufreq_sched: fix thermal capping events
  sched/fair: Picking cpus with low OPPs for tasks that prefer idle CPUs
  FIXUP: sched/tune: do initialization as a postcore_initicall
  DEBUG: sched: add tracepoint for RD overutilized
  sched/tune: Introducing a new schedtune attribute prefer_idle
  sched: use util instead of capacity to select busy cpu
  arch_timer: add error handling when the MPM global timer is cleared
  FIXUP: sched: Fix double-release of spinlock in move_queued_task
  FIXUP: sched/fair: Fix hang during suspend in sched_group_energy
  FIXUP: sched: fix SchedFreq integration for both PELT and WALT
  sched: EAS: Avoid causing spikes to max-freq unnecessarily
  FIXUP: sched: fix set_cfs_cpu_capacity when WALT is in use
  sched/walt: Accounting for number of irqs pending on each core
  sched: Introduce Window Assisted Load Tracking (WALT)
  sched/tune: fix PB and PC cuts indexes definition
  sched/fair: optimize idle cpu selection for boosted tasks
  FIXUP: sched/tune: fix accounting for runnable tasks
  sched/tune: use a single initialisation function
  sched/{fair,tune}: simplify fair.c code
  FIXUP: sched/tune: fix payoff calculation for boost region
  sched/tune: Add support for negative boost values
  FIX: sched/tune: move schedtune_nornalize_energy into fair.c
  FIX: sched/tune: update usage of boosted task utilisation on CPU selection
  sched/fair: add tunable to set initial task load
  sched/fair: add tunable to force selection at cpu granularity
  sched: EAS: take cstate into account when selecting idle core
  sched/cpufreq_sched: Consolidated update
  FIXUP: sched: fix build for non-SMP target
  DEBUG: sched/tune: add tracepoint on P-E space filtering
  DEBUG: sched/tune: add tracepoint for energy_diff() values
  DEBUG: sched/tune: add tracepoint for task boost signal
  arm: topology: Define TC2 energy and provide it to the scheduler
  CHROMIUM: sched: update the average of nr_running
  DEBUG: schedtune: add tracepoint for schedtune_tasks_update() values
  DEBUG: schedtune: add tracepoint for CPU boost signal
  DEBUG: schedtune: add tracepoint for SchedTune configuration update
  DEBUG: sched: add energy procfs interface
  DEBUG: sched,cpufreq: add cpu_capacity change tracepoint
  DEBUG: sched: add tracepoint for CPU load/util signals
  DEBUG: sched: add tracepoint for task load/util signals
  DEBUG: sched: add tracepoint for cpu/freq scale invariance
  sched/fair: filter energy_diff() based on energy_payoff value
  sched/tune: add support to compute normalized energy
  sched/fair: keep track of energy/capacity variations
  sched/fair: add boosted task utilization
  sched/{fair,tune}: track RUNNABLE tasks impact on per CPU boost value
  sched/tune: compute and keep track of per CPU boost value
  sched/tune: add initial support for CGroups based boosting
  sched/fair: add boosted CPU usage
  sched/fair: add function to convert boost value into "margin"
  sched/tune: add sysctl interface to define a boost value
  sched/tune: add detailed documentation
  fixup! sched/fair: jump to max OPP when crossing UP threshold
  fixup! sched: scheduler-driven cpu frequency selection
  sched: rt scheduler sets capacity requirement
  sched: deadline: use deadline bandwidth in scale_rt_capacity
  sched: remove call of sched_avg_update from sched_rt_avg_update
  sched/cpufreq_sched: add trace events
  sched/fair: jump to max OPP when crossing UP threshold
  sched/fair: cpufreq_sched triggers for load balancing
  sched/{core,fair}: trigger OPP change request on fork()
  sched/fair: add triggers for OPP change requests
  sched: scheduler-driven cpu frequency selection
  cpufreq: introduce cpufreq_driver_is_slow
  sched: Consider misfit tasks when load-balancing
  sched: Add group_misfit_task load-balance type
  sched: Add per-cpu max capacity to sched_group_capacity
  sched: Do eas idle balance regardless of the rq avg idle value
  arm64: Enable max freq invariant scheduler load-tracking and capacity support
  arm: Enable max freq invariant scheduler load-tracking and capacity support
  sched: Update max cpu capacity in case of max frequency constraints
  cpufreq: Max freq invariant scheduler load-tracking and cpu capacity support
  arm64, topology: Updates to use DT bindings for EAS costing data
  sched: Support for extracting EAS energy costs from DT
  Documentation: DT bindings for energy model cost data required by EAS
  sched: Disable energy-unfriendly nohz kicks
  sched: Consider a not over-utilized energy-aware system as balanced
  sched: Energy-aware wake-up task placement
  sched: Determine the current sched_group idle-state
  sched, cpuidle: Track cpuidle state index in the scheduler
  sched: Add over-utilization/tipping point indicator
  sched: Estimate energy impact of scheduling decisions
  sched: Extend sched_group_energy to test load-balancing decisions
  sched: Calculate energy consumption of sched_group
  sched: Highest energy aware balancing sched_domain level pointer
  sched: Relocated cpu_util() and change return type
  sched: Compute cpu capacity available at current frequency
  arm64: Cpu invariant scheduler load-tracking and capacity support
  arm: Cpu invariant scheduler load-tracking and capacity support
  sched: Introduce SD_SHARE_CAP_STATES sched_domain flag
  sched: Initialize energy data structures
  sched: Introduce energy data structures
  sched: Make energy awareness a sched feature
  sched: Documentation for scheduler energy cost model
  sched: Prevent unnecessary active balance of single task in sched group
  sched: Enable idle balance to pull single task towards cpu with higher capacity
  sched: Consider spare cpu capacity at task wake-up
  sched: Add cpu capacity awareness to wakeup balancing
  sched: Store system-wide maximum cpu capacity in root domain
  arm: Update arch_scale_cpu_capacity() to reflect change to define
  arm64: Enable frequency invariant scheduler load-tracking support
  arm: Enable frequency invariant scheduler load-tracking support
  cpufreq: Frequency invariant scheduler load-tracking support
  sched/fair: Fix new task's load avg removed from source CPU in wake_up_new_task()
  FROMLIST: pstore: drop pmsg bounce buffer
  UPSTREAM: usercopy: remove page-spanning test for now
  UPSTREAM: usercopy: force check_object_size() inline
  BACKPORT: usercopy: fold builtin_const check into inline function
  UPSTREAM: x86/uaccess: force copy_*_user() to be inlined
  UPSTREAM: HID: core: prevent out-of-bound readings
  Android: Fix build breakages.
  UPSTREAM: tty: Prevent ldisc drivers from re-using stale tty fields
  UPSTREAM: netfilter: nfnetlink: correctly validate length of batch messages
  cpuset: Make cpusets restore on hotplug
  UPSTREAM: mm/slub: support left redzone
  UPSTREAM: Make the hardened user-copy code depend on having a hardened allocator
  Android: MMC/UFS IO Latency Histograms.
  UPSTREAM: usercopy: fix overlap check for kernel text
  UPSTREAM: usercopy: avoid potentially undefined behavior in pointer math
  UPSTREAM: unsafe_[get|put]_user: change interface to use a error target label
  BACKPORT: arm64: mm: fix location of _etext
  BACKPORT: ARM: 8583/1: mm: fix location of _etext
  BACKPORT: Don't show empty tag stats for unprivileged uids
  UPSTREAM: tcp: fix use after free in tcp_xmit_retransmit_queue()
  ANDROID: base-cfg: drop SECCOMP_FILTER config
  UPSTREAM: [media] xc2028: unlock on error in xc2028_set_config()
  UPSTREAM: [media] xc2028: avoid use after free
  ANDROID: base-cfg: enable SECCOMP config
  ANDROID: rcu_sync: Export rcu_sync_lockdep_assert
  RFC: FROMLIST: cgroup: reduce read locked section of cgroup_threadgroup_rwsem during fork
  RFC: FROMLIST: cgroup: avoid synchronize_sched() in __cgroup_procs_write()
  RFC: FROMLIST: locking/percpu-rwsem: Optimize readers and reduce global impact
  net: ipv6: Fix ping to link-local addresses.
  ipv6: fix endianness error in icmpv6_err
  ANDROID: dm: android-verity: Allow android-verity to be compiled as an independent module
  backporting: a brief introduce of backported feautures on 4.4
  Linux 4.4.20
  sysfs: correctly handle read offset on PREALLOC attrs
  hwmon: (iio_hwmon) fix memory leak in name attribute
  ALSA: line6: Fix POD sysfs attributes segfault
  ALSA: line6: Give up on the lock while URBs are released.
  ALSA: line6: Remove double line6_pcm_release() after failed acquire.
  ACPI / SRAT: fix SRAT parsing order with both LAPIC and X2APIC present
  ACPI / sysfs: fix error code in get_status()
  ACPI / drivers: replace acpi_probe_lock spinlock with mutex
  ACPI / drivers: fix typo in ACPI_DECLARE_PROBE_ENTRY macro
  staging: comedi: ni_mio_common: fix wrong insn_write handler
  staging: comedi: ni_mio_common: fix AO inttrig backwards compatibility
  staging: comedi: comedi_test: fix timer race conditions
  staging: comedi: daqboard2000: bug fix board type matching code
  USB: serial: option: add WeTelecom 0x6802 and 0x6803 products
  USB: serial: option: add WeTelecom WM-D200
  USB: serial: mos7840: fix non-atomic allocation in write path
  USB: serial: mos7720: fix non-atomic allocation in write path
  USB: fix typo in wMaxPacketSize validation
  usb: chipidea: udc: don't touch DP when controller is in host mode
  USB: avoid left shift by -1
  dmaengine: usb-dmac: check CHCR.DE bit in usb_dmac_isr_channel()
  crypto: qat - fix aes-xts key sizes
  crypto: nx - off by one bug in nx_of_update_msc()
  Input: i8042 - set up shared ps2_cmd_mutex for AUX ports
  Input: i8042 - break load dependency between atkbd/psmouse and i8042
  Input: tegra-kbc - fix inverted reset logic
  btrfs: properly track when rescan worker is running
  btrfs: waiting on qgroup rescan should not always be interruptible
  fs/seq_file: fix out-of-bounds read
  gpio: Fix OF build problem on UM
  usb: renesas_usbhs: gadget: fix return value check in usbhs_mod_gadget_probe()
  megaraid_sas: Fix probing cards without io port
  mpt3sas: Fix resume on WarpDrive flash cards
  cdc-acm: fix wrong pipe type on rx interrupt xfers
  i2c: cros-ec-tunnel: Fix usage of cros_ec_cmd_xfer()
  mfd: cros_ec: Add cros_ec_cmd_xfer_status() helper
  aacraid: Check size values after double-fetch from user
  ARC: Elide redundant setup of DMA callbacks
  ARC: Call trace_hardirqs_on() before enabling irqs
  ARC: use correct offset in pt_regs for saving/restoring user mode r25
  ARC: build: Better way to detect ISA compatible toolchain
  drm/i915: fix aliasing_ppgtt leak
  drm/amdgpu: record error code when ring test failed
  drm/amd/amdgpu: sdma resume fail during S4 on CI
  drm/amdgpu: skip TV/CV in display parsing
  drm/amdgpu: avoid a possible array overflow
  drm/amdgpu: fix amdgpu_move_blit on 32bit systems
  drm/amdgpu: Change GART offset to 64-bit
  iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"
  sched/nohz: Fix affine unpinned timers mess
  sched/cputime: Fix NO_HZ_FULL getrusage() monotonicity regression
  of: fix reference counting in of_graph_get_endpoint_by_regs
  arm64: dts: rockchip: add reset saradc node for rk3368 SoCs
  mac80211: fix purging multicast PS buffer queue
  s390/dasd: fix hanging device after clear subchannel
  EDAC: Increment correct counter in edac_inc_ue_error()
  pinctrl/amd: Remove the default de-bounce time
  iommu/arm-smmu: Don't BUG() if we find aborting STEs with disable_bypass
  iommu/arm-smmu: Fix CMDQ error handling
  iommu/dma: Don't put uninitialised IOVA domains
  xhci: Make sure xhci handles USB_SPEED_SUPER_PLUS devices.
  USB: serial: ftdi_sio: add PIDs for Ivium Technologies devices
  USB: serial: ftdi_sio: add device ID for WICED USB UART dev board
  USB: serial: option: add support for Telit LE920A4
  USB: serial: option: add D-Link DWM-156/A3
  USB: serial: fix memleak in driver-registration error path
  xhci: don't dereference a xhci member after removing xhci
  usb: xhci: Fix panic if disconnect
  xhci: always handle "Command Ring Stopped" events
  usb/gadget: fix gadgetfs aio support.
  usb: gadget: fsl_qe_udc: off by one in setup_received_handle()
  USB: validate wMaxPacketValue entries in endpoint descriptors
  usb: renesas_usbhs: Use dmac only if the pipe type is bulk
  usb: renesas_usbhs: clear the BRDYSTS in usbhsg_ep_enable()
  USB: hub: change the locking in hub_activate
  USB: hub: fix up early-exit pathway in hub_activate
  usb: hub: Fix unbalanced reference count/memory leak/deadlocks
  usb: define USB_SPEED_SUPER_PLUS speed for SuperSpeedPlus USB3.1 devices
  usb: dwc3: gadget: increment request->actual once
  usb: dwc3: pci: add Intel Kabylake PCI ID
  usb: misc: usbtest: add fix for driver hang
  usb: ehci: change order of register cleanup during shutdown
  crypto: caam - defer aead_set_sh_desc in case of zero authsize
  crypto: caam - fix echainiv(authenc) encrypt shared descriptor
  crypto: caam - fix non-hmac hashes
  genirq/msi: Make sure PCI MSIs are activated early
  genirq/msi: Remove unused MSI_FLAG_IDENTITY_MAP
  um: Don't discard .text.exit section
  ACPI / CPPC: Prevent cpc_desc_ptr points to the invalid data
  ACPI: CPPC: Return error if _CPC is invalid on a CPU
  mmc: sdhci-acpi: Reduce Baytrail eMMC/SD/SDIO hangs
  PCI: Limit config space size for Netronome NFP4000
  PCI: Add Netronome NFP4000 PF device ID
  PCI: Limit config space size for Netronome NFP6000 family
  PCI: Add Netronome vendor and device IDs
  PCI: Support PCIe devices with short cfg_size
  NVMe: Don't unmap controller registers on reset
  ALSA: hda - Manage power well properly for resume
  libnvdimm, nd_blk: mask off reserved status bits
  perf intel-pt: Fix occasional decoding errors when tracing system-wide
  vfio/pci: Fix NULL pointer oops in error interrupt setup handling
  virtio: fix memory leak in virtqueue_add()
  parisc: Fix order of EREFUSED define in errno.h
  arm64: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO
  ALSA: usb-audio: Add quirk for ELP HD USB Camera
  ALSA: usb-audio: Add a sample rate quirk for Creative Live! Cam Socialize HD (VF0610)
  powerpc/eeh: eeh_pci_enable(): fix checking of post-request state
  SUNRPC: allow for upcalls for same uid but different gss service
  SUNRPC: Handle EADDRNOTAVAIL on connection failures
  tools/testing/nvdimm: fix SIGTERM vs hotplug crash
  uprobes/x86: Fix RIP-relative handling of EVEX-encoded instructions
  x86/mm: Disable preemption during CR3 read+write
  hugetlb: fix nr_pmds accounting with shared page tables
  mm: SLUB hardened usercopy support
  mm: SLAB hardened usercopy support
  s390/uaccess: Enable hardened usercopy
  sparc/uaccess: Enable hardened usercopy
  powerpc/uaccess: Enable hardened usercopy
  ia64/uaccess: Enable hardened usercopy
  arm64/uaccess: Enable hardened usercopy
  ARM: uaccess: Enable hardened usercopy
  x86/uaccess: Enable hardened usercopy
  x86: remove more uaccess_32.h complexity
  x86: remove pointless uaccess_32.h complexity
  x86: fix SMAP in 32-bit environments
  Use the new batched user accesses in generic user string handling
  Add 'unsafe' user access functions for batched accesses
  x86: reorganize SMAP handling in user space accesses
  mm: Hardened usercopy
  mm: Implement stack frame object validation
  mm: Add is_migrate_cma_page
  Linux 4.4.19
  Documentation/module-signing.txt: Note need for version info if reusing a key
  module: Invalidate signatures on force-loaded modules
  dm flakey: error READ bios during the down_interval
  rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq()
  lpfc: fix oops in lpfc_sli4_scmd_to_wqidx_distr() from lpfc_send_taskmgmt()
  ACPI / EC: Work around method reentrancy limit in ACPICA for _Qxx
  x86/platform/intel_mid_pci: Rework IRQ0 workaround
  PCI: Mark Atheros AR9485 and QCA9882 to avoid bus reset
  MIPS: hpet: Increase HPET_MIN_PROG_DELTA and decrease HPET_MIN_CYCLES
  MIPS: Don't register r4k sched clock when CPUFREQ enabled
  MIPS: mm: Fix definition of R6 cache instruction
  SUNRPC: Don't allocate a full sockaddr_storage for tracing
  Input: elan_i2c - properly wake up touchpad on ASUS laptops
  target: Fix ordered task CHECK_CONDITION early exception handling
  target: Fix max_unmap_lba_count calc overflow
  target: Fix race between iscsi-target connection shutdown + ABORT_TASK
  target: Fix missing complete during ABORT_TASK + CMD_T_FABRIC_STOP
  target: Fix ordered task target_setup_cmd_from_cdb exception hang
  iscsi-target: Fix panic when adding second TCP connection to iSCSI session
  ubi: Fix race condition between ubi device creation and udev
  ubi: Fix early logging
  ubi: Make volume resize power cut aware
  of: fix memory leak related to safe_name()
  IB/mlx4: Fix memory leak if QP creation failed
  IB/mlx4: Fix error flow when sending mads under SRIOV
  IB/mlx4: Fix the SQ size of an RC QP
  IB/IWPM: Fix a potential skb leak
  IB/IPoIB: Don't update neigh validity for unresolved entries
  IB/SA: Use correct free function
  IB/mlx5: Return PORT_ERR in Active to Initializing tranisition
  IB/mlx5: Fix post send fence logic
  IB/mlx5: Fix entries check in mlx5_ib_resize_cq
  IB/mlx5: Fix returned values of query QP
  IB/mlx5: Fix entries checks in mlx5_ib_create_cq
  IB/mlx5: Fix MODIFY_QP command input structure
  ALSA: hda - Fix headset mic detection problem for two dell machines
  ALSA: hda: add AMD Bonaire AZ PCI ID with proper driver caps
  ALSA: hda/realtek - Can't adjust speaker's volume on a Dell AIO
  ALSA: hda: Fix krealloc() with __GFP_ZERO usage
  mm/hugetlb: avoid soft lockup in set_max_huge_pages()
  mtd: nand: fix bug writing 1 byte less than page size
  block: fix bdi vs gendisk lifetime mismatch
  block: add missing group association in bio-cloning functions
  metag: Fix __cmpxchg_u32 asm constraint for CMP
  ftrace/recordmcount: Work around for addition of metag magic but not relocations
  balloon: check the number of available pages in leak balloon
  drm/i915/dp: Revert "drm/i915/dp: fall back to 18 bpp when sink capability is unknown"
  drm/i915: Never fully mask the the EI up rps interrupt on SNB/IVB
  drm/edid: Add 6 bpc quirk for display AEO model 0.
  drm: Restore double clflush on the last partial cacheline
  drm/nouveau/fbcon: fix font width not divisible by 8
  drm/nouveau/gr/nv3x: fix instobj write offsets in gr setup
  drm/nouveau: check for supported chipset before booting fbdev off the hw
  drm/radeon: support backlight control for UNIPHY3
  drm/radeon: fix firmware info version checks
  drm/radeon: Poll for both connect/disconnect on analog connectors
  drm/radeon: add a delay after ATPX dGPU power off
  drm/amdgpu/gmc7: add missing mullins case
  drm/amdgpu: fix firmware info version checks
  drm/amdgpu: Disable RPM helpers while reprobing connectors on resume
  drm/amdgpu: support backlight control for UNIPHY3
  drm/amdgpu: Poll for both connect/disconnect on analog connectors
  drm/amdgpu: add a delay after ATPX dGPU power off
  w1:omap_hdq: fix regression
  netlabel: add address family checks to netlbl_{sock,req}_delattr()
  ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys
  audit: fix a double fetch in audit_log_single_execve_arg()
  iommu/amd: Update Alias-DTE in update_device_table()
  iommu/amd: Init unity mappings only for dma_ops domains
  iommu/amd: Handle IOMMU_DOMAIN_DMA in ops->domain_free call-back
  iommu/vt-d: Return error code in domain_context_mapping_one()
  iommu/exynos: Suppress unbinding to prevent system failure
  drm/i915: Don't complain about lack of ACPI video bios
  nfsd: don't return an unhashed lock stateid after taking mutex
  nfsd: Fix race between FREE_STATEID and LOCK
  nfs: don't create zero-length requests
  MIPS: KVM: Propagate kseg0/mapped tlb fault errors
  MIPS: KVM: Fix gfn range check in kseg0 tlb faults
  MIPS: KVM: Add missing gfn range check
  MIPS: KVM: Fix mapped fault broken commpage handling
  random: add interrupt callback to VMBus IRQ handler
  random: print a warning for the first ten uninitialized random users
  random: initialize the non-blocking pool via add_hwgenerator_randomness()
  CIFS: Fix a possible invalid memory access in smb2_query_symlink()
  cifs: fix crash due to race in hmac(md5) handling
  cifs: Check for existing directory when opening file with O_CREAT
  fs/cifs: make share unaccessible at root level mountable
  jbd2: make journal y2038 safe
  ARC: mm: don't loose PTE_SPECIAL in pte_modify()
  remoteproc: Fix potential race condition in rproc_add
  ovl: disallow overlayfs as upperdir
  HID: uhid: fix timeout when probe races with IO
  EDAC: Correct channel count limit
  Bluetooth: Fix l2cap_sock_setsockopt() with optname BT_RCVMTU
  spi: pxa2xx: Clear all RFT bits in reset_sccr1() on Intel Quark
  i2c: efm32: fix a failure path in efm32_i2c_probe()
  s5p-mfc: Add release callback for memory region devs
  s5p-mfc: Set device name for reserved memory region devs
  hp-wmi: Fix wifi cannot be hard-unblocked
  dm: set DMF_SUSPENDED* _before_ clearing DMF_NOFLUSH_SUSPENDING
  sur40: fix occasional oopses on device close
  sur40: lower poll interval to fix occasional FPS drops to ~56 FPS
  Fix RC5 decoding with Fintek CIR chipset
  vb2: core: Skip planes array verification if pb is NULL
  videobuf2-v4l2: Verify planes array in buffer dequeueing
  media: dvb_ringbuffer: Add memory barriers
  media: usbtv: prevent access to free'd resources
  mfd: qcom_rpm: Parametrize also ack selector size
  mfd: qcom_rpm: Fix offset error for msm8660
  intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate()
  s390/cio: allow to reset channel measurement block
  KVM: nVMX: Fix memory corruption when using VMCS shadowing
  KVM: VMX: handle PML full VMEXIT that occurs during event delivery
  KVM: MTRR: fix kvm_mtrr_check_gfn_range_consistency page fault
  KVM: PPC: Book3S HV: Save/restore TM state in H_CEDE
  KVM: PPC: Book3S HV: Pull out TM state save/restore into separate procedures
  arm64: mm: avoid fdt_check_header() before the FDT is fully mapped
  arm64: dts: rockchip: fixes the gic400 2nd region size for rk3368
  pinctrl: cherryview: prevent concurrent access to GPIO controllers
  Bluetooth: hci_intel: Fix null gpio desc pointer dereference
  gpio: intel-mid: Remove potentially harmful code
  gpio: pca953x: Fix NBANK calculation for PCA9536
  tty/serial: atmel: fix RS485 half duplex with DMA
  serial: samsung: Fix ERR pointer dereference on deferred probe
  tty: serial: msm: Don't read off end of tx fifo
  arm64: Fix incorrect per-cpu usage for boot CPU
  arm64: debug: unmask PSTATE.D earlier
  arm64: kernel: Save and restore UAO and addr_limit on exception entry
  USB: usbfs: fix potential infoleak in devio
  usb: renesas_usbhs: fix NULL pointer dereference in xfer_work()
  USB: serial: option: add support for Telit LE910 PID 0x1206
  usb: dwc3: fix for the isoc transfer EP_BUSY flag
  usb: quirks: Add no-lpm quirk for Elan
  usb: renesas_usbhs: protect the CFIFOSEL setting in usbhsg_ep_enable()
  usb: f_fs: off by one bug in _ffs_func_bind()
  usb: gadget: avoid exposing kernel stack
  UPSTREAM: usb: gadget: configfs: add mutex lock before unregister gadget
  ANDROID: dm-verity: adopt changes made to dm callbacks
  UPSTREAM: ecryptfs: fix handling of directory opening
  ANDROID: net: core: fix UID-based routing
  ANDROID: net: fib: remove duplicate assignment
  FROMLIST: proc: Fix timerslack_ns CAP_SYS_NICE check when adjusting self
  ANDROID: dm verity fec: pack the fec_header structure
  ANDROID: dm: android-verity: Verify header before fetching table
  ANDROID: dm: allow adb disable-verity only in userdebug
  ANDROID: dm: mount as linear target if eng build
  ANDROID: dm: use default verity public key
  ANDROID: dm: fix signature verification flag
  ANDROID: dm: use name_to_dev_t
  ANDROID: dm: rename dm-linear methods for dm-android-verity
  ANDROID: dm: Minor cleanup
  ANDROID: dm: Mounting root as linear device when verity disabled
  ANDROID: dm-android-verity: Rebase on top of 4.1
  ANDROID: dm: Add android verity target
  ANDROID: dm: fix dm_substitute_devices()
  ANDROID: dm: Rebase on top of 4.1
  CHROMIUM: dm: boot time specification of dm=
  Implement memory_state_time, used by qcom,cpubw
  Revert "panic: Add board ID to panic output"
  usb: gadget: f_accessory: remove duplicate endpoint alloc
  BACKPORT: brcmfmac: defer DPC processing during probe
  FROMLIST: proc: Add LSM hook checks to /proc/<tid>/timerslack_ns
  FROMLIST: proc: Relax /proc/<tid>/timerslack_ns capability requirements
  UPSTREAM: ppp: defer netns reference release for ppp channel
  cpuset: Add allow_attach hook for cpusets on android.
  UPSTREAM: KEYS: Fix ASN.1 indefinite length object parsing
  ANDROID: sdcardfs: fix itnull.cocci warnings
  android-recommended.cfg: enable fstack-protector-strong
  Linux 4.4.18
  mm: memcontrol: fix memcg id ref counter on swap charge move
  mm: memcontrol: fix swap counter leak on swapout from offline cgroup
  mm: memcontrol: fix cgroup creation failure after many small jobs
  ext4: fix reference counting bug on block allocation error
  ext4: short-cut orphan cleanup on error
  ext4: validate s_reserved_gdt_blocks on mount
  ext4: don't call ext4_should_journal_data() on the journal inode
  ext4: fix deadlock during page writeback
  ext4: check for extents that wrap around
  crypto: scatterwalk - Fix test in scatterwalk_done
  crypto: gcm - Filter out async ghash if necessary
  fs/dcache.c: avoid soft-lockup in dput()
  fuse: fix wrong assignment of ->flags in fuse_send_init()
  fuse: fuse_flush must check mapping->flags for errors
  fuse: fsync() did not return IO errors
  sysv, ipc: fix security-layer leaking
  block: fix use-after-free in seq file
  x86/syscalls/64: Add compat_sys_keyctl for 32-bit userspace
  drm/i915: Pretend cursor is always on for ILK-style WM calculations (v2)
  x86/mm/pat: Fix BUG_ON() in mmap_mem() on QEMU/i386
  x86/pat: Document the PAT initialization sequence
  x86/xen, pat: Remove PAT table init code from Xen
  x86/mtrr: Fix PAT init handling when MTRR is disabled
  x86/mtrr: Fix Xorg crashes in Qemu sessions
  x86/mm/pat: Replace cpu_has_pat with boot_cpu_has()
  x86/mm/pat: Add pat_disable() interface
  x86/mm/pat: Add support of non-default PAT MSR setting
  devpts: clean up interface to pty drivers
  random: strengthen input validation for RNDADDTOENTCNT
  apparmor: fix ref count leak when profile sha1 hash is read
  Revert "s390/kdump: Clear subchannel ID to signal non-CCW/SCSI IPL"
  KEYS: 64-bit MIPS needs to use compat_sys_keyctl for 32-bit userspace
  arm: oabi compat: add missing access checks
  cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind
  i2c: i801: Allow ACPI SystemIO OpRegion to conflict with PCI BAR
  x86/mm/32: Enable full randomization on i386 and X86_32
  HID: sony: do not bail out when the sixaxis refuses the output report
  PNP: Add Broadwell to Intel MCH size workaround
  PNP: Add Haswell-ULT to Intel MCH size workaround
  scsi: ignore errors from scsi_dh_add_device()
  ipath: Restrict use of the write() interface
  tcp: consider recv buf for the initial window scale
  qed: Fix setting/clearing bit in completion bitmap
  net/irda: fix NULL pointer dereference on memory allocation failure
  net: bgmac: Fix infinite loop in bgmac_dma_tx_add()
  bonding: set carrier off for devices created through netlink
  ipv4: reject RTNH_F_DEAD and RTNH_F_LINKDOWN from user space
  tcp: enable per-socket rate limiting of all 'challenge acks'
  tcp: make challenge acks less predictable
  arm64: relocatable: suppress R_AARCH64_ABS64 relocations in vmlinux
  arm64: vmlinux.lds: make __rela_offset and __dynsym_offset ABSOLUTE
  Linux 4.4.17
  vfs: fix deadlock in file_remove_privs() on overlayfs
  intel_th: Fix a deadlock in modprobing
  intel_th: pci: Add Kaby Lake PCH-H support
  net: mvneta: set real interrupt per packet for tx_done
  libceph: apply new_state before new_up_client on incrementals
  libata: LITE-ON CX1-JB256-HP needs lower max_sectors
  i2c: mux: reg: wrong condition checked for of_address_to_resource return value
  posix_cpu_timer: Exit early when process has been reaped
  media: fix airspy usb probe error path
  ipr: Clear interrupt on croc/crocodile when running with LSI
  SCSI: fix new bug in scsi_dev_info_list string matching
  RDS: fix rds_tcp_init() error path
  can: fix oops caused by wrong rtnl dellink usage
  can: fix handling of unmodifiable configuration options fix
  can: c_can: Update D_CAN TX and RX functions to 32 bit - fix Altera Cyclone access
  can: at91_can: RX queue could get stuck at high bus load
  perf/x86: fix PEBS issues on Intel Atom/Core2
  ovl: handle ATTR_KILL*
  sched/fair: Fix effective_load() to consistently use smoothed load
  mmc: block: fix packed command header endianness
  block: fix use-after-free in sys_ioprio_get()
  qeth: delete napi struct when removing a qeth device
  platform/chrome: cros_ec_dev - double fetch bug in ioctl
  clk: rockchip: initialize flags of clk_init_data in mmc-phase clock
  spi: sun4i: fix FIFO limit
  spi: sunxi: fix transfer timeout
  namespace: update event counter when umounting a deleted dentry
  9p: use file_dentry()
  ext4: verify extent header depth
  ecryptfs: don't allow mmap when the lower fs doesn't support it
  Revert "ecryptfs: forbid opening files without mmap handler"
  locks: use file_inode()
  power_supply: power_supply_read_temp only if use_cnt > 0
  cgroup: set css->id to -1 during init
  pinctrl: imx: Do not treat a PIN without MUX register as an error
  pinctrl: single: Fix missing flush of posted write for a wakeirq
  pvclock: Add CPU barriers to get correct version value
  Input: tsc200x - report proper input_dev name
  Input: xpad - validate USB endpoint count during probe
  Input: wacom_w8001 - w8001_MAX_LENGTH should be 13
  Input: xpad - fix oops when attaching an unknown Xbox One gamepad
  Input: elantech - add more IC body types to the list
  Input: vmmouse - remove port reservation
  ALSA: timer: Fix leak in events via snd_timer_user_tinterrupt
  ALSA: timer: Fix leak in events via snd_timer_user_ccallback
  ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS
  xenbus: don't bail early from xenbus_dev_request_and_reply()
  xenbus: don't BUG() on user mode induced condition
  xen/pciback: Fix conf_space read/write overlap check.
  ARC: unwind: ensure that .debug_frame is generated (vs. .eh_frame)
  arc: unwind: warn only once if DW2_UNWIND is disabled
  kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w
  pps: do not crash when failed to register
  vmlinux.lds: account for destructor sections
  mm, meminit: ensure node is online before checking whether pages are uninitialised
  mm, meminit: always return a valid node from early_pfn_to_nid
  mm, compaction: prevent VM_BUG_ON when terminating freeing scanner
  fs/nilfs2: fix potential underflow in call to crc32_le
  mm, compaction: abort free scanner if split fails
  mm, sl[au]b: add __GFP_ATOMIC to the GFP reclaim mask
  dmaengine: at_xdmac: double FIFO flush needed to compute residue
  dmaengine: at_xdmac: fix residue corruption
  dmaengine: at_xdmac: align descriptors on 64 bits
  x86/quirks: Add early quirk to reset Apple AirPort card
  x86/quirks: Reintroduce scanning of secondary buses
  x86/quirks: Apply nvidia_bugs quirk only on root bus
  USB: OHCI: Don't mark EDs as ED_OPER if scheduling fails

Conflicts:
	arch/arm/kernel/topology.c
	arch/arm64/include/asm/arch_gicv3.h
	arch/arm64/kernel/topology.c
	block/bio.c
	drivers/cpufreq/Kconfig
	drivers/md/Makefile
	drivers/media/dvb-core/dvb_ringbuffer.c
	drivers/media/tuners/tuner-xc2028.c
	drivers/misc/Kconfig
	drivers/misc/Makefile
	drivers/mmc/core/host.c
	drivers/scsi/ufs/ufshcd.c
	drivers/scsi/ufs/ufshcd.h
	drivers/usb/dwc3/gadget.c
	drivers/usb/gadget/configfs.c
	fs/ecryptfs/file.c
	include/linux/mmc/core.h
	include/linux/mmc/host.h
	include/linux/mmzone.h
	include/linux/sched.h
	include/linux/sched/sysctl.h
	include/trace/events/power.h
	include/trace/events/sched.h
	init/Kconfig
	kernel/cpuset.c
	kernel/exit.c
	kernel/sched/Makefile
	kernel/sched/core.c
	kernel/sched/cputime.c
	kernel/sched/fair.c
	kernel/sched/features.h
	kernel/sched/rt.c
	kernel/sched/sched.h
	kernel/sched/stop_task.c
	kernel/sched/tune.c
	lib/Kconfig.debug
	mm/Makefile
	mm/vmstat.c

Change-Id: I243a43231ca56a6362076fa6301827e1b0493be5
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-12-16 13:52:17 -08:00
Sebastian Frias
f2c4508a35 genirq/generic_chip: Add irq_unmap callback
commit ee26c013cdee0b947e29d6cadfb9ff3341c69ff9 upstream.

Without this patch irq_domain_disassociate() cannot properly release the
interrupt. In fact, irq_map_generic_chip() checks a bit on 'gc->installed'
but said bit is never cleared, only set.

Commit 088f40b7b0 ("genirq: Generic chip: Add linear irq domain support")
added irq_map_generic_chip() function and also stated "This lacks a removal
function for now".

This commit provides an implementation of an unmap function that can be
called by irq_domain_disassociate().

[ tglx: Made the function static and removed the export as we have neither
  	a prototype nor a modular user. ]

Fixes: 088f40b7b0 ("genirq: Generic chip: Add linear irq domain support")
Signed-off-by: Sebastian Frias <sf84@laposte.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Mason <slash.tmp@free.fr>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/579F5C5A.2070507@laposte.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-31 04:13:59 -06:00
Prasad Sodagudi
10b3f40cb0 genirq: Avoid race between cpu hot plug and irq_desc() allocation paths
One of the core might have just allocated irq_desc() and other core
might be doing irq migration in the hot plug path. In the hot plug path
during the IRQ migration, for_each_active_irq macro is trying to get
irqs whose bits are set in allocated_irqs bit map but there is no return
value check after irq_to_desc for desc validity.

[   24.566381] msm_thermal:do_core_control Set Offline: CPU4 Temp: 73
[   24.568821] Unable to handle kernel NULL pointer dereference at virtual address 000000a4
[   24.568931] pgd = ffffffc002184000
[   24.568995] [000000a4] *pgd=0000000178df5003, *pud=0000000178df5003, *pmd=0000000178df6003, *pte=0060000017a00707
[   24.569153] ------------[ cut here ]------------
[   24.569228] Kernel BUG at ffffffc0000f3060 [verbose debug info unavailable]
[   24.569334] Internal error: Oops - BUG: 96000005 [#1] PREEMPT SMP
[   24.569422] Modules linked in:
[   24.569486] CPU: 4 PID: 28 Comm: migration/4 Tainted: G        W       4.4.8-perf-9407222-eng #1
[   24.569684] task: ffffffc0f28f0e80 ti: ffffffc0f2a84000 task.ti: ffffffc0f2a84000
[   24.569785] PC is at do_raw_spin_lock+0x20/0x160
[   24.569859] LR is at _raw_spin_lock+0x34/0x40
[   24.569931] pc : [<ffffffc0000f3060>] lr : [<ffffffc001023dec>] pstate: 200001c5
[   24.570029] sp : ffffffc0f2a87bc0
[   24.570091] x29: ffffffc0f2a87bc0 x28: ffffffc001033988
[   24.570174] x27: ffffffc001adebb0 x26: 0000000000000000
[   24.570257] x25: 00000000000000a0 x24: 0000000000000020
[   24.570339] x23: ffffffc001033978 x22: ffffffc001adeb80
[   24.570421] x21: 000000000000027e x20: 0000000000000000
[   24.570502] x19: 00000000000000a0 x18: 000000000000000d
[   24.570584] x17: 0000000000005f00 x16: 0000000000000003
[   24.570666] x15: 000000000000bd39 x14: 0ffffffffffffffe
[   24.570748] x13: 0000000000000000 x12: 0000000000000018
[   24.570829] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f
[   24.570911] x9 : fefefefeff332e6d x8 : 7f7f7f7f7f7f7f7f
[   24.570993] x7 : ffffffc00344f6a0 x6 : 0000000000000000
[   24.571075] x5 : 0000000000000001 x4 : ffffffc00344f488
[   24.571157] x3 : 0000000000000000 x2 : 0000000000000000
[   24.571238] x1 : ffffffc0f2a84000 x0 : 0000000000004ead
...
...
...
[   24.581324] Call trace:
[   24.581379] [<ffffffc0000f3060>] do_raw_spin_lock+0x20/0x160
[   24.581463] [<ffffffc001023dec>] _raw_spin_lock+0x34/0x40
[   24.581546] [<ffffffc000103f10>] irq_migrate_all_off_this_cpu+0x84/0x1c4
[   24.581641] [<ffffffc00008ec84>] __cpu_disable+0x54/0x74
[   24.581722] [<ffffffc0000a3368>] take_cpu_down+0x1c/0x58
[   24.581803] [<ffffffc00013ac08>] multi_cpu_stop+0xb0/0x10c
[   24.581885] [<ffffffc00013ad60>] cpu_stopper_thread+0xb8/0x184
[   24.581972] [<ffffffc0000c4920>] smpboot_thread_fn+0x26c/0x290
[   24.582057] [<ffffffc0000c0f84>] kthread+0x100/0x108
[   24.582135] Code: aa0003f3 aa1e03e0 d503201f 5289d5a0 (b9400661)
[   24.582224] ---[ end trace 609f38584306f5d9 ]---

CRs-Fixed: 1074611
Change-Id: I6cc5399e511b6d62ec7fbc4cac21f4f41023520e
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-10-12 13:35:10 -07:00
Prasad Sodagudi
4e38f843b6 genirq: Avoid race between cpu hot plug and irq_desc() allocation paths
One of the core might have just allocated irq_desc() and other core
might be doing irq migration in the hot plug path. In the hot plug path
during the IRQ migration, for_each_active_irq macro is trying to get
irqs whose bits are set in allocated_irqs bit map but there is no return
value check after irq_to_desc for desc validity.

[   24.566381] msm_thermal:do_core_control Set Offline: CPU4 Temp: 73
[   24.568821] Unable to handle kernel NULL pointer dereference at virtual address 000000a4
[   24.568931] pgd = ffffffc002184000
[   24.568995] [000000a4] *pgd=0000000178df5003, *pud=0000000178df5003, *pmd=0000000178df6003, *pte=0060000017a00707
[   24.569153] ------------[ cut here ]------------
[   24.569228] Kernel BUG at ffffffc0000f3060 [verbose debug info unavailable]
[   24.569334] Internal error: Oops - BUG: 96000005 [#1] PREEMPT SMP
[   24.569422] Modules linked in:
[   24.569486] CPU: 4 PID: 28 Comm: migration/4 Tainted: G        W       4.4.8-perf-9407222-eng #1
[   24.569684] task: ffffffc0f28f0e80 ti: ffffffc0f2a84000 task.ti: ffffffc0f2a84000
[   24.569785] PC is at do_raw_spin_lock+0x20/0x160
[   24.569859] LR is at _raw_spin_lock+0x34/0x40
[   24.569931] pc : [<ffffffc0000f3060>] lr : [<ffffffc001023dec>] pstate: 200001c5
[   24.570029] sp : ffffffc0f2a87bc0
[   24.570091] x29: ffffffc0f2a87bc0 x28: ffffffc001033988
[   24.570174] x27: ffffffc001adebb0 x26: 0000000000000000
[   24.570257] x25: 00000000000000a0 x24: 0000000000000020
[   24.570339] x23: ffffffc001033978 x22: ffffffc001adeb80
[   24.570421] x21: 000000000000027e x20: 0000000000000000
[   24.570502] x19: 00000000000000a0 x18: 000000000000000d
[   24.570584] x17: 0000000000005f00 x16: 0000000000000003
[   24.570666] x15: 000000000000bd39 x14: 0ffffffffffffffe
[   24.570748] x13: 0000000000000000 x12: 0000000000000018
[   24.570829] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f
[   24.570911] x9 : fefefefeff332e6d x8 : 7f7f7f7f7f7f7f7f
[   24.570993] x7 : ffffffc00344f6a0 x6 : 0000000000000000
[   24.571075] x5 : 0000000000000001 x4 : ffffffc00344f488
[   24.571157] x3 : 0000000000000000 x2 : 0000000000000000
[   24.571238] x1 : ffffffc0f2a84000 x0 : 0000000000004ead
...
...
...
[   24.581324] Call trace:
[   24.581379] [<ffffffc0000f3060>] do_raw_spin_lock+0x20/0x160
[   24.581463] [<ffffffc001023dec>] _raw_spin_lock+0x34/0x40
[   24.581546] [<ffffffc000103f10>] irq_migrate_all_off_this_cpu+0x84/0x1c4
[   24.581641] [<ffffffc00008ec84>] __cpu_disable+0x54/0x74
[   24.581722] [<ffffffc0000a3368>] take_cpu_down+0x1c/0x58
[   24.581803] [<ffffffc00013ac08>] multi_cpu_stop+0xb0/0x10c
[   24.581885] [<ffffffc00013ad60>] cpu_stopper_thread+0xb8/0x184
[   24.581972] [<ffffffc0000c4920>] smpboot_thread_fn+0x26c/0x290
[   24.582057] [<ffffffc0000c0f84>] kthread+0x100/0x108
[   24.582135] Code: aa0003f3 aa1e03e0 d503201f 5289d5a0 (b9400661)
[   24.582224] ---[ end trace 609f38584306f5d9 ]---

CRs-Fixed: 1074611
Change-Id: I6cc5399e511b6d62ec7fbc4cac21f4f41023520e
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-10-07 13:07:10 -07:00
Olav Haugan
4400ef145f irq: Make irq affinity function cpu isolation aware
Prohibit setting the affinity of an IRQ to an isolated core.

Change-Id: I7b50778615541a64f9956573757c7f28748c4f69
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-09-24 10:59:55 -07:00
Thomas Gleixner
2fbc61d977 genirq/msi: Fix broken debug output
commit 4364e1a29be16b2783c0bcbc263f61236af64281 upstream.

virq is not required to be the same for all msi descs. Use the base irq number
from the desc in the debug printk.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-24 10:07:46 +02:00
Marc Zyngier
6722e24787 genirq/msi: Make sure PCI MSIs are activated early
commit f3b0946d629c8bfbd3e5f038e30cb9c711a35f10 upstream.

Bharat Kumar Gogada reported issues with the generic MSI code, where the
end-point ended up with garbage in its MSI configuration (both for the vector
and the message).

It turns out that the two MSI paths in the kernel are doing slightly different
things:

generic MSI: disable MSI -> allocate MSI -> enable MSI -> setup EP
PCI MSI: disable MSI -> allocate MSI -> setup EP -> enable MSI

And it turns out that end-points are allowed to latch the content of the MSI
configuration registers as soon as MSIs are enabled.  In Bharat's case, the
end-point ends up using whatever was there already, which is not what you
want.

In order to make things converge, we introduce a new MSI domain flag
(MSI_FLAG_ACTIVATE_EARLY) that is unconditionally set for PCI/MSI. When set,
this flag forces the programming of the end-point as soon as the MSIs are
allocated.

A consequence of this is that we have an extra activate in irq_startup, but
that should be without much consequence.

tglx:

 - Several people reported a VMWare regression with PCI/MSI-X passthrough. It
   turns out that the patch also cures that issue.

 - We need to have a look at the MSI disable interrupt path, where we write
   the msg to all zeros without disabling MSI in the PCI device. Is that
   correct?

Fixes: 52f518a3a7 "x86/MSI: Use hierarchical irqdomains to manage MSI interrupts"
Reported-and-tested-by: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
Reported-and-tested-by: Foster Snowhill <forst@forstwoof.ru>
Reported-by: Matthias Prager <linux@matthiasprager.de>
Reported-by: Jason Taylor <jason.taylor@simplivity.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Link: http://lkml.kernel.org/r/1468426713-31431-1-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-07 08:32:38 +02:00
Thomas Gleixner
fd59f98be0 genirq/msi: Remove unused MSI_FLAG_IDENTITY_MAP
commit b6140914fd079e43ea75a53429b47128584f033a upstream.

No user and we definitely don't want to grow one.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: linux-block@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Cc: linux-nvme@lists.infradead.org
Cc: axboe@fb.com
Cc: agordeev@redhat.com
Link: http://lkml.kernel.org/r/1467621574-8277-2-git-send-email-hch@lst.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-07 08:32:38 +02:00
Runmin Wang
750075feff Merge remote-tracking branch 'origin/tmp-917a9a9133a6' into lsk
* tmp-917a9:
  ARM/vdso: Mark the vDSO code read-only after init
  x86/vdso: Mark the vDSO code read-only after init
  lkdtm: Verify that '__ro_after_init' works correctly
  arch: Introduce post-init read-only memory
  x86/mm: Always enable CONFIG_DEBUG_RODATA and remove the Kconfig option
  mm/init: Add 'rodata=off' boot cmdline parameter to disable read-only kernel mappings
  asm-generic: Consolidate mark_rodata_ro()
  Linux 4.4.6
  ld-version: Fix awk regex compile failure
  target: Drop incorrect ABORT_TASK put for completed commands
  block: don't optimize for non-cloned bio in bio_get_last_bvec()
  MIPS: smp.c: Fix uninitialised temp_foreign_map
  MIPS: Fix build error when SMP is used without GIC
  ovl: fix getcwd() failure after unsuccessful rmdir
  ovl: copy new uid/gid into overlayfs runtime inode
  userfaultfd: don't block on the last VM updates at exit time
  powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages
  powerpc/powernv: Add a kmsg_dumper that flushes console output on panic
  powerpc: Fix dedotify for binutils >= 2.26
  Revert "drm/radeon/pm: adjust display configuration after powerstate"
  drm/radeon: Fix error handling in radeon_flip_work_func.
  drm/amdgpu: Fix error handling in amdgpu_flip_work_func.
  Revert "drm/radeon: call hpd_irq_event on resume"
  x86/mm: Fix slow_virt_to_phys() for X86_PAE again
  gpu: ipu-v3: Do not bail out on missing optional port nodes
  mac80211: Fix Public Action frame RX in AP mode
  mac80211: check PN correctly for GCMP-encrypted fragmented MPDUs
  mac80211: minstrel_ht: fix a logic error in RTS/CTS handling
  mac80211: minstrel_ht: set default tx aggregation timeout to 0
  mac80211: fix use of uninitialised values in RX aggregation
  mac80211: minstrel: Change expected throughput unit back to Kbps
  iwlwifi: mvm: inc pending frames counter also when txing non-sta
  can: gs_usb: fixed disconnect bug by removing erroneous use of kfree()
  cfg80211/wext: fix message ordering
  wext: fix message delay/ordering
  ovl: fix working on distributed fs as lower layer
  ovl: ignore lower entries when checking purity of non-directory entries
  ASoC: wm8958: Fix enum ctl accesses in a wrong type
  ASoC: wm8994: Fix enum ctl accesses in a wrong type
  ASoC: samsung: Use IRQ safe spin lock calls
  ASoC: dapm: Fix ctl value accesses in a wrong type
  ncpfs: fix a braino in OOM handling in ncp_fill_cache()
  jffs2: reduce the breakage on recovery from halfway failed rename()
  dmaengine: at_xdmac: fix residue computation
  tracing: Fix check for cpu online when event is disabled
  s390/dasd: fix diag 0x250 inline assembly
  s390/mm: four page table levels vs. fork
  KVM: MMU: fix reserved bit check for ept=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0
  KVM: MMU: fix ept=0/pte.u=1/pte.w=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0 combo
  KVM: PPC: Book3S HV: Sanitize special-purpose register values on guest exit
  KVM: s390: correct fprs on SIGP (STOP AND) STORE STATUS
  KVM: VMX: disable PEBS before a guest entry
  kvm: cap halt polling at exactly halt_poll_ns
  PCI: Allow a NULL "parent" pointer in pci_bus_assign_domain_nr()
  ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property
  ARM: dts: dra7: do not gate cpsw clock due to errata i877
  ARM: mvebu: fix overlap of Crypto SRAM with PCIe memory window
  arm64: account for sparsemem section alignment when choosing vmemmap offset
  Linux 4.4.5
  drm/amdgpu: fix topaz/tonga gmc assignment in 4.4 stable
  modules: fix longstanding /proc/kallsyms vs module insertion race.
  drm/i915: refine qemu south bridge detection
  drm/i915: more virtual south bridge detection
  block: get the 1st and last bvec via helpers
  block: check virt boundary in bio_will_gap()
  drm/amdgpu: Use drm_calloc_large for VM page_tables array
  thermal: cpu_cooling: fix out of bounds access in time_in_idle
  i2c: brcmstb: allocate correct amount of memory for regmap
  ubi: Fix out of bounds write in volume update code
  cxl: Fix PSL timebase synchronization detection
  MIPS: traps: Fix SIGFPE information leak from `do_ov' and `do_trap_or_bp'
  MIPS: scache: Fix scache init with invalid line size.
  USB: serial: option: add support for Quectel UC20
  USB: serial: option: add support for Telit LE922 PID 0x1045
  USB: qcserial: add Sierra Wireless EM74xx device ID
  USB: qcserial: add Dell Wireless 5809e Gobi 4G HSPA+ (rev3)
  USB: cp210x: Add ID for Parrot NMEA GPS Flight Recorder
  usb: chipidea: otg: change workqueue ci_otg as freezable
  ALSA: timer: Fix broken compat timer user status ioctl
  ALSA: hdspm: Fix zero-division
  ALSA: hdsp: Fix wrong boolean ctl value accesses
  ALSA: hdspm: Fix wrong boolean ctl value accesses
  ALSA: seq: oss: Don't drain at closing a client
  ALSA: pcm: Fix ioctls for X32 ABI
  ALSA: timer: Fix ioctls for X32 ABI
  ALSA: rawmidi: Fix ioctls X32 ABI
  ALSA: hda - Fix mic issues on Acer Aspire E1-472
  ALSA: ctl: Fix ioctls for X32 ABI
  ALSA: usb-audio: Add a quirk for Plantronics DA45
  adv7604: fix tx 5v detect regression
  dmaengine: pxa_dma: fix cyclic transfers
  Fix directory hardlinks from deleted directories
  jffs2: Fix page lock / f->sem deadlock
  Revert "jffs2: Fix lock acquisition order bug in jffs2_write_begin"
  Btrfs: fix loading of orphan roots leading to BUG_ON
  pata-rb532-cf: get rid of the irq_to_gpio() call
  tracing: Do not have 'comm' filter override event 'comm' field
  ata: ahci: don't mark HotPlugCapable Ports as external/removable
  PM / sleep / x86: Fix crash on graph trace through x86 suspend
  arm64: vmemmap: use virtual projection of linear region
  Adding Intel Lewisburg device IDs for SATA
  writeback: flush inode cgroup wb switches instead of pinning super_block
  block: bio: introduce helpers to get the 1st and last bvec
  libata: Align ata_device's id on a cacheline
  libata: fix HDIO_GET_32BIT ioctl
  drm/amdgpu: return from atombios_dp_get_dpcd only when error
  drm/amdgpu/gfx8: specify which engine to wait before vm flush
  drm/amdgpu: apply gfx_v8 fixes to gfx_v7 as well
  drm/amdgpu/pm: update current crtc info after setting the powerstate
  drm/radeon/pm: update current crtc info after setting the powerstate
  drm/ast: Fix incorrect register check for DRAM width
  target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors
  iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path
  iommu/amd: Fix boot warning when device 00:00.0 is not iommu covered
  iommu/amd: Apply workaround for ATS write permission check
  arm/arm64: KVM: Fix ioctl error handling
  KVM: x86: fix root cause for missed hardware breakpoints
  vfio: fix ioctl error handling
  Fix cifs_uniqueid_to_ino_t() function for s390x
  CIFS: Fix SMB2+ interim response processing for read requests
  cifs: fix out-of-bounds access in lease parsing
  fbcon: set a default value to blink interval
  kvm: x86: Update tsc multiplier on change.
  mips/kvm: fix ioctl error handling
  parisc: Fix ptrace syscall number and return value modification
  PCI: keystone: Fix MSI code that retrieves struct pcie_port pointer
  block: Initialize max_dev_sectors to 0
  drm/amdgpu: mask out WC from BO on unsupported arches
  btrfs: async-thread: Fix a use-after-free error for trace
  btrfs: Fix no_space in write and rm loop
  Btrfs: fix deadlock running delayed iputs at transaction commit time
  drivers: sh: Restore legacy clock domain on SuperH platforms
  use ->d_seq to get coherency between ->d_inode and ->d_flags
  Linux 4.4.4
  iwlwifi: mvm: don't allow sched scans without matches to be started
  iwlwifi: update and fix 7265 series PCI IDs
  iwlwifi: pcie: properly configure the debug buffer size for 8000
  iwlwifi: dvm: fix WoWLAN
  security: let security modules use PTRACE_MODE_* with bitmasks
  IB/cma: Fix RDMA port validation for iWarp
  x86/irq: Plug vector cleanup race
  x86/irq: Call irq_force_move_complete with irq descriptor
  x86/irq: Remove outgoing CPU from vector cleanup mask
  x86/irq: Remove the cpumask allocation from send_cleanup_vector()
  x86/irq: Clear move_in_progress before sending cleanup IPI
  x86/irq: Remove offline cpus from vector cleanup
  x86/irq: Get rid of code duplication
  x86/irq: Copy vectormask instead of an AND operation
  x86/irq: Check vector allocation early
  x86/irq: Reorganize the search in assign_irq_vector
  x86/irq: Reorganize the return path in assign_irq_vector
  x86/irq: Do not use apic_chip_data.old_domain as temporary buffer
  x86/irq: Validate that irq descriptor is still active
  x86/irq: Fix a race in x86_vector_free_irqs()
  x86/irq: Call chip->irq_set_affinity in proper context
  x86/entry/compat: Add missing CLAC to entry_INT80_32
  x86/mpx: Fix off-by-one comparison with nr_registers
  hpfs: don't truncate the file when delete fails
  do_last(): ELOOP failure exit should be done after leaving RCU mode
  should_follow_link(): validate ->d_seq after having decided to follow
  xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted.
  xen/pciback: Save the number of MSI-X entries to be copied later.
  xen/pciback: Check PF instead of VF for PCI_COMMAND_MEMORY
  xen/scsiback: correct frontend counting
  xen/arm: correctly handle DMA mapping of compound pages
  ARM: at91/dt: fix typo in sama5d2 pinmux descriptions
  ARM: OMAP2+: Fix onenand initialization to avoid filesystem corruption
  do_last(): don't let a bogus return value from ->open() et.al. to confuse us
  kernel/resource.c: fix muxed resource handling in __request_region()
  sunrpc/cache: fix off-by-one in qword_get()
  tracing: Fix showing function event in available_events
  powerpc/eeh: Fix partial hotplug criterion
  KVM: x86: MMU: fix ubsan index-out-of-range warning
  KVM: x86: fix conversion of addresses to linear in 32-bit protected mode
  KVM: x86: fix missed hardware breakpoints
  KVM: arm/arm64: vgic: Ensure bitmaps are long enough
  KVM: async_pf: do not warn on page allocation failures
  of/irq: Fix msi-map calculation for nonzero rid-base
  NFSv4: Fix a dentry leak on alias use
  nfs: fix nfs_size_to_loff_t
  block: fix use-after-free in dio_bio_complete
  bio: return EINTR if copying to user space got interrupted
  i2c: i801: Adding Intel Lewisburg support for iTCO
  phy: core: fix wrong err handle for phy_power_on
  writeback: keep superblock pinned during cgroup writeback association switches
  cgroup: make sure a parent css isn't offlined before its children
  cpuset: make mm migration asynchronous
  PCI/AER: Flush workqueue on device remove to avoid use-after-free
  ARCv2: SMP: Emulate IPI to self using software triggered interrupt
  ARCv2: STAR 9000950267: Handle return from intr to Delay Slot #2
  libata: fix sff host state machine locking while polling
  qla2xxx: Fix stale pointer access.
  spi: atmel: fix gpio chip-select in case of non-DT platform
  target: Fix race with SCF_SEND_DELAYED_TAS handling
  target: Fix remote-port TMR ABORT + se_cmd fabric stop
  target: Fix TAS handling for multi-session se_node_acls
  target: Fix LUN_RESET active TMR descriptor handling
  target: Fix LUN_RESET active I/O handling for ACK_KREF
  ALSA: hda - Fixing background noise on Dell Inspiron 3162
  ALSA: hda - Apply clock gate workaround to Skylake, too
  Revert "workqueue: make sure delayed work run in local cpu"
  workqueue: handle NUMA_NO_NODE for unbound pool_workqueue lookup
  mac80211: Requeue work after scan complete for all VIF types.
  rfkill: fix rfkill_fop_read wait_event usage
  tick/nohz: Set the correct expiry when switching to nohz/lowres mode
  perf stat: Do not clean event's private stats
  cdc-acm:exclude Samsung phone 04e8:685d
  Revert "Staging: panel: usleep_range is preferred over udelay"
  Staging: speakup: Fix getting port information
  sd: Optimal I/O size is in bytes, not sectors
  libceph: don't spam dmesg with stray reply warnings
  libceph: use the right footer size when skipping a message
  libceph: don't bail early from try_read() when skipping a message
  libceph: fix ceph_msg_revoke()
  seccomp: always propagate NO_NEW_PRIVS on tsync
  cpufreq: Fix NULL reference crash while accessing policy->governor_data
  cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype
  hwmon: (ads1015) Handle negative conversion values correctly
  hwmon: (gpio-fan) Remove un-necessary speed_index lookup for thermal hook
  hwmon: (dell-smm) Blacklist Dell Studio XPS 8000
  Thermal: do thermal zone update after a cooling device registered
  Thermal: handle thermal zone device properly during system sleep
  Thermal: initialize thermal zone device correctly
  IB/mlx5: Expose correct maximum number of CQE capacity
  IB/qib: Support creating qps with GFP_NOIO flag
  IB/qib: fix mcast detach when qp not attached
  IB/cm: Fix a recently introduced deadlock
  dmaengine: dw: disable BLOCK IRQs for non-cyclic xfer
  dmaengine: at_xdmac: fix resume for cyclic transfers
  dmaengine: dw: fix cyclic transfer callbacks
  dmaengine: dw: fix cyclic transfer setup
  nfit: fix multi-interface dimm handling, acpi6.1 compatibility
  ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot()
  ACPI: Revert "ACPI / video: Add Dell Inspiron 5737 to the blacklist"
  ACPI / video: Add disable_backlight_sysfs_if quirk for the Toshiba Satellite R830
  ACPI / video: Add disable_backlight_sysfs_if quirk for the Toshiba Portege R700
  lib: sw842: select crc32
  uapi: update install list after nvme.h rename
  ideapad-laptop: Add Lenovo Yoga 700 to no_hw_rfkill dmi list
  ideapad-laptop: Add Lenovo ideapad Y700-17ISK to no_hw_rfkill dmi list
  toshiba_acpi: Fix blank screen at boot if transflective backlight is supported
  make sure that freeing shmem fast symlinks is RCU-delayed
  drm/radeon/pm: adjust display configuration after powerstate
  drm/radeon: Don't hang in radeon_flip_work_func on disabled crtc. (v2)
  drm: Fix treatment of drm_vblank_offdelay in drm_vblank_on() (v2)
  drm: Fix drm_vblank_pre/post_modeset regression from Linux 4.4
  drm: Prevent vblank counter bumps > 1 with active vblank clients. (v2)
  drm: No-Op redundant calls to drm_vblank_off() (v2)
  drm/radeon: use post-decrement in error handling
  drm/qxl: use kmalloc_array to alloc reloc_info in qxl_process_single_command
  drm/i915: fix error path in intel_setup_gmbus()
  drm/i915/dsi: don't pass arbitrary data to sideband
  drm/i915/dsi: defend gpio table against out of bounds access
  drm/i915/skl: Don't skip mst encoders in skl_ddi_pll_select()
  drm/i915: Don't reject primary plane windowing with color keying enabled on SKL+
  drm/i915/dp: fall back to 18 bpp when sink capability is unknown
  drm/i915: Make sure DC writes are coherent on flush.
  drm/i915: Init power domains early in driver load
  drm/i915: intel_hpd_init(): Fix suspend/resume reprobing
  drm/i915: Restore inhibiting the load of the default context
  drm: fix missing reference counting decrease
  drm/radeon: hold reference to fences in radeon_sa_bo_new
  drm/radeon: mask out WC from BO on unsupported arches
  drm: add helper to check for wc memory support
  drm/radeon: fix DP audio support for APU with DCE4.1 display engine
  drm/radeon: Add a common function for DFS handling
  drm/radeon: cleaned up VCO output settings for DP audio
  drm/radeon: properly byte swap vce firmware setup
  drm/radeon: clean up fujitsu quirks
  drm/radeon: Fix "slow" audio over DP on DCE8+
  drm/radeon: call hpd_irq_event on resume
  drm/radeon: Fix off-by-one errors in radeon_vm_bo_set_addr
  drm/dp/mst: deallocate payload on port destruction
  drm/dp/mst: Reverse order of MST enable and clearing VC payload table.
  drm/dp/mst: move GUID storage from mgr, port to only mst branch
  drm/dp/mst: Calculate MST PBN with 31.32 fixed point
  drm: Add drm_fixp_from_fraction and drm_fixp2int_ceil
  drm/dp/mst: fix in RAD element access
  drm/dp/mst: fix in MSTB RAD initialization
  drm/dp/mst: always send reply for UP request
  drm/dp/mst: process broadcast messages correctly
  drm/nouveau: platform: Fix deferred probe
  drm/nouveau/disp/dp: ensure sink is powered up before attempting link training
  drm/nouveau/display: Enable vblank irqs after display engine is on again.
  drm/nouveau/kms: take mode_config mutex in connector hotplug path
  drm/amdgpu/pm: adjust display configuration after powerstate
  drm/amdgpu: Don't hang in amdgpu_flip_work_func on disabled crtc.
  drm/amdgpu: use post-decrement in error handling
  drm/amdgpu: fix issue with overlapping userptrs
  drm/amdgpu: hold reference to fences in amdgpu_sa_bo_new (v2)
  drm/amdgpu: remove unnecessary forward declaration
  drm/amdgpu: fix s4 resume
  drm/amdgpu: remove exp hardware support from iceland
  drm/amdgpu: don't load MEC2 on topaz
  drm/amdgpu: drop topaz support from gmc8 module
  drm/amdgpu: pull topaz gmc bits into gmc_v7
  drm/amdgpu: The VI specific EXE bit should only apply to GMC v8.0 above
  drm/amdgpu: iceland use CI based MC IP
  drm/amdgpu: move gmc7 support out of CIK dependency
  drm/amdgpu: no need to load MC firmware on fiji
  drm/amdgpu: fix amdgpu_bo_pin_restricted VRAM placing v2
  drm/amdgpu: fix tonga smu resume
  drm/amdgpu: fix lost sync_to if scheduler is enabled.
  drm/amdgpu: call hpd_irq_event on resume
  drm/amdgpu: Fix off-by-one errors in amdgpu_vm_bo_map
  drm/vmwgfx: respect 'nomodeset'
  drm/vmwgfx: Fix a width / pitch mismatch on framebuffer updates
  drm/vmwgfx: Fix an incorrect lock check
  virtio_pci: fix use after free on release
  virtio_balloon: fix race between migration and ballooning
  virtio_balloon: fix race by fill and leak
  regulator: mt6311: MT6311_REGULATOR needs to select REGMAP_I2C
  regulator: axp20x: Fix GPIO LDO enable value for AXP22x
  clk: exynos: use irqsave version of spin_lock to avoid deadlock with irqs
  cxl: use correct operator when writing pcie config space values
  sparc64: fix incorrect sign extension in sys_sparc64_personality
  EDAC, mc_sysfs: Fix freeing bus' name
  EDAC: Robustify workqueues destruction
  MIPS: Fix buffer overflow in syscall_get_arguments()
  MIPS: Fix some missing CONFIG_CPU_MIPSR6 #ifdefs
  MIPS: hpet: Choose a safe value for the ETIME check
  MIPS: Loongson-3: Fix SMP_ASK_C0COUNT IPI handler
  Revert "MIPS: Fix PAGE_MASK definition"
  cputime: Prevent 32bit overflow in time[val|spec]_to_cputime()
  time: Avoid signed overflow in timekeeping_get_ns()
  Bluetooth: 6lowpan: Fix handling of uncompressed IPv6 packets
  Bluetooth: 6lowpan: Fix kernel NULL pointer dereferences
  Bluetooth: Fix incorrect removing of IRKs
  Bluetooth: Add support of Toshiba Broadcom based devices
  Bluetooth: Use continuous scanning when creating LE connections
  Drivers: hv: vmbus: Fix a Host signaling bug
  tools: hv: vss: fix the write()'s argument: error -> vss_msg
  mmc: sdhci: Allow override of get_cd() called from sdhci_request()
  mmc: sdhci: Allow override of mmc host operations
  mmc: sdhci-pci: Fix card detect race for Intel BXT/APL
  mmc: pxamci: fix again read-only gpio detection polarity
  mmc: sdhci-acpi: Fix card detect race for Intel BXT/APL
  mmc: mmci: fix an ages old detection error
  mmc: core: Enable tuning according to the actual timing
  mmc: sdhci: Fix sdhci_runtime_pm_bus_on/off()
  mmc: mmc: Fix incorrect use of driver strength switching HS200 and HS400
  mmc: sdio: Fix invalid vdd in voltage switch power cycle
  mmc: sdhci: Fix DMA descriptor with zero data length
  mmc: sdhci-pci: Do not default to 33 Ohm driver strength for Intel SPT
  mmc: usdhi6rol0: handle NULL data in timeout
  clockevents/tcb_clksrc: Prevent disabling an already disabled clock
  posix-clock: Fix return code on the poll method's error path
  irqchip/gic-v3-its: Fix double ICC_EOIR write for LPI in EOImode==1
  irqchip/atmel-aic: Fix wrong bit operation for IRQ priority
  irqchip/mxs: Add missing set_handle_irq()
  irqchip/omap-intc: Add support for spurious irq handling
  coresight: checking for NULL string in coresight_name_match()
  dm: fix dm_rq_target_io leak on faults with .request_fn DM w/ blk-mq paths
  dm snapshot: fix hung bios when copy error occurs
  dm space map metadata: remove unused variable in brb_pop()
  tda1004x: only update the frontend properties if locked
  vb2: fix a regression in poll() behavior for output,streams
  gspca: ov534/topro: prevent a division by 0
  si2157: return -EINVAL if firmware blob is too big
  media: dvb-core: Don't force CAN_INVERSION_AUTO in oneshot mode
  rc: sunxi-cir: Initialize the spinlock properly
  namei: ->d_inode of a pinned dentry is stable only for positives
  mei: validate request value in client notify request ioctl
  mei: fix fasync return value on error
  rtlwifi: rtl8723be: Fix module parameter initialization
  rtlwifi: rtl8188ee: Fix module parameter initialization
  rtlwifi: rtl8192se: Fix module parameter initialization
  rtlwifi: rtl8723ae: Fix initialization of module parameters
  rtlwifi: rtl8192de: Fix incorrect module parameter descriptions
  rtlwifi: rtl8192ce: Fix handling of module parameters
  rtlwifi: rtl8192cu: Add missing parameter setup
  rtlwifi: rtl_pci: Fix kernel panic
  locks: fix unlock when fcntl_setlk races with a close
  um: link with -lpthread
  uml: fix hostfs mknod()
  uml: flush stdout before forking
  s390/fpu: signals vs. floating point control register
  s390/compat: correct restore of high gprs on signal return
  s390/dasd: fix performance drop
  s390/dasd: fix refcount for PAV reassignment
  s390/dasd: prevent incorrect length error under z/VM after PAV changes
  s390: fix normalization bug in exception table sorting
  btrfs: initialize the seq counter in struct btrfs_device
  Btrfs: Initialize btrfs_root->highest_objectid when loading tree root and subvolume roots
  Btrfs: fix transaction handle leak on failure to create hard link
  Btrfs: fix number of transaction units required to create symlink
  Btrfs: send, don't BUG_ON() when an empty symlink is found
  btrfs: statfs: report zero available if metadata are exhausted
  Btrfs: igrab inode in writepage
  Btrfs: add missing brelse when superblock checksum fails
  KVM: s390: fix memory overwrites when vx is disabled
  s390/kvm: remove dependency on struct save_area definition
  clocksource/drivers/vt8500: Increase the minimum delta
  genirq: Validate action before dereferencing it in handle_irq_event_percpu()
  mm: numa: quickly fail allocations for NUMA balancing on full nodes
  mm: thp: fix SMP race condition between THP page fault and MADV_DONTNEED
  ocfs2: unlock inode if deleting inode from orphan fails
  drm/i915: shut up gen8+ SDE irq dmesg noise
  iw_cxgb3: Fix incorrectly returning error on success
  spi: omap2-mcspi: Prevent duplicate gpio_request
  drivers: android: correct the size of struct binder_uintptr_t for BC_DEAD_BINDER_DONE
  USB: option: add "4G LTE usb-modem U901"
  USB: option: add support for SIM7100E
  USB: cp210x: add IDs for GE B650V3 and B850V3 boards
  usb: dwc3: Fix assignment of EP transfer resources
  can: ems_usb: Fix possible tx overflow
  dm thin: fix race condition when destroying thin pool workqueue
  bcache: Change refill_dirty() to always scan entire disk if necessary
  bcache: prevent crash on changing writeback_running
  bcache: allows use of register in udev to avoid "device_busy" error.
  bcache: unregister reboot notifier if bcache fails to unregister device
  bcache: fix a leak in bch_cached_dev_run()
  bcache: clear BCACHE_DEV_UNLINK_DONE flag when attaching a backing device
  bcache: Add a cond_resched() call to gc
  bcache: fix a livelock when we cause a huge number of cache misses
  lib/ucs2_string: Correct ucs2 -> utf8 conversion
  efi: Add pstore variables to the deletion whitelist
  efi: Make efivarfs entries immutable by default
  efi: Make our variable validation list include the guid
  efi: Do variable name validation tests in utf8
  efi: Use ucs2_as_utf8 in efivarfs instead of open coding a bad version
  lib/ucs2_string: Add ucs2 -> utf8 helper functions
  ARM: 8457/1: psci-smp is built only for SMP
  drm/gma500: Use correct unref in the gem bo create function
  devm_memremap: Fix error value when memremap failed
  KVM: s390: fix guest fprs memory leak
  arm64: errata: Add -mpc-relative-literal-loads to build flags
  ARM: debug-ll: fix BCM63xx entry for multiplatform
  ext4: fix bh->b_state corruption
  sctp: Fix port hash table size computation
  unix_diag: fix incorrect sign extension in unix_lookup_by_ino
  tipc: unlock in error path
  rtnl: RTM_GETNETCONF: fix wrong return value
  IFF_NO_QUEUE: Fix for drivers not calling ether_setup()
  tcp/dccp: fix another race at listener dismantle
  route: check and remove route cache when we get route
  net_sched fix: reclassification needs to consider ether protocol changes
  pppoe: fix reference counting in PPPoE proxy
  l2tp: Fix error creating L2TP tunnels
  net/mlx4_en: Avoid changing dev->features directly in run-time
  net/mlx4_en: Choose time-stamping shift value according to HW frequency
  net/mlx4_en: Count HW buffer overrun only once
  qmi_wwan: add "4G LTE usb-modem U901"
  tcp: md5: release request socket instead of listener
  tipc: fix premature addition of node to lookup table
  af_unix: Guard against other == sk in unix_dgram_sendmsg
  af_unix: Don't set err in unix_stream_read_generic unless there was an error
  ipv4: fix memory leaks in ip_cmsg_send() callers
  bonding: Fix ARP monitor validation
  bpf: fix branch offset adjustment on backjumps after patching ctx expansion
  flow_dissector: Fix unaligned access in __skb_flow_dissector when used by eth_get_headlen
  net: Copy inner L3 and L4 headers as unaligned on GRE TEB
  sctp: translate network order to host order when users get a hmacid
  enic: increment devcmd2 result ring in case of timeout
  tg3: Fix for tg3 transmit queue 0 timed out when too many gso_segs
  net:Add sysctl_max_skb_frags
  tcp: do not drop syn_recv on all icmp reports
  unix: correctly track in-flight fds in sending process user_struct
  ipv6: fix a lockdep splat
  ipv6: addrconf: Fix recursive spin lock call
  ipv6/udp: use sticky pktinfo egress ifindex on connect()
  ipv6: enforce flowi6_oif usage in ip6_dst_lookup_tail()
  tcp: beware of alignments in tcp_get_info()
  switchdev: Require RTNL mutex to be held when sending FDB notifications
  inet: frag: Always orphan skbs inside ip_defrag()
  tipc: fix connection abort during subscription cancel
  net: dsa: fix mv88e6xxx switches
  sctp: allow setting SCTP_SACK_IMMEDIATELY by the application
  pptp: fix illegal memory access caused by multiple bind()s
  af_unix: fix struct pid memory leak
  tcp: fix NULL deref in tcp_v4_send_ack()
  lwt: fix rx checksum setting for lwt devices tunneling over ipv6
  tunnels: Allow IPv6 UDP checksums to be correctly controlled.
  net: dp83640: Fix tx timestamp overflow handling.
  gro: Make GRO aware of lightweight tunnels.
  af_iucv: Validate socket address length in iucv_sock_bind()

Conflicts:
	arch/arm64/Makefile
	arch/arm64/include/asm/cacheflush.h
	drivers/mmc/host/sdhci.c
	drivers/usb/dwc3/ep0.c
	drivers/usb/dwc3/gadget.c
	kernel/module.c
	sound/core/pcm_compat.c

CRs-Fixed: 1010239
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Change-Id: I41a28636fc9ad91f9d979b191784609476294cdf
2016-07-12 11:40:49 -07:00
Prasad Sodagudi
efea890321 genirq: call cancel_work_sync from irq_set_affinity_notifier
When ever notification of IRQ affinity changes, call
cancel_work_sync from irq_set_affinity_notifier to cancel
all pending works to avoid work list corruption.

Change-Id: I1f093bcc43be8c6696bad29250e4926cbc6c4029
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2016-03-25 16:02:35 -07:00