276 Commits

Author SHA1 Message Date
lucaswei
474475fa1d Merge android-4.9-q (4.9.241) into android-msm-pixel-4.9-lts
Merge 4.9.241 into android-4.9-q
Linux 4.9.241
    usb: gadget: f_ncm: allow using NCM in SuperSpeed Plus gadgets.
    eeprom: at25: set minimum read/write access stride to 1
    USB: cdc-wdm: Make wdm_flush() interruptible and add wdm_fsync().
    usb: cdc-acm: add quirk to blacklist ETAS ES58X devices
    net: korina: cast KSEG0 address to pointer in kfree
    ath10k: check idx validity in __ath10k_htt_rx_ring_fill_n()
  * usb: core: Solve race condition in anchor cleanup functions
      drivers/usb/core/urb.c
    brcm80211: fix possible memleak in brcmf_proto_msgbuf_attach
    reiserfs: Fix memory leak in reiserfs_parse_options()
    ipvs: Fix uninit-value in do_ip_vs_set_ctl()
    tty: ipwireless: fix error handling
    Fix use after free in get_capset_info callback.
    rtl8xxxu: prevent potential memory leak
    brcmsmac: fix memory leak in wlc_phy_attach_lcnphy
    scsi: ibmvfc: Fix error return in ibmvfc_probe()
  * Bluetooth: Only mark socket zapped after unlocking
      net/bluetooth/l2cap_sock.c
    usb: ohci: Default to per-port over-current protection
    xfs: make sure the rt allocator doesn't run off the end
    reiserfs: only call unlock_new_inode() if I_NEW
    misc: rtsx: Fix memory leak in rtsx_pci_probe
    ath9k: hif_usb: fix race condition between usb_get_urb() and usb_kill_anchored_urbs()
    USB: cdc-acm: handle broken union descriptors
    udf: Avoid accessing uninitialized data on failed inode read
    udf: Limit sparing table size
    usb: gadget: function: printer: fix use-after-free in __lock_acquire
    misc: vop: add round_up(x,4) for vring_size to avoid kernel panic
    mic: vop: copy data to kernel space then write to io memory
  * scsi: target: core: Add CONTROL field for trace events
      include/scsi/scsi_common.h
    scsi: mvumi: Fix error return in mvumi_io_attach()
    PM: hibernate: remove the bogus call to get_gendisk() in software_resume()
    ntfs: add check for mft record size in superblock
    fs: dlm: fix configfs memory leak
    media: saa7134: avoid a shift overflow
  * mmc: sdio: Check for CISTPL_VERS_1 buffer size
      drivers/mmc/core/sdio_cis.c
    media: uvcvideo: Ensure all probed info is returned to v4l2
    media: media/pci: prevent memory leak in bttv_probe
    media: bdisp: Fix runtime PM imbalance on error
    media: platform: sti: hva: Fix runtime PM imbalance on error
    media: platform: s3c-camif: Fix runtime PM imbalance on error
    media: vsp1: Fix runtime PM imbalance on error
    media: exynos4-is: Fix a reference count leak
    media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync
    media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync
    media: ati_remote: sanity check for both endpoints
    media: firewire: fix memory leak
    crypto: ccp - fix error handling
    NTB: hw: amd: fix an issue about leak system resources
    nvmet: fix uninitialized work for zero kato
    powerpc/powernv/dump: Fix race while processing OPAL dump
    arm64: dts: zynqmp: Remove additional compatible string for i2c IPs
    arm64: dts: qcom: msm8916: Fix MDP/DSI interrupts
    memory: fsl-corenet-cf: Fix handling of platform_get_irq() error
    memory: omap-gpmc: Fix a couple off by ones
    KVM: x86: emulating RDPID failure shall return #UD rather than #GP
    Input: sun4i-ps2 - fix handling of platform_get_irq() error
    Input: twl4030_keypad - fix handling of platform_get_irq() error
    Input: omap4-keypad - fix handling of platform_get_irq() error
    Input: ep93xx_keypad - fix handling of platform_get_irq() error
    Input: imx6ul_tsc - clean up some errors in imx6ul_tsc_resume()
    vfio/pci: Clear token on bypass registration failure
    clk: bcm2835: add missing release if devm_clk_hw_register fails
    clk: at91: clk-main: update key before writing AT91_CKGR_MOR
    rapidio: fix the missed put_device() for rio_mport_add_riodev
    rapidio: fix error handling path
  * lib/crc32.c: fix trivial typo in preprocessor condition
      lib/crc32.c
    IB/rdmavt: Fix sizeof mismatch
    cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier
    powerpc/perf/hv-gpci: Fix starting index value
    powerpc/perf: Exclude pmc5/6 from the irrelevant PMU group constraints
  * overflow: Include header file with SIZE_MAX declaration
      include/linux/overflow.h
  * kdb: Fix pager search for multi-line strings
      kernel/debug/kdb/kdb_io.c
    RDMA/hns: Set the unsupported wr opcode
    perf intel-pt: Fix "context_switch event has no tid" error
    powerpc/tau: Disable TAU between measurements
    powerpc/tau: Remove duplicated set_thresholds() call
    powerpc/tau: Use appropriate temperature sample interval
    RDMA/qedr: Fix use of uninitialized field
    ARM: 9007/1: l2c: fix prefetch bits init in L2X0_AUX_CTRL using DT values
    mtd: mtdoops: Don't write panic data twice
    mtd: lpddr: fix excessive stack usage with clang
    powerpc/icp-hv: Fix missing of_node_put() in success path
    powerpc/pseries: Fix missing of_node_put() in rng_init()
    IB/mlx4: Adjust delayed work when a dup is observed
    IB/mlx4: Fix starvation in paravirt mux/demux
    net: korina: fix kfree of rx/tx descriptor array
    mwifiex: fix double free
    scsi: be2iscsi: Fix a theoretical leak in beiscsi_create_eqs()
  * nl80211: fix non-split wiphy information
      net/wireless/nl80211.c
  * usb: gadget: u_ether: enable qmult on SuperSpeed Plus as well
      drivers/usb/gadget/function/u_ether.c
    usb: gadget: f_ncm: fix ncm_bitrate for SuperSpeed and above.
    iwlwifi: mvm: split a print to avoid a WARNING in ROC
    mfd: sm501: Fix leaks in probe()
    net: enic: Cure the enic api locking trainwreck
  * quota: clear padding in v2r1_mem2diskdqb()
      fs/quota/quota_v2.c
    ALSA: seq: oss: Avoid mutex lock for a long-time ioctl
    misc: mic: scif: Fix error handling path
    ath6kl: wmi: prevent a shift wrapping bug in ath6kl_wmi_delete_pstream_cmd()
    HID: roccat: add bounds checking in kone_sysfs_write_settings()
    video: fbdev: sis: fix null ptr dereference
    video: fbdev: vga16fb: fix setting of pixclock because a pass-by-value error
    drivers/virt/fsl_hypervisor: Fix error handling path
  * pty: do tty_flip_buffer_push without port->lock in pty_write
      drivers/tty/pty.c
    tty: hvcs: Don't NULL tty->driver_data until hvcs_cleanup()
  * tty: serial: earlycon dependency
      drivers/tty/serial/Kconfig
    VMCI: check return value of get_user_pages_fast() for errors
    backlight: sky81452-backlight: Fix refcount imbalance on error
    scsi: csiostor: Fix wrong return value in csio_hw_prep_fw()
    scsi: qla4xxx: Fix an error handling path in 'qla4xxx_get_host_stats()'
    drm/gma500: fix error check
    mwifiex: Do not use GFP_KERNEL in atomic context
    ASoC: qcom: lpass-platform: fix memory leak
    wcn36xx: Fix reported 802.11n rx_highest rate wcn3660/wcn3680
    ath9k: Fix potential out of bounds in ath9k_htc_txcompletion_cb()
    ath6kl: prevent potential array overflow in ath6kl_add_new_sta()
    ath10k: provide survey info as accumulated data
  * regulator: resolve supply after creating regulator
      drivers/regulator/core.c
    media: ti-vpe: Fix a missing check and reference count leak
    media: platform: fcp: Fix a reference count leak.
    media: tc358743: initialize variable
    crypto: omap-sham - fix digcnt register handling with export/import
    media: omap3isp: Fix memleak in isp_probe
    media: m5mols: Check function pointer in m5mols_sensor_power
    media: Revert "media: exynos4-is: Add missed check for pinctrl_lookup_state()"
    crypto: ixp4xx - Fix the size used in a 'dma_free_coherent()' call
    EDAC/i5100: Fix error handling order in i5100_init_one()
    crypto: algif_aead - Do not set MAY_BACKLOG on the async path
    ima: Don't ignore errors from crypto_shash_update()
    KVM: x86/mmu: Commit zap of remaining invalid pages when recovering lpages
    cifs: remove bogus debug code
  * icmp: randomize the global rate limiter
      net/ipv4/icmp.c
  * tcp: fix to update snd_wl1 in bulk receiver fast path
      net/ipv4/tcp_input.c
    nfc: Ensure presence of NFC_ATTR_FIRMWARE_NAME attribute in nfc_genl_fw_download()
    net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup
    net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device
    ALSA: bebob: potential info leak in hwdep_read()
    r8169: fix data corruption issue on RTL8402
  * net/ipv4: always honour route mtu during forwarding
      include/net/ip.h
    tipc: fix the skb_unshare() in tipc_buf_append()
    ibmveth: Identify ingress large send packets.
  * UPSTREAM: binder: fix UAF when releasing todo list
      drivers/android/binder.c
  * ANDROID: namespace'ify tcp_default_init_rwnd implementation
      include/net/netns/ipv4.h
      include/net/tcp.h
      net/ipv4/sysctl_net_ipv4.c
      net/ipv4/tcp_input.c
      net/ipv4/tcp_ipv4.c
      net/ipv4/tcp_minisocks.c
      net/ipv4/tcp_output.c
    Merge 4.9.240 into android-4.9-q
Linux 4.9.240
    crypto: qat - check cipher length for aead AES-CBC-HMAC-SHA
    reiserfs: Fix oops during mount
    reiserfs: Initialize inode keys properly
    USB: serial: ftdi_sio: add support for FreeCalypso JTAG+UART adapters
    USB: serial: pl2303: add device-id for HP GC device
    staging: comedi: check validity of wMaxPacketSize of usb endpoints found
    USB: serial: option: Add Telit FT980-KS composition
    USB: serial: option: add Cellient MPL200 card
    media: usbtv: Fix refcounting mixup
  * Bluetooth: Disconnect if E0 is used for Level 4
      include/net/bluetooth/hci_core.h
      net/bluetooth/hci_conn.c
      net/bluetooth/hci_event.c
  * Bluetooth: Fix update of connection state in `hci_encrypt_cfm`
      include/net/bluetooth/hci_core.h
  * Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
      include/net/bluetooth/hci_core.h
      net/bluetooth/hci_event.c
  * Bluetooth: fix kernel oops in store_pending_adv_report
      net/bluetooth/hci_event.c
  * Bluetooth: MGMT: Fix not checking if BT_HS is enabled
      net/bluetooth/mgmt.c
  * Bluetooth: L2CAP: Fix calling sk_filter on non-socket based channel
      include/net/bluetooth/l2cap.h
      net/bluetooth/l2cap_core.c
      net/bluetooth/l2cap_sock.c
  * Bluetooth: A2MP: Fix not initializing all members
      net/bluetooth/a2mp.c
    Merge 4.9.239 into android-4.9-q
Linux 4.9.239
  * net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails
      drivers/net/usb/rtl8150.c
  * mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged
      include/linux/khugepaged.h
      mm/page_alloc.c
  * perf: Fix task_function_call() error handling
      kernel/events/core.c
    rxrpc: Fix server keyring leak
    rxrpc: Fix some missing _bh annotations on locking conn->state_lock
    rxrpc: Downgrade the BUG() for unsupported token type in rxrpc_read()
    rxrpc: Fix rxkad token xdr encoding
  * mdio: fix mdio-thunder.c dependency & build error
      drivers/net/phy/Kconfig
  * bonding: set dev->needed_headroom in bond_setup_by_slave()
      drivers/net/bonding/bond_main.c
  * xfrm: Use correct address family in xfrm_state_find
      net/xfrm/xfrm_state.c
    net: stmmac: removed enabling eee in EEE set callback
  * xfrm: clone whole liftime_cur structure in xfrm_do_migrate
      net/xfrm/xfrm_state.c
  * xfrm: clone XFRMA_REPLAY_ESN_VAL in xfrm_do_migrate
      include/net/xfrm.h
    drm/amdgpu: prevent double kfree ttm->sg
    openvswitch: handle DNAT tuple collision
    net: team: fix memory leak in __team_options_register
    team: set dev->needed_headroom in team_setup_by_port()
    sctp: fix sctp_auth_init_hmacs() error path
    mm/khugepaged: fix filemap page_to_pgoff(page) != offset
    macsec: avoid use-after-free in macsec_handle_frame()
    ftrace: Move RCU is watching check after recursion check
    mtd: rawnand: sunxi: Fix the probe error path
    perf top: Fix stdio interface input handling with glibc 2.28+
  * driver core: Fix probe_count imbalance in really_probe()
      drivers/base/dd.c
    platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse
    platform/x86: thinkpad_acpi: initialize tp_nvram_state variable
  * usermodehelper: reset umask to default before executing user process
      kernel/kmod.c
  * net: wireless: nl80211: fix out-of-bounds access in nl80211_del_key()
      net/wireless/nl80211.c
    fbcon: Fix global-out-of-bounds read in fbcon_get_font()
    Revert "ravb: Fixed to be able to unload modules"
  * Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts
      include/linux/font.h
  * fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h
      include/linux/font.h
  * netfilter: ctnetlink: add a range check for l3/l4 protonum
      net/netfilter/nf_conntrack_netlink.c
  * ep_create_wakeup_source(): dentry name can change under you...
      fs/eventpoll.c
  * epoll: EPOLL_CTL_ADD: close the race in decision to take fast path
      fs/eventpoll.c
  * epoll: replace ->visited/visited_list with generation count
      fs/eventpoll.c
  * epoll: do not insert into poll queues until all sanity checks are done
      fs/eventpoll.c
  * net/packet: fix overflow in tpacket_rcv
      net/packet/af_packet.c
  * random32: Restore __latent_entropy attribute on net_rand_state
      lib/random32.c
    i2c: cpm: Fix i2c_ram structure
    iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate()
    clk: samsung: exynos4: mark 'chipid' clock as CLK_IGNORE_UNUSED
    nfs: Fix security label length not being reset
    mac80211: do not allow bigger VHT MPDUs than the hardware supports
    drivers/net/wan/hdlc: Set skb->protocol before transmitting
    drivers/net/wan/lapbether: Make skb->protocol consistent with the header
    rndis_host: increase sleep time in the query-response loop
    net: dec: de2104x: Increase receive ring size for Tulip
    drm/amdgpu: restore proper ref count in amdgpu_display_crtc_set_config
    Input: i8042 - add nopnp quirk for Acer Aspire 5 A515
    gpio: tc35894: fix up tc35894 interrupt configuration
    USB: gadget: f_ncm: Fix NDP16 datagram validation
    vsock/virtio: stop workers during the .remove()
    vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock
    Merge 4.9.238 into android-4.9-q
Linux 4.9.238
    ata: sata_mv, avoid trigerrable BUG_ON
    ata: make qc_prep return ata_completion_errors
    ata: define AC_ERR_OK
  * lib/string.c: implement stpcpy
      lib/string.c
    kprobes: Fix to check probe enabled before disarm_kprobe_ftrace()
    MIPS: Add the missing 'CPU_1074K' into __get_cpu_type()
    ALSA: asihpi: fix iounmap in error handler
    batman-adv: mcast: fix duplicate mcast packets in BLA backbone from mesh
    batman-adv: Add missing include for in_interrupt()
    mac802154: tx: fix use-after-free
    batman-adv: mcast/TT: fix wrongly dropped or rerouted packets
    atm: eni: fix the missed pci_disable_device() for eni_init_one()
    batman-adv: bla: fix type misuse for backbone_gw hash indexing
    mwifiex: Increase AES key storage size to 256 bits
    clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init()
    ieee802154/adf7242: check status of adf7242_read_reg
    objtool: Fix noreturn detection for ignored functions
  * i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices()
      drivers/i2c/i2c-core.c
    s390/init: add missing __init annotations
    vfio/pci: fix racy on error and request eventfd ctx
    selftests/x86/syscall_nt: Clear weird flags after each test
    cifs: Fix double add page to memcg when cifs_readpages
    vfio/pci: Clear error and request eventfd ctx after releasing
    x86/speculation/mds: Mark mds_user_clear_cpu_buffers() __always_inline
    mtd: parser: cmdline: Support MTD names containing one or more colons
    ceph: fix potential race in ceph_check_caps
    mtd: rawnand: omap_elm: Fix runtime PM imbalance on error
    perf kcore_copy: Fix module map when there are no modules loaded
    perf util: Fix memory leak of prefix_if_not_in
    vfio/pci: fix memory leaks of eventfd ctx
    btrfs: don't force read-only after error in drop snapshot
  * printk: handle blank console arguments passed in.
      kernel/printk/printk.c
    e1000: Do not perform reset in reset_task if we are already down
    USB: EHCI: ehci-mv: fix less than zero comparison of an unsigned int
  * fuse: don't check refcount after stealing page
      fs/fuse/dev.c
    ALSA: hda: Fix potential race in unsol event handler
    tty: serial: samsung: Correct clock selection logic
    USB: EHCI: ehci-mv: fix error handling in mv_ehci_probe()
  * Bluetooth: Handle Inquiry Cancel error after Inquiry Complete
      net/bluetooth/hci_event.c
    phy: samsung: s5pv210-usb2: Add delay after reset
    atm: fix a memory leak of vcc->user_back
    dt-bindings: sound: wm8994: Correct required supplies based on actual implementaion
    drivers: char: tlclk.c: Avoid data race between init and interrupt handler
  * bdev: Reduce time holding bd_mutex in sync in blkdev_close()
      fs/block_dev.c
    KVM: Remove CREATE_IRQCHIP/SET_PIT2 race
  * mm/mmap.c: initialize align_offset explicitly for vm_unmapped_area
      mm/mmap.c
  * mm/filemap.c: clear page error before actual read
      mm/filemap.c
  * ALSA: usb-audio: Fix case when USB MIDI interface has more than one extra endpoint descriptor
      sound/usb/midi.c
    ubifs: Fix out-of-bounds memory access caused by abnormal value of node_len
    svcrdma: Fix leak of transport addresses
    SUNRPC: Fix a potential buffer overflow in 'svc_print_xprts()'
    tools: gpio-hammer: Avoid potential overflow in main
    cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_work_fn
    serial: 8250: 8250_omap: Terminate DMA before pushing data on RX timeout
    serial: 8250_omap: Fix sleeping function called from invalid context during probe
    serial: 8250_port: Don't service RX FIFO if throttled
  * tracing: Use address-of operator on section symbols
      kernel/trace/trace.c
    tpm: ibmvtpm: Wait for buffer to be set before proceeding
    xfs: don't ever return a stale pointer from __xfs_dir3_free_read
    media: tda10071: fix unsigned sign extension overflow
  * Bluetooth: L2CAP: handle l2cap config request during open state
      net/bluetooth/l2cap_core.c
    drm/amdgpu: increase atombios cmd timeout
  * timekeeping: Prevent 32bit truncation in scale64_check_overflow()
      kernel/time/timekeeping.c
  * Bluetooth: guard against controllers sending zero'd events
      net/bluetooth/hci_event.c
    media: go7007: Fix URB type for interrupt handling
    dmaengine: tegra-apb: Prevent race conditions on channel's freeing
  * bpf: Remove recursion prevention from rcu free callback
      kernel/bpf/hashtab.c
    x86/pkeys: Add check for pkey "overflow"
    KVM: x86: fix incorrect comparison in trace event
    RDMA/rxe: Fix configuration of atomic queue pair attributes
    drm/omap: fix possible object reference leak
    scsi: lpfc: Fix coverity errors in fmdi attribute handling
    scsi: lpfc: Fix RQ buffer leakage when no IOCBs available
  * selinux: sel_avc_get_stat_idx should increase position index
      security/selinux/selinuxfs.c
    audit: CONFIG_CHANGE don't log internal bookkeeping as an event
  * skbuff: fix a data race in skb_queue_len()
      include/linux/skbuff.h
      net/unix/af_unix.c
    ALSA: hda: Clear RIRB status before reading WP
    KVM: fix overflow of zero page refcount with ksm running
  * Bluetooth: prefetch channel before killing sock
      net/bluetooth/l2cap_sock.c
  * mm: pagewalk: fix termination condition in walk_pte_range()
      mm/pagewalk.c
  * Bluetooth: Fix refcount use-after-free issue
      net/bluetooth/l2cap_core.c
      net/bluetooth/l2cap_sock.c
    ar5523: Add USB ID of SMCWUSBT-G2 wireless adapter
  * tracing: Set kernel_stack's caller size properly
      kernel/trace/trace_entries.h
    dmaengine: zynqmp_dma: fix burst length configuration
    ACPI: EC: Reference count query handlers under lock
    media: ti-vpe: cal: Restrict DMA to avoid memory corruption
  * seqlock: Require WRITE_ONCE surrounding raw_seqcount_barrier
      include/linux/seqlock.h
  * rt_cpu_seq_next should increase position index
      net/ipv4/route.c
  * neigh_stat_seq_next() should increase position index
      net/core/neighbour.c
  * kernel/sys.c: avoid copying possible padding bytes in copy_to_user
      kernel/sys.c
    CIFS: Properly process SMB3 lease breaks
  * debugfs: Fix !DEBUG_FS debugfs_create_automount
      include/linux/debugfs.h
    RDMA/iw_cgxb4: Fix an error handling path in 'c4iw_connect()'
    xfs: fix attr leaf header freemap.size underflow
    RDMA/i40iw: Fix potential use after free
    bcache: fix a lost wake-up problem caused by mca_cannibalize_lock
  * tracing: Adding NULL checks for trace_array descriptor pointer
      kernel/trace/trace.c
      kernel/trace/trace_events.c
  * mfd: mfd-core: Protect against NULL call-back function pointer
      drivers/mfd/mfd-core.c
    mtd: cfi_cmdset_0002: don't free cfi->cfiq in error path of cfi_amdstd_setup()
    clk/ti/adpll: allocate room for terminating null
    PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out
  * ALSA: usb-audio: Add delay quirk for H570e USB headsets
      sound/usb/quirks.c
    ASoC: kirkwood: fix IRQ error handling
    gma/gma500: fix a memory disclosure bug due to uninitialized bytes
    m68k: q40: Fix info-leak in rtc_ioctl
    scsi: aacraid: fix illegal IO beyond last LBA
    serial: 8250: Avoid error message on reprobe
  * net: add __must_check to skb_put_padto()
      include/linux/skbuff.h
    net/hsr: Check skb_put_padto() return value
  * net: phy: Avoid NPD upon phy_detach() when driver is unbound
      drivers/net/phy/phy_device.c
    bnxt_en: Protect bnxt_set_eee() and bnxt_set_pauseparam() with mutex.
    tipc: use skb_unshare() instead in tipc_buf_append()
  * ip: fix tos reflection in ack and reset packets
      net/ipv4/ip_output.c
    hdlc_ppp: add range checks in ppp_cp_parse_cr()
    mtd: Fix comparison in map_word_andequal()
    RDMA/ucma: ucma_context reference leak in error path
    kprobes: fix kill kprobe which has been marked as gone
    KVM: fix memory leak in kvm_io_bus_unregister_dev()
  * af_key: pfkey_dump needs parameter validation
      net/key/af_key.c

Change-Id: Ic405992aa26bd9ce6da4fdcf67ab341ef9427b53
Signed-off-by: lucaswei <lucaswei@google.com>
2020-11-26 18:08:27 +08:00
Dmitry Osipenko
0a06f599c8 PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out
[ Upstream commit 53b4b2aeee26f42cde5ff2a16dd0d8590c51a55a ]

There is another kHz-conversion bug in the code, resulting in integer
overflow. Although, this time the resulting value is 4294966296 and it's
close to ULONG_MAX, which is okay in this case.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 20:40:02 +02:00
lucaswei
b647e7a00f Merge android-4.9-q (4.9.219) into android-msm-pixel-4.9-lts
Merge 4.9.219 into android-4.9-q
Linux 4.9.219
  * drm/msm: Use the correct dma_sync calls in msm_gem
      drivers/gpu/drm/msm/msm_gem.c
  * drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read()
      drivers/gpu/drm/drm_dp_mst_topology.c
  * usb: dwc3: don't set gadget->is_otg flag
      drivers/usb/dwc3/gadget.c
  * arm64: Fix size of __early_cpu_boot_status
      arch/arm64/kernel/head.S
  * drm/msm: stop abusing dma_map/unmap for cache
      drivers/gpu/drm/msm/msm_gem.c
  * clk: qcom: rcg: Return failure for RCG update
      drivers/clk/qcom/clk-rcg2.c
    RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow
    Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl
    ceph: canonicalize server path in place
    ceph: remove the extra slashes in the server path
    IB/hfi1: Fix memory leaks in sysfs registration and unregistration
    IB/hfi1: Call kobject_put() when kobject_init_and_add() fails
    ASoC: jz4740-i2s: Fix divider written at incorrect offset in register
    tools/accounting/getdelays.c: fix netlink attribute length
  * random: always use batched entropy for get_random_u{32,64}
      drivers/char/random.c
    net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers
    slcan: Don't transmit uninitialized stack data in padding
    net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting
    net: dsa: bcm_sf2: Ensure correct sub-node is parsed
    mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
    padata: always acquire cpu_hotplug_lock before pinst->lock
    net: dsa: tag_brcm: Fix skb->fwd_offload_mark location
  * coresight: do not use the BIT() macro in the UAPI header
      include/uapi/linux/coresight-stm.h
  * blk-mq: Allow blocking queue tag iter callbacks
      block/blk-mq-tag.c
  * blk-mq: sync the update nr_hw_queues with blk_mq_queue_tag_busy_iter
      block/blk-mq-tag.c
      block/blk-mq.c
    drm/etnaviv: replace MMU flush marker with flush sequence
    sctp: fix possibly using a bad saddr with a given dst
    sctp: fix refcount bug in sctp_wfree
  * net, ip_tunnel: fix interface lookup with no key
      net/ipv4/ip_tunnel.c
  * ipv4: fix a RCU-list lock in fib_triestat_seq_show
      net/ipv4/fib_trie.c
    drm/bochs: downgrade pci_request_region failure from error to warning
  * l2tp: fix race between l2tp_session_delete() and l2tp_tunnel_closeall()
      net/l2tp/l2tp_core.c
      net/l2tp/l2tp_core.h
  * l2tp: ensure sessions are freed after their PPPOL2TP socket
      net/l2tp/l2tp_ppp.c
    ANDROID: cuttlefish_defconfig: Minimally enable EFI
    Merge 4.9.218 into android-4.9-q
Linux 4.9.218
    perf map: Fix off by one in strncpy() size argument
  * arm64: alternative: fix build with clang integrated assembler
      arch/arm64/include/asm/alternative.h
    net: ks8851-ml: Fix IO operations, again
  * bpf: Explicitly memset the bpf_attr structure
      kernel/bpf/syscall.c
  * vt: vt_ioctl: fix use-after-free in vt_in_use()
      drivers/tty/vt/vt_ioctl.c
  * locking/atomic, kref: Add kref_read()
      include/linux/kref.h
  * vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
      drivers/tty/vt/vt.c
      drivers/tty/vt/vt_ioctl.c
  * vt: vt_ioctl: remove unnecessary console allocation checks
      drivers/tty/vt/vt_ioctl.c
  * vt: switch vt_dont_switch to bool
      drivers/tty/vt/vt_ioctl.c
      include/linux/vt_kern.h
  * vt: ioctl, switch VT_IS_IN_USE and VT_BUSY to inlines
      drivers/tty/vt/vt_ioctl.c
  * vt: selection, introduce vc_is_sel
      drivers/tty/vt/selection.c
      drivers/tty/vt/vt.c
      drivers/tty/vt/vt_ioctl.c
      include/linux/selection.h
    mac80211: fix authentication with iwlwifi/mvm
    mac80211: Check port authorization in the ieee80211_tx_dequeue() case
    media: xirlink_cit: add missing descriptor sanity checks
    media: stv06xx: add missing descriptor sanity checks
    media: dib0700: fix rc endpoint lookup
    media: ov519: add missing endpoint sanity checks
  * libfs: fix infoleak in simple_attr_read()
      fs/libfs.c
    staging: wlan-ng: fix use-after-free Read in hfa384x_usbin_callback
    staging: wlan-ng: fix ODEBUG bug in prism2sta_disconnect_usb
    staging: rtl8188eu: Add ASUS USB-N10 Nano B1 to device table
    media: usbtv: fix control-message timeouts
    media: flexcop-usb: fix endpoint sanity check
    usb: musb: fix crash with highmen PIO and usbmon
    USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback
    USB: cdc-acm: restore capability check order
    USB: serial: option: add Wistron Neweb D19Q1
    USB: serial: option: add BroadMobi BM806U
    USB: serial: option: add support for ASKEY WWHC050
    tools: Let O= makes handle a relative path with -C option
    Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger()
    Input: raydium_i2c_ts - use true and false for boolean values
  * vti6: Fix memory leak of skb if input policy check fails
      net/ipv6/ip6_vti.c
    netfilter: nft_fwd_netdev: validate family and chain type
  * xfrm: policy: Fix doulbe free in xfrm_policy_timer
      net/xfrm/xfrm_policy.c
  * xfrm: add the missing verify_sec_ctx_len check in xfrm_add_acquire
      net/xfrm/xfrm_user.c
  * xfrm: fix uctx len check in verify_sec_ctx_len
      net/xfrm/xfrm_user.c
  * vti[6]: fix packet tx through bpf_redirect() in XinY cases
      net/ipv4/Kconfig
      net/ipv4/ip_vti.c
      net/ipv6/ip6_vti.c
  * genirq: Fix reference leaks on irq affinity notifiers
      kernel/irq/manage.c
    mac80211: mark station unauthorized before key removal
  * scsi: sd: Fix optimal I/O size for devices that change reported values
      drivers/scsi/sd.c
    scripts/dtc: Remove redundant YYLOC global declaration
    perf probe: Do not depend on dwfl_module_addrsym()
    ARM: dts: omap5: Add bus_dma_limit for L3 bus
    ARM: dts: dra7: Add bus_dma_limit for L3 bus
    i2c: hix5hd2: add missed clk_disable_unprepare in remove
    sxgbe: Fix off by one in samsung driver strncpy size arg
    mac80211: Do not send mesh HWMP PREQ if HWMP is disabled
    scsi: ipr: Fix softlockup when rescanning devices in petitboot
    dt-bindings: net: FMan erratum A050385
    cpupower: avoid multiple definition with gcc -fno-common
  * net: ipv4: don't let PMTU updates increase route MTU
      net/ipv4/route.c
    KVM: VMX: Do not allow reexecute_instruction() when skipping MMIO instr
    hsr: set .netnsok flag
    hsr: add restart routine into hsr_get_node_list()
    hsr: use rcu_read_lock() in hsr_get_node_{list/status}()
    net: mvneta: Fix the case where the last poll did not process all rx
    vxlan: check return value of gro_cells_init()
    slcan: not call free_netdev before rtnl_unlock in slcan_open
    NFC: fdp: Fix a signedness bug in fdp_nci_send_patch()
    net_sched: keep alloc_hash updated after hash allocation
    net_sched: cls_route: remove the right filter from hashtable
    net: dsa: Fix duplicate frames flooded by learning
    macsec: restrict to ethernet devices
    hsr: fix general protection fault in hsr_addr_is_self()
  * Revert "drm/dp_mst: Skip validating ports during destruction, just ref"
      drivers/gpu/drm/drm_dp_mst_topology.c
    staging: greybus: loopback_test: fix potential path truncations
    staging: greybus: loopback_test: fix potential path truncation
  * arm64: smp: fix smp_send_stop() behaviour
      arch/arm64/kernel/smp.c
    ALSA: hda/realtek: Fix pop noise on ALC225
  * futex: Unbreak futex hashing
      kernel/futex.c
  * futex: Fix inode life-time issue
      fs/inode.c
      include/linux/fs.h
      include/linux/futex.h
      kernel/futex.c
  * kbuild: Disable -Wpointer-to-enum-cast
      scripts/Makefile.extrawarn
    USB: cdc-acm: fix rounding error in TIOCSSERIAL
    USB: cdc-acm: fix close_delay and closing_wait units in TIOCSSERIAL
  * x86/mm: split vmalloc_sync_all()
      include/linux/vmalloc.h
      kernel/notifier.c
      mm/vmalloc.c
  * mm, slub: prevent kmalloc_node crashes and memory leaks
      mm/slub.c
  * mm: slub: be more careful about the double cmpxchg of freelist
      mm/slub.c
  * memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event
      mm/memcontrol.c
  * rtc: max8907: add missing select REGMAP_IRQ
      drivers/rtc/Kconfig
    intel_th: Fix user-visible error codes
    staging/speakup: fix get_word non-space look-ahead
    staging: rtl8188eu: Add device id for MERCUSYS MW150US v2
    mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2
    iio: magnetometer: ak8974: Fix negative raw values in sysfs
    ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks
    ALSA: pcm: oss: Avoid plugin buffer overflow
    ALSA: seq: oss: Fix running status after receiving sysex
    ALSA: seq: virmidi: Fix running status after receiving sysex
    ALSA: line6: Fix endless MIDI read loop
    USB: serial: pl2303: add device-id for HP LD381
  * usb: host: xhci-plat: add a shutdown
      drivers/usb/host/xhci-plat.c
    USB: serial: option: add ME910G1 ECM composition 0x110b
  * usb: quirks: add NO_LPM quirk for RTL8153 based ethernet adapters
      drivers/usb/core/quirks.c
  * USB: Disable LPM on WD19's Realtek Hub
      drivers/usb/core/quirks.c
    altera-stapl: altera_get_note: prevent write beyond end of 'key'
    drm/exynos: dsi: fix workaround for the legacy clock name
    drm/exynos: dsi: propagate error value and silence meaningless warning
    spi/zynqmp: remove entry that causes a cs glitch
    ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes
    powerpc: Include .BTF section
  * spi: qup: call spi_qup_pm_resume_runtime before suspending
      drivers/spi/spi-qup.c
  * UPSTREAM: ipv6: ndisc: add support for 'PREF64' dns64 prefix identifier
      include/net/ndisc.h
      net/ipv6/ndisc.c
    ANDROID: dm-bow: Fix free_show value is incorrect
  * UPSTREAM: bpf: Explicitly memset the bpf_attr structure
      kernel/bpf/syscall.c
    Merge 4.9.217 into android-4.9-q
Linux 4.9.217
  * ipv4: ensure rcu_read_lock() in cipso_v4_error()
      net/ipv4/cipso_ipv4.c
  * mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
      mm/slub.c
    ARM: 8958/1: rename missed uaccess .fixup section
    ARM: 8957/1: VDSO: Match ARMv8 timer in cntvct_functional()
  * jbd2: fix data races at struct journal_head
      fs/jbd2/transaction.c
  * signal: avoid double atomic counter increments for user accounting
      kernel/signal.c
    mac80211: rx: avoid RCU list traversal under mutex
    net: ks8851-ml: Fix IRQ handling and locking
  * cfg80211: check reg_rule for NULL in handle_channel_custom()
      net/wireless/reg.c
    HID: i2c-hid: add Trekstor Surfbook E11B to descriptor override
  * HID: apple: Add support for recent firmware on Magic Keyboards
      drivers/hid/hid-apple.c
    ACPI: watchdog: Allow disabling WDAT at boot
    perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag
    batman-adv: Use explicit tvlv padding for ELP packets
    batman-adv: Avoid probe ELP information leak
    batman-adv: update data pointers after skb_cow()
    batman-adv: Don't schedule OGM for disabled interface
    batman-adv: Avoid free/alloc race when handling OGM buffer
    batman-adv: Avoid free/alloc race when handling OGM2 buffer
    batman-adv: Fix duplicated OGMs on NETDEV_UP
    batman-adv: Prevent duplicated gateway_node entry
    batman-adv: Fix multicast TT issues with bogus ROAM flags
    batman-adv: Avoid storing non-TT-sync flags on singular entries too
    batman-adv: Fix debugfs path for renamed softif
    batman-adv: Fix debugfs path for renamed hardif
    batman-adv: prevent TT request storms by not sending inconsistent TT TLVLs
    batman-adv: Fix TT sync flags for intermediate TT responses
    batman-adv: Avoid race in TT TVLV allocator helper
    batman-adv: Fix internal interface indices types
    batman-adv: Fix lock for ogm cnt access in batadv_iv_ogm_calc_tq
    batman-adv: Fix check of retrieved orig_gw in batadv_v_gw_is_eligible
    batman-adv: Always initialize fragment header priority
    batman-adv: Avoid spurious warnings from bat_v neigh_cmp implementation
    batman-adv: fix TT sync flag inconsistencies
    batman-adv: Accept only filled wifi station info
    batman-adv: Use default throughput value on cfg80211 error
    batman-adv: Fix rx packet/bytes stats on local ARP reply
    batman-adv: Initialize gw sel_class via batadv_algo
    batman-adv: Fix transmission of final, 16th fragment
    batman-adv: Fix double free during fragment merge error
    efi: Add a sanity check to efivar_store_raw()
  * ipv6: restrict IPV6_ADDRFORM operation
      net/ipv6/ipv6_sockglue.c
    iommu/vt-d: Ignore devices with out-of-spec domain number
    iommu/vt-d: Fix the wrong printing in RHSA parsing
    mwifiex: Fix heap overflow in mmwifiex_process_tdls_action_frame()
    netfilter: cthelper: add missing attribute validation for cthelper
  * nl80211: add missing attribute validation for channel switch
      net/wireless/nl80211.c
  * nl80211: add missing attribute validation for beacon report scanning
      net/wireless/nl80211.c
  * nl80211: add missing attribute validation for critical protocol indication
      net/wireless/nl80211.c
    iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page
    iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
    efi: Fix a race and a buffer overflow while reading efivars via sysfs
    ARC: define __ALIGN_STR and __ALIGN symbols for ARC
    KVM: x86: clear stale x86_emulate_ctxt->intercept value
    gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache
  * cifs_atomic_open(): fix double-put on late allocation failure
      fs/open.c
    drm/amd/display: remove duplicated assignment to grph_obj_type
  * workqueue: don't use wq_select_unbound_cpu() for bound works
      kernel/workqueue.c
    iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint
    virtio-blk: fix hw_queue stopped on arbitrary error
  * net: phy: fix MDIO bus PM PHY resuming
      drivers/net/phy/phy_device.c
      include/linux/phy.h
  * cgroup: memcg: net: do not associate sock with unrelated cgroup
      kernel/cgroup.c
      mm/memcontrol.c
  * bonding/alb: make sure arp header is pulled before accessing it
      drivers/net/bonding/bond_alb.c
  * slip: make slhc_compress() more robust against malicious packets
      drivers/net/slip/slhc.c
    net: fec: validate the new settings in fec_enet_set_coalesce()
    macvlan: add cond_resched() during multicast processing
    ipvlan: don't deref eth hdr before checking it's set
    ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()
    ipvlan: egress mcast packets are not exceptional
    ipvlan: do not add hardware address of master to its unicast filter list
    ipvlan: add cond_resched_rcu() while processing muticast backlog
    nfc: add missing attribute validation for vendor subcommand
    nfc: add missing attribute validation for SE API
    team: add missing attribute validation for array index
    team: add missing attribute validation for port ifindex
    net: fq: add missing attribute validation for orphan mask
    macsec: add missing attribute validation for port
    nl802154: add missing attribute validation for dev_type
    nl802154: add missing attribute validation
  * fib: add missing attribute validation for tun_id
      include/net/fib_rules.h
    bnxt_en: reinitialize IRQs when MTU is modified
  * r8152: check disconnect status after long sleep
      drivers/net/usb/r8152.c
    net: nfc: fix bounds checking bugs on "pipe"
    net: macsec: update SCI upon MAC address change.
  * ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface
      net/ipv6/addrconf.c
    gre: fix uninit-value in __iptunnel_pull_header
    cgroup, netclassid: periodically release file_lock on classid updating
  * net: phy: Avoid multiple suspends
      drivers/net/phy/phy_device.c
  * phy: Revert toggling reset changes.
      drivers/net/phy/phy_device.c
    NFS: Remove superfluous kmap in nfs_readdir_xdr_to_array
    Merge 4.9.216 into android-4.9-q
Linux 4.9.216
    crypto: algif_skcipher - use ZERO_OR_NULL_PTR in skcipher_recvmsg_async
    dm cache: fix a crash due to incorrect work item cancelling
    powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems
    dmaengine: coh901318: Fix a double lock bug in dma_tc_handle()
    hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT()
    ARM: imx: build v7_cpu_resume() unconditionally
    RMDA/cm: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()
    RDMA/iwcm: Fix iwcm work deallocation
  * ASoC: dapm: Correct DAPM handling of active widgets during shutdown
      sound/soc/soc-dapm.c
    ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path
  * ASoC: pcm: Fix possible buffer overflow in dpcm state sysfs output
      sound/soc/soc-pcm.c
    ARM: dts: ls1021a: Restore MDIO compatible to gianfar
    dmaengine: tegra-apb: Prevent race conditions of tasklet vs free list
    dmaengine: tegra-apb: Fix use-after-free
    x86/pkeys: Manually set X86_FEATURE_OSPKE to preserve existing changes
  * vt: selection, push sel_lock up
      drivers/tty/vt/selection.c
  * vt: selection, push console lock down
      drivers/tty/vt/selection.c
      drivers/tty/vt/vt.c
  * vt: selection, close sel_buffer race
      drivers/tty/vt/selection.c
    tty:serial:mvebu-uart:fix a wrong return
  * fat: fix uninit-memory access for partial initialized inode
      fs/fat/inode.c
    vgacon: Fix a UAF in vgacon_invert_region
  * usb: core: port: do error out if usb_autopm_get_interface() fails
      drivers/usb/core/port.c
  * usb: core: hub: do error out if usb_autopm_get_interface() fails
      drivers/usb/core/hub.c
  * usb: quirks: add NO_LPM quirk for Logitech Screen Share
      drivers/usb/core/quirks.c
  * usb: storage: Add quirk for Samsung Fit flash
      drivers/usb/storage/unusual_devs.h
    cifs: don't leak -EAGAIN for stat() during reconnect
    s390/cio: cio_ignore_proc_seq_next should increase position index
    watchdog: da9062: do not ping the hw during stop()
    net: ks8851-ml: Fix 16-bit IO operation
    net: ks8851-ml: Fix 16-bit data access
    net: ks8851-ml: Remove 8-bit bus accessors
    drm/msm/dsi: save pll state before dsi host is powered off
    drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI
    usb: gadget: serial: fix Tx stall after buffer overflow
  * usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags
      drivers/usb/gadget/function/f_fs.c
  * usb: gadget: composite: Support more than 500mA MaxPower
      drivers/usb/gadget/composite.c
    serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE
    vhost: Check docket sk_family instead of call getname
  * audit: always check the netlink payload length in audit_receive_msg()
      kernel/audit.c
    mm/huge_memory.c: use head to check huge zero page
    perf hists browser: Restore ESC as "Zoom out" of DSO/thread/etc
    drivers: net: xgene: Fix the order of the arguments of 'alloc_etherdev_mqs()'
  * tuntap: correctly set SOCKWQ_ASYNC_NOSPACE
      drivers/net/tun.c
    slip: stop double free sl->dev in slip_open
    KVM: Check for a bad hva before dropping into the ghc slow path
  * namei: only return -ECHILD from follow_dotdot_rcu()
      fs/namei.c
    net: ena: make ena rxfh support ETH_RSS_HASH_NO_CHANGE
  * net: netlink: cap max groups which will be considered in netlink_bind()
      net/netlink/af_netlink.c
  * include/linux/bitops.h: introduce BITS_PER_TYPE
      include/linux/bitops.h
    serial: 8250: Check UPF_IRQ_SHARED in advance
  * ecryptfs: Fix up bad backport of fe2e082f5da5b4a0a92ae32978f81507ef37ec66
      fs/ecryptfs/keystore.c
    i2c: jz4780: silence log flood on txabrt
    MIPS: VPE: Fix a double free and a memory leak in 'release_vpe()'
  * HID: hiddev: Fix race in in hiddev_disconnect()
      drivers/hid/usbhid/hiddev.c
  * HID: core: increase HID report buffer size to 8KiB
      include/linux/hid.h
  * HID: core: fix off-by-one memset in hid_report_raw_event()
      drivers/hid/hid-core.c
    ACPI: watchdog: Fix gas->access_width usage
  * ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro
      include/acpi/actypes.h
  * audit: fix error handling in audit_data_to_entry()
      kernel/auditfilter.c
  * ext4: potential crash on allocation error in ext4_alloc_flex_bg_array()
      fs/ext4/super.c
  * net: sched: correct flower port blocking
      include/net/flow_dissector.h
    nfc: pn544: Fix occasional HW initialization failure
    sctp: move the format error check out of __sctp_sf_do_9_1_abort
  * ipv6: Fix route replacement with dev-only route
      net/ipv6/ip6_fib.c
  * ipv6: Fix nlmsg_flags when splitting a multipath route
      net/ipv6/route.c
    net: phy: restore mdio regs in the iproc mdio driver
  * net: fib_rules: Correctly set table field when table number exceeds 8 bits
      net/core/fib_rules.c
  * sysrq: Remove duplicated sysrq message
      drivers/tty/sysrq.c
  * sysrq: Restore original console_loglevel when sysrq disabled
      drivers/tty/sysrq.c
  * cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE
      net/wireless/nl80211.c
    cifs: Fix mode output in debugging statements
    net: ena: ena-com.c: prevent NULL pointer dereference
    net: ena: fix incorrectly saving queue numbers when setting RSS indirection table
    net: ena: rss: store hash function as values and not bits
    net: ena: rss: fix failure to get indirection table
    net: ena: fix incorrect default RSS key
    net: ena: add missing ethtool TX timestamping indication
    net: ena: fix potential crash when rxfh key is NULL
    qmi_wwan: re-add DW5821e pre-production variant
  * cfg80211: check wiphy driver existence for drvinfo report
      net/wireless/ethtool.c
    mac80211: consider more elements in parsing CRC
  * drm/msm: Set dma maximum segment size for mdss
      drivers/gpu/drm/msm/msm_drv.c
    ipmi:ssif: Handle a possible NULL pointer reference
  * ext4: fix potential race between s_group_info online resizing and access
      fs/ext4/ext4.h
      fs/ext4/mballoc.c
  * ext4: fix potential race between s_flex_groups online resizing and access
      fs/ext4/ext4.h
      fs/ext4/ialloc.c
      fs/ext4/mballoc.c
      fs/ext4/resize.c
      fs/ext4/super.c
  * ext4: fix potential race between online resizing and write operations
      fs/ext4/balloc.c
      fs/ext4/ext4.h
      fs/ext4/resize.c
      fs/ext4/super.c
    iwlwifi: pcie: fix rb_allocator workqueue allocation
  * FROMLIST: HID: nintendo: add nintendo switch controller driver
      drivers/hid/Kconfig
      drivers/hid/Makefile
      drivers/hid/hid-core.c
      drivers/hid/hid-ids.h
      drivers/hid/hid-nintendo.c
    Merge 4.9.215 into android-4.9-q
  * UPSTREAM: sched/psi: Fix OOB write when writing 0 bytes to PSI files
      kernel/sched/psi.c
  * UPSTREAM: psi: Fix a division error in psi poll()
      kernel/sched/psi.c
  * UPSTREAM: sched/psi: Fix sampling error and rare div0 crashes with cgroups and high uptime
      kernel/sched/psi.c
  * UPSTREAM: sched/psi: Correct overly pessimistic size calculation
      kernel/sched/psi.c
Linux 4.9.215
    s390/mm: Explicitly compare PAGE_DEFAULT_KEY against zero in storage_key_init_range
    xen: Enable interrupts when calling _cond_resched()
    ata: ahci: Add shutdown to freeze hardware resources of ahci
  * netfilter: xt_hashlimit: limit the max size of hashtable
      net/netfilter/xt_hashlimit.c
    ALSA: seq: Fix concurrent access to queue current tick/time
    ALSA: seq: Avoid concurrent access to queue flags
  * ALSA: rawmidi: Avoid bit fields for state flags
      include/sound/rawmidi.h
  * ecryptfs: replace BUG_ON with error handling code
      fs/ecryptfs/crypto.c
    staging: greybus: use after free in gb_audio_manager_remove_all()
  * usb: gadget: composite: Fix bMaxPower for SuperSpeedPlus
      drivers/usb/gadget/composite.c
    scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session"
    scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout"
    Btrfs: fix btrfs_wait_ordered_range() so that it waits for all ordered extents
    KVM: apic: avoid calculating pending eoi from an uninitialized val
    KVM: nVMX: Check IO instruction VM-exit conditions
    KVM: nVMX: Refactor IO bitmap checks into helper function
  * ext4: fix race between writepages and enabling EXT4_EXTENTS_FL
      fs/ext4/ext4.h
      fs/ext4/migrate.c
  * ext4: rename s_journal_flag_rwsem to s_writepages_rwsem
      fs/ext4/ext4.h
      fs/ext4/inode.c
      fs/ext4/super.c
  * ext4: fix mount failure with quota configured as module
      fs/ext4/super.c
  * ext4: add cond_resched() to __ext4_find_entry()
      fs/ext4/namei.c
  * ext4: fix a data race in EXT4_I(inode)->i_disksize
      fs/ext4/ext4.h
      fs/ext4/inode.c
  * netfilter: xt_bpf: add overflow checks
      net/netfilter/xt_bpf.c
    KVM: nVMX: Don't emulate instructions in guest mode
    lib/stackdepot.c: fix global out-of-bounds in stack_slabs
  * vt: vt_ioctl: fix race in VT_RESIZEX
      drivers/tty/vt/vt_ioctl.c
  * VT_RESIZEX: get rid of field-by-field copyin
      drivers/tty/vt/vt_ioctl.c
    KVM: x86: don't notify userspace IOAPIC on edge-triggered interrupt EOI
  * xhci: apply XHCI_PME_STUCK_QUIRK to Intel Comet Lake platforms
      drivers/usb/host/xhci-pci.c
    Revert "ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()"
    tty: serial: imx: setup the correct sg entry for tx dma
    tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode
    x86/mce/amd: Fix kobject lifetime
    x86/mce/amd: Publish the bank pointer only after setup has succeeded
    staging: rtl8188eu: Fix potential overuse of kernel memory
    staging: rtl8188eu: Fix potential security hole
  * USB: hub: Don't record a connect-change event during reset-resume
      drivers/usb/core/hub.c
  * USB: Fix novation SourceControl XL after suspend
      drivers/usb/core/quirks.c
    usb: uas: fix a plug & unplug racing
  * xhci: Force Maximum Packet size for Full-speed bulk devices to valid range.
      drivers/usb/host/xhci-mem.c
    staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.
  * staging: android: ashmem: Disallow ashmem memory from being remapped
      drivers/staging/android/ashmem.c
  * vt: selection, handle pending signals in paste_selection
      drivers/tty/vt/selection.c
    floppy: check FDC index for errors before assigning it
    net/sched: flower: add missing validation of TCA_FLOWER_FLAGS
    net/sched: matchall: add missing validation of TCA_MATCHALL_FLAGS
    enic: prevent waking up stopped tx queues over watchdog reset
  * selinux: ensure we cleanup the internal AVC counters on error in avc_update()
      security/selinux/avc.c
    help_next should increase position index
  * brd: check and limit max_part par
      drivers/block/brd.c
    microblaze: Prevent the overflow of the start
    iwlwifi: mvm: Fix thermal zone registration
  * irqchip/gic-v3-its: Reference to its_invall_cmd descriptor when building INVALL
      drivers/irqchip/irq-gic-v3-its.c
    bcache: explicity type cast in bset_bkey_last()
    reiserfs: prevent NULL pointer dereference in reiserfs_insert_item()
  * lib/scatterlist.c: adjust indentation in __sg_alloc_table
      lib/scatterlist.c
    ocfs2: fix a NULL pointer dereference when call ocfs2_update_inode_fsync_trans()
    radeon: insert 10ms sleep in dce5_crtc_load_lut
  * trigger_next should increase position index
      kernel/trace/trace_events_trigger.c
    ftrace: fpid_next() should increase position index
    drm/nouveau/disp/nv50-: prevent oops when no channel method map provided
  * irqchip/gic-v3: Only provision redistributors that are enabled in ACPI
      drivers/irqchip/irq-gic-v3.c
    cifs: fix NULL dereference in match_prepath
    iwlegacy: ensure loop counter addr does not wrap and cause an infinite loop
    hostap: Adjust indentation in prism2_hostapd_add_sta
    ARM: 8951/1: Fix Kexec compilation issue.
  * jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record
      fs/jbd2/commit.c
    powerpc/sriov: Remove VF eeh_dev state when disabling SR-IOV
    ALSA: hda - Add docking station support for Lenovo Thinkpad T420s
  * driver core: platform: fix u32 greater or equal to zero comparison
      drivers/base/platform.c
    s390/ftrace: generate traced function stack frame
    x86/decoder: Add TEST opcode to Group3-2
    remoteproc: Initialize rproc_class before use
    ide: serverworks: potential overflow in svwks_set_pio_mode()
    cmd64x: potential buffer overflow in cmd64x_program_timings()
    pwm: omap-dmtimer: Remove PWM chip in .remove before making it unfunctional
  * arm64: fix alternatives with LLVM's integrated assembler
      arch/arm64/include/asm/alternative.h
    scsi: iscsi: Don't destroy session if there are outstanding connections
    iommu/arm-smmu-v3: Use WRITE_ONCE() when changing validity of an STE
    usb: musb: omap2430: Get rid of musb .set_vbus for omap2430 glue
    drm/vmwgfx: prevent memory leak in vmw_cmdbuf_res_add
    drm/nouveau: Fix copy-paste error in nouveau_fence_wait_uevent_handler
    drm/nouveau/gr/gk20a,gm200-: add terminators to method lists read from fw
    vme: bridges: reduce stack usage
  * driver core: Print device when resources present in really_probe()
      drivers/base/dd.c
  * driver core: platform: Prevent resouce overflow from causing infinite loops
      drivers/base/platform.c
    tty: synclink_gt: Adjust indentation in several functions
    tty: synclinkmp: Adjust indentation in several functions
  * ASoC: atmel: fix build error with CONFIG_SND_ATMEL_SOC_DMA=m
      sound/soc/atmel/Kconfig
    wan: ixp4xx_hss: fix compile-testing on 64-bit
    Input: edt-ft5x06 - work around first register access error
  * rcu: Use WRITE_ONCE() for assignments to ->pprev for hlist_nulls
      include/linux/list_nulls.h
      include/linux/rculist_nulls.h
    soc/tegra: fuse: Correct straps' address for older Tegra124 device trees
    udf: Fix free space reporting for metadata and virtual partitions
    usbip: Fix unsafe unaligned pointer usage
    tools lib api fs: Fix gcc9 stringop-truncation compilation error
    ALSA: sh: Fix compile warning wrt const
    RDMA/rxe: Fix error type of mmap_offset
    pinctrl: sh-pfc: sh7269: Fix CAN function GPIOs
  * PM / devfreq: rk3399_dmc: Add COMPILE_TEST and HAVE_ARM_SMCCC dependency
      drivers/devfreq/Kconfig
      drivers/devfreq/event/Kconfig
    x86/vdso: Provide missing include file
    ARM: dts: r8a7779: Add device node for ARM global timer
    drm/mediatek: handle events when enabling/disabling crtc
    scsi: aic7xxx: Adjust indentation in ahc_find_syncrate
    ACPICA: Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1
    orinoco: avoid assertion in case of NULL pointer
    rtlwifi: rtl_pci: Fix -Wcast-function-type
    iwlegacy: Fix -Wcast-function-type
    ipw2x00: Fix -Wcast-function-type
    b43legacy: Fix -Wcast-function-type
    ALSA: usx2y: Adjust indentation in snd_usX2Y_hwdep_dsp_status
    reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling
  * media: v4l2-device.h: Explicitly compare grp{id,mask} to zero in v4l2_device macros
      include/media/v4l2-device.h
    NFC: port100: Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu().
    PCI/IOV: Fix memory leak in pci_iov_add_virtfn()
    net/wan/fsl_ucc_hdlc: reject muram offsets above 64K
    regulator: rk808: Lower log level on optional GPIOs being not available
    drm/amdgpu: remove 4 set but not used variable in amdgpu_atombios_get_connector_info_from_object_table
  * clk: qcom: rcg2: Don't crash if our parent can't be found; return an error
      drivers/clk/qcom/clk-rcg2.c
  * kconfig: fix broken dependency in randconfig-generated .config
      scripts/kconfig/confdata.c
  * ext4, jbd2: ensure panic when aborting with zero errno
      fs/jbd2/checkpoint.c
      fs/jbd2/journal.c
  * tracing: Fix very unlikely race of registering two stat tracers
      kernel/trace/trace_stat.c
  * tracing: Fix tracing_stat return values in error handling paths
      kernel/trace/trace_stat.c
    x86/sysfb: Fix check for bad VRAM size
  * jbd2: clear JBD2_ABORT flag before journal_reset to update log tail info when load journal
      fs/jbd2/journal.c
    usb: gadget: udc: fix possible sleep-in-atomic-context bugs in gr_probe()
    uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol()
    sparc: Add .exit.data section.
    MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init()
    efi/x86: Map the entire EFI vendor string before copying it
    pinctrl: baytrail: Do not clear IRQ flags on direct-irq enabled pins
    media: sti: bdisp: fix a possible sleep-in-atomic-context bug in bdisp_device_run()
    gpio: gpio-grgpio: fix possible sleep-in-atomic-context bugs in grgpio_irq_map/unmap()
    powerpc/powernv/iov: Ensure the pdn for VFs always contains a valid PE number
    media: i2c: mt9v032: fix enum mbus codes and frame sizes
    pxa168fb: Fix the function used to release some memory in an error handling path
    pinctrl: sh-pfc: sh7264: Fix CAN function GPIOs
    gianfar: Fix TX timestamping with a stacked DSA driver
    brcmfmac: Fix use after free in brcmf_sdio_readframes()
  * cpu/hotplug, stop_machine: Fix stop_machine vs hotplug order
      kernel/cpu.c
    drm/gma500: Fixup fbdev stolen size usage evaluation
    Revert "KVM: VMX: Add non-canonical check on writes to RTIT address MSRs"
    scsi: qla2xxx: fix a potential NULL pointer dereference
    btrfs: print message when tree-log replay starts
  * jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer
      fs/jbd2/commit.c
  * jbd2: move the clearing of b_modified flag to the journal_unmap_buffer()
      fs/jbd2/commit.c
      fs/jbd2/transaction.c
    hwmon: (pmbus/ltc2978) Fix PMBus polling of MFR_COMMON definitions.
    perf/x86/intel: Fix inaccurate period in context switch for auto-reload
    s390/time: Fix clk type in get_tod_clock
    padata: Remove broken queue flushing
    perf/x86/amd: Add missing L2 misses event spec to AMD Family 17h's event map
    btrfs: log message when rw remount is attempted with unclean tree-log
    Btrfs: fix race between using extent maps and merging them
  * ext4: improve explanation of a mount failure caused by a misconfigured kernel
      fs/ext4/super.c
  * ext4: fix checksum errors with indexed dirs
      fs/ext4/dir.c
      fs/ext4/ext4.h
      fs/ext4/inode.c
      fs/ext4/namei.c
  * ext4: don't assume that mmp_nodename/bdevname have NUL
      fs/ext4/mmp.c
  * ALSA: usb-audio: Apply sample rate quirk for Audioengine D1
      sound/usb/quirks.c
  * ecryptfs: fix a memory leak bug in ecryptfs_init_messaging()
      fs/ecryptfs/messaging.c
  * ecryptfs: fix a memory leak bug in parse_tag_1_packet()
      fs/ecryptfs/keystore.c
    ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs
    KVM: x86: emulate RDPID
    x86/vdso: Use RDPID in preference to LSL when available
    Merge 4.9.214 into android-4.9-q
Linux 4.9.214
    libertas: make lbs_ibss_join_existing() return error code on rates overflow
    libertas: don't exit from lbs_ibss_join_existing() with RCU read lock held
    mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv()
    mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status()
  * dm: fix potential for q->make_request_fn NULL pointer
      drivers/md/dm.c
    scsi: megaraid_sas: Do not initiate OCR if controller is not in ready state
    pinctrl: sh-pfc: r8a7778: Fix duplicate SDSELF_B and SD1_CLK_B
    powerpc/pseries: Allow not having ibm, hypertas-functions::hcall-multi-tce for DDW
    tools/power/acpi: fix compilation error
    ARM: dts: at91: sama5d3: define clock rate range for tcb1
    ARM: dts: at91: sama5d3: fix maximum peripheral clock rates
    ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node
    rtc: cmos: Stop using shared IRQ
    rtc: hym8563: Return -EINVAL if the time is known to be invalid
    NFSv4: try lease recovery on NFS4ERR_EXPIRED
  * nfs: NFS_SWAP should depend on SWAP
      fs/nfs/Kconfig
  * PCI: Don't disable bridge BARs when assigning bus resources
      drivers/pci/setup-bus.c
  * scsi: ufs: Fix ufshcd_probe_hba() reture value in case ufshcd_scsi_add_wlus() fails
      drivers/scsi/ufs/ufshcd.c
    RDMA/netlink: Do not always generate an ACK for some netlink operations
  * ASoC: pcm: update FE/BE trigger order based on the command
      sound/soc/soc-pcm.c
    rxrpc: Fix service call disconnection
  * perf/core: Fix mlock accounting in perf_mmap()
      kernel/events/core.c
  * clocksource: Prevent double add_timer_on() for watchdog_timer
      kernel/time/clocksource.c
    cifs: fail i/o on soft mounts if sessionsetup errors out
    KVM: nVMX: vmread should not set rflags to specify success in case of #PF
    KVM: VMX: Add non-canonical check on writes to RTIT address MSRs
    KVM: x86/mmu: Apply max PA check for MMIO sptes to 32-bit KVM
    btrfs: flush write bio if we loop in extent_write_cache_pages
    KVM: x86: Protect pmu_intel.c from Spectre-v1/L1TF attacks
    drm: atmel-hlcdc: enable clock before configuring timing engine
    Btrfs: fix race between adding and putting tree mod seq elements and nodes
    btrfs: remove trivial locking wrappers of tree mod log
    btrfs: use bool argument in free_root_pointers()
    Btrfs: fix assertion failure on fsync with NO_HOLES enabled
  * ext4: fix deadlock allocating crypto bounce page from mempool
      fs/ext4/page-io.c
    NFS: Directory page cache pages need to be locked when read
    NFS: Fix bool initialization/comparison
    NFS: Fix memory leaks and corruption in readdir
    NFS: switch back to to ->iterate()
  * bonding/alb: properly access headers in bond_alb_xmit()
      drivers/net/bonding/bond_alb.c
    net: systemport: Avoid RBUF stuck in Wake-on-LAN mode
    mfd: rn5t618: Mark ADC control register volatile
    mfd: da9062: Fix watchdog compatible string
    ubi: Fix an error pointer dereference in error handling code
    ubi: fastmap: Fix inverted logic in seen selfcheck
    nfsd: fix jiffies/time_t mixup in LRU list
    nfsd: fix delay timer on 32-bit architectures
    IB/mlx5: Fix outstanding_pi index for GSI qps
    net: tulip: Adjust indentation in {dmfe, uli526x}_init_module
    net: smc911x: Adjust indentation in smc911x_phy_configure
  * ppp: Adjust indentation into ppp_async_input
      drivers/net/ppp/ppp_async.c
    NFC: pn544: Adjust indentation in pn544_hci_check_presence
    powerpc/44x: Adjust indentation in ibm4xx_denali_fixup_memsize
    ext2: Adjust indentation in ext2_fill_super
    scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free
    scsi: csiostor: Adjust indentation in csio_device_reset
    scsi: qla2xxx: Fix the endianness of the qla82xx_get_fw_size() return type
    clk: tegra: Mark fuse clock as critical
    KVM: x86: Free wbinvd_dirty_mask if vCPU creation fails
    KVM: PPC: Book3S PR: Free shared page if mmu initialization fails
    KVM: PPC: Book3S HV: Uninit vCPU if vcore creation fails
    KVM: x86: Protect MSR-based index computations in fixed_msr_to_seg_unit() from Spectre-v1/L1TF attacks
    KVM: x86: Protect x86_decode_insn from Spectre-v1/L1TF attacks
    KVM: x86: Protect MSR-based index computations from Spectre-v1/L1TF attacks in x86.c
    KVM: x86: Protect ioapic_read_indirect() from Spectre-v1/L1TF attacks
    KVM: x86: Protect MSR-based index computations in pmu.h from Spectre-v1/L1TF attacks
    KVM: x86: Protect ioapic_write_indirect() from Spectre-v1/L1TF attacks
    KVM: x86: Protect kvm_hv_msr_[get|set]_crash_data() from Spectre-v1/L1TF attacks
    KVM: x86: Protect kvm_lapic_reg_write() from Spectre-v1/L1TF attacks
    KVM: x86: Protect DR-based index computations from Spectre-v1/L1TF attacks
    KVM: x86: Refactor prefix decoding to prevent Spectre-v1/L1TF attacks
    sunrpc: expiry_time should be seconds not timeval
    mwifiex: fix unbalanced locking in mwifiex_process_country_ie()
    ARM: tegra: Enable PLLP bypass during Tegra124 LP1
    btrfs: set trans->drity in btrfs_commit_transaction
    crypto: picoxcell - adjust the position of tasklet_init and fix missed tasklet_kill
  * crypto: api - Fix race condition in crypto_spawn_alg
      crypto/algapi.c
      crypto/api.c
      crypto/internal.h
    crypto: atmel-aes - Fix counter overflow in CTR mode
    crypto: pcrypt - Do not clear MAY_SLEEP flag in original request
    dm space map common: fix to ensure new block isn't already in use
  * of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc
      drivers/of/Kconfig
      drivers/of/address.c
    power: supply: ltc2941-battery-gauge: fix use-after-free
    scsi: qla2xxx: Fix mtcp dump collection failure
  * crypto: api - Check spawn->alg under lock in crypto_drop_spawn
      crypto/algapi.c
    ubifs: Fix deadlock in concurrent bulk-read and writepage
    ubifs: Change gfp flags in page allocation for bulk read
    PCI: keystone: Fix link training retries initiation
    mmc: spi: Toggle SPI polarity, do not hardcode it
    powerpc/pseries: Advance pfn if section is not present in lmb_is_removable()
    lib/test_kasan.c: fix memory leak in kmalloc_oob_krealloc_more()
    media: v4l2-rect.h: fix v4l2_rect_map_inside() top/left adjustments
    media/v4l2-core: set pages dirty upon releasing DMA buffers
    ALSA: dummy: Fix PCM format loop in proc output
    usb: gadget: f_ecm: Use atomic_t to track in-flight request
    usb: gadget: f_ncm: Use atomic_t to track in-flight request
    usb: gadget: legacy: set max_speed to super-speed
    brcmfmac: Fix memory leak in brcmf_usbdev_qinit
    mfd: dln2: More sanity checking for endpoints
    media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors
  * tcp: clear tp->segs_{in|out} in tcp_disconnect()
      net/ipv4/tcp.c
  * tcp: clear tp->data_segs{in|out} in tcp_disconnect()
      net/ipv4/tcp.c
  * tcp: clear tp->delivered in tcp_disconnect()
      net/ipv4/tcp.c
  * tcp: clear tp->total_retrans in tcp_disconnect()
      net/ipv4/tcp.c
    rxrpc: Fix NULL pointer deref due to call->conn being cleared on disconnect
    rxrpc: Fix insufficient receive notification generation
    net_sched: fix an OOB access in cls_tcindex
    net: hsr: fix possible NULL deref in hsr_handle_frame()
    gtp: use __GFP_NOWARN to avoid memalloc warning
    cls_rsvp: fix rsvp_policy
    ASoC: qcom: Fix of-node refcount unbalance to link->codec_of_node
    sparc32: fix struct ipc64_perm type definition
    x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR
    media: iguanair: fix endpoint sanity check
    Merge 4.9.213 into android-4.9-q
Linux 4.9.213
    btrfs: do not zero f_bavail if we have available space
  * net: Fix skb->csum update in inet_proto_csum_replace16().
      net/core/utils.c
    l2t_seq_next should increase position index
    seq_tab_next() should increase position index
    net/sonic: Quiesce SONIC before re-initializing descriptor memory
    net/sonic: Fix receive buffer handling
    net/sonic: Use MMIO accessors
    net/sonic: Add mutual exclusion for accessing shared state
    net: fsl/fman: rename IF_MODE_XGMII to IF_MODE_10G
    net/fsl: treat fsl,erratum-a011043
    powerpc/fsl/dts: add fsl,erratum-a011043
    qlcnic: Fix CPU soft lockup while collecting firmware dump
  * r8152: get default setting of WOL before initializing
      drivers/net/usb/r8152.c
    airo: Add missing CAP_NET_ADMIN check in AIROOLDIOCTL/SIOCDEVPRIVATE
    airo: Fix possible info leak in AIROOLDIOCTL/SIOCDEVPRIVATE
    scsi: fnic: do not queue commands during fwreset
  * vti[6]: fix packet tx through bpf_redirect()
      net/ipv4/ip_vti.c
      net/ipv6/ip6_vti.c
  * wireless: wext: avoid gcc -O3 warning
      net/wireless/wext-core.c
    mac80211: Fix TKIP replay protection immediately after key setup
  * wireless: fix enabling channel 12 for custom regulatory domain
      net/wireless/reg.c
    ixgbe: Fix calculation of queue with VFs and flow director on interface flap
    ixgbevf: Remove limit of 10 entries for unicast filter list
    clk: mmp2: Fix the order of timer mux parents
    mac80211: mesh: restrict airtime metric to peered established plinks
    soc: ti: wkup_m3_ipc: Fix race condition with rproc_boot
    ARM: dts: beagle-x15-common: Model 5V0 regulator
    media: si470x-i2c: Move free() past last use of 'radio'
  * usb: dwc3: turn off VBUS when leaving host mode
      drivers/usb/dwc3/core.c
  * Bluetooth: Fix race condition in hci_release_sock()
      net/bluetooth/hci_sock.c
    ttyprintk: fix a potential deadlock in interrupt context issue
    media: dvb-usb/dvb-usb-urb.c: initialize actlen to 0
    media: gspca: zero usb_buf
    media: af9005: uninitialized variable printked
    media: digitv: don't continue if remote control state can't be read
    reiserfs: Fix memory leak of journal device string
    mm/mempolicy.c: fix out of bounds write in mpol_parse_str()
  * arm64: kbuild: remove compressed images on 'make ARCH=arm64 (dist)clean'
      arch/arm64/boot/Makefile
    tools lib: Fix builds when glibc contains strlcpy()
    iio: gyro: st_gyro: fix L3GD20H support
    iio: gyro: st_gyro: inline per-sensor data
    crypto: pcrypt - Fix user-after-free on module unload
  * vfs: fix do_last() regression
      fs/namei.c
    crypto: af_alg - Use bh_lock_sock in sk_destruct
  * net_sched: ematch: reject invalid TCF_EM_SIMPLE
      net/sched/ematch.c
    usb-storage: Disable UAS on JMicron SATA enclosure
    atm: eni: fix uninitialized variable warning
  * gpio: max77620: Add missing dependency on GPIOLIB_IRQCHIP
      drivers/gpio/Kconfig
    net: wan: sdla: Fix cast from pointer to integer of different size
    drivers/net/b44: Change to non-atomic bit operations on pwol_mask
    watchdog: rn5t618_wdt: fix module aliases
    arc: eznps: fix allmodconfig kconfig warning
    zd1211rw: fix storage endpoint lookup
    rtl8xxxu: fix interface sanity check
    brcmfmac: fix interface sanity check
    ath9k: fix storage endpoint lookup
    serial: 8250_bcm2835aux: Fix line mismatch on driver unbind
    staging: vt6656: Fix false Tx excessive retries reporting.
    staging: vt6656: use NULLFUCTION stack on mac80211
    staging: vt6656: correct packet types for CTS protect, mode.
    staging: wlan-ng: ensure error return is actually returned
    staging: most: net: fix buffer overflow
    USB: serial: ir-usb: fix IrLAP framing
    USB: serial: ir-usb: fix link-speed handling
    USB: serial: ir-usb: add missing endpoint sanity check
    rsi_91x_usb: fix interface sanity check
    orinoco_usb: fix interface sanity check
  * ALSA: pcm: Add missing copy ops check before clearing buffer
      sound/core/pcm_native.c
    UPSTREAM: staging: most: net: fix buffer overflow
  * UPSTREAM: ALSA: pcm: Add missing copy ops check before clearing buffer
      sound/core/pcm_native.c
    Merge 4.9.212 into android-4.9-q
Linux 4.9.212
    net/x25: fix nonblocking connect
    netfilter: ipset: use bitmap infrastructure completely
  * bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()
      include/linux/bitmap.h
      lib/bitmap.c
    md: Avoid namespace collision with bitmap API
    scsi: iscsi: Avoid potential deadlock in iscsi_if_rx func
    bcache: silence static checker warning
    libertas: Fix two buffer overflows at parsing bss descriptor
    coresight: tmc-etf: Do not call smp_processor_id from preemptible
    coresight: etb10: Do not call smp_processor_id from preemptible
  * arm64: kpti: Whitelist Cortex-A CPUs that don't implement the CSV3 field
      arch/arm64/kernel/cpufeature.c
    Documentation: Document arm64 kpti control
  * do_last(): fetch directory ->i_mode and ->i_uid before it's too late
      fs/namei.c
    tracing: xen: Ordered comparison of function pointers
    scsi: RDMA/isert: Fix a recently introduced regression related to logout
    hwmon: (nct7802) Fix voltage limits to wrong registers
    Input: sun4i-ts - add a check for devm_thermal_zone_of_sensor_register
    Input: pegasus_notetaker - fix endpoint sanity check
    Input: aiptek - fix endpoint sanity check
    Input: gtco - fix endpoint sanity check
    Input: sur40 - fix interface sanity checks
  * mmc: sdhci: fix minimum clock rate for v3 controller
      drivers/mmc/host/sdhci.c
    mmc: tegra: fix SDR50 tuning override
    ARM: 8950/1: ftrace/recordmcount: filter relocation types
    Input: keyspan-remote - fix control-message timeouts
  * hwmon: (core) Do not use device managed functions for memory allocations
      drivers/hwmon/hwmon.c
  * hwmon: (core) Fix double-free in __hwmon_device_register()
      drivers/hwmon/hwmon.c
  * hwmon: Deal with errors from the thermal subsystem
      drivers/hwmon/hwmon.c
  * hwmon: (core) Simplify sysfs attribute name allocation
      drivers/hwmon/hwmon.c
    hwmon: (adt7475) Make volt2reg return same reg as reg2volt input
    gtp: make sure only SOCK_DGRAM UDP sockets are accepted
    net: usb: lan78xx: Add .ndo_features_check
    tcp_bbr: improve arithmetic division in bbr_update_bw()
  * net_sched: fix datalen for ematch
      net/sched/ematch.c
  * net, ip_tunnel: fix namespaces move
      net/ipv4/ip_tunnel.c
  * net, ip6_tunnel: fix namespaces move
      net/ipv6/ip6_tunnel.c
    net: cxgb3_main: Add CAP_NET_ADMIN check to CHELSIO_GET_MEM
    firestream: fix memory leaks
    can, slip: Protect tty->disc_data in write_wakeup and close with RCU
  * net: phy: Keep reporting transceiver type
      drivers/net/phy/phy.c
  * net: ethtool: Add back transceiver type
      include/uapi/linux/ethtool.h
      net/core/ethtool.c
    m68k: Call timer_interrupt() with interrupts disabled
    IB/iser: Fix dma_nents type definition
    arm64: dts: juno: Fix UART frequency
    drm/radeon: fix bad DMA from INTERRUPT_CNTL2
    dmaengine: ti: edma: fix missed failure handling
  * packet: fix data-race in fanout_flow_is_huge()
      net/packet/af_packet.c
  * net: neigh: use long type to store jiffies delta
      net/core/neighbour.c
    MIPS: Loongson: Fix return value of loongson_hwmon_init
    media: ov6650: Fix .get_fmt() V4L2_SUBDEV_FORMAT_TRY support
    media: ov6650: Fix some format attributes not under control
    media: ov6650: Fix incorrect use of JPEG colorspace
    afs: Fix large file support
    net: qca_spi: Move reset_count to struct qcaspi
  * net: netem: correct the parent's backlog when corrupted packet was dropped
      net/sched/sch_netem.c
  * net: netem: fix error path for corrupted GSO frames
      net/sched/sch_netem.c
    dmaengine: imx-sdma: fix size check for sdma script_number
    drm/msm/dsi: Implement reset correctly
  * act_mirred: Fix mirred_init_module error handling
      net/sched/act_mirred.c
    net: stmmac: fix length of PTP clock's name string
    llc: fix sk_buff refcounting in llc_conn_state_process()
    llc: fix another potential sk_buff leak in llc_ui_sendmsg()
    mac80211: accept deauth frames in IBSS mode
    net: stmmac: gmac4+: Not all Unicast addresses may be available
    nvme: retain split access workaround for capability reads
    net: ethernet: stmmac: Fix signedness bug in ipq806x_gmac_of_parse()
  * of: mdio: Fix a signedness bug in of_phy_get_and_connect()
      drivers/of/of_mdio.c
    net: stmmac: dwmac-meson8b: Fix signedness bug in probe
    net: broadcom/bcmsysport: Fix signedness in bcm_sysport_probe()
    net: hisilicon: Fix signedness bug in hix5hd2_dev_probe()
    iommu/amd: Wait for completion of IOTLB flush in attach_device
    net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names'
    net: sonic: replace dev_kfree_skb in sonic_send_packet
    hwmon: (shtc1) fix shtc1 and shtw1 id mask
    Btrfs: fix hang when loading existing inode cache off disk
    net: sonic: return NETDEV_TX_OK if failed to map buffer
    ath9k: dynack: fix possible deadlock in ath_dynack_node_{de}init
    iio: dac: ad5380: fix incorrect assignment to val
    bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA
    staging: greybus: light: fix a couple double frees
    x86, perf: Fix the dependency of the x86 insn decoder selftest
  * power: supply: Init device wakeup after device_add()
      drivers/power/supply/power_supply_core.c
    hwmon: (lm75) Fix write operations for negative temperatures
  * Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()"
      lib/kfifo.c
    ahci: Do not export local variable ahci_em_messages
    mips: avoid explicit UB in assignment of mips_io_port_base
    mac80211: minstrel_ht: fix per-group max throughput rate initialization
    dmaengine: dw: platform: Switch to acpi_dma_controller_register()
    ASoC: sun4i-i2s: RX and TX counter registers are swapped
  * signal: Allow cifs and drbd to receive their terminating signals
      include/linux/signal.h
      kernel/signal.c
    ASoC: wm8737: Fix copy-paste error in wm8737_snd_controls
    ASoC: cs4349: Use PM ops 'cs4349_runtime_pm'
    ASoC: es8328: Fix copy-paste error in es8328_right_line_controls
  * ext4: set error return correctly when ext4_htree_store_dirent fails
      fs/ext4/inline.c
    crypto: caam - free resources in case caam_rng registration failed
    cifs: fix rmmod regression in cifs.ko caused by force_sig changes
    net/mlx5: Fix mlx5_ifc_query_lag_out_bits
    ALSA: aoa: onyx: always initialize register read value
    x86/kgbd: Use NMI_VECTOR not APIC_DM_NMI
    mic: avoid statically declaring a 'struct device'.
  * usb: host: xhci-hub: fix extra endianness conversion
      drivers/usb/host/xhci-hub.c
    qed: reduce maximum stack frame size
    libertas_tf: Use correct channel range in lbtf_geo_init
    scsi: libfc: fix null pointer dereference on a null lport
    net: pasemi: fix an use-after-free in pasemi_mac_phy_init()
    RDMA/hns: Fixs hw access invalid dma memory error
  * devres: allow const resource arguments
      include/linux/device.h
      lib/devres.c
    rxrpc: Fix uninitialized error code in rxrpc_send_data_packet()
    mfd: intel-lpss: Release IDA resources
    iommu/amd: Make iommu_disable safer
    clk: qcom: Fix -Wunused-const-variable
    dmaengine: hsu: Revert "set HSU_CH_MTSR to memory width"
  * perf/ioctl: Add check for the sample_period value
      kernel/events/core.c
    drm/msm/a3xx: remove TPL1 regs from snapshot
    rtc: pcf8563: Clear event flags and disable interrupts before requesting irq
    ASoC: ti: davinci-mcasp: Fix slot mask settings when using multiple AXRs
    net/af_iucv: always register net_device notifier
  * net: netem: fix backlog accounting for corrupted GSO frames
      net/sched/sch_netem.c
    drm/msm/mdp5: Fix mdp5_cfg_init error return
    powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild
    media: vivid: fix incorrect assignment operation when setting video mode
  * inet: frags: call inet_frags_fini() after unregister_pernet_subsys()
      net/ipv6/reassembly.c
    signal/cifs: Fix cifs_put_tcp_session to call send_sig instead of force_sig
  * iommu: Use right function to get group for device
      drivers/iommu/iommu.c
    misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa
    serial: stm32: fix transmit_chars when tx is stopped
    crypto: ccp - fix AES CFB error exposed by new test vectors
    spi: spi-fsl-spi: call spi_finalize_current_message() at the end
    dmaengine: tegra210-adma: Fix crash during probe
  * thermal: cpu_cooling: Actually trace CPU load in thermal_power_cpu_get_power
      drivers/thermal/cpu_cooling.c
    backlight: lm3630a: Return 0 on success in update_status functions
  * kdb: do a sanity check on the cpu in kdb_per_cpu()
      kernel/debug/kdb/kdb_main.c
    ARM: riscpc: fix lack of keyboard interrupts after irq conversion
    pwm: meson: Don't disable PWM when setting duty repeatedly
  * netfilter: ebtables: CONFIG_COMPAT: reject trailing data after last rule
      net/bridge/netfilter/ebtables.c
    platform/x86: alienware-wmi: printing the wrong error code
    media: davinci/vpbe: array underflow in vpbe_enum_outputs()
    media: omap_vout: potential buffer overflow in vidioc_dqbuf()
  * l2tp: Fix possible NULL pointer dereference
      net/l2tp/l2tp_core.c
    dmaengine: tegra210-adma: restore channel status
    net: ena: fix ena_com_fill_hash_function() implementation
    net: ena: fix incorrect test of supported hash function
    net: ena: fix: Free napi resources when ena_up() fails
    net: ena: fix swapped parameters when calling ena_com_indirect_table_fill_entry
    iommu/vt-d: Make kernel parameter igfx_off work with vIOMMU
    IB/mlx5: Add missing XRC options to QP optional params mask
  * usb: gadget: fsl: fix link error against usb-gadget module
      drivers/usb/phy/Kconfig
  * ASoC: fix valid stream condition
      sound/soc/soc-pcm.c
  * packet: in recvmsg msg_name return at least sizeof sockaddr_ll
      net/packet/af_packet.c
  * ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk()
      sound/usb/mixer.c
    dmaengine: axi-dmac: Don't check the number of frames for alignment
    6lowpan: Off by one handling ->nexthdr
    media: ov2659: fix unbalanced mutex_lock/unlock
    ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect
    powerpc: vdso: Make vdso32 installation conditional in vdso_install
    tipc: set sysctl_tipc_rmem and named_timeout right range
    hwmon: (w83627hf) Use request_muxed_region for Super-IO accesses
    ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data"
    scsi: qla2xxx: Unregister chrdev if module initialization fails
    ehea: Fix a copy-paste err in ehea_init_port_res
    spi: bcm2835aux: fix driver to not allow 65535 (=-1) cs-gpios
    soc/fsl/qe: Fix an error code in qe_pin_request()
    spi: tegra114: fix for unpacked mode transfers
    spi: tegra114: clear packed bit for unpacked mode
    media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame
    media: davinci-isif: avoid uninitialized variable use
    ARM: OMAP2+: Fix potentially uninitialized return value for _setup_reset()
    m68k: mac: Fix VIA timer counter accesses
    tipc: tipc clang warning
    jfs: fix bogus variable self-initialization
    regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xB
    media: cx23885: check allocation return
    media: wl128x: Fix an error code in fm_download_firmware()
    media: cx18: update *pos correctly in cx18_read_pos()
    media: ivtv: update *pos correctly in ivtv_read_pos()
    net: sh_eth: fix a missing check of of_get_phy_mode
    xen, cpu_hotplug: Prevent an out of bounds access
    drivers/rapidio/rio_cm.c: fix potential oops in riocm_ch_listen()
    scsi: megaraid_sas: reduce module load time
    nios2: ksyms: Add missing symbol exports
    regulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA
    ARM: 8848/1: virt: Align GIC version check with arm64 counterpart
    ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used
    mmc: sdhci-brcmstb: handle mmc_of_parse() errors during probe
    clocksource/drivers/exynos_mct: Fix error path in timer resources initialization
    clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable
    NFS: Fix a soft lockup in the delegation recovery code
    fs/nfs: Fix nfs_parse_devname to not modify it's argument
    ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of()
    drm/nouveau/pmu: don't print reply values if exec is false
    drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON
    net: dsa: qca8k: Enable delay for RGMII_ID mode
    regulator: pv88090: Fix array out-of-bounds access
    regulator: pv88080: Fix array out-of-bounds access
    regulator: pv88060: Fix array out-of-bounds access
    cdc-wdm: pass return value of recover_from_urb_loss
    dmaengine: mv_xor: Use correct device for DMA API
    vfio_pci: Enable memory accesses before calling pci_map_rom
  * keys: Timestamp new keys
      security/keys/key.c
  * block: don't use bio->bi_vcnt to figure out segment number
      block/blk-merge.c
    usb: phy: twl6030-usb: fix possible use-after-free on remove
    pinctrl: sh-pfc: sh73a0: Fix fsic_spdif pin groups
    pinctrl: sh-pfc: r8a7792: Fix vin1_data18_b pin group
    pinctrl: sh-pfc: r8a7791: Fix scifb2_data_c pin group
    pinctrl: sh-pfc: emev2: Add missing pinmux functions
    iw_cxgb4: use tos when finding ipv6 routes
    iw_cxgb4: use tos when importing the endpoint
    fbdev: chipsfb: remove set but not used variable 'size'
    rtc: pm8xxx: fix unintended sign extension
    rtc: 88pm80x: fix unintended sign extension
    rtc: 88pm860x: fix unintended sign extension
  * net: phy: fixed_phy: Fix fixed_phy not checking GPIO
      drivers/net/phy/fixed_phy.c
    thermal: mediatek: fix register index error
    rtc: ds1672: fix unintended sign extension
    staging: most: cdev: add missing check for cdev_add failure
    iwlwifi: mvm: fix RSS config command
    ARM: dts: lpc32xx: phy3250: fix SD card regulator voltage
    ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller clocks property
    ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller variant
    ARM: dts: lpc32xx: reparent keypad controller to SIC1
    ARM: dts: lpc32xx: add required clocks property to keypad device node
    crypto: crypto4xx - Fix wrong ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments
    tty: ipwireless: Fix potential NULL pointer dereference
    iwlwifi: mvm: fix A-MPDU reference assignment
    clk: sunxi-ng: sun8i-a23: Enable PLL-MIPI LDOs when ungating it
    rtc: cmos: ignore bogus century byte
    IB/iser: Pass the correct number of entries for dma mapped SGL
    ASoC: imx-sgtl5000: put of nodes if finding codec fails
    crypto: tgr192 - fix unaligned memory access
    media: s5p-jpeg: Correct step and max values for V4L2_CID_JPEG_RESTART_INTERVAL
    drm/etnaviv: NULL vs IS_ERR() buf in etnaviv_core_dump()
    arm64: dts: apq8016-sbc: Increase load on l11 for SDCARD
    RDMA/qedr: Fix out of bounds index check in query pkey
    RDMA/ocrdma: Fix out of bounds index check in query pkey
    IB/usnic: Fix out of bounds index check in query pkey
    clk: dove: fix refcount leak in dove_clk_init()
    clk: armada-xp: fix refcount leak in axp_clk_init()
    clk: kirkwood: fix refcount leak in kirkwood_clk_init()
    clk: armada-370: fix refcount leak in a370_clk_init()
    clk: vf610: fix refcount leak in vf610_clocks_init()
    clk: imx7d: fix refcount leak in imx7d_clocks_init()
    clk: imx6sx: fix refcount leak in imx6sx_clocks_init()
    clk: imx6q: fix refcount leak in imx6q_clocks_init()
    clk: samsung: exynos4: fix refcount leak in exynos4_get_xom()
    clk: socfpga: fix refcount leak
    clk: qoriq: fix refcount leak in clockgen_init()
    clk: highbank: fix refcount leak in hb_clk_init()
    Input: nomadik-ske-keypad - fix a loop timeout test
    pinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value
    pinctrl: sh-pfc: sh7269: Add missing PCIOR0 field
    pinctrl: sh-pfc: sh7734: Add missing IPSR11 field
    pinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field
    pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group
    pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group
    pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group
    pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group
    pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group
  * net: phy: Fix not to call phy_resume() if PHY is not attached
      drivers/net/phy/phy_device.c
  * drm/dp_mst: Skip validating ports during destruction, just ref
      drivers/gpu/drm/drm_dp_mst_topology.c
    exportfs: fix 'passing zero to ERR_PTR()' warning
    pcrypt: use format specifier in kobject_add
    mlxsw: reg: QEEC: Add minimum shaper fields
    pwm: lpss: Release runtime-pm reference from the driver's remove callback
    staging: comedi: ni_mio_common: protect register write overflow
  * ALSA: usb-audio: update quirk for B&W PX to remove microphone
      sound/usb/quirks-table.h
    IB/rxe: replace kvfree with vfree
    ALSA: hda: fix unused variable warning
    drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()
    drm/sti: do not remove the drm_bridge that was never added
    mt7601u: fix bbp version check in mt7601u_wait_bbp_ready
    powerpc/archrandom: fix arch_get_random_seed_int()
    xfs: Sanity check flags of Q_XQUOTARM call
  * UPSTREAM: mm/page_io.c: annotate refault stalls from swap_readpage
      mm/page_io.c
  * ANDROID: selinux: modify RTM_GETLINK permission
      security/selinux/include/classmap.h
      security/selinux/include/security.h
      security/selinux/nlmsgtab.c
      security/selinux/ss/policydb.c
      security/selinux/ss/policydb.h
      security/selinux/ss/services.c
    Merge 4.9.211 into android-4.9-q
Linux 4.9.211
    regulator: ab8500: Remove SYSCLKREQ from enum ab8505_regulator_id
    perf probe: Fix wrong address verification
  * scsi: core: scsi_trace: Use get_unaligned_be*()
      drivers/scsi/scsi_trace.c
    scsi: target: core: Fix a pr_debug() argument
    scsi: bnx2i: fix potential use after free
    scsi: qla4xxx: fix double free bug
    scsi: esas2r: unlock on error in esas2r_nvram_read_direct()
    reiserfs: fix handling of -EOPNOTSUPP in reiserfs_for_each_xattr
  * cfg80211: check for set_wiphy_params
      net/wireless/rdev-ops.h
    cw1200: Fix a signedness bug in cw1200_load_firmware()
    xen/blkfront: Adjust indentation in xlvbd_alloc_gendisk
    net: usb: lan78xx: limit size of local TSO packets
  * tcp: fix marked lost packets not being retransmitted
      net/ipv4/tcp_input.c
  * r8152: add missing endpoint sanity check
      drivers/net/usb/r8152.c
    net/wan/fsl_ucc_hdlc: fix out of bounds write on array utdm_info
    net: dsa: tag_qca: fix doubled Tx statistics
    macvlan: use skb_reset_mac_header() in macvlan_queue_xmit()
    batman-adv: Fix DAT candidate selection on little endian systems
  * netfilter: arp_tables: init netns pointer in xt_tgdtor_param struct
      net/ipv4/netfilter/arp_tables.c
    netfilter: fix a use-after-free in mtype_destroy()
  * cfg80211: fix page refcount issue in A-MSDU decap
      net/wireless/util.c
    arm64: dts: agilex/stratix10: fix pmu interrupt numbers
    scsi: fnic: fix invalid stack access
    scsi: fnic: use kernel's '%pM' format option to print MAC
    USB: serial: keyspan: handle unbound ports
    USB: serial: io_edgeport: handle unbound ports on URB completion
    USB: serial: io_edgeport: use irqsave() in USB's complete callback
    net: stmmac: Enable 16KB buffer size
    net: stmmac: 16KB buffer must be 16 byte aligned
  * mm/page-writeback.c: avoid potential division by zero in wb_min_max_ratio()
      mm/page-writeback.c
    perf report: Fix incorrectly added dimensions as switch perf data file
    perf hists: Fix variable name's inconsistency in hists__for_each() macro
    x86/efistub: Disable paging at mixed mode entry
  * usb: core: hub: Improved device recognition on remote wakeup
      drivers/usb/core/hub.c
    scsi: mptfusion: Fix double fetch bug in ioctl
    USB: serial: quatech2: handle unbound ports
    USB: serial: io_edgeport: add missing active-port sanity check
    USB: serial: ch341: handle unbound port at reset_resume
    USB: serial: suppress driver bind attributes
    USB: serial: opticon: fix control-message timeouts
    USB: serial: simple: Add Motorola Solutions TETRA MTP3xxx and MTP85xx
    iio: buffer: align the size of scan bytes to size of the largest element
  * block: fix an integer overflow in logical block size
      block/blk-settings.c
      include/linux/blkdev.h
  * Fix built-in early-load Intel microcode alignment
      firmware/Makefile
    ALSA: seq: Fix racy access for queue timer in proc read
  * clk: Don't try to enable critical clocks if prepare failed
      drivers/clk/clk.c
    dt-bindings: reset: meson8b: fix duplicate reset IDs
    ocfs2: call journal flush to mark journal as empty after journal recovery when mount
    hexagon: work around compiler crash
    hexagon: parenthesize registers in asm predicates
    ioat: ioat_alloc_ring() failure handling.
    MIPS: Prevent link failure with kcov instrumentation
    rseq/selftests: Turn off timeout setting
    scsi: libcxgbi: fix NULL pointer dereference in cxgbi_device_destroy()
    gpio: mpc8xxx: Add platform device to gpiochip->parent
    rtc: msm6242: Fix reading of 10-hour digit
  * f2fs: fix potential overflow
      fs/f2fs/data.c
      fs/f2fs/file.c
    rtlwifi: Remove unnecessary NULL check in rtl_regd_init
    spi: atmel: fix handling of cs_change set on non-last xfer
    mtd: spi-nor: fix silent truncation in spi_nor_read()
    media: exynos4-is: Fix recursive locking in isp_video_release()
    tty: serial: pch_uart: correct usage of dma_unmap_sg
    tty: serial: imx: use the sg count from dma_map_sg
    powerpc/powernv: Disable native PCIe port management
    PCI/PTM: Remove spurious "d" from granularity message
  * compat_ioctl: handle SIOCOUTQNSD
      net/socket.c
    clk: samsung: exynos5420: Preserve CPU clocks configuration during suspend/resume
    mei: fix modalias documentation
    iio: imu: adis16480: assign bias value only if operation succeeded
    platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0
  * scsi: sd: Clear sdkp->protection_type if disk is reformatted without PI
      drivers/scsi/sd.c
    scsi: enclosure: Fix stale device oops with hot replug
    RDMA/srpt: Report the SCSI residual to the initiator
    cifs: Adjust indentation in smb2_open_file
    hsr: reset network header when supervision frame is created
  * gpio: Fix error message on out-of-range GPIO in lookup table
      drivers/gpio/gpiolib.c
  * iommu: Remove device link to group on failure
      drivers/iommu/iommu.c
    rtc: mt6397: fix alarm register overwrite
    dccp: Fix memleak in __feat_register_sp
  * ext4: add more paranoia checking in ext4_expand_extra_isize handling
      fs/ext4/inode.c
      fs/ext4/super.c
  * ext4: fix use-after-free race with debug_want_extra_isize
      fs/ext4/super.c
    wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle
    wimax: i2400: fix memory leak
    media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap
    mac80211: Do not send Layer 2 Update frame before authorization
  * cfg80211/mac80211: make ieee80211_send_layer2_update a public function
      include/net/cfg80211.h
      net/wireless/util.c
  * arm64: Make sure permission updates happen for pmd/pud
      arch/arm64/mm/mmu.c
  * arm64: Enforce BBM for huge IO/VMAP mappings
      arch/arm64/mm/mmu.c
  * arm64: mm: Change page table pointer name in p[md]_set_huge()
      arch/arm64/mm/mmu.c
  * arm64: don't open code page table entry creation
      arch/arm64/include/asm/pgtable.h
      arch/arm64/mm/mmu.c
  * arm64: mm: BUG on unsupported manipulations of live kernel mappings
      arch/arm64/mm/mmu.c
    rsi: add fix for crash during assertions
  * fs/select: avoid clang stack usage warning
      include/linux/poll.h
  * ethtool: reduce stack usage with clang
      net/core/ethtool.c
  * HID: hidraw, uhid: Always report EPOLLOUT
      drivers/hid/uhid.c
    HID: hidraw: Fix returning EPOLLOUT from hidraw_poll
    hidraw: Return EPOLLOUT from hidraw_poll

Change-Id: I65d36338fa1ba89ad6ec2ff878fb4c89ff79b0be
Signed-off-by: lucaswei <lucaswei@google.com>
2020-04-24 18:27:47 +08:00
lucaswei
649b0b6508 Merge LA.UM.7.8.9.C2.08.00.00.618.012 via branch 'qcom-msm-4.9' into android-msm-pixel-4.9
Conflicts:
	arch/arm64/mm/dma-mapping.c
	drivers/char/adsprpc.c
	drivers/gpu/msm/kgsl_drawobj.c
	drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c
	drivers/media/platform/msm/camera/cam_sensor_module/cam_actuator/cam_actuator_dev.h
	drivers/media/platform/msm/camera/cam_sensor_module/cam_eeprom/cam_eeprom_core.c
	drivers/media/platform/msm/camera/cam_sensor_module/cam_ois/cam_ois_core.c
	drivers/media/platform/msm/camera/cam_sensor_module/cam_sensor/cam_sensor_dev.h
	drivers/media/platform/msm/vidc/venus_hfi.c
	drivers/media/platform/msm/vidc_3x/venus_hfi.c
	drivers/misc/qseecom.c
	drivers/power/supply/power_supply_sysfs.c
	drivers/power/supply/qcom/battery.c
	drivers/power/supply/qcom/qpnp-smb2.c
	drivers/power/supply/qcom/smb-lib.h
	drivers/usb/gadget/function/f_mtp.c
	drivers/usb/gadget/udc/core.c
	include/linux/power_supply.h
	kernel/events/core.c
	net/l2tp/l2tp_ppp.c

Bug: 149539244
Signed-off-by: lucaswei <lucaswei@google.com>
Change-Id: Ia263e3a06dcf251efa5ea1fb0d1a6c6b53e4f863
2020-03-17 19:03:53 +08:00
Chanwoo Choi
c673faa159 PM / devfreq: rk3399_dmc: Add COMPILE_TEST and HAVE_ARM_SMCCC dependency
[ Upstream commit eff5d31f7407fa9d31fb840106f1593399457298 ]

To build test, add COMPILE_TEST depedency to both ARM_RK3399_DMC_DEVFREQ
and DEVFREQ_EVENT_ROCKCHIP_DFI configuration. And ARM_RK3399_DMC_DEVFREQ
used the SMCCC interface so that add HAVE_ARM_SMCCC dependency to prevent
the build break.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-28 15:42:28 +01:00
lucaswei
ea8ebe3ab8 Merge android-4.9-q (4.9.210) into android-msm-pixel-4.9-lts
Merge 4.9.210 into android-4.9-q
Linux 4.9.210
    drm/i915/gen9: Clear residual context state on context switch
    netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present
  * netfilter: arp_tables: init netns pointer in xt_tgchk_param struct
      net/ipv4/netfilter/arp_tables.c
  * USB: Fix: Don't skip endpoint descriptors with maxpacket=0
      drivers/usb/core/config.c
    rtl8xxxu: prevent leaking urb
    scsi: bfa: release allocated memory in case of error
    mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf
    mwifiex: fix possible heap overflow in mwifiex_process_country_ie()
  * tty: always relink the port
      drivers/tty/tty_port.c
  * tty: link tty and port before configuring it as console
      drivers/tty/serial/serial_core.c
      drivers/tty/tty_port.c
    staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21
    staging: comedi: adv_pci1710: fix AI channels 16-31 for PCI-1713
    usb: musb: dma: Correct parameter passed to IRQ handler
    usb: musb: Disable pullup at init
    usb: musb: fix idling for suspend after disconnect interrupt
    USB: serial: option: add ZLP support for 0x1bc7/0x9010
    staging: vt6656: set usb_set_intfdata on driver fail.
    can: can_dropped_invalid_skb(): ensure an initialized headroom in outgoing CAN sk_buffs
    can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode
    can: gs_usb: gs_usb_probe(): use descriptors of current altsetting
  * drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ
      drivers/gpu/drm/drm_dp_mst_topology.c
  * Input: add safety guards to input_set_keycode()
      drivers/input/input.c
  * HID: hid-input: clear unmapped usages
      drivers/hid/hid-input.c
  * HID: uhid: Fix returning EPOLLOUT from uhid_char_poll
      drivers/hid/uhid.c
  * HID: Fix slab-out-of-bounds read in hid_field_extract
      drivers/hid/hid-core.c
    tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined
    kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail
  * tcp: minimize false-positives on TCP/GRO check
      net/ipv4/tcp_input.c
  * ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5
      sound/usb/quirks.c
    usb: chipidea: host: Disable port power only if previously enabled
  * chardev: Avoid potential use-after-free in 'chrdev_open()'
      fs/char_dev.c
  * kobject: Export kobject_get_unless_zero()
      include/linux/kobject.h
      lib/kobject.c
    Merge 4.9.209 into android-4.9-q
Linux 4.9.209
    USB: serial: option: add Telit ME910G1 0x110a composition
  * USB: core: fix check for duplicate endpoints
      drivers/usb/core/config.c
    vlan: fix memory leak in vlan_dev_set_egress_priority
  * net: sch_prio: When ungrafting, replace with FIFO
      net/sched/sch_prio.c
    vlan: vlan_changelink() should propagate errors
    vxlan: fix tos value before xmit
  * tcp: fix "old stuff" D-SACK causing SACK to be treated as D-SACK
      net/ipv4/tcp_input.c
    sctp: free cmd->obj.chunk for the unprocessed SCTP_CMD_REPLY
    pkt_sched: fq: do not accept silly TCA_FQ_QUANTUM
    net: usb: lan78xx: fix possible skb leak
    net: stmmac: dwmac-sunxi: Allow all RGMII modes
  * macvlan: do not assume mac_header is set in macvlan_broadcast()
      include/linux/if_ether.h
    llc2: Fix return statement of llc_stat_ev_rx_null_dsap_xid_c (and _test_c)
    parisc: Fix compiler warnings in debug_core.c
  * block: fix memleak when __blk_rq_map_user_iov() is failed
      block/blk-map.c
    net: stmmac: RX buffer size must be 16 byte aligned
    perf/x86/intel: Fix PT PMI handling
  * kconfig: don't crash on NULL expressions in expr_eq()
      scripts/kconfig/expr.c
    regulator: rn5t618: fix module aliases
    ASoC: wm8962: fix lambda value
  * rfkill: Fix incorrect check to avoid NULL pointer dereference
      net/rfkill/core.c
    net: usb: lan78xx: Fix error message format specifier
    bnx2x: Fix logic to get total no. of PFs per engine
    bnx2x: Do not handle requests from VFs after parity
    powerpc: Ensure that swiotlb buffer is allocated from low memory
    samples: bpf: Replace symbol compare of trace_event
    ARM: dts: am437x-gp/epos-evm: fix panel compatible
    spi: spi-cavium-thunderx: Add missing pci_release_regions()
    netfilter: uapi: Avoid undefined left-shift in xt_sctp.h
    ARM: vexpress: Set-up shared OPP table instead of individual for each CPU
    efi/gop: Fix memory leak in __gop_query32/64()
    efi/gop: Return EFI_SUCCESS if a usable GOP was found
    efi/gop: Return EFI_NOT_FOUND if there are no usable GOPs
  * netfilter: ctnetlink: netns exit must wait for callbacks
      net/netfilter/nf_conntrack_netlink.c
    locking/spinlock/debug: Fix various data races
  * pstore/ram: Write new dumps to start of recycled zones
      fs/pstore/ram.c
    locking/x86: Remove the unused atomic_inc_short() methd
    xen/blkback: Avoid unmapping unmapped grant pages
    s390/smp: fix physical to logical CPU map for SMT
  * net: add annotations on hh->hh_len lockless accesses
      include/net/neighbour.h
      net/core/neighbour.c
      net/ethernet/eth.c
    ath9k_htc: Discard undersized packets
    ath9k_htc: Modify byte order for an error message
    rxrpc: Fix possible NULL pointer access in ICMP handling
    powerpc/pseries/hvconsole: Fix stack overread via udbg
  * drm/mst: Fix MST sideband up-reply failure handling
      drivers/gpu/drm/drm_dp_mst_topology.c
  * fix compat handling of FICLONERANGE, FIDEDUPERANGE and FS_IOC_FIEMAP
      fs/compat_ioctl.c
    tty: serial: msm_serial: Fix lockup for sysrq and oops
    media: usb: fix memory leak in af9005_identify_state
    regulator: ab8500: Remove AB8505 USB regulator
    media: flexcop-usb: ensure -EIO is returned on error condition
  * Bluetooth: Fix memory leak in hci_connect_le_scan
      net/bluetooth/hci_conn.c
  * Bluetooth: delete a stray unlock
      net/bluetooth/l2cap_core.c
    Bluetooth: btusb: fix PM leak in error case of setup
    xfs: don't check for AG deadlock for realtime files in bunmapi
    nfsd4: fix up replay_matches_cache()
  * PM / devfreq: Check NULL governor in available_governors_show
      drivers/devfreq/devfreq.c
  * arm64: Revert support for execute-only user mappings
      arch/arm64/include/asm/pgtable-prot.h
      arch/arm64/include/asm/pgtable.h
      arch/arm64/mm/fault.c
      mm/mmap.c
    ftrace: Avoid potential division by zero in function profiler
    ALSA: cs4236: fix error return comparison of an unsigned integer
    tracing: Have the histogram compare functions convert to u64 first
  * gpiolib: fix up emulated open drain outputs
      drivers/gpio/gpiolib.c
    ata: ahci_brcm: Fix AHCI resources management
    ata: ahci_brcm: Allow optional reset controller to be used
    ata: libahci_platform: Export again ahci_platform_<en/dis>able_phys()
  * compat_ioctl: block: handle Persistent Reservations
      block/compat_ioctl.c
  * dmaengine: Fix access to uninitialized dma_slave_caps
      include/linux/dmaengine.h
  * locks: print unsigned ino in /proc/locks
      fs/locks.c
  * memcg: account security cred as well to kmemcg
      kernel/cred.c
  * mm/zsmalloc.c: fix the migrated zspage statistics.
      mm/zsmalloc.c
    MIPS: Avoid VDSO ABI breakage due to global register variable
    ALSA: ice1724: Fix sleep-in-atomic in Infrasonic Quartet support code
    Revert "perf report: Add warning when libunwind not compiled in"
  * drm: limit to INT_MAX in create_blob ioctl
      drivers/gpu/drm/drm_property.c
  * taskstats: fix data-race
      kernel/taskstats.c
    xfs: fix mount failure crash on invalid iclog memory access
    PM / hibernate: memory_bm_find_bit(): Tighten node optimisation
    xen/balloon: fix ballooned page accounting without hotplug enabled
    xen-blkback: prevent premature module unload
    IB/mlx4: Follow mirror sequence of device add during device removal
    s390/cpum_sf: Avoid SBD overflow condition in irq handler
    s390/cpum_sf: Adjust sampling interval to avoid hitting sample limits
    md: raid1: check rdev before reference in raid1_sync_request func
    usb: gadget: fix wrong endpoint desc
    scsi: libsas: stop discovering if oob mode is disconnected
    scsi: iscsi: qla4xxx: fix double free in probe
    scsi: qla2xxx: Don't call qlt_async_event twice
    scsi: lpfc: Fix memory leak on lpfc_bsg_write_ebuf_set func
    RDMA/cma: add missed unregister_pernet_subsys in init failure
  * PM / devfreq: Don't fail devfreq_dev_release if not in list
      drivers/devfreq/devfreq.c
  * arm64: alternatives: use tpidr_el2 on VHE hosts
      arch/arm64/mm/proc.S
    Merge 4.9.208 into android-4.9-q
Linux 4.9.208
    gtp: avoid zero size hashtable
    gtp: fix wrong condition in gtp_genl_dump_pdp()
  * tcp: do not send empty skb from tcp_write_xmit()
      net/ipv4/tcp_output.c
  * tcp/dccp: fix possible race __inet_lookup_established()
      include/linux/rculist_nulls.h
      include/net/inet_hashtables.h
      include/net/sock.h
      net/ipv4/inet_diag.c
      net/ipv4/inet_hashtables.c
      net/ipv4/tcp_ipv4.c
      net/ipv6/inet6_hashtables.c
    vhost/vsock: accept only packets with the right dst_cid
    net: ena: fix napi handler misbehavior when the napi budget is zero
  * mmc: sdhci: Update the tuning failed messages to pr_debug level
      drivers/mmc/host/sdhci.c
    pinctrl: baytrail: Really serialize all register accesses
    tty/serial: atmel: fix out of range clock divider handling
  * hrtimer: Annotate lockless access to timer->state
      include/linux/hrtimer.h
      kernel/time/hrtimer.c
  * net: icmp: fix data-race in cmp_global_allow()
      net/ipv4/icmp.c
    netfilter: bridge: make sure to pull arp header in br_nf_forward_arp()
    6pack,mkiss: fix possible deadlock
  * netfilter: ebtables: compat: reject all padding in matches/watchers
      net/bridge/netfilter/ebtables.c
  * filldir[64]: remove WARN_ON_ONCE() for bad directory entries
      fs/readdir.c
  * Make filldir[64]() verify the directory entry filename is valid
      fs/readdir.c
    perf strbuf: Remove redundant va_end() in strbuf_addv()
    ALSA: hda - Downgrade error message for single-cmd fallback
  * net, sysctl: Fix compiler warning when only cBPF is present
      net/core/sysctl_net_core.c
    x86/mce: Fix possibly incorrect severity calculation on AMD
  * kernel: sysctl: make drop_caches write-only
      kernel/sysctl.c
    ocfs2: fix passing zero to 'PTR_ERR' warning
    s390/cpum_sf: Check for SDBT and SDB consistency
  * libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h
      include/linux/libfdt_env.h
    perf regs: Make perf_reg_name() return "unknown" instead of NULL
    cdrom: respect device capabilities during opening action
  * scripts/kallsyms: fix definitely-lost memory leak
      scripts/kallsyms.c
    gpio: mpc8xxx: Don't overwrite default irq_set_type callback
    scsi: target: iscsi: Wait for all commands to finish before freeing a session
    scsi: scsi_debug: num_tgts must be >= 0
    scsi: pm80xx: Fix for SATA device discovery
  * ext4: work around deleting a file with i_nlink == 0 safely
      fs/ext4/namei.c
  * HID: Improve Windows Precision Touchpad detection.
      drivers/hid/hid-core.c
    bcache: at least try to shrink 1 node in bch_mca_scan()
    clk: pxa: fix one of the pxa RTC clocks
    scsi: atari_scsi: sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE
    powerpc/security: Fix wrong message when RFI Flush is disable
    powerpc/pseries/cmm: Implement release() function for sysfs device
  * scsi: ufs: fix potential bug which ends in system hang
      drivers/scsi/ufs/ufshcd.c
    scsi: lpfc: fix: Coverity: lpfc_cmpl_els_rsp(): Null pointer dereferences
  * fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long
      fs/quota/dquot.c
      include/linux/quota.h
    irqchip: ingenic: Error out if IRQ domain creation failed
    irqchip/irq-bcm7038-l1: Enable parent IRQ if necessary
  * clk: qcom: Allow constant ratio freq tables for rcg
      drivers/clk/qcom/clk-rcg2.c
      drivers/clk/qcom/common.c
    scsi: lpfc: Fix duplicate unreg_rpi error in port offline flow
  * scsi: tracing: Fix handling of TRANSFER LENGTH == 0 for READ(6) and WRITE(6)
      drivers/scsi/scsi_trace.c
  * jbd2: Fix statistics for the number of logged blocks
      fs/jbd2/commit.c
    powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning
    powerpc/security/book3s64: Report L1TF status in sysfs
    clocksource/drivers/asm9260: Add a check for of_clk_get
    dma-debug: add a schedule point in debug_dma_dump_mappings()
    powerpc/pseries: Don't fail hash page table insert for bolted mapping
    powerpc/pseries: Mark accumulate_stolen_time() as notrace
    scsi: csiostor: Don't enable IRQs too early
    scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices
    scsi: target: compare full CHAP_A Algorithm strings
    iommu/tegra-smmu: Fix page tables in > 4 GiB memory
    Input: atmel_mxt_ts - disable IRQ across suspend
    scsi: lpfc: Fix locking on mailbox command completion
    scsi: mpt3sas: Fix clear pending bit in ioctl status
    perf probe: Fix to show function entry line as probe-able
    mmc: sdhci-of-esdhc: fix P2020 errata handling
    powerpc/irq: fix stack overflow verification
  * ext4: check for directory entries too close to block end
      fs/ext4/dir.c
  * ext4: fix ext4_empty_dir() for directories with holes
      fs/ext4/namei.c
    staging: comedi: gsc_hpdi: check dma_alloc_coherent() return value
    platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes
    USB: EHCI: Do not return -EPIPE when hub is disconnected
    usbip: Fix error path of vhci_recv_ret_submit()
  * net: dst: Force 4-byte alignment of dst_metrics
      include/net/dst.h
    sctp: fully initialize v4 addr in some functions
    net: usb: lan78xx: Fix suspend/resume PHY register access error
    net: qlogic: Fix error paths in ql_alloc_large_buffers()
    net: nfc: nci: fix a possible sleep-in-atomic-context bug in nci_uart_tty_receive()
    net: hisilicon: Fix a BUG trigered by wrong bytes_compl
  * mod_devicetable: fix PHY module format
      include/linux/mod_devicetable.h
    fjes: fix missed check in fjes_acpi_add
  * af_packet: set defaule value for tmo
      net/packet/af_packet.c
    Btrfs: fix removal logic of the tree mod log that leads to use-after-free issues
    btrfs: abort transaction after failed inode updates in create_subvol
    btrfs: return error pointer from alloc_test_extent_buffer
    btrfs: do not call synchronize_srcu() in inode_tree_del
    btrfs: don't double lock the subvol_sem for rename exchange
  * usb: xhci: Fix build warning seen with CONFIG_PM=n
      drivers/usb/host/xhci-pci.c
  * Revert "mmc: sdhci: Fix incorrect switch to HS mode"
      drivers/mmc/host/sdhci.c
    btrfs: don't prematurely free work in reada_start_machine_worker()
  * net: phy: initialise phydev speed and duplex sanely
      drivers/net/phy/phy_device.c
    libtraceevent: Fix memory leakage in copy_filter_type
  * crypto: vmx - Avoid weird build failures
      drivers/crypto/vmx/Makefile
    crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c
    fbtft: Make sure string is NULL terminated
    iwlwifi: check kasprintf() return value
    x86/insn: Add some Intel instructions to the opcode map
    spi: st-ssc4: add missed pm_runtime_disable
    btrfs: don't prematurely free work in run_ordered_work()
    btrfs: don't prematurely free work in end_workqueue_fn()
    mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests
    spi: tegra20-slink: add missed clk_unprepare
    iwlwifi: mvm: fix unaligned read of rx_pkt_status
    x86/crash: Add a forward declaration of struct kimage
  * cpufreq: Register drivers only after CPU devices have been registered
      drivers/cpufreq/cpufreq.c
    parport: load lowlevel driver if ports not found
    s390/disassembler: don't hide instruction addresses
    ASoC: rt5677: Mark reg RT5677_PWR_ANLG2 as volatile
    spi: pxa2xx: Add missed security checks
    EDAC/ghes: Fix grain calculation
    media: si470x-i2c: add missed operations in remove
    media: pvrusb2: Fix oops on tear-down when radio support is not present
    ath10k: fix get invalid tx rate for Mesh metric
    perf probe: Filter out instances except for inlined subroutine and subprogram
    perf probe: Skip end-of-sequence and non statement lines
    perf probe: Fix to show calling lines of inlined functions
    perf probe: Return a better scope DIE if there is no best scope
    perf probe: Skip overlapped location on searching variables
    perf probe: Fix to probe a function which has no entry pc
    perf probe: Fix to show inlined function callsite without entry_pc
    perf probe: Fix to show ranges of variables in functions without entry_pc
    perf probe: Fix to probe an inline function which has no entry pc
    perf probe: Walk function lines in lexical blocks
    perf probe: Fix to list probe event with correct line number
    perf probe: Fix to find range-only function instance
    rtlwifi: fix memory leak in rtl92c_set_fw_rsvdpagepkt()
  * ALSA: timer: Limit max amount of slave instances
      sound/core/timer.c
    spi: img-spfi: fix potential double release
    bnx2x: Fix PF-VF communication over multi-cos queues.
  * Bluetooth: Fix advertising duplicated flags
      net/bluetooth/hci_request.c
    pinctrl: sh-pfc: sh7734: Fix duplicate TCLK1_B
    libata: Ensure ata_port probe has completed before detach
  * arm64: psci: Reduce the waiting time for cpu_psci_cpu_kill()
      arch/arm64/kernel/psci.c
    x86/ioapic: Prevent inconsistent state when moving an interrupt
    rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
    drm/gma500: fix memory disclosures due to uninitialized bytes
    x86/mce: Lower throttling MCE messages' priority to warning
  * Bluetooth: hci_core: fix init for HCI_USER_CHANNEL
      net/bluetooth/hci_core.c
    iio: adc: max1027: Reset the device at probe time
  * usb: usbfs: Suppress problematic bind and unbind uevents.
      drivers/usb/core/devio.c
    perf report: Add warning when libunwind not compiled in
    perf test: Report failure for mmap events
    x86/mm: Use the correct function type for native_set_fixmap()
    extcon: sm5502: Reset registers during initialization
    media: ti-vpe: vpe: Make sure YUYV is set as default format
    media: ti-vpe: vpe: fix a v4l2-compliance failure about frame sequence number
    media: ti-vpe: vpe: fix a v4l2-compliance warning about invalid pixel format
    mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring
    samples: pktgen: fix proc_cmd command result check logic
    media: cec-funcs.h: add status_req checks
    media: flexcop-usb: fix NULL-ptr deref in flexcop_usb_transfer_init()
    regulator: max8907: Fix the usage of uninitialized variable in max8907_regulator_probe()
    hwrng: omap3-rom - Call clk_disable_unprepare() on exit only if not idled
    usb: renesas_usbhs: add suspend event support in gadget mode
    tools/power/cpupower: Fix initializer override in hsw_ext_cstates
    media: ov6650: Fix stored frame format not in sync with hardware
    media: i2c: ov2659: Fix missing 720p register config
    media: i2c: ov2659: fix s_stream return value
    media: am437x-vpfe: Setting STD to current value is not an error
    IB/iser: bound protection_sg size by data_sg size
    libertas: fix a potential NULL pointer dereference
    rtlwifi: prevent memory leak in rtl_usb_probe
    staging: rtl8188eu: fix possible null dereference
    staging: rtl8192u: fix multiple memory leaks on error path
  * spi: Add call to spi_slave_abort() function when spidev driver is released
      drivers/spi/spidev.c
    iio: light: bh1750: Resolve compiler warning and make code more readable
    drm/bridge: analogix-anx78xx: silence -EPROBE_DEFER warnings
  * drm: mst: Fix query_payload ack reply struct
      include/drm/drm_dp_mst_helper.h
    ALSA: hda/ca0132 - Avoid endless loop
    ALSA: hda/ca0132 - Keep power on during processing DSP response
  * ALSA: pcm: Avoid possible info leaks from PCM stream buffers
      sound/core/pcm_native.c
    btrfs: handle ENOENT in btrfs_uuid_tree_iterate
    btrfs: do not leak reloc root if we fail to read the fs root
    btrfs: skip log replay on orphaned roots
  * UPSTREAM: HID: input: map digitizer battery usage
      drivers/hid/hid-input.c
      include/linux/hid.h
    ANDROID: cuttlefish_defconfig: Disable TRANSPARENT_HUGEPAGE
    Merge 4.9.207 into android-4.9-q
Linux 4.9.207
    net: stmmac: don't stop NAPI processing when dropping a packet
    net: stmmac: use correct DMA buffer size in the RX descriptor
  * xhci: fix USB3 device initiated resume race with roothub autosuspend
      drivers/usb/host/xhci-hub.c
      drivers/usb/host/xhci-ring.c
      drivers/usb/host/xhci.h
    drm/radeon: fix r1xx/r2xx register checker for POT textures
    scsi: iscsi: Fix a potential deadlock in the timeout handler
    dm btree: increase rebalance threshold in __rebalance2()
  * dma-buf: Fix memory leak in sync_file_merge()
      drivers/dma-buf/sync_file.c
    vfio/pci: call irq_bypass_unregister_producer() before freeing irq
    ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume()
    ARM: dts: s3c64xx: Fix init order of clock providers
    CIFS: Respect O_SYNC and O_DIRECT flags during reconnect
    xtensa: fix TLB sanity checker
  * PCI/MSI: Fix incorrect MSI-X masking on resume
      drivers/pci/msi.c
  * PCI: Fix Intel ACS quirk UPDCR register address
      drivers/pci/quirks.c
  * Revert "regulator: Defer init completion for a while after late_initcall"
      drivers/regulator/core.c
  * tcp: Protect accesses to .ts_recent_stamp with {READ,WRITE}_ONCE()
      include/net/tcp.h
  * tcp: tighten acceptance of ACKs not matching a child socket
      include/net/tcp.h
  * tcp: fix rejected syncookies due to stale timestamps
      include/linux/time.h
      include/net/tcp.h
  * inet: protect against too small mtu values.
      include/linux/netdevice.h
      include/net/ip.h
      net/core/dev.c
      net/ipv4/devinet.c
      net/ipv4/ip_output.c
    tipc: fix ordering of tipc module init and exit routine
  * tcp: md5: fix potential overestimation of TCP option space
      net/ipv4/tcp_output.c
    openvswitch: support asymmetric conntrack
    net: ethernet: ti: cpsw: fix extra rx interrupt
  * net: bridge: deny dev_set_mac_address() when unregistering
      net/bridge/br_device.c
    nvme: host: core: fix precedence of ternary operator
  * kernel/module.c: wakeup processes in module_wq on module unload
      kernel/module.c
    net/mlx5e: Fix SFF 8472 eeprom length
    sunrpc: fix crash when cache_head become valid before update
  * workqueue: Fix missing kfree(rescuer) in destroy_workqueue()
      kernel/workqueue.c
  * blk-mq: make sure that line break can be printed
      block/blk-mq-sysfs.c
  * ext4: fix a bug in ext4_wait_for_tail_page_commit
      fs/ext4/inode.c
  * mm/shmem.c: cast the type of unmap_start to u64
      mm/shmem.c
  * firmware: qcom: scm: Ensure 'a0' status code is treated as signed
      drivers/firmware/qcom_scm-64.c
    reiserfs: fix extended attributes on the root directory
    powerpc: Fix vDSO clock_getres()
    scsi: qla2xxx: Always check the qla2x00_wait_for_hba_online() return value
    scsi: qla2xxx: Fix qla24xx_process_bidir_cmd()
    scsi: qla2xxx: Fix session lookup in qlt_abort_work()
    scsi: qla2xxx: Fix DMA unmap leak
    pinctrl: samsung: Fix device node refcount leaks in S3C64xx wakeup controller init
    ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity
    ath10k: fix fw crash by moving chip reset after napi disabled
    x86/MCE/AMD: Carve out the MC4_MISC thresholding quirk
    x86/MCE/AMD: Turn off MC4_MISC thresholding on all family 0x15 models
    e100: Fix passing zero to 'PTR_ERR' warning in e100_load_ucode_wait
    scsi: lpfc: Cap NPIV vports to 256
    omap: pdata-quirks: remove openpandora quirks for mmc3 and wl1251
    Btrfs: fix negative subv_writers counter and data space leak after buffered write
    iio: adis16480: Add debugfs_reg_access entry
  * xhci: make sure interrupts are restored to correct state
      drivers/usb/host/xhci-hub.c
  * xhci: Fix memory leak in xhci_add_in_port()
      drivers/usb/host/xhci-mem.c
  * usb: xhci: only set D3hot for pci device
      drivers/usb/host/xhci-pci.c
      drivers/usb/host/xhci.c
      drivers/usb/host/xhci.h
    scsi: zfcp: trace channel log even for FCP command responses
  * quota: fix livelock in dquot_writeback_dquots
      fs/quota/dquot.c
    ext2: check err when partial != NULL
  * quota: Check that quota is not dirty before release
      fs/quota/dquot.c
      include/linux/quotaops.h
  * video/hdmi: Fix AVI bar unpack
      drivers/video/hdmi.c
    powerpc: Allow 64bit VDSO __kernel_sync_dicache to work across ranges >4GB
    ppdev: fix PPGETTIME/PPSETTIME ioctls
    mmc: host: omap_hsmmc: add code for special init of wl1251 to get rid of pandora_wl1251_init_card
    pinctrl: samsung: Fix device node refcount leaks in init code
    pinctrl: samsung: Fix device node refcount leaks in S3C24xx wakeup controller init
    ACPI: PM: Avoid attaching ACPI PM domain to certain devices
    ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data()
    ACPI: OSL: only free map once in osl.c
  * PM / devfreq: Lock devfreq in trans_stat_show
      drivers/devfreq/devfreq.c
  * cpuidle: Do not unset the driver if it is there already
      drivers/cpuidle/driver.c
    media: radio: wl1273: fix interrupt masking on release
    media: bdisp: fix memleak on release
    ar5523: check NULL before memcpy() in ar5523_cmd()
    cgroup: pids: use atomic64_t for pids->limit
  * blk-mq: avoid sysfs buffer overflow with too many CPU cores
      block/blk-mq-sysfs.c
  * ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report
      sound/soc/soc-jack.c
  * workqueue: Fix pwq ref leak in rescuer_thread()
      kernel/workqueue.c
  * workqueue: Fix spurious sanity check failures in destroy_workqueue()
      kernel/workqueue.c
    ALSA: hda - Fix pending unsol events at shutdown
    lib: raid6: fix awk build warnings
    rtlwifi: rtl8192de: Fix missing enable interrupt flag
    rtlwifi: rtl8192de: Fix missing callback that tests for hw release of buffer
    rtlwifi: rtl8192de: Fix missing code to retrieve RX buffer address
    btrfs: record all roots for rename exchange on a subvol
    Btrfs: send, skip backreference walking for extents with many references
    btrfs: Remove btrfs_bio::flags member
    btrfs: check page->mapping when loading free space cache
    virtio-balloon: fix managed page counts when migrating pages between zones
    mtd: spear_smi: Fix Write Burst mode
    usb: mon: Fix a deadlock in usbmon between mmap and read
  * usb: core: urb: fix URB structure initialization function
      drivers/usb/core/urb.c
    USB: adutux: fix interface sanity check
    USB: serial: io_edgeport: fix epic endpoint lookup
    USB: idmouse: fix interface sanity checks
    USB: atm: ueagle-atm: add missing endpoint check
    iio: humidity: hdc100x: fix IIO_HUMIDITYRELATIVE channel reporting
    ARM: dts: pandora-common: define wl1251 as child node of mmc3
  * xhci: Increase STS_HALT timeout in xhci_suspend()
      drivers/usb/host/xhci.c
    staging: gigaset: add endpoint-type sanity check
    staging: gigaset: fix illegal free on probe errors
    staging: gigaset: fix general protection fault on probe
    staging: rtl8712: fix interface sanity check
    staging: rtl8188eu: fix interface sanity check
  * usb: Allow USB device to be warm reset in suspended state
      drivers/usb/core/hub.c
    USB: uas: heed CAPACITY_HEURISTICS
    USB: uas: honor flag to avoid CAPACITY16
  * usb: gadget: configfs: Fix missing spin_lock_init()
      drivers/usb/gadget/configfs.c
    appletalk: Set error code if register_snap_client failed
  * appletalk: Fix potential NULL pointer dereference in unregister_snap_client
      include/linux/atalk.h
    KVM: x86: fix out-of-bounds write in KVM_GET_EMULATED_CPUID (CVE-2019-19332)
  * thermal: Fix deadlock in thermal thermal_zone_device_check
      drivers/thermal/thermal_core.c
    RDMA/qib: Validate ->show()/store() callbacks before calling them
    spi: atmel: Fix CS high support
    crypto: user - fix memory leak in crypto_report
    crypto: ecdh - fix big endian bug in ECC library
    crypto: ccp - fix uninitialized list head
    crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr
    KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES
    KVM: x86: do not modify masked bits of shared MSRs
    drm/i810: Prevent underflow in ioctl
  * jbd2: Fix possible overflow in jbd2_log_space_left()
      include/linux/jbd2.h
    can: slcan: Fix use-after-free Read in slcan_open
  * tty: vt: keyboard: reject invalid keycodes
      drivers/tty/vt/keyboard.c
    CIFS: Fix SMB2 oplock break processing
    CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks
    x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect
    coresight: etm4x: Fix input validation for sysfs.
    Input: goodix - add upside-down quirk for Teclast X89 tablet
    ALSA: pcm: oss: Avoid potential buffer overflows
  * fuse: verify attributes
      fs/fuse/dir.c
      fs/fuse/fuse_i.h
  * fuse: verify nlink
      fs/fuse/dir.c
  * sched/fair: Scale bandwidth quota and period without losing quota/period ratio precision
      kernel/sched/fair.c
    ARM: dts: sunxi: Fix PMU compatible strings
    mlx4: Use snprintf instead of complicated strcpy
    media: stkwebcam: Bugfix for wrong return values
  * tty: Don't block on IO when ldisc change is pending
      drivers/tty/n_tty.c
      drivers/tty/tty_ldisc.c
      include/linux/tty.h
    nfsd: Return EPERM, not EACCES, in some SETATTR cases
    MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition
    powerpc/math-emu: Update macros from GCC
    net/mlx4_core: Fix return codes of unsupported operations
    dlm: fix invalid cluster name warning
    ARM: dts: realview: Fix some more duplicate regulator nodes
    clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent
    ARM: dts: pxa: clean up USB controller nodes
    mtd: fix mtd_oobavail() incoherent returned value
  * kbuild: fix single target build for external module
      Makefile
  * modpost: skip ELF local symbols during section mismatch check
      scripts/mod/modpost.c
  * tcp: fix SNMP TCP timeout under-estimation
      net/ipv4/tcp_timer.c
  * tcp: fix off-by-one bug on aborting window-probing socket
      net/ipv4/tcp_timer.c
    ARM: dts: realview-pbx: Fix duplicate regulator nodes
    ARM: dts: mmp2: fix the gpio interrupt cell number
    net/x25: fix null_x25_address handling
    net/x25: fix called/calling length calculation in x25_parse_address_block
    ARM: OMAP1/2: fix SoC name printing
    nfsd: fix a warning in __cld_pipe_upcall()
    ARM: debug: enable UART1 for socfpga Cyclone5
    dlm: NULL check before kmem_cache_destroy is not needed
    i2c: imx: don't print error message on probe defer
    serial: imx: fix error handling in console_setup
    altera-stapl: check for a null key before strcasecmp'ing it
  * dma-mapping: fix return type of dma_set_max_seg_size()
      include/linux/dma-mapping.h
  * ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion()
      include/linux/acpi.h
  * usb: dwc3: don't log probe deferrals; but do log other error codes
      drivers/usb/dwc3/core.c
    dmaengine: coh901318: Remove unused variable
    dmaengine: coh901318: Fix a double-lock bug
    media: pulse8-cec: return 0 when invalidating the logical address
    ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module
    rtc: dt-binding: abx80x: fix resistance scale
    rtc: max8997: Fix the returned value in case of error in 'max8997_rtc_read_alarm()'
    math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning
    MIPS: OCTEON: octeon-platform: fix typing
  * regulator: Fix return value of _set_load() stub
      include/linux/regulator/consumer.h
    Staging: iio: adt7316: Fix i2c data reading, set the data field
    pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues
    scsi: zfcp: drop default switch case which might paper over missing case
    MIPS: SiByte: Enable ZONE_DMA32 for LittleSur
    dlm: fix missing idr_destroy for recover_idr
    ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name
    clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering
    clk: rockchip: fix rk3188 sclk_smc gate data
    extcon: max8997: Fix lack of path setting in USB device mode
    net/mlx5: Release resource on error flow
    ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+
    iwlwifi: mvm: Send non offchannel traffic via AP sta
    cxgb4vf: fix memleak in mac_hlist initialization
  * serial: core: Allow processing sysrq at port unlock time
      include/linux/serial_core.h
    net: ep93xx_eth: fix mismatch of request_mem_region in remove
    rsxx: add missed destroy_workqueue calls in remove
  * ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
      sound/core/pcm_lib.c
    Input: cyttsp4_core - fix use after free bug
    NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error
    audit_get_nd(): don't unlock parent too early
    exportfs_decode_fh(): negative pinned may become positive without the parent locked
    RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN
    autofs: fix a leak in autofs_expire_indirect()
    serial: ifx6x60: add missed pm_runtime_disable
  * serial: serial_core: Perform NULL checks for break_ctl ops
      drivers/tty/serial/serial_core.c
    serial: pl011: Fix DMA ->flush_buffer()
    tty: serial: msm_serial: Fix flow control
    tty: serial: fsl_lpuart: use the sg count from dma_map_sg
    usb: gadget: u_serial: add missing port entry locking
    arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator
  * UPSTREAM: binder: fix incorrect calculation for num_valid
      drivers/android/binder.c
  * ANDROID: sched/core: Fix arm32 allmodconfig build-break
      include/trace/events/sched.h
  * BACKPORT: bpf: permit multiple bpf attachments for a single perf event
      include/linux/bpf.h
      include/linux/trace_events.h
      include/trace/perf.h
      kernel/bpf/core.c
      kernel/events/core.c
      kernel/trace/bpf_trace.c
      kernel/trace/trace_kprobe.c
  * UPSTREAM: bpf: use the same condition in perf event set/free bpf handler
      kernel/events/core.c
  * BACKPORT: bpf: multi program support for cgroup+bpf
      include/linux/bpf-cgroup.h
      include/linux/bpf.h
      include/linux/filter.h
      include/uapi/linux/bpf.h
      kernel/bpf/cgroup.c
      kernel/bpf/core.c
      kernel/bpf/syscall.c
      kernel/cgroup.c
    Merge 4.9.206 into android-4.9-q
Linux 4.9.206
    net: fec: fix clock count mis-match
    platform/x86: hp-wmi: Fix ACPI errors caused by too small buffer
    hwrng: stm32 - fix unbalanced pm_runtime_enable
  * HID: core: check whether Usage Page item is after Usage ID items
      drivers/hid/hid-core.c
  * net: sched: fix `tc -s class show` no bstats on class with nolock subqueues
      net/sched/sch_mq.c
      net/sched/sch_multiq.c
      net/sched/sch_prio.c
  * sctp: cache netns in sctp_ep_common
      include/net/sctp/structs.h
    tipc: fix link name length check
    openvswitch: remove another BUG_ON()
    openvswitch: drop unneeded BUG_ON() in ovs_flow_cmd_build_info()
    slip: Fix use-after-free Read in slip_open
    openvswitch: fix flow command message size
    macvlan: schedule bc_work even if error
    media: atmel: atmel-isc: fix asd memory allocation
  * pwm: Clear chip_data in pwm_put()
      drivers/pwm/core.c
    net: macb: fix error format in dev_err()
  * media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE
      drivers/media/v4l2-core/v4l2-ctrls.c
    mei: bus: prefix device names on bus with the bus name
    USB: serial: ftdi_sio: add device IDs for U-Blox C099-F9P
    staging: rtl8192e: fix potential use after free
    clk: at91: fix update bit maps on CFG_MOR write
    mm, gup: add missing refcount overflow checks on x86 and s390
    mtd: Remove a debug trace in mtdpart.c
    powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()
    scsi: libsas: Check SMP PHY control function result
    ACPI / APEI: Switch estatus pool to use vmalloc memory
    scsi: libsas: Support SATA PHY connection rate unmatch fixing during discovery
    iommu/amd: Fix NULL dereference bug in match_hid_uid
  * net: dev: Use unsigned integer as an argument to left-shift
      include/linux/netdevice.h
    sctp: don't compare hb_timer expire date before starting it
  * net: fix possible overflow in __sk_mem_raise_allocated()
      include/net/sock.h
      net/core/sock.c
    sfc: initialise found bitmap in efx_ef10_mtd_probe
    tipc: fix skb may be leaky in tipc_link_input
    decnet: fix DN_IFREQ_SIZE
  * ip_tunnel: Make none-tunnel-dst tunnel port work with lwtunnel
      net/ipv4/ip_tunnel.c
    sfc: suppress duplicate nvmem partition types in efx_ef10_mtd_probe
  * net/core/neighbour: fix kmemleak minimal reference count for hash tables
      net/core/neighbour.c
  * net/core/neighbour: tell kmemleak about hash tables
      net/core/neighbour.c
    tipc: fix memory leak in tipc_nl_compat_publ_dump
    mtd: Check add_mtd_device() ret code
  * lib/genalloc.c: include vmalloc.h
      lib/genalloc.c
  * drivers/base/platform.c: kmemleak ignore a known leak
      drivers/base/platform.c
  * lib/genalloc.c: use vzalloc_node() to allocate the bitmap
      lib/genalloc.c
  * lib/genalloc.c: fix allocation of aligned buffer from non-aligned chunk
      include/linux/genalloc.h
      lib/genalloc.c
  * vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n
      include/linux/swap.h
      mm/internal.h
    ocfs2: clear journal dirty flag after shutdown journal
    net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe()
    tipc: fix a missing check of genlmsg_put
    atl1e: checking the status of atl1e_write_phy_reg
    net: dsa: bcm_sf2: Propagate error value from mdio_write
    net: stmicro: fix a missing check of clk_prepare
    um: Make GCOV depend on !KCOV
  * net/net_namespace: Check the return value of register_pernet_subsys()
      net/core/net_namespace.c
    pwm: clps711x: Fix period calculation
    crypto: mxc-scc - fix build warnings on ARM64
    powerpc/pseries: Fix node leak in update_lmb_associativity_index()
    powerpc/83xx: handle machine check caused by watchdog timer
    regulator: tps65910: fix a missing check of return value
    drbd: fix print_st_err()'s prototype to match the definition
    drbd: do not block when adjusting "disk-options" while IO is frozen
    drbd: reject attach of unsuitable uuids even if connected
    drbd: ignore "all zero" peer volume sizes in handshake
    powerpc/powernv/eeh/npu: Fix uninitialized variables in opal_pci_eeh_freeze_status
    vfio/spapr_tce: Get rid of possible infinite loop
    powerpc/44x/bamboo: Fix PCI range
    powerpc/mm: Make NULL pointer deferences explicit on bad page faults.
    powerpc/prom: fix early DEBUG messages
    ath6kl: Fix off by one error in scan completion
    ath6kl: Only use match sets when firmware supports it
    scsi: csiostor: fix incorrect dma device in case of vport
    scsi: qla2xxx: deadlock by configfs_depend_item
    RDMA/srp: Propagate ib_post_send() failures to the SCSI mid-layer
    openrisc: Fix broken paths to arch/or32
    serial: max310x: Fix tx_empty() callback
    drivers/regulator: fix a missing check of return value
    powerpc/xmon: fix dump_segments()
    powerpc/book3s/32: fix number of bats in p/v_block_mapped()
    IB/qib: Fix an error code in qib_sdma_verbs_send()
    xfs: Fix bulkstat compat ioctls on x32 userspace.
    xfs: Align compat attrlist_by_handle with native implementation.
    gfs2: take jdata unstuff into account in do_grow
    dm flakey: Properly corrupt multi-page bios.
    HID: doc: fix wrong data structure reference for UHID_OUTPUT
    pinctrl: sh-pfc: sh7734: Fix shifted values in IPSR10
    pinctrl: sh-pfc: sh7264: Fix PFCR3 and PFCR0 register configuration
    KVM: s390: unregister debug feature on failing arch init
    net/mlx5: Continue driver initialization despite debugfs failure
    pinctrl: xway: fix gpio-hog related boot issues
    xen/pciback: Check dev_data before using it
    HID: intel-ish-hid: fixes incorrect error handling
    btrfs: only track ref_heads in delayed_ref_updates
    mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET
    VSOCK: bind to random port for VMADDR_PORT_ANY
  * gpiolib: Fix return value of gpio_to_desc() stub if !GPIOLIB
      include/linux/gpio/consumer.h
    microblaze: move "... is ready" messages to arch/microblaze/Makefile
    microblaze: adjust the help to the real behavior
    ubi: Do not drop UBI device reference before using
    ubi: Put MTD device after it is not used
    xfs: require both realtime inodes to mount
    rtl818x: fix potential use after free
    mwifiex: debugfs: correct histogram spacing, formatting
    mwifiex: fix potential NULL dereference and use after free
    crypto: user - support incremental algorithm dumps
    ACPI / LPSS: Ignore acpi_device_fix_up_power() return value
    ARM: ks8695: fix section mismatch warning
    PM / AVS: SmartReflex: NULL check before some freeing functions is not needed
  * arm64: smp: Handle errors reported by the firmware
      arch/arm64/kernel/smp.c
  * arm64: mm: Prevent mismatched 52-bit VA support
      arch/arm64/kernel/head.S
      arch/arm64/kernel/smp.c
    parisc: Fix HP SDC hpa address output
    parisc: Fix serio address output
    ARM: dts: imx53-voipac-dmm-668: Fix memory node duplication
    ARM: debug-imx: only define DEBUG_IMX_UART_PORT if needed
    scsi: lpfc: Fix dif and first burst use in write commands
    pwm: bcm-iproc: Prevent unloading the driver module while in use
    block: drbd: remove a stray unlock in __drbd_send_protocol()
    mac80211: fix station inactive_time shortly after boot
    scripts/gdb: fix debugging modules compiled with hot/cold partitioning
    watchdog: meson: Fix the wrong value of left time
    can: c_can: D_CAN: c_can_chip_config(): perform a sofware reset on open
    can: peak_usb: report bus recovery as well
    net: fec: add missed clk_disable_unprepare in remove
    clk: at91: avoid sleeping early
  * reset: fix reset_control_ops kerneldoc comment
      include/linux/reset-controller.h
    clk: samsung: exynos5420: Preserve PLL configuration during suspend/resume
    ASoC: kirkwood: fix external clock probe defer
  * ASoC: compress: fix unsigned integer overflow check
      sound/core/compress_offload.c

Change-Id: Ida917e8b91aa0dd373b92c6bdc283734141543d4
Signed-off-by: lucaswei <lucaswei@google.com>
2020-02-14 10:56:19 +08:00
Leonard Crestez
b110cf2b74 PM / devfreq: Check NULL governor in available_governors_show
commit d68adc8f85cd757bd33c8d7b2660ad6f16f7f3dc upstream.

The governor is initialized after sysfs attributes become visible so in
theory the governor field can be NULL here.

Fixes: bcf23c79c4e46 ("PM / devfreq: Fix available_governor sysfs")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-12 11:24:15 +01:00
Leonard Crestez
ce13d56c68 PM / devfreq: Don't fail devfreq_dev_release if not in list
[ Upstream commit 42a6b25e67df6ee6675e8d1eaf18065bd73328ba ]

Right now devfreq_dev_release will print a warning and abort the rest of
the cleanup if the devfreq instance is not part of the global
devfreq_list. But this is a valid scenario, for example it can happen if
the governor can't be found or on any other init error that happens
after device_register.

Initialize devfreq->node to an empty list head in devfreq_add_device so
that list_del becomes a safe noop inside devfreq_dev_release and we can
continue the rest of the cleanup.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-12 11:24:09 +01:00
Leonard Crestez
b99f20c459 PM / devfreq: Lock devfreq in trans_stat_show
commit 2abb0d5268ae7b5ddf82099b1f8d5aa8414637d4 upstream.

There is no locking in this sysfs show function so stats printing can
race with a devfreq_update_status called as part of freq switching or
with initialization.

Also add an assert in devfreq_update_status to make it clear that lock
must be held by caller.

Fixes: 39688ce6fa ("PM / devfreq: account suspend/resume for stats")
Cc: stable@vger.kernel.org
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-21 10:42:05 +01:00
Robin Peng
a7d6f7d1a0 Merge android-4.9-q (4.9.196) into android-msm-pixel-4.9-lts
Merge 4.9.196 into android-4.9-q
Linux 4.9.196
    NFC: fix attrs checks in netlink interface
  * smack: use GFP_NOFS while holding inode_smack::smk_lock
      security/smack/smack_access.c
      security/smack/smack_lsm.c
  * Smack: Don't ignore other bprm->unsafe flags if LSM_UNSAFE_PTRACE is set
      security/smack/smack_lsm.c
  * ipv6: Handle missing host route in __ipv6_ifa_notify
      net/ipv6/addrconf.c
    sch_cbq: validate TCA_CBQ_WRROPT to avoid crash
    xen-netfront: do not use ~0U as error return value for xennet_fill_frags()
    net/rds: Fix error handling in rds_ib_add_one()
    sch_dsmark: fix potential NULL deref in dsmark_init()
    qmi_wwan: add support for Cinterion CLS8 devices
    nfc: fix memory leak in llcp_sock_bind()
  * net: Unpublish sk from sk_reuseport_cb before call_rcu
      net/core/sock.c
    net: qlogic: Fix memory leak in ql_alloc_large_buffers
  * net: ipv4: avoid mixed n_redirects and rate_tokens usage
      net/ipv4/route.c
  * ipv6: drop incoming packets having a v4mapped source address
      net/ipv6/ip6_input.c
    hso: fix NULL-deref on tty open
    cxgb4:Fix out-of-bounds MSI-X info array access
  * ANDROID: binder: synchronize_rcu() when using POLLFREE.
      drivers/android/binder.c
  * ANDROID: binder: remove waitqueue when thread exits.
      drivers/android/binder.c
  * kmemleak: increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K
      lib/Kconfig.debug
    ocfs2: wait for recovering done after direct unlock request
    hypfs: Fix error number left in struct pointer member
  * fat: work around race with userspace's read via blockdev while mounting
      fs/fat/dir.c
      fs/fat/fatent.c
    ARM: 8903/1: ensure that usable memory in bank 0 starts from a PMD-aligned address
  * security: smack: Fix possible null-pointer dereferences in smack_socket_sock_rcv_skb()
      security/smack/smack_lsm.c
  * HID: apple: Fix stuck function keys when using FN
      drivers/hid/hid-apple.c
    ARM: 8898/1: mm: Don't treat faults reported from cache maintenance as writes
    PCI: tegra: Fix OF node reference leak
    mfd: intel-lpss: Remove D3cold delay
    MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean
  * scsi: core: Reduce memory required for SCSI logging
      drivers/scsi/scsi_logging.c
      include/scsi/scsi_dbg.h
    clk: at91: select parent if main oscillator or bypass is enabled
  * arm64: fix unreachable code issue with cmpxchg
      arch/arm64/include/asm/cmpxchg.h
    powerpc/pseries: correctly track irq state in default idle
    powerpc/64s/exception: machine check use correct cfar for late handler
    drm/amdgpu/si: fix ASIC tests
    vfio_pci: Restore original state on release
    pinctrl: tegra: Fix write barrier placement in pmx_writel
    powerpc/pseries/mobility: use cond_resched when updating device tree
    powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function
    powerpc/rtas: use device model APIs and serialization during LPM
    clk: sirf: Don't reference clk_init_data after registration
    clk: qoriq: Fix -Wunused-const-variable
    ipmi_si: Only schedule continuously in the thread in maintenance mode
    gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property()
    drm/radeon: Fix EEH during kexec
    video: ssd1307fb: Start page range at page_offset
    drm/bridge: tc358767: Increase AUX transfer length limit
    Merge 4.9.195 into android-4.9-q
Linux 4.9.195
    Btrfs: fix race setting up and completing qgroup rescan workers
    btrfs: qgroup: Drop quota_root and fs_info parameters from update_qgroup_status_item
    CIFS: Fix oplock handling for SMB 2.1+ protocols
    CIFS: fix max ea value size
    i2c: riic: Clear NACK in tend isr
  * hwrng: core - don't wait on add_early_randomness()
      drivers/char/hw_random/core.c
  * quota: fix wrong condition in is_quota_modification()
      include/linux/quotaops.h
  * ext4: fix punch hole for inline_data file systems
      fs/ext4/inode.c
  * ext4: fix warning inside ext4_convert_unwritten_extents_endio
      fs/ext4/extents.c
  * /dev/mem: Bail out upon SIGKILL.
      drivers/char/mem.c
  * cfg80211: Purge frame registrations on iftype change
      net/wireless/util.c
    md/raid6: Set R5_ReadError when there is read failure on parity disk
    btrfs: Relinquish CPUs in btrfs_compare_trees
    Btrfs: fix use-after-free when using the tree modification log
  * ovl: filter of trusted xattr results in audit
      fs/overlayfs/inode.c
  * memcg, kmem: do not fail __GFP_NOFAIL charges
      mm/memcontrol.c
  * regulator: Defer init completion for a while after late_initcall
      drivers/regulator/core.c
  * alarmtimer: Use EOPNOTSUPP instead of ENOTSUPP
      kernel/time/alarmtimer.c
    ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up
    ASoC: Intel: Fix use of potentially uninitialized variable
    ASoC: Intel: NHLT: Fix debug print format
    media: sn9c20x: Add MSI MS-1039 laptop to flip_dmi_table
    KVM: x86: Manually calculate reserved bits when loading PDPTRS
    KVM: x86: set ctxt->have_exception in x86_decode_insn()
    KVM: x86: always stop emulation on page fault
    parisc: Disable HP HSC-PCI Cards to prevent kernel crash
  * fuse: fix missing unlock_page in fuse_writepage()
      fs/fuse/file.c
  * printk: Do not lose last line in kmsg buffer dump
      kernel/printk/printk.c
  * printk: remove games with previous record flags
      kernel/printk/printk.c
    IB/hfi1: Define variables as unsigned long to fix KASAN warning
    ALSA: firewire-tascam: check intermediate state of clock status and retry
    ALSA: firewire-tascam: handle error code when getting current source of clock
    PM / devfreq: passive: fix compiler warning
    media: omap3isp: Set device on omap3isp subdevs
    btrfs: extent-tree: Make sure we only allocate extents from block groups with the same type
    ALSA: hda/realtek - Blacklist PC beep for Lenovo ThinkCentre M73/93
    media: ttusb-dec: Fix info-leak in ttusb_dec_send_command()
    drm/amd/powerplay/smu7: enforce minimal VBITimeout (v2)
    e1000e: add workaround for possible stalled packet
    libertas: Add missing sentinel at end of if_usb.c fw_table
  * mmc: sdhci: Fix incorrect switch to HS mode
      drivers/mmc/host/sdhci.c
    ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set
    s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding
  * kprobes: Prohibit probing on BUG() and WARN() address
      include/linux/bug.h
      kernel/kprobes.c
    dmaengine: ti: edma: Do not reset reserved paRAM slots
    md/raid1: fail run raid1 array when active disk less than one
    hwmon: (acpi_power_meter) Change log level for 'unsafe software power cap'
    ACPI / PCI: fix acpi_pci_irq_enable() memory leak
    ACPI: custom_method: fix memory leaks
    ARM: dts: exynos: Mark LDO10 as always-on on Peach Pit/Pi Chromebooks
    libtraceevent: Change users plugin directory
    iommu/amd: Silence warnings under memory pressure
    nvmet: fix data units read and written counters in SMART log
  * arm64: kpti: ensure patched kernel text is fetched from PoU
      arch/arm64/mm/proc.S
    ACPI / CPPC: do not require the _PSD method
    media: ov9650: add a sanity check
    media: saa7134: fix terminology around saa7134_i2c_eeprom_md7134_gate()
    media: cpia2_usb: fix memory leaks
    media: saa7146: add cleanup in hexium_attach()
    PM / devfreq: exynos-bus: Correct clock enable sequence
    PM / devfreq: passive: Use non-devm notifiers
  * media: dvb-core: fix a memory leak bug
      drivers/media/dvb-core/dvbdev.c
    media: hdpvr: add terminating 0 at end of string
    media: radio/si470x: kill urb on error
    ARM: dts: imx7d: cl-som-imx7: make ethernet work again
    net: lpc-enet: fix printk format strings
    media: omap3isp: Don't set streaming state on random subdevs
    dmaengine: iop-adma: use correct printk format strings
    media: gspca: zero usb_buf on error
    efi: cper: print AER info of PCIe fatal error
    md: don't set In_sync if array is frozen
    md: don't call spare_active in md_reap_sync_thread if all member devices can't work
    EDAC/altera: Use the proper type for the IRQ status bits
    ia64:unwind: fix double free for mod->arch.init_unw_table
  * ALSA: usb-audio: Skip bSynchAddress endpoint check if it is invalid
      sound/usb/pcm.c
  * base: soc: Export soc_device_register/unregister APIs
      drivers/base/soc.c
    media: iguanair: add sanity checks
    ALSA: i2c: ak4xxx-adda: Fix a possible null pointer dereference in build_adc_controls()
    ALSA: hda - Show the fatal CORB/RIRB error more clearly
    x86/apic: Soft disable APIC before initializing it
    x86/reboot: Always use NMI fallback when shutdown via reboot vector IPI fails
  * sched/core: Fix CPU controller for !RT_GROUP_SCHED
      kernel/sched/core.c
  * sched/fair: Fix imbalance due to CPU affinity
      kernel/sched/fair.c
    media: hdpvr: Add device num check and handling
    media: exynos4-is: fix leaked of_node references
    media: dib0700: fix link error for dibx000_i2c_set_speed
    leds: leds-lp5562 allow firmware files up to the maximum length
    dmaengine: bcm2835: Print error in case setting DMA mask fails
    ASoC: sgtl5000: Fix charge pump source assignment
    regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg
    ALSA: hda: Flush interrupts on disabling
    nfc: enforce CAP_NET_RAW for raw sockets
    ieee802154: enforce CAP_NET_RAW for raw sockets
    ax25: enforce CAP_NET_RAW for raw sockets
    appletalk: enforce CAP_NET_RAW for raw sockets
    mISDN: enforce CAP_NET_RAW for raw sockets
  * usbnet: sanity checking of packet sizes and device mtu
      drivers/net/usb/usbnet.c
  * usbnet: ignore endpoints with invalid wMaxPacketSize
      drivers/net/usb/usbnet.c
    skge: fix checksum byte order
  * sch_netem: fix a divide by zero in tabledist()
      net/sched/sch_netem.c
  * ppp: Fix memory leak in ppp_write
      drivers/net/ppp/ppp_generic.c
    openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC
    net: qrtr: Stop rx_worker before freeing node
    net/phy: fix DP83865 10 Mbps HDX loopback disable function
    macsec: drop skb sk before calling gro_cells_receive
  * cdc_ncm: fix divide-by-zero caused by invalid wMaxPacketSize
      drivers/net/usb/cdc_ncm.c
    arcnet: provide a buffer big enough to actually receive packets
    Bluetooth: btrtl: Additional Realtek 8822CE Bluetooth devices
    xfs: don't crash on null attr fork xfs_bmapi_read
  * drm: Flush output polling on shutdown
      drivers/gpu/drm/drm_probe_helper.c
  * f2fs: fix to do sanity check on segment bitmap of LFS curseg
      fs/f2fs/segment.c
  * Revert "f2fs: avoid out-of-range memory access"
      fs/f2fs/segment.c
  * f2fs: check all the data segments against all node ones
      fs/f2fs/super.c
  * irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices
      drivers/irqchip/irq-gic-v3-its.c
    locking/lockdep: Add debug_locks check in __lock_downgrade()
  * power: supply: sysfs: ratelimit property read error message
      drivers/power/supply/power_supply_sysfs.c
    mac80211: handle deauthentication/disassociation from TDLS peer
    mac80211: Print text for disassociation reason
    objtool: Clobber user CFLAGS variable
    ALSA: hda - Add laptop imic fixup for ASUS M9V laptop
    ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt()
    media: tvp5150: fix switch exit in set control handler
    crypto: talitos - fix missing break in switch statement
    mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword()
    HID: hidraw: Fix invalid read in hidraw_ioctl
    HID: logitech: Fix general protection fault caused by Logitech driver
    HID: prodikeys: Fix general protection fault during probe
    IB/core: Add an unbound WQ type to the new CQ API
  * Revert "Bluetooth: validate BLE connection interval updates"
      net/bluetooth/hci_event.c
      net/bluetooth/l2cap_core.c
  * BACKPORT: block: annotate refault stalls from IO submission
      block/bio.c
      block/blk-core.c
      include/linux/blk_types.h
  * ANDROID: usb: gadget: Fix dependency for f_accessory
      drivers/usb/gadget/Kconfig
    Remove taskname from lowmemorykiller kill reports
    Merge 4.9.194 into android-4.9-q
Linux 4.9.194
  * net_sched: let qdisc_put() accept NULL pointer
      net/sched/sch_generic.c
    ARC: export "abort" for modules
    media: technisat-usb2: break out of loop at end of buffer
    floppy: fix usercopy direction
    iommu/amd: Fix race in increase_address_space()
  * keys: Fix missing null pointer check in request_key_auth_describe()
      security/keys/request_key_auth.c
    x86/uaccess: Don't leak the AC flags into __get_user() argument evaluation
    dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe()
    dmaengine: ti: dma-crossbar: Fix a memory leak bug
    net: seeq: Fix the function used to release some memory in an error handling path
    tools/power turbostat: fix buffer overrun
    perf/x86/amd/ibs: Fix sample bias for dispatched micro-ops
    perf/x86/intel: Restrict period on Nehalem
    sky2: Disable MSI on yet another ASUS boards (P6Xxxx)
    ARM: 8901/1: add a criteria for pfn_valid of arm
    cifs: Use kzfree() to zero out the password
    cifs: set domainName when a domain-key is used in multiuser
    NFSv2: Fix write regression
    NFSv2: Fix eof handling
  * netfilter: nf_conntrack_ftp: Fix debug output
      net/netfilter/nf_conntrack_ftp.c
    x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines
  * r8152: Set memory to all 0xFFs on failed reg reads
      drivers/net/usb/r8152.c
    batman-adv: Only read OGM2 tvlv_len after buffer len check
    ARM: 8874/1: mm: only adjust sections of valid mm structures
    qed: Add cleanup in qed_slowpath_start()
  * Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105
      drivers/atm/Kconfig
    NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup
    NFSv4: Fix return values for nfs4_file_open()
    s390/bpf: use 32-bit index for tail calls
    ARM: OMAP2+: Fix omap4 errata warning on other SoCs
    s390/bpf: fix lcgr instruction encoding
    ARM: OMAP2+: Fix missing SYSC_HAS_RESET_STATUS for dra7 epwmss
    mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings
    tty/serial: atmel: reschedule TX after RX was started
    serial: sprd: correct the wrong sequence of arguments
    KVM: coalesced_mmio: add bounds checking
    xen-netfront: do not assume sk_buff_head list is empty in error handling
    x86/boot: Add missing bootparam that breaks boot on some platforms
    powerpc/mm/radix: Use the right page size for vmemmap mapping
    media: tm6000: double free if usb disconnect while streaming
  * USB: usbcore: Fix slab-out-of-bounds bug during device reset
      drivers/usb/core/config.c
    x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning
  * nvmem: Use the same permissions for eeprom as for nvmem
      drivers/nvmem/core.c
    drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto
    crypto: talitos - HMAC SNOOP NO AFEU mode requires SW icv checking.
    crypto: talitos - Do not modify req->cryptlen on decryption.
    crypto: talitos - fix ECB algs ivsize
    crypto: talitos - check data blocksize in ablkcipher.
    crypto: talitos - fix CTR alg blocksize
    crypto: talitos - check AES key size
  * driver core: Fix use-after-free and double free on glue directory
      drivers/base/core.c
    mtd: rawnand: mtk: Fix wrongly assigned OOB buffer pointer issue
    clk: rockchip: Don't yell about bad mmc phases when getting
    MIPS: VDSO: Use same -m%-float cflag as the kernel proper
    MIPS: VDSO: Prevent use of smp_processor_id()
    KVM: nVMX: handle page fault in vmread
    KVM: x86: work around leak of uninitialized stack contents
    KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl
  * genirq: Prevent NULL pointer dereference in resend_irqs()
      kernel/irq/resend.c
    Btrfs: fix assertion failure during fsync and use of stale transaction
  * gpio: fix line flag validation in lineevent_create
      drivers/gpio/gpiolib.c
  * gpio: fix line flag validation in linehandle_create
      drivers/gpio/gpiolib.c
    Revert "MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur"
  * tun: fix use-after-free when register netdev failed
      drivers/net/tun.c
    tipc: add NULL pointer check before calling kfree_rcu
  * tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR
      net/ipv4/tcp_input.c
    sctp: use transport pf_retrans in sctp_do_8_2_transport_strike
    sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'
    sch_hhf: ensure quantum and hhf_non_hh_weight are non-zero
  * net: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list
      net/core/skbuff.c
  * net: Fix null de-reference of device refcount
      net/core/dev.c
    isdn/capi: check message length in capi_write()
  * ipv6: Fix the link time qualifier of 'ping_v6_proc_exit_net()'
      net/ipv6/ping.c
  * cdc_ether: fix rndis support for Mediatek based smartphones
      drivers/net/usb/cdc_ether.c
  * bridge/mdb: remove wrong use of NLM_F_MULTI
      net/bridge/br_mdb.c
  * ANDROID: regression introduced override_creds=off
      fs/overlayfs/dir.c
  * UPSTREAM: psi: get poll_work to run when calling poll syscall next time
      kernel/sched/psi.c
  * UPSTREAM: sched/psi: Do not require setsched permission from the trigger creator
      kernel/sched/psi.c
  * UPSTREAM: sched/psi: Reduce psimon FIFO priority
      kernel/sched/psi.c
    Merge 4.9.193 into android-4.9-q
Linux 4.9.193
    vhost: make sure log_num < in_num
    clk: s2mps11: Add used attribute to s2mps11_dt_match
    scripts/decode_stacktrace: match basepath using shell prefix operator, not regex
    batman-adv: Only read OGM tvlv_len after buffer len check
    batman-adv: fix uninit-value in batadv_netlink_get_ifindex()
    vhost/test: fix build for vhost test
  * ip6: fix skb leak in ip6frag_expire_frag_queue()
      include/net/ipv6_frag.h
  * xfrm: clean up xfrm protocol checks
      include/net/xfrm.h
      net/key/af_key.c
      net/xfrm/xfrm_state.c
      net/xfrm/xfrm_user.c
    powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction
    drm/vmwgfx: Fix double free in vmw_recv_msg()
  * sched/fair: Don't assign runtime for throttled cfs_rq
      kernel/sched/fair.c
    ALSA: hda/realtek - Fix overridden device-specific initialization
    ALSA: hda - Fix potential endless loop at applying quirks
  * ANDROID: Revert "ANDROID: sched: Disallow WALT with CFS bandwidth control"
      init/Kconfig
  * ANDROID: sched: WALT: Add support for CFS_BANDWIDTH
      kernel/sched/fair.c
  * ANDROID: sched: WALT: Refactor cumulative runnable average fixup
      kernel/sched/deadline.c
      kernel/sched/fair.c
      kernel/sched/rt.c
      kernel/sched/sched.h
      kernel/sched/stop_task.c
      kernel/sched/walt.c
      kernel/sched/walt.h

Change-Id: Ifc17376212d89db44dc48d0963b25d93ff1cb978
Signed-off-by: Robin Peng <robinpeng@google.com>
2019-11-01 12:32:49 +08:00
MyungJoo Ham
b17539c5b6 PM / devfreq: passive: fix compiler warning
[ Upstream commit 0465814831a926ce2f83e8f606d067d86745234e ]

The recent commit of
PM / devfreq: passive: Use non-devm notifiers
had incurred compiler warning, "unused variable 'dev'".

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-10-05 12:30:29 +02:00
Kamil Konieczny
4ebe3a8fd0 PM / devfreq: exynos-bus: Correct clock enable sequence
[ Upstream commit 2c2b20e0da89c76759ee28c6824413ab2fa3bfc6 ]

Regulators should be enabled before clocks to avoid h/w hang. This
require change in exynos_bus_probe() to move exynos_bus_parse_of()
after exynos_bus_parent_parse_of() and change in error handling.
Similar change is needed in exynos_bus_exit() where clock should be
disabled before regulators.

Signed-off-by: Kamil Konieczny <k.konieczny@partner.samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-10-05 12:30:23 +02:00
Leonard Crestez
d1e9aa3cc3 PM / devfreq: passive: Use non-devm notifiers
[ Upstream commit 0ef7c7cce43f6ecc2b96d447e69b2900a9655f7c ]

The devfreq passive governor registers and unregisters devfreq
transition notifiers on DEVFREQ_GOV_START/GOV_STOP using devm wrappers.

If devfreq itself is registered with devm then a warning is triggered on
rmmod from devm_devfreq_unregister_notifier. Call stack looks like this:

	devm_devfreq_unregister_notifier+0x30/0x40
	devfreq_passive_event_handler+0x4c/0x88
	devfreq_remove_device.part.8+0x6c/0x9c
	devm_devfreq_dev_release+0x18/0x20
	release_nodes+0x1b0/0x220
	devres_release_all+0x78/0x84
	device_release_driver_internal+0x100/0x1c0
	driver_detach+0x4c/0x90
	bus_remove_driver+0x7c/0xd0
	driver_unregister+0x2c/0x58
	platform_driver_unregister+0x10/0x18
	imx_devfreq_platdrv_exit+0x14/0xd40 [imx_devfreq]

This happens because devres_release_all will first remove all the nodes
into a separate todo list so the nested devres_release from
devm_devfreq_unregister_notifier won't find anything.

Fix the warning by calling the non-devm APIS for frequency notification.
Using devm wrappers is not actually useful for a governor anyway: it
relies on the devfreq core to correctly match the GOV_START/GOV_STOP
notifications.

Fixes: 996133119f ("PM / devfreq: Add new passive governor")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-10-05 12:30:23 +02:00
Archana Sriram
9ef06790db PM / devfreq: gpubw_mon: Add null check for governor private data
During SUSPEND event, check the pointer for governor
private data is not NULL before updating bus parameters
to zero.

Change-Id: I1a37173e8ae7ad4bcd5f8497c5956302e647c862
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
2019-09-20 17:17:31 +05:30
Linux Build Service Account
5d5d4d4ba0 Merge "defconfig: enable compute governor on sdxpoorwills target" 2018-05-19 14:02:28 -07:00
Santosh Mardi
49eea524be devfreq: update freq variable in compute_freq function
Update freq variable from unsigned long to uint64_t of
compute_freq function  to be in compliance with 32 bit
environment.

Change-Id: Ia9183b0e593daf3780135a8e1ae8ddb36db16f86
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2018-05-18 17:17:03 +05:30
Blagovest Kolenichev
2e229cb024 Merge android-4.9.94 (8683408) into msm-4.9
* refs/heads/tmp-8683408:
  ANDROID: Add build server config for cuttlefish.
  ANDROID: Add defconfig for cuttlefish.
  FROMLIST: staging: Android: Add 'vsoc' driver for cuttlefish.
  Revert "ANDROID: proc: make oom adjustment files user read-only"
  Revert "ANDROID: fixup! proc: make oom adjustment files user read-only"
  Linux 4.9.94
  Revert "xhci: plat: Register shutdown for xhci_plat"
  vrf: Fix use after free and double free in vrf_finish_output
  net sched actions: fix dumping which requires several messages to user space
  strparser: Fix sign of err codes
  net/mlx4_core: Fix memory leak while delete slave's resources
  vhost_net: add missing lock nesting notation
  team: move dev_mc_sync after master_upper_dev_link in team_port_add
  route: check sysctl_fib_multipath_use_neigh earlier than hash
  vhost: validate log when IOTLB is enabled
  net/mlx4_en: Fix mixed PFC and Global pause user control requests
  net/sched: fix NULL dereference on the error path of tcf_skbmod_init()
  net/sched: fix NULL dereference in the error path of tunnel_key_init()
  net/mlx5e: Sync netdev vxlan ports at open
  vti6: better validate user provided tunnel names
  ip6_tunnel: better validate user provided tunnel names
  ip6_gre: better validate user provided tunnel names
  ipv6: sit: better validate user provided tunnel names
  ip_tunnel: better validate user provided tunnel names
  net: fool proof dev_valid_name()
  bonding: process the err returned by dev_set_allmulti properly in bond_enslave
  bonding: move dev_mc_sync after master_upper_dev_link in bond_enslave
  bonding: fix the err path for dev hwaddr sync in bond_enslave
  vlan: also check phy_driver ts_info for vlan's real device
  vhost: correctly remove wait queue during poll failure
  sky2: Increase D3 delay to sky2 stops working after suspend
  sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6
  sctp: do not leak kernel memory to user space
  r8169: fix setting driver_data after register_netdev
  pptp: remove a buggy dst release in pptp_connect()
  net/sched: fix NULL dereference in the error path of tcf_bpf_init()
  netlink: make sure nladdr has correct size in netlink_connect()
  net/ipv6: Increment OUTxxx counters after netfilter hook
  net/ipv6: Fix route leaking between VRFs
  net: fix possible out-of-bound read in skb_network_protocol()
  ipv6: the entire IPv6 header chain must fit the first fragment
  arp: fix arp_filter on l3slave devices
  clk: at91: fix clk-generated compilation
  random: use lockless method of accessing and updating f->reg_idx
  virtio_net: check return value of skb_to_sgvec in one more location
  virtio_net: check return value of skb_to_sgvec always
  rxrpc: check return value of skb_to_sgvec always
  ipsec: check return value of skb_to_sgvec always
  perf tools: Fix copyfile_offset update of output offset
  mtd: mtd_oobtest: Handle bitflips during reads
  Input: goodix - disable IRQs while suspended
  sdhci: Advertise 2.0v supply on SDIO host controller
  cxgb4vf: Fix SGE FL buffer initialization logic for 64K pages
  EDAC, mv64x60: Fix an error handling path
  tty: n_gsm: Allow ADM response in addition to UA for control dlci
  blk-mq: fix kernel oops in blk_mq_tag_idle()
  scsi: libsas: initialize sas_phy status according to response of DISCOVER
  scsi: libsas: fix error when getting phy events
  scsi: libsas: fix memory leak in sas_smp_get_phy_events()
  bcache: segregate flash only volume write streams
  bcache: stop writeback thread after detaching
  drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path
  selftests: kselftest_harness: Fix compile warning
  hsr: fix incorrect warning
  vxlan: dont migrate permanent fdb entries during learn
  s390/dasd: fix hanging safe offline
  ACPICA: Disassembler: Abort on an invalid/unknown AML opcode
  ACPICA: Events: Add runtime stub support for event APIs
  ACPICA: OSL: Add support to exclude stdarg.h
  cpuidle: dt: Add missing 'of_node_put()'
  Bluetooth: Send HCI Set Event Mask Page 2 command only when needed
  clk: meson: meson8b: add compatibles for Meson8 and Meson8m2
  net: ena: disable admin msix while working in polling mode
  net: ena: add missing unmap bars on device removal
  net: ena: add missing return when ena_com_get_io_handlers() fails
  net: ena: fix race condition between submit and completion admin command
  net: ena: fix rare uncompleted admin command false alarm
  iio: magnetometer: st_magn_spi: fix spi_device_id table
  sparc64: ldc abort during vds iso boot
  net: fec: Add a fec_enet_clear_ethtool_stats() stub for CONFIG_M5272
  sctp: fix recursive locking warning in sctp_do_peeloff
  bnx2x: Allow vfs to disable txvlan offload
  crypto: omap-sham - fix closing of hash with separate finalize call
  crypto: omap-sham - buffer handling fixes for hashing later
  geneve: add missing rx stats accounting
  stmmac: fix ptp header for GMAC3 hw timestamp
  coresight: tmc: Configure DMA mask appropriately
  coresight: Fix reference count for software sources
  pinctrl: meson-gxbb: remove non-existing pin GPIOX_22
  X.509: Fix error code in x509_cert_parse()
  xen: avoid type warning in xchg_xen_ulong
  skbuff: only inherit relevant tx_flags
  perf tests: Decompress kernel module before objdump
  perf tools: Decompress kernel module when reading DSO data
  net: emac: fix reset timeout with AR8035 phy
  Fix loop device flush before configure v3
  ARM: dts: armadillo800eva: Split LCD mux and gpio
  MIPS: kprobes: flush_insn_slot should flush only if probe initialised
  MIPS: mm: adjust PKMAP location
  MIPS: mm: fixed mappings: correct initialisation
  sched/deadline: Use the revised wakeup rule for suspending constrained dl tasks
  perf/core: Correct event creation with PERF_FORMAT_GROUP
  e1000e: Undo e1000e_pm_freeze if __e1000_shutdown fails
  KVM: nVMX: Update vmcs12->guest_linear_address on nested VM-exit
  nvme: fix hang in remove path
  nvme-pci: fix multiple ctrl removal scheduling
  ARM: imx: Add MXC_CPU_IMX6ULL and cpu_is_imx6ull
  net: phy: avoid genphy_aneg_done() for PHYs without clause 22 support
  mceusb: sporadic RX truncation corruption fix
  cx25840: fix unchecked return values
  cxl: Unlock on error in probe
  igb: fix race condition with PTP_TX_IN_PROGRESS bits
  e1000e: fix race condition around skb_tstamp_tx()
  ARM: dts: qcom: ipq4019: fix i2c_0 node
  tags: honor COMPILED_SOURCE with apart output directory
  iwlwifi: fix min API version for 7265D, 3168, 8000 and 8265
  iwlwifi: pcie: only use d0i3 in suspend/resume if system_pm is set to d0i3
  iwlwifi: tt: move ucode_loaded check under mutex
  iwlwifi: mvm: Fix command queue number on d0i3 flow
  watchdog: f71808e_wdt: Add F71868 support
  iwlwifi: mvm: fix firmware debug restart recording
  perf report: Ensure the perf DSO mapping matches what libdw sees
  perf header: Set proper module name when build-id event found
  net/mlx4: Check if Granular QoS per VF has been enabled before updating QP qos_vport
  net/mlx4: Fix the check in attaching steering rules
  sit: reload iphdr in ipip6_rcv
  macsec: check return value of skb_to_sgvec always
  skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow
  ip6_tunnel: fix traffic class routing for tunnels
  bio-integrity: Do not allocate integrity context for bio w/o data
  Fix serial console on SNI RM400 machines
  cxgb4: fix incorrect cim_la output for T6
  powerpc/8xx: fix mpc8xx_get_irq() return on no irq
  drm/omap: fix tiled buffer stride calculations
  RDMA/hfi1: fix array termination by appending NULL to attr array
  RDMA/iw_cxgb4: Avoid touch after free error in ARP failure handlers
  net: phy: micrel: Restore led_mode and clk_sel on resume
  mISDN: Fix a sleep-in-atomic bug
  arm64: kernel: restrict /dev/mem read() calls to linear region
  qlcnic: Fix a sleep-in-atomic bug in qlcnic_82xx_hw_write_wx_2M and qlcnic_82xx_hw_read_wx_2M
  perf trace: Add mmap alias for s390
  ath10k: add BMI parameters to fix calibration from DT/pre-cal
  drm/amdkfd: NULL dereference involving create_process()
  powerpc/spufs: Fix coredump of SPU contexts
  clk: Fix __set_clk_rates error print-string
  clk: scpi: fix return type of __scpi_dvfs_round_rate
  KVM: SVM: do not zero out segment attributes if segment is unusable or not present
  mtd: nand: check ecc->total sanity in nand_scan_tail
  mtd: nand: gpmi: Fix gpmi_nand_init() error path
  dt-bindings: display: sun4i: Add allwinner,tcon-channel property
  drm/sun4i: Ignore the generic connectors for components
  clk: at91: fix clk-generated parenting
  net: freescale: fix potential null pointer dereference
  SUNRPC: ensure correct error is reported by xs_tcp_setup_socket()
  rtc: interface: Validate alarm-time before handling rollover
  rtc: opal: Handle disabled TPO in opal_get_tpo_time()
  i40evf: fix merge error in older patch
  rtc: m41t80: fix SQW dividers override when setting a date
  cxgb4: Fix netdev_features flag
  cxgb4: FW upgrade fixes
  net/mlx5: avoid build warning for uniprocessor
  arm64: futex: Fix undefined behaviour with FUTEX_OP_OPARG_SHIFT usage
  backlight: Report error on failure
  dmaengine: imx-sdma: Handle return value of clk_prepare_enable
  powerpc/[booke|4xx]: Don't clobber TCR[WP] when setting TCR[DIE]
  ovl: filter trusted xattr for non-admin
  HID: i2c: Call acpi_device_fix_up_power for ACPI-enumerated devices
  netfilter: conntrack: don't call iter for non-confirmed conntracks
  x86/efi: Disable runtime services on kexec kernel if booted with efi=old_map
  hdlcdrv: Fix divide by zero in hdlcdrv_ioctl
  wl1251: check return from call to wl1251_acx_arp_ip_filter
  rt2x00: do not pause queue unconditionally on error path
  ASoC: Intel: sst: Fix the return value of 'sst_send_byte_stream_mrfld()'
  pinctrl: baytrail: Enable glitch filter for GPIOs used as interrupts
  backlight: tdo24m: Fix the SPI CS between transfers
  blk-mq: fix race between updating nr_hw_queues and switching io sched
  IB/rdmavt: Allocate CQ memory on the correct node
  gpio: label descriptors using the device name
  vfb: fix video mode and line_length being set when loaded
  mac80211: Fix setting TX power on monitor interfaces
  ACPI: EC: Fix debugfs_create_*() usage
  irqchip/gic-v3: Fix the driver probe() fail due to disabled GICC entry
  scsi: mpt3sas: Proper handling of set/clear of "ATA command pending" flag.
  scsi: libiscsi: Allow sd_shutdown on bad transport
  ASoC: Intel: cht_bsw_rt5645: Analog Mic support
  ASoC: Intel: Skylake: Disable clock gating during firmware and library download
  media: videobuf2-core: don't go out of the buffer range
  hwmon: (ina2xx) Make calibration register value fixed
  PM / devfreq: Fix potential NULL pointer dereference in governor_store
  VFS: close race between getcwd() and d_move()
  net/mlx4_en: Change default QoS settings
  ACPI / video: Default lcd_only to true on Win8-ready and newer machines
  rds; Reset rs->rs_bound_addr in rds_add_bound() failure path
  l2tp: fix missing print session offset info
  perf probe: Add warning message if there is unexpected event name
  thermal: power_allocator: fix one race condition issue for thermal_instances list
  ARM: dts: ls1021a: add "fsl,ls1021a-esdhc" compatible string to esdhc node
  i40iw: Correct Q1/XF object count equation
  i40iw: Fix sequence number for the first partial FPDU
  drm/msm: Take the mutex before calling msm_gem_new_impl
  net: llc: add lock_sock in llc_ui_bind to avoid a race condition
  KVM: nVMX: Fix handling of lmsw instruction
  KVM: X86: Fix preempt the preemption timer cancel
  PCI/msi: fix the pci_alloc_irq_vectors_affinity stub
  cpuhotplug: Link lock stacks for hotplug callbacks
  bonding: Don't update slave->link until ready to commit
  Input: elan_i2c - clear INT before resetting controller
  net: move somaxconn init from sysctl code
  tcp: better validation of received ack sequences
  ARM64: PCI: Fix struct acpi_pci_root_ops allocation failure path
  ext4: fix off-by-one on max nr_pages in ext4_find_unwritten_pgoff()
  fix race in drivers/char/random.c:get_reg()
  scsi: bnx2fc: fix race condition in bnx2fc_get_host_stats()
  ASoC: rsnd: SSI PIO adjust to 24bit mode
  pNFS/flexfiles: missing error code in ff_layout_alloc_lseg()
  netfilter: ctnetlink: fix incorrect nf_ct_put during hash resize
  perf report: Fix off-by-one for non-activation frames
  libceph: NULL deref on crush_decode() error path
  net: ieee802154: fix net_device reference release too early
  mlx5: fix bug reading rss_hash_type from CQE
  block: fix an error code in add_partition()
  selinux: do not check open permission on sockets
  net/mlx5: Tolerate irq_set_affinity_hint() failures
  gpio: crystalcove: Do not write regular gpio registers for virtual GPIOs
  sched/numa: Use down_read_trylock() for the mmap_sem
  perf/core: Fix error handling in perf_event_alloc()
  leds: pca955x: Correct I2C Functionality
  net/wan/fsl_ucc_hdlc: fix muram allocation error
  ray_cs: Avoid reading past end of buffer
  ARM: davinci: da8xx: Create DSP device only when assigned memory
  md-cluster: fix potential lock issue in add_new_disk
  ext4: handle the rest of ext4_mb_load_buddy() ENOMEM errors
  iio: light: rpr0521 poweroff for probe fails
  iio: hi8435: cleanup reset gpio
  iio: hi8435: avoid garbage event at first enable
  ASoC: simple-card: fix mic jack initialization
  xfrm: fix state migration copy replay sequence numbers
  selftests/powerpc: Fix TM resched DSCR test with some compilers
  ath5k: fix memory leak on buf on failed eeprom read
  powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash
  scsi: csiostor: fix use after free in csio_hw_use_fwconfig()
  mlxsw: spectrum: Avoid possible NULL pointer dereference
  sh_eth: Use platform device for printing before register_netdev()
  fsl/qe: add bit description for SYNL register for GUMR
  net/wan/fsl_ucc_hdlc: fix incorrect memory allocation
  net/wan/fsl_ucc_hdlc: fix unitialized variable warnings
  serial: sh-sci: Fix race condition causing garbage during shutdown
  serial: 8250: omap: Disable DMA for console UART
  USB: ene_usb6250: fix SCSI residue overwriting
  net: x25: fix one potential use-after-free issue
  USB: ene_usb6250: fix first command execution
  pxa_camera: fix module remove codepath for v4l2 clock
  usb: chipidea: properly handle host or gadget initialization failure
  ARM: dts: rockchip: fix rk322x i2s1 pinctrl error
  arp: honour gratuitous ARP _replies_
  neighbour: update neigh timestamps iff update is effective
  uio: fix incorrect memory leak cleanup
  ipmr: vrf: Find VIFs using the actual device
  ata: libahci: properly propagate return value of platform_get_irq()
  btrfs: fix incorrect error return ret being passed to mapping_set_error
  usb: dwc3: keystone: check return value
  KVM: arm64: Restore host physical timer access on hyp_panic()
  KVM: arm: Restore banked registers and physical timer access on hyp_panic()
  async_tx: Fix DMA_PREP_FENCE usage in do_async_gen_syndrome()
  ipv6: avoid dad-failures for addresses with NODAD
  mdio: mux: fix device_node_continue.cocci warnings
  arm64: perf: Ignore exclude_hv when kernel is running in HYP
  i2c: mux: reg: put away the parent i2c adapter on probe failure
  ARM: dts: imx6qdl-wandboard: Fix audio channel swap
  powerpc/modules: If mprofile-kernel is enabled add it to vermagic
  x86/tsc: Provide 'tsc=unstable' boot parameter
  clk: renesas: rcar-gen2: Fix PLL0 on R-Car V2H and E2
  staging: wlan-ng: prism2mgmt.c: fixed a double endian conversion before calling hfa384x_drvr_setconfig16, also fixes relative sparse warning
  ARM: dts: imx53-qsrb: Pulldown PMIC IRQ pin
  iio: pressure: zpa2326: report interrupted case as failure
  PowerCap: Fix an error code in powercap_register_zone()
  bus: brcmstb_gisb: correct support for 64-bit address output
  bus: brcmstb_gisb: Use register offsets with writes too
  SMB2: Fix share type handling
  mm, vmstat: Remove spurious WARN() during zoneinfo print
  vmxnet3: ensure that adapter is in proper state during force_close
  irqchip/mbigen: Fix the clear register offset calculation
  KVM: PPC: Book3S PR: Check copy_to/from_user return values
  Input: elantech - force relative mode on a certain module
  Input: elan_i2c - check if device is there before really probing
  mdio: mux: Correct mdio_mux_init error path issues
  netxen_nic: set rcode to the return status from the call to netxen_issue_cmd
  net: qca_spi: Fix alignment issues in rx path
  blk-mq: NVMe 512B/4K+T10 DIF/DIX format returns I/O error on dd with split op
  perf/callchain: Force USER_DS when invoking perf_callchain_user()
  CIFS: silence lockdep splat in cifs_relock_file()
  NFSv4.1: Work around a Linux server bug...
  qed: Correct doorbell configuration for !4Kb pages
  net/mlx4_en: Avoid adding steering rules with invalid ring
  s390: move _text symbol to address higher than zero
  pidns: disable pid allocation if pid_ns_prepare_proc() is failed in alloc_pid()
  drivers/misc/vmw_vmci/vmci_queue_pair.c: fix a couple integer overflow tests
  lockd: fix lockd shutdown race
  net: ethernet: ti: cpsw: adjust cpsw fifos depth for fullduplex flow control
  net: cdc_ncm: Fix TX zero padding
  ipmi_ssif: unlock on allocation failure
  ubi: fastmap: Fix slab corruption
  qlge: Avoid reading past end of buffer
  bna: Avoid reading past end of buffer
  mac80211: bail out from prep_connection() if a reconfig is ongoing
  af_key: Fix slab-out-of-bounds in pfkey_compile_policy.
  IB/srpt: Avoid that aborting a command triggers a kernel warning
  IB/srpt: Fix abort handling
  x86/boot: Declare error() as noreturn
  NFSv4.1: RECLAIM_COMPLETE must handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION
  ovl: persistent inode numbers for upper hardlinks
  x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility
  x86/asm: Don't use RBP as a temporary register in csum_partial_copy_generic()
  rtc: snvs: fix an incorrect check of return value
  md/raid5: make use of spin_lock_irq over local_irq_disable + spin_lock
  cfg80211: make RATE_INFO_BW_20 the default
  qed: Fix overriding of supported autoneg value.
  ANDROID: proc: add null check in proc_uid_init
  f2fs/fscrypt: updates to v4.17-rc1
  Revert "ANDROID: sched/tune: Initialize raw_spin_lock in boosted_groups"
  ANDROID: uid_sys_stats: Replace tasklist lock with RCU in uid_cputime_show
  ANDROID: arm64: mark kpti_install_ng_mappings as __nocfi

Conflicts:
	arch/arm64/kernel/perf_event.c
	drivers/gpu/drm/msm/msm_gem.c
	drivers/hwtracing/coresight/coresight-tmc.c
	drivers/hwtracing/coresight/coresight.c

Change-Id: I3a1bd6216f55601cff0a2b4344c480b2e1a771a6
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2018-05-11 03:07:46 -07:00
Gustavo A. R. Silva
715f7e3efe PM / devfreq: Fix potential NULL pointer dereference in governor_store
[ Upstream commit 63f1e05f7fe9ca509c60154d6a833abf96eecdc9 ]

df->governor is being dereferenced before it is null checked,
hence there is a potential null pointer dereference.

Notice that df->governor is being null checked at line 1004:
if (df->governor) {, which implies it might be null.

Fix this by null checking df->governor before dereferencing it.

Addresses-Coverity-ID: 1401988 ("Dereference before null check")
Fixes: bcf23c79c4e4 ("PM / devfreq: Fix available_governor sysfs")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-13 19:48:09 +02:00
Jonathan Avila
5a2f4ce3fa PM / devfreq: Introduce a sysfs lock
Currently, concurrent writes to sysfs entries leave the	possibility for
race conditions within the devfreq framework.  For example, concurrently
executing max_freq_store and governor_store can result in attempting to
perform an update_devfreq() before the new governor's start handler can be
executed.

A more concrete case is a race between polling_interval_store and
governor_store.  Because no lock is used after calling into the event
handler of the old governor and there's nothing preventing work from being
queued after the monitor is stopped, it's possible to accidentally cause
delayed work to be queued on the governor being switched to.  This can be
seen if you create two threads, one which changes a device's governor
between simple_ondemand and performance, and one which changes its polling
interval between 45 and 50.

All of these races can be addressed with the introduction of a lock that
prevents sysfs operations from interleaving in this fashion.

Change-Id: Ia6887dcb2d69dc2576837a6c09fed55a28943abc
Signed-off-by: Jonathan Avila <avilaj@codeaurora.org>
2018-04-11 13:28:37 -07:00
Blagovest Kolenichev
e06a1054bd Merge android-4.9.84 (a9d0273) into msm-4.9
* refs/heads/tmp-a9d0273:
  Linux 4.9.84
  crypto: s5p-sss - Fix kernel Oops in AES-ECB mode
  KVM: nVMX: invvpid handling improvements
  KVM: VMX: clean up declaration of VPID/EPT invalidation types
  KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously
  x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug
  usb: phy: msm add regulator dependency
  arm64: fix warning about swapper_pg_dir overflow
  idle: i7300: add PCI dependency
  spi: bcm-qspi: shut up warning about cfi header inclusion
  binfmt_elf: compat: avoid unused function warning
  arm64: sunxi: always enable reset controller
  drm/i915: hide unused intel_panel_set_backlight function
  kasan: rework Kconfig settings
  clk: meson: gxbb: fix build error without RESET_CONTROLLER
  ISDN: eicon: reduce stack size of sig_ind function
  tw5864: use dev_warn instead of WARN to shut up warning
  em28xx: only use mt9v011 if camera support is enabled
  go7007: add MEDIA_CAMERA_SUPPORT dependency
  tc358743: fix register i2c_rd/wr functions
  shmem: fix compilation warnings on unused functions
  KVM: add X86_LOCAL_APIC dependency
  Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-uninitialized warning
  drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized
  rbd: silence bogus -Wmaybe-uninitialized warning
  drm: exynos: mark pm functions as __maybe_unused
  security/keys: BIG_KEY requires CONFIG_CRYPTO
  cw1200: fix bogus maybe-uninitialized warning
  reiserfs: avoid a -Wmaybe-uninitialized warning
  ALSA: hda/ca0132 - fix possible NULL pointer use
  arm64: Kconfig: select COMPAT_BINFMT_ELF only when BINFMT_ELF is set
  scsi: advansys: fix uninitialized data access
  x86/vm86: Fix unused variable warning if THP is disabled
  x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG
  dmaengine: zx: fix build warning
  x86: add MULTIUSER dependency for KVM
  thermal: fix INTEL_SOC_DTS_IOSF_CORE dependencies
  x86/build: Silence the build with "make -s"
  tools build: Add tools tree support for 'make -s'
  x86/fpu/math-emu: Fix possible uninitialized variable use
  arm64: define BUG() instruction without CONFIG_BUG
  gpio: xgene: mark PM functions as __maybe_unused
  x86/ras/inject: Make it depend on X86_LOCAL_APIC=y
  scsi: advansys: fix build warning for PCI=n
  video: fbdev: via: remove possibly unused variables
  perf: xgene: Include module.h
  PCI: Change pci_host_common_probe() visibility
  usb: musb: fix compilation warning on unused function
  platform/x86: intel_mid_thermal: Fix suspend handlers unused warning
  gpio: intel-mid: Fix build warning when !CONFIG_PM
  PCI: vmd: Fix suspend handlers defined-but-not-used warning
  perf/x86: Shut up false-positive -Wmaybe-uninitialized warning
  vmxnet3: prevent building with 64K pages
  clk: sunxi-ng: fix build error without CONFIG_RESET_CONTROLLER
  shmem: avoid maybe-uninitialized warning
  drm/i915: fix intel_backlight_device_register declaration
  crypto: talitos - fix Kernel Oops on hashing an empty file
  powerpc/64s: Improve RFI L1-D cache flush fallback
  powerpc/64s: Simple RFI macro conversions
  powerpc/64s: Fix conversion of slb_miss_common to use RFI_TO_USER/KERNEL
  hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close
  xen: XEN_ACPI_PROCESSOR is Dom0-only
  platform/x86: dell-laptop: Fix keyboard max lighting for Dell Latitude E6410
  x86/mm/kmmio: Fix mmiotrace for page unaligned addresses
  mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep
  usb: dwc3: of-simple: fix missing clk_disable_unprepare
  usb: dwc3: gadget: Wait longer for controller to end command processing
  dmaengine: jz4740: disable/unprepare clk if probe fails
  drm/armada: fix leak of crtc structure
  xfrm: Fix stack-out-of-bounds with misconfigured transport mode policies.
  spi: sun4i: disable clocks in the remove function
  ASoC: rockchip: disable clock on error
  clk: fix a panic error caused by accessing NULL pointer
  dmaengine: at_hdmac: fix potential NULL pointer dereference in atc_prep_dma_interleaved
  dmaengine: ioat: Fix error handling path
  gianfar: Disable EEE autoneg by default
  509: fix printing uninitialized stack memory when OID is empty
  net: ethernet: arc: fix error handling in emac_rockchip_probe
  brcmfmac: Avoid build error with make W=1
  btrfs: Fix possible off-by-one in btrfs_search_path_in_tree
  net_sched: red: Avoid illegal values
  net_sched: red: Avoid devision by zero
  gianfar: fix a flooded alignment reports because of padding issue.
  ARM: dts: Fix elm interrupt compiler warning
  s390/dasd: prevent prefix I/O error
  powerpc/perf: Fix oops when grouping different pmu events
  m68k: add missing SOFTIRQENTRY_TEXT linker section
  ipvlan: Add the skb->mark as flow4's member to lookup route
  scripts/kernel-doc: Don't fail with status != 0 if error encountered with -none
  sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune
  RDMA/cma: Make sure that PSN is not over max allowed
  i40iw: Correct ARP index mask
  pinctrl: sunxi: Fix A64 UART mux value
  pinctrl: sunxi: Fix A80 interrupt pin bank
  media: s5k6aa: describe some function parameters
  perf bench numa: Fixup discontiguous/sparse numa nodes
  perf top: Fix window dimensions change handling
  ARM: dts: am437x-cm-t43: Correct the dmas property of spi0
  ARM: dts: am4372: Correct the interrupts_properties of McASP
  ARM: dts: logicpd-somlv: Fix wl127x pinmux
  ARM: dts: logicpd-som-lv: Fix gpmc addresses for NAND and enet
  ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen
  ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function
  ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context
  usb: build drivers/usb/common/ when USB_SUPPORT is set
  usbip: keep usbip_device sockfd state in sync with tcp_socket
  staging: iio: ad5933: switch buffer mode to software
  staging: iio: adc: ad7192: fix external frequency setting
  binder: check for binder_thread allocation failure in binder_poll()
  staging: android: ashmem: Fix a race condition in pin ioctls
  dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock
  arm64: dts: add #cooling-cells to CPU nodes
  ARM: 8743/1: bL_switcher: add MODULE_LICENSE tag
  video: fbdev/mmp: add MODULE_LICENSE
  ASoC: ux500: add MODULE_LICENSE tag
  crypto: hash - prevent using keyed hashes without setting key
  crypto: hash - annotate algorithms taking optional key
  net: avoid skb_warn_bad_offload on IS_ERR
  rds: tcp: atomically purge entries from rds_tcp_conn_list during netns delete
  netfilter: xt_RATEEST: acquire xt_rateest_mutex for hash insert
  netfilter: xt_cgroup: initialize info->priv in cgroup_mt_check_v1()
  netfilter: on sockopt() acquire sock lock only in the required scope
  netfilter: ipt_CLUSTERIP: fix out-of-bounds accesses in clusterip_tg_check()
  netfilter: x_tables: avoid out-of-bounds reads in xt_request_find_{match|target}
  netfilter: x_tables: fix int overflow in xt_alloc_table_info()
  kcov: detect double association with a single task
  KVM: x86: fix escape of guest dr6 to the host
  blk_rq_map_user_iov: fix error override
  staging: android: ion: Switch from WARN to pr_warn
  staging: android: ion: Add __GFP_NOWARN for system contig heap
  crypto: x86/twofish-3way - Fix %rbp usage
  selinux: skip bounded transition processing if the policy isn't loaded
  selinux: ensure the context is NUL terminated in security_context_to_sid_core()
  Provide a function to create a NUL-terminated string from unterminated data
  ptr_ring: fail early if queue occupies more than KMALLOC_MAX_SIZE
  drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all
  blktrace: fix unlocked registration of tracepoints
  sctp: set frag_point in sctp_setsockopt_maxseg correctly
  xfrm: check id proto in validate_tmpl()
  xfrm: Fix stack-out-of-bounds read on socket policy lookup.
  mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed.
  xfrm: skip policies marked as dead while rehashing
  cfg80211: check dev_set_name() return value
  kcm: Only allow TCP sockets to be attached to a KCM mux
  kcm: Check if sk_user_data already set in kcm_attach
  vhost: use mutex_lock_nested() in vhost_dev_lock_vqs()
  ANDROID: sdcardfs: Hold i_mutex for i_size_write
  UPSTREAM: ANDROID: binder: synchronize_rcu() when using POLLFREE.
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck64-XTS
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck128-XTS
  BACKPORT, FROMGIT: crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS
  FROMGIT: crypto: speck - export common helpers
  BACKPORT, FROMGIT: crypto: speck - add support for the Speck block cipher
  f2fs: updates on v4.16-rc1
  Linux 4.9.83
  media: r820t: fix r820t_write_reg for KASAN
  ARM: dts: Delete bogus reference to the charlcd
  arm: dts: mt2701: Add reset-cells
  ARM: dts: s5pv210: add interrupt-parent for ohci
  arm64: dts: msm8916: Add missing #phy-cells
  ARM: pxa/tosa-bt: add MODULE_LICENSE tag
  ARM: dts: exynos: fix RTC interrupt for exynos5410
  vfs: don't do RCU lookup of empty pathnames
  x86: fix build warnign with 32-bit PAE
  x86/cpu: Change type of x86_cache_size variable to unsigned int
  x86/spectre: Fix an error message
  x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping
  selftests/x86/mpx: Fix incorrect bounds with old _sigfault
  x86/speculation: Add <asm/msr-index.h> dependency
  nospec: Move array_index_nospec() parameter checking into separate macro
  x86/speculation: Fix up array_index_nospec_mask() asm constraint
  selftests/x86: Do not rely on "int $0x80" in single_step_syscall.c
  selftests/x86: Do not rely on "int $0x80" in test_mremap_vdso.c
  selftests/x86/pkeys: Remove unused functions
  x86/speculation: Clean up various Spectre related details
  X86/nVMX: Properly set spec_ctrl and pred_cmd before merging MSRs
  KVM/x86: Reduce retpoline performance impact in slot_handle_level_range(), by always inlining iterator helper methods
  x86/speculation: Correct Speculation Control microcode blacklist again
  x86/speculation: Update Speculation Control microcode blacklist
  compiler-gcc.h: Introduce __optimize function attribute
  x86/entry/64/compat: Clear registers for compat syscalls, to reduce speculation attack surface
  arm: spear13xx: Fix spics gpio controller's warning
  arm: spear13xx: Fix dmas cells
  arm: spear600: Add missing interrupt-parent of rtc
  ARM: dts: nomadik: add interrupt-parent for clcd
  ARM: dts: STi: Add gpio polarity for "hdmi,hpd-gpio" property
  ARM: lpc3250: fix uda1380 gpio numbers
  arm64: dts: msm8916: Correct ipc references for smsm
  s390: fix handling of -1 in set{,fs}[gu]id16 syscalls
  ocfs2: try a blocking lock before return AOP_TRUNCATED_PAGE
  PM / devfreq: Propagate error from devfreq_add_device()
  cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin
  RDMA/rxe: Fix a race condition related to the QP error state
  kselftest: fix OOM in memory compaction test
  IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports
  IB/qib: Fix comparison error with qperf compare/swap test
  powerpc: fix build errors in stable tree
  dm: correctly handle chained bios in dec_pending()
  usb: Move USB_UHCI_BIG_ENDIAN_* out of USB_SUPPORT
  mvpp2: fix multicast address filter
  ALSA: seq: Fix racy pool initializations
  ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204
  ALSA: hda/realtek: PCI quirk for Fujitsu U7x7
  ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform
  ALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute
  ALSA: hda - Fix headset mic detection problem for two Dell machines
  mtd: nand: vf610: set correct ooblayout
  9p/trans_virtio: discard zero-length reply
  Btrfs: fix unexpected -EEXIST when creating new inode
  Btrfs: fix btrfs_evict_inode to handle abnormal inodes correctly
  Btrfs: fix extent state leak from tree log
  Btrfs: fix crash due to not cleaning up tree log block's dirty bits
  Btrfs: fix deadlock in run_delalloc_nocow
  target/iscsi: avoid NULL dereference in CHAP auth error path
  rtlwifi: rtl8821ae: Fix connection lost problem correctly
  console/dummy: leave .con_font_get set to NULL
  video: fbdev: atmel_lcdfb: fix display-timings lookup
  PCI: keystone: Fix interrupt-controller-node lookup
  MIPS: Fix typo BIG_ENDIAN to CPU_BIG_ENDIAN
  mm: Fix memory size alignment in devm_memremap_pages_release()
  mm: hide a #warning for COMPILE_TEST
  ext4: correct documentation for grpid mount option
  ext4: save error to disk in __ext4_grp_locked_error()
  ext4: fix a race in the ext4 shutdown path
  jbd2: fix sphinx kernel-doc build warnings
  mbcache: initialize entry->e_referenced in mb_cache_entry_create()
  rtc-opal: Fix handling of firmware error codes, prevent busy loops
  drm/radeon: adjust tested variable
  drm/radeon: Add dpm quirk for Jet PRO (v2)
  scsi: smartpqi: allow static build ("built-in")
  BACKPORT: tee: shm: Potential NULL dereference calling tee_shm_register()
  BACKPORT: tee: shm: don't put_page on null shm->pages
  BACKPORT: tee: shm: make function __tee_shm_alloc static
  BACKPORT: tee: optee: check type of registered shared memory
  BACKPORT: tee: add start argument to shm_register callback
  BACKPORT: tee: optee: fix header dependencies
  BACKPORT: tee: shm: inline tee_shm_get_id()
  BACKPORT: tee: use reference counting for tee_context
  BACKPORT: tee: optee: enable dynamic SHM support
  BACKPORT: tee: optee: add optee-specific shared pool implementation
  BACKPORT: tee: optee: store OP-TEE capabilities in private data
  BACKPORT: tee: optee: add registered buffers handling into RPC calls
  BACKPORT: tee: optee: add registered shared parameters handling
  BACKPORT: tee: optee: add shared buffer registration functions
  BACKPORT: tee: optee: add page list manipulation functions
  BACKPORT: tee: optee: Update protocol definitions
  BACKPORT: tee: shm: add page accessor functions
  BACKPORT: tee: shm: add accessors for buffer size and page offset
  BACKPORT: tee: add register user memory
  BACKPORT: tee: flexible shared memory pool creation
  BACKPORT: optee: support asynchronous supplicant requests
  BACKPORT: tee: add TEE_IOCTL_PARAM_ATTR_META
  BACKPORT: tee: add tee_param_is_memref() for driver use
  UPSTREAM: tcp: fix access to sk->sk_state in tcp_poll()
  BACKPORT: tcp: fix potential double free issue for fastopen_req
  BACKPORT: xfrm: Fix return value check of copy_sec_ctx.
  time: Fix ktime_get_raw() incorrect base accumulation
  FROMLIST: coresight: ETM: Add support for ARM Cortex-A73
  FROMLIST: coresight: tmc: implementing TMC-ETR AUX space API
  UPSTREAM: coresight: etm_perf: Fix using uninitialised work
  UPSTREAM: coresight: fix kernel panic caused by invalid CPU
  UPSTREAM: coresight: Fix disabling of CoreSight TPIU
  UPSTREAM: coresight: perf: Add a missing call to etm_free_aux
  UPSTREAM: coresight: tmc: Remove duplicate memset
  UPSTREAM: coresight: tmc: Get rid of mode parameter for helper routines
  UPSTREAM: coresight: tmc: Cleanup operation mode handling
  UPSTREAM: coresight: reset "enable_sink" flag when need be
  sched/fair: prevent possible infinite loop in sched_group_energy
  ANDROID: qtaguid: Fix the UAF probelm with tag_ref_tree
  UPSTREAM: ANDROID: binder: remove waitqueue when thread exits.
  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
  ANDROID: sched: EAS: check energy_aware() before calling select_energy_cpu_brute() in up-migrate path
  UPSTREAM: eventpoll.h: add missing epoll event masks
  BACKPORT: thermal/drivers/hisi: Add support for hi3660 SoC
  BACKPORT: thermal/drivers/hisi: Prepare to add support for other hisi platforms
  BACKPORT: thermal/drivers/hisi: Add platform prefix to function name
  BACKPORT: thermal/drivers/hisi: Put platform code together
  BACKPORT: thermal/drivers/hisi: Use round up step value
  BACKPORT: thermal/drivers/hisi: Move the clk setup in the corresponding functions
  BACKPORT: thermal/drivers/hisi: Remove mutex_lock in the code
  BACKPORT: thermal/drivers/hisi: Remove thermal data back pointer
  BACKPORT: thermal/drivers/hisi: Convert long to int
  BACKPORT: thermal/drivers/hisi: Rename and remove unused field
  BACKPORT: thermal/drivers/hisi: Remove costly sensor inspection
  BACKPORT: thermal/drivers/hisi: Fix configuration register setting
  BACKPORT: thermal/drivers/hisi: Encapsulate register writes into helpers
  BACKPORT: thermal/drivers/hisi: Remove pointless lock
  BACKPORT: thermal/drivers/hisi: Remove the multiple sensors support
  BACKPORT: thermal: hisilicon: constify thermal_zone_of_device_ops structures
  ANDROID: xattr: Pass EOPNOTSUPP to permission2
  ANDROID: sdcardfs: Move default_normal to superblock
  UPSTREAM: tcp: fix a request socket leak
  UPSTREAM: tcp: fix possible deadlock in TCP stack vs BPF filter
  UPSTREAM: tcp: Add a tcp_filter hook before handle ack packet
  FROMLIST: arm64: kpti: Fix the interaction between ASID switching and software PAN
  FROMLIST: arm64: Move post_ttbr_update_workaround to C code
  fscrypt: updates on 4.15-rc4
  ANDROID: uid_sys_stats: fix the comment
  BACKPORT: optee: fix invalid of_node_put() in optee_driver_init()
  BACKPORT: tee: optee: sync with new naming of interrupts
  BACKPORT: tee: indicate privileged dev in gen_caps
  BACKPORT: tee: optee: interruptible RPC sleep
  BACKPORT: tee: optee: add const to tee_driver_ops and tee_desc structures
  BACKPORT: tee: tee_shm: Constify dma_buf_ops structures.
  BACKPORT: tee: add forward declaration for struct device
  BACKPORT: tee: optee: fix uninitialized symbol 'parg'
  BACKPORT: tee.txt: standardize document format
  BACKPORT: tee: add ARM_SMCCC dependency
  clocksource: arch_timer: make virtual counter access configurable
  arm64: issue isb when trapping CNTVCT_EL0 access
  BACKPORT: arm64: Add CNTFRQ_EL0 trap handler
  BACKPORT: arm64: Add CNTVCT_EL0 trap handler
  ANDROID: sdcardfs: Fix missing break on default_normal
  ANDROID: arm64: kaslr: fixup Falkor workaround for 4.9
  ANDROID: usb: f_fs: Prevent gadget unbind if it is already unbound
  arm64: Kconfig: Reword UNMAP_KERNEL_AT_EL0 kconfig entry
  arm64: use RET instruction for exiting the trampoline
  UPSTREAM: arm64: kaslr: Put kernel vectors address in separate data page
  UPSTREAM: arm64: mm: Introduce TTBR_ASID_MASK for getting at the ASID in the TTBR
  UPSTREAM: arm64: Kconfig: Add CONFIG_UNMAP_KERNEL_AT_EL0
  UPSTREAM: arm64: entry: Add fake CPU feature for unmapping the kernel at EL0
  UPSTREAM: arm64: tls: Avoid unconditional zeroing of tpidrro_el0 for native tasks
  UPSTREAM: arm64: erratum: Work around Falkor erratum #E1003 in trampoline code
  UPSTREAM: arm64: entry: Hook up entry trampoline to exception vectors
  UPSTREAM: arm64: entry: Explicitly pass exception level to kernel_ventry macro
  UPSTREAM: arm64: mm: Map entry trampoline into trampoline and kernel page tables
  UPSTREAM: arm64: entry: Add exception trampoline page for exceptions from EL0
  UPSTREAM: arm64: mm: Invalidate both kernel and user ASIDs when performing TLBI
  UPSTREAM: arm64: mm: Add arm64_kernel_unmapped_at_el0 helper
  UPSTREAM: arm64: mm: Allocate ASIDs in pairs
  UPSTREAM: arm64: mm: Fix and re-enable ARM64_SW_TTBR0_PAN
  UPSTREAM: arm64: mm: Rename post_ttbr0_update_workaround
  UPSTREAM: arm64: mm: Move ASID from TTBR0 to TTBR1
  UPSTREAM: arm64: mm: Temporarily disable ARM64_SW_TTBR0_PAN
  UPSTREAM: arm64: mm: Use non-global mappings for kernel space
  UPSTREAM: arm64: factor out entry stack manipulation
  ANDROID: sdcardfs: Add default_normal option
  ANDROID: sdcardfs: notify lower file of opens
  blkdev: Refactoring block io latency histogram codes
  UPSTREAM: netfilter: conntrack: use power efficient workqueue
  ANDROID: binder: Remove obsolete proc waitqueue.
  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
  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()
  UPSTREAM: kasan, sched/headers: Uninline kasan_enable/disable_current()
  UPSTREAM: kasan: drain quarantine of memcg slab objects
  UPSTREAM: kasan: eliminate long stalls during quarantine reduction
  UPSTREAM: kasan: support panic_on_warn
  ANDROID: dma-buf/sw_sync: Rename active_list to link
  ANDROID: initramfs: call free_initrd() when skipping init
  BACKPORT: Documentation: tee subsystem and op-tee driver
  BACKPORT: tee: add OP-TEE driver
  BACKPORT: tee: generic TEE subsystem
  BACKPORT: dt/bindings: add bindings for optee
  BACKPORT: schedutil: Reset cached freq if it is not in sync with next_freq
  sched: EAS/WALT: Don't take into account of running task's util
  sched: EAS/WALT: take into account of waking task's load
  sched: EAS: upmigrate misfit current task
  sched: avoid pushing tasks to an offline CPU
  sched: Extend active balance to accept 'push_task' argument
  sched: walt: Correct WALT window size initialization
  sched: WALT: account cumulative window demand
  sched: EAS/WALT: finish accounting prior to task_tick
  sched/fair: prevent meaningless active migration
  sched: walt: Leverage existing helper APIs to apply invariance
  UPSTREAM: net: xfrm: allow clearing socket xfrm policies.
  UPSTREAM: time: Clean up CLOCK_MONOTONIC_RAW time handling
  UPSTREAM: arm64: vdso: fix clock_getres for 4GiB-aligned res
  f2fs: updates on 4.15-rc1
  UPSTREAM: android: binder: fix type mismatch warning
  BACKPORT: arm64: Use __pa_symbol for empty_zero_page
  UPSTREAM: arm64: Use __pa_symbol for kernel symbols
  UPSTREAM: mm: Introduce lm_alias
  FROMLIST: binder: fix proc->files use-after-free
  BACKPORT: xfrm: Clear sk_dst_cache when applying per-socket policy.
  sched: WALT: fix potential overflow
  sched: Update task->on_rq when tasks are moving between runqueues
  sched: WALT: fix window mis-alignment
  sched: EAS: kill incorrect nohz idle cpu kick
  sched: EAS: fix incorrect energy delta calculation due to rounding error
  sched: EAS/WALT: use cr_avg instead of prev_runnable_sum
  sched: WALT: fix broken cumulative runnable average accounting
  sched: deadline: WALT: account cumulative runnable avg
  ANDROID: binder: clarify deferred thread work.
  BACKPORT: net/tcp-fastopen: Add new API support
  UPSTREAM: net: Remove __sk_dst_reset() in tcp_v6_connect()
  UPSTREAM: net/tcp-fastopen: refactor cookie check logic
  sched: compute task utilisation with WALT consistently
  FROMLIST: arm64: Avoid aligning normal memory pointers in __memcpy_{to,from}io
  UPSTREAM: security: bpf: replace include of linux/bpf.h with forward declarations
  UPSTREAM: selinux: bpf: Add addtional check for bpf object file receive
  UPSTREAM: selinux: bpf: Add selinux check for eBPF syscall operations
  BACKPORT: security: bpf: Add LSM hooks for bpf object related syscall
  BACKPORT: bpf: Add file mode configuration into bpf maps
  cpufreq: Drop schedfreq governor
  ANDROID: Revert "arm64: move ELF_ET_DYN_BASE to 4GB / 4MB"
  ANDROID: Revert "arm: move ELF_ET_DYN_BASE to 4MB"
  sched: EAS: Fix the condition to distinguish energy before/after
  sched: EAS: update trg_cpu to backup_cpu if no energy saving for target_cpu
  sched/fair: consider task utilization in group_max_util()
  sched/fair: consider task utilization in group_norm_util()
  sched/fair: enforce EAS mode
  sched/fair: ignore backup CPU when not valid
  sched/fair: trace energy_diff for non boosted tasks
  UPSTREAM: sched/fair: Sync task util before slow-path wakeup
  UPSTREAM: sched/core: Add missing update_rq_clock() call in set_user_nice()
  UPSTREAM: sched/core: Add missing update_rq_clock() call for task_hot()
  UPSTREAM: sched/core: Add missing update_rq_clock() in detach_task_cfs_rq()
  UPSTREAM: sched/core: Add missing update_rq_clock() in post_init_entity_util_avg()
  UPSTREAM: sched/fair: Fix task group initialization
  cpufreq/sched: Consider max cpu capacity when choosing frequencies
  cpufreq/sched: Use cpu max freq rather than policy max
  sched/fair: remove erroneous RCU_LOCKDEP_WARN from start_cpu()
  FROMLIST: ALSA: usx2y: Suppress kernel warning at page allocation failures
  FROMLIST: kbuild: clang: fix build failures with sparse check
  Revert "Revert "BACKPORT: efi/libstub/arm64: Set -fpie when building the EFI stub""
  BACKPORT: efi/libstub: Unify command line param parsing
  ANDROID: sched/walt: Fix divide by zero error in cpufreq notifier
  ANDROID: binder: show high watermark of alloc->pages.
  ANDROID: binder: Add thread->process_todo flag.
  ANDROID: sched/fair: Select correct capacity state for energy_diff
  ANDROID: cpufreq-dt: Set sane defaults for schedutil rate limits
  BACKPORT: cpufreq: schedutil: Use policy-dependent transition delays
  Revert "BACKPORT: efi/libstub/arm64: Set -fpie when building the EFI stub"
  FROMLIST: android: binder: Fix null ptr dereference in debug msg
  FROMLIST: android: binder: Change binder_shrinker to static
  UPSTREAM: arm64: compat: Remove leftover variable declaration
  ANDROID: HACK: arm64: use -mno-implicit-float instead of -mgeneral-regs-only
  ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple
  CHROMIUM: arm64: Disable asm-operand-width warning for clang
  CHROMIUM: kbuild: clang: Disable the 'duplicate-decl-specifier' warning
  BACKPORT: x86/asm: Fix inline asm call constraints for Clang
  BACKPORT: efi/libstub/arm64: Set -fpie when building the EFI stub
  UPSTREAM: efi/libstub/arm64: Force 'hidden' visibility for section markers
  UPSTREAM: efi/libstub/arm64: Use hidden attribute for struct screen_info reference
  UPSTREAM: x86/build: Use cc-option to validate stack alignment parameter
  UPSTREAM: x86/build: Fix stack alignment for CLang
  UPSTREAM: compiler, clang: always inline when CONFIG_OPTIMIZE_INLINING is disabled
  UPSTREAM: x86/boot: #undef memcpy() et al in string.c
  UPSTREAM: llist: clang: introduce member_address_is_nonnull()
  UPSTREAM: crypto: arm64/sha - avoid non-standard inline asm tricks
  UPSTREAM: kbuild: clang: Disable 'address-of-packed-member' warning
  UPSTREAM: x86/build: Specify stack alignment for clang
  UPSTREAM: x86/build: Use __cc-option for boot code compiler options
  UPSTREAM: kbuild: Add __cc-option macro
  UPSTREAM: x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility
  UPSTREAM: crypto, x86: aesni - fix token pasting for clang
  UPSTREAM: x86/kbuild: Use cc-option to enable -falign-{jumps/loops}
  UPSTREAM: compiler, clang: properly override 'inline' for clang
  UPSTREAM: compiler, clang: suppress warning for unused static inline functions
  UPSTREAM: modules: mark __inittest/__exittest as __maybe_unused
  UPSTREAM: kbuild: Add support to generate LLVM assembly files
  UPSTREAM: kbuild: use -Oz instead of -Os when using clang
  UPSTREAM: kbuild, LLVMLinux: Add -Werror to cc-option to support clang
  UPSTREAM: kbuild: drop -Wno-unknown-warning-option from clang options
  UPSTREAM: kbuild: fix asm-offset generation to work with clang
  UPSTREAM: kbuild: consolidate redundant sed script ASM offset generation
  UPSTREAM: kbuild: Consolidate header generation from ASM offset information
  UPSTREAM: kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS
  UPSTREAM: kbuild: Add better clang cross build support
  FROMLIST: f2fs: expose some sectors to user in inline data or dentry case
  UPSTREAM: sched/fair: Fix usage of find_idlest_group() when the local group is idlest
  UPSTREAM: sched/fair: Fix usage of find_idlest_group() when no groups are allowed
  UPSTREAM: sched/fair: Fix find_idlest_group() when local group is not allowed
  UPSTREAM: sched/fair: Remove unnecessary comparison with -1
  UPSTREAM: sched/fair: Move select_task_rq_fair() slow-path into its own function
  UPSTREAM: sched/fair: Force balancing on NOHZ balance if local group has capacity
  UPSTREAM: f2fs: fix potential panic during fstrim
  f2fs: catch up to v4.14-rc1
  UPSTREAM: sched: use load_avg for selecting idlest group
  UPSTREAM: sched: fix find_idlest_group for fork
  ANDROID: binder: fix node sched policy calculation
  ANDROID: binder: init desired_prio.sched_policy before use it
  BACKPORT: net: xfrm: support setting an output mark.
  FROMLIST: tracing: Add support for preempt and irq enable/disable events
  FROMLIST: tracing: Prepare to add preempt and irq trace events

Conflicts:
	arch/arm64/Kconfig
	arch/arm64/include/asm/assembler.h
	arch/arm64/include/asm/cpucaps.h
	arch/arm64/include/asm/efi.h
	arch/arm64/include/asm/memory.h
	arch/arm64/include/asm/mmu.h
	arch/arm64/include/asm/mmu_context.h
	arch/arm64/kernel/cpufeature.c
	arch/arm64/kernel/io.c
	arch/arm64/kernel/setup.c
	arch/arm64/kernel/vdso.c
	arch/arm64/mm/context.c
	arch/arm64/mm/mmu.c
	drivers/Kconfig
	drivers/Makefile
	drivers/cpufreq/Kconfig
	drivers/hwtracing/coresight/coresight-etm4x.c
	drivers/hwtracing/coresight/coresight-priv.h
	drivers/hwtracing/coresight/coresight-tmc-etr.c
	drivers/hwtracing/coresight/coresight.c
	drivers/scsi/ufs/ufshcd.h
	drivers/staging/android/ion/ion-ioctl.c
	drivers/staging/android/ion/ion_system_heap.c
	drivers/usb/dwc3/gadget.c
	include/linux/sched.h
	include/trace/events/sched.h
	kernel/kcov.c
	kernel/sched/core.c
	kernel/sched/cpufreq_sched.c
	kernel/sched/cpufreq_schedutil.c
	kernel/sched/fair.c
	kernel/sched/sched.h
	kernel/sched/walt.c
	kernel/sched/walt.h
	mm/kasan/report.c
	security/security.c
	security/selinux/hooks.c

Change-Id: I0ec8cbca6cb6384e22fbbe8def8a9d228229dc48
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2018-03-19 04:18:31 -07:00
Maria Yu
4481a7df4f PM / devfreq: bw_hwmon: use unsigned parameter for bytes_to_mbps
In bytes_to_mbps function, the parameter is all unsigned,
so change the decleration of the function to include unsigned long
long to avoid compilation errors in 32 bit environment.
Also changed the return value as unsigned long to avoid
any data loss possible in 64 bit environment.

Change-Id: Ib3906bb4bc16086ae343764c5a718f6f005428c5
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
2018-03-05 15:03:04 +08:00
David Dai
272c4ce82e dev_freq: devfreq_spdm: add null terminator to prevent OOB access
Add null terminator to end of buffered copied from user to prevent
over reading.

Change-Id: I80cfcb087ea2c335fd65d8fcdaf372c7d34a533d
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Signed-off-by: phanendra yarra <pyarra@codeaurora.org>
2018-02-26 08:38:17 -08:00
Bjorn Andersson
b3685e8e2b PM / devfreq: Propagate error from devfreq_add_device()
commit d1bf2d30728f310f72296b54f0651ecdb09cbb12 upstream.

Propagate the error of devfreq_add_device() in devm_devfreq_add_device()
rather than statically returning ENOMEM. This makes it slightly faster
to pinpoint the cause of a returned error.

Fixes: 8cd84092d3 ("PM / devfreq: Add resource-managed function for devfreq device")
Cc: stable@vger.kernel.org
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22 15:43:52 +01:00
Linux Build Service Account
fcb32a6551 Merge "Revert "ARM: dts: msm: add MID details for BWMON counter in sdm670"" 2018-01-11 07:30:10 -08:00
Santosh Mardi
2aa2326167 PM / devfreq: disable certain interrupts events
As per the current algorithm the driver is only interested
in interrupts arising due to certain thresholds being crossed.
Program interrupt registers such that only those interrupts are
handled and the rest are ignored.

Change-Id: I8e344c28967a36f96116db5c1e8a2aa00883e948
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2018-01-10 14:26:59 +05:30
Maria Yu
e9293b044c devfreq: spdm: Fix for rpm creat request err
ERR value or NULL may returned from msm_rpm_create_request,
so correct the check as IS_ERR_OR_NULL.

Change-Id: I069f3c74e5d699ce394355dda192b662ba75f6a0
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
2018-01-04 17:42:54 +08:00
Odelu Kukatla
7382075343 devfreq: spdm: Add snapshot of devfreq-spdm driver
This is a snapshot of the devfreq-spdm driver as of msm-3.18
'commit fa156811a90f ("ASoC: msm: enable group config for both
tx and rx").

Change-Id: I11fbcbfbca8b9bc30b9b43d08557fd5774e1444d
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2017-12-18 21:32:14 -08:00
Linux Build Service Account
fcc6981b01 Merge "PM / devfreq: memlat: Add support for compute-bound logic" 2017-11-07 03:49:42 -08:00
Jonathan Avila
e71f95f68b PM / devfreq: memlat: Add support for compute-bound logic
Currently, an entirely separate governor is used to handle compute-bound
cases.  Roll this functionality into the existing memlat governor and
allow devices to choose which logic to target by specifying different
drivers in the 'compatible' field.

Change-Id: I8dc41bf0474309c3564dec8e6c813511b8a7fc02
Signed-off-by: Jonathan Avila <avilaj@codeaurora.org>
2017-11-06 15:03:02 -08:00
Saravana Kannan
8b71d22c56 PM / devfreq: bw_hwmon: Delete "low power mode" feature
This feature didn't really give any power savings when tested on multiple
platforms. The tunables that come with this feature just make the
configuration of normal io_percent unnecessarily confusing. So, delete the
unused feature and the corresponding tunables.

Change-Id: I4a5ac4e627aa801fd6804eb3ad5672057b1ebf56
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2017-10-30 15:37:44 -07:00
Linux Build Service Account
411a7a1188 Merge "Merge remote-tracking branch '4.9/tmp-05a906d' into msm-4.9" 2017-10-24 19:57:25 -07:00
Kyle Yan
cd02e634b8 Merge remote-tracking branch '4.9/tmp-379e3b2' into 4.9
* 4.9/tmp-379e3b2:
  ANDROID: binder: fix transaction leak.
  ANDROID: binder: Add tracing for binder priority inheritance.
  Linux 4.9.53
  swiotlb-xen: implement xen_swiotlb_dma_mmap callback
  video: fbdev: aty: do not leak uninitialized padding in clk to userspace
  KVM: VMX: use cmpxchg64
  cxl: Fix driver use count
  KVM: VMX: remove WARN_ON_ONCE in kvm_vcpu_trigger_posted_interrupt
  KVM: VMX: do not change SN bit in vmx_update_pi_irte()
  timer/sysclt: Restrict timer migration sysctl values to 0 and 1
  gfs2: Fix debugfs glocks dump
  x86/fpu: Don't let userspace set bogus xcomp_bv
  x86/mm: Fix fault error path using unsafe vma pointer
  btrfs: prevent to set invalid default subvolid
  btrfs: propagate error to btrfs_cmp_data_prepare caller
  btrfs: fix NULL pointer dereference from free_reloc_roots()
  PCI: Fix race condition with driver_override
  etnaviv: fix gem object list corruption
  xfs: validate bdev support for DAX inode flag
  kvm: nVMX: Don't allow L2 to access the hardware CR8
  KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
  kvm/x86: Handle async PF in RCU read-side critical sections
  KVM: VMX: simplify and fix vmx_vcpu_pi_load
  KVM: VMX: avoid double list add with VT-d posted interrupts
  KVM: VMX: extract __pi_post_block
  arm64: fault: Route pte translation faults via do_translation_fault
  arm64: Make sure SPsel is always set
  seccomp: fix the usage of get/put_seccomp_filter() in seccomp_get_filter()
  selftests/seccomp: Support glibc 2.26 siginfo_t.h
  iw_cxgb4: put ep reference in pass_accept_req()
  iw_cxgb4: remove the stid on listen create failure
  bsg-lib: don't free job in bsg_prepare_job
  nl80211: check for the required netlink attributes presence
  vfs: Return -ENXIO for negative SEEK_HOLE / SEEK_DATA offsets
  SMB3: Don't ignore O_SYNC/O_DSYNC and O_DIRECT flags
  SMB: Validate negotiate (to protect against downgrade) even if signing off
  SMB3: Warn user if trying to sign connection that authenticated as guest
  Fix SMB3.1.1 guest authentication to Samba
  PM: core: Fix device_pm_check_callbacks()
  s390/mm: fix write access check in gup_huge_pmd()
  powerpc/ftrace: Pass the correct stack pointer for DYNAMIC_FTRACE_WITH_REGS
  powerpc/tm: Flush TM only if CPU has TM feature
  powerpc/pseries: Fix parent_dn reference leak in add_dt_node()
  KEYS: prevent KEYCTL_READ on negative key
  KEYS: prevent creating a different user's keyrings
  KEYS: fix writing past end of user-supplied buffer in keyring_read()
  security/keys: rewrite all of big_key crypto
  security/keys: properly zero out sensitive key material in big_key
  crypto: talitos - fix hashing
  crypto: talitos - fix sha224
  crypto: talitos - Don't provide setkey for non hmac hashing algs.
  crypto: drbg - fix freeing of resources
  drm/radeon: disable hard reset in hibernate for APUs
  scsi: scsi_transport_iscsi: fix the issue that iscsi_if_rx doesn't parse nlmsg properly
  md/raid5: preserve STRIPE_ON_UNPLUG_LIST in break_stripe_batch_list
  md/raid5: fix a race condition in stripe batch
  tracing: Erase irqsoff trace with empty write
  tracing: Fix trace_pipe behavior for instance traces
  KVM: PPC: Book3S HV: Protect updates to spapr_tce_tables list
  KVM: PPC: Book3S: Fix race and leak in kvm_vm_ioctl_create_spapr_tce()
  genirq: Make sparse_irq_lock protect what it should protect
  mac80211: flush hw_roc_start work before cancelling the ROC
  mac80211_hwsim: Use proper TX power
  mac80211: fix VLAN handling with TXQs
  fs/proc: Report eip/esp in /prod/PID/stat for coredumping
  cifs: release auth_key.response for reconnect.
  cifs: release cifs root_cred after exit_cifs
  ANDROID: add script to fetch android kernel config fragments
  FROMLIST: binder: fix use-after-free in binder_transaction()
  UPSTREAM: ipv6: fib: Unlink replaced routes from their nodes
  Linux 4.9.52
  bcache: fix bch_hprint crash and improve output
  bcache: fix for gc and write-back race
  bcache: Correct return value for sysfs attach errors
  bcache: correct cache_dirty_target in __update_writeback_rate()
  bcache: do not subtract sectors_to_gc for bypassed IO
  bcache: Fix leak of bdev reference
  bcache: initialize dirty stripes in flash_dev_run()
  PM / devfreq: Fix memory leak when fail to register device
  media: uvcvideo: Prevent heap overflow when accessing mapped controls
  media: v4l2-compat-ioctl32: Fix timespec conversion
  s390/mm: fix race on mm->context.flush_mm
  s390/mm: fix local TLB flushing vs. detach of an mm address space
  net/netfilter/nf_conntrack_core: Fix net_conntrack_lock()
  PCI: pciehp: Report power fault only once until we clear it
  PCI: shpchp: Enable bridge bus mastering if MSI is enabled
  ARC: Re-enable MMU upon Machine Check exception
  tracing: Apply trace_clock changes to instance max buffer
  tracing: Add barrier to trace_printk() buffer nesting modification
  ftrace: Fix memleak when unregistering dynamic ops when tracing disabled
  ftrace: Fix selftest goto location on error
  scsi: qla2xxx: Fix an integer overflow in sysfs code
  scsi: qla2xxx: Correction to vha->vref_count timeout
  scsi: sg: fixup infoleak when using SG_GET_REQUEST_TABLE
  scsi: sg: factor out sg_fill_request_table()
  scsi: sg: off by one in sg_ioctl()
  scsi: sg: use standard lists for sg_requests
  scsi: sg: remove 'save_scat_len'
  scsi: storvsc: fix memory leak on ring buffer busy
  scsi: megaraid_sas: Return pended IOCTLs with cmd_status MFI_STAT_WRONG_STATE in case adapter is dead
  scsi: megaraid_sas: Check valid aen class range to avoid kernel panic
  scsi: megaraid_sas: set minimum value of resetwaittime to be 1 secs
  scsi: zfcp: trace high part of "new" 64 bit SCSI LUN
  scsi: zfcp: trace HBA FSF response by default on dismiss or timedout late response
  scsi: zfcp: fix payload with full FCP_RSP IU in SCSI trace records
  scsi: zfcp: fix missing trace records for early returns in TMF eh handlers
  scsi: zfcp: fix passing fsf_req to SCSI trace on TMF to correlate with HBA
  scsi: zfcp: fix capping of unsuccessful GPN_FT SAN response trace records
  scsi: zfcp: add handling for FCP_RESID_OVER to the fcp ingress path
  scsi: zfcp: fix queuecommand for scsi_eh commands when DIX enabled
  skd: Submit requests to firmware before triggering the doorbell
  skd: Avoid that module unloading triggers a use-after-free
  md/bitmap: disable bitmap_resize for file-backed bitmaps.
  block: Relax a check in blk_start_queue()
  powerpc: Fix DAR reporting when alignment handler faults
  ext4: fix quota inconsistency during orphan cleanup for read-only mounts
  ext4: fix incorrect quotaoff if the quota feature is enabled
  crypto: AF_ALG - remove SGL terminator indicator when chaining
  crypto: ccp - Fix XTS-AES-128 support on v5 CCPs
  MIPS: math-emu: <MADDF|MSUBF>.D: Fix accuracy (64-bit case)
  MIPS: math-emu: <MADDF|MSUBF>.S: Fix accuracy (32-bit case)
  MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Clean up "maddf_flags" enumeration
  MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Fix some cases of zero inputs
  MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Fix some cases of infinite inputs
  MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Fix NaN propagation
  MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately
  MIPS: math-emu: MINA.<D|S>: Fix some cases of infinity and zero inputs
  MIPS: math-emu: <MAXA|MINA>.<D|S>: Fix cases of both infinite inputs
  MIPS: math-emu: <MAXA|MINA>.<D|S>: Fix cases of input values with opposite signs
  MIPS: math-emu: <MAX|MIN>.<D|S>: Fix cases of both inputs negative
  MIPS: math-emu: <MAX|MAXA|MIN|MINA>.<D|S>: Fix cases of both inputs zero
  MIPS: math-emu: <MAX|MAXA|MIN|MINA>.<D|S>: Fix quiet NaN propagation
  Input: i8042 - add Gigabyte P57 to the keyboard reset table
  pinctrl/amd: save pin registers over suspend/resume
  tty: fix __tty_insert_flip_char regression
  tty: improve tty_insert_flip_char() slow path
  tty: improve tty_insert_flip_char() fast path
  IB/addr: Fix setting source address in addr6_resolve()
  drm/sun4i: Implement drm_driver lastclose to restore fbdev console
  IB/{qib, hfi1}: Avoid flow control testing for RDMA write operation
  orangefs: Don't clear SGID when inheriting ACLs
  mm: prevent double decrease of nr_reserved_highatomic
  NFSv4: Fix callback server shutdown
  SUNRPC: Refactor svc_set_num_threads()
  UPSTREAM: drm/atomic: Handle -EDEADLK with out-fences correctly
  UPSTREAM: sched/fair: Fix FTQ noise bench regression
  UPSTREAM: fib_rules: fix error return code
  UPSTREAM: ipv4: add missing initialization for flowi4_uid
  ANDROID: Squashfs: optimize reading uncompressed data
  ANDROID: Squashfs: implement .readpages()
  ANDROID: Squashfs: replace buffer_head with BIO
  ANDROID: Squashfs: refactor page_actor
  ANDROID: Squashfs: remove the FILE_CACHE option
  FROMLIST: android: binder: Don't get mm from task
  FROMLIST: android: binder: Remove unused vma argument
  FROMLIST: android: binder: Drop lru lock in isolate callback
  ANDROID: Use sk_uid to replace uid get from socket file
  ANDROID: nf: xt_qtaguid: fix handling for cases where tunnels are used.
  Revert "ANDROID: Use sk_uid to replace uid get from socket file"
  ANDROID: USB gadget: mtp: Fix hang in ioctl(MTP_RECEIVE_FILE) for WritePartialObject

Conflicts:
	drivers/android/binder_alloc.c
	drivers/media/v4l2-core/v4l2-compat-ioctl32.c
	drivers/scsi/sg.c
	drivers/usb/gadget/function/f_mtp.c
	net/netfilter/xt_qtaguid.c
	net/wireless/nl80211.c

Change-Id: I6af673bd4b920bb229fe238a3e96b2330fa18263
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-10-17 14:48:18 -07:00
Linux Build Service Account
029f60a8e5 Merge "PM / devfreq: memlat: Look for min stall% in addition to ratio criteria" 2017-10-11 16:37:05 -07:00
Linux Build Service Account
b7da61d284 Merge "PM / devfreq: bw_hwmon: Fix event-based race condition" 2017-10-11 16:36:56 -07:00
Saravana Kannan
83f2846e94 PM / devfreq: memlat: Look for min stall% in addition to ratio criteria
Some workloads doing memory access might appear memory latency bound even
though they might not actually be memory latency bound.

This error can happen when the core that's running the workload is very
parallelized or can do out of order executions, etc so not all memory
accesses would actually stall the core.

This can also happen when the the memory access monitoring capabilities
aren't ideal and end up counting more kinds of memory accesses than what
would be ideal. In this case, the IPM ratio can be lower than what it would
be if we had ideal monitoring capabilities.

To account for these errors, if the core has a stall cycle counting
capabilities, check for a minimum stall% before the workload is considered
memory latency bound. This would help reduce the inaccuracies, but is not a
replacement for IPM ratio scheme because the stall% method doesn't allow us
to detect which level of memory the workload is latency bound on, but the
IPM ratio does (based on which memory accesses we use for calculating the
ratio).

Change-Id: I4363d7848584e5562f6683b5ad6b0f99017ec71b
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2017-10-10 15:00:20 -07:00
Jonathan Avila
52593752cc PM / devfreq: bw_hwmon: Fix event-based race condition
Two events caused by sysfs writes to the bw_hwmon governor, when properly
interleaved, can lead to a race condition due to needing to stop and
restart the hardware monitor.  Fix this by adding locking to the event
handler.

Change-Id: I85c120ac0cf53f59ec12b8f56aed494acc446258
Signed-off-by: Jonathan Avila <avilaj@codeaurora.org>
2017-10-10 08:46:42 -07:00
Saravana Kannan
45994ff9d6 PM / devfreq: bimc-bwmon: Don't always round up BWMON5 measurements
All BWMON5 counters currently have very coarse resolution. So, rounding up
to the next resolvable measurement results in very high bandwidth
measurement event for use cases that generate almost no traffic. So,
instead of always rounding up to the next resolvable measurement, round up
only when the measurement is non-zero.

Change-Id: I347c9a9a3863291d2b94a4530d32faf2b1e996e0
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2017-10-02 15:57:41 -07:00
Saravana Kannan
52978b96a0 PM / devfreq: arm-memlat-mon: Simplify event initialization code
Instead of repeating the event initialization code for each event, just
keep an array of events and initialize them all using a for loop.

Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Change-Id: Id35078953aaecb1cb0a8b64980d92e873c4e6cb5
2017-09-29 16:13:24 -07:00
Saravana Kannan
a0ecf0067d PM / devfreq: memlat: Improve tracing of stats and votes
When the memlat governor votes for 0, it didn't generate any "update" trace
points to avoid spamming the trace buffer. But this can sometimes make it
harder to interpret some traces logs.

So, as a middle ground betweem making the trace harder to interpret vs
spamming the trace buffer, generate one trace point, when the vote
transitions from a non-zero value to a zero.

At the same time, the memlat governor was also generating "meas" trace
points for completely idle cores during every polling interval. This causes
a significant amount of spamming of the trace buffer. So, when a core is
idle, don't generate any "meas" trace points for it.

Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Change-Id: I3c72cde87bf56e45e31cc04fc4f80c030eed1e1a
2017-09-29 16:13:14 -07:00
Saravana Kannan
62e41b4473 PM / devfreq: arm-memlat-mon: Delete event count overflow handling code
The event counts that are u64 are unlikely to overflow before the system is
rebooted. And even if we never reboot the system in 100+ years and the
event counts overflow and we don't handle it, the worst case behavior would
be voting for the wrong memory frequency (bad power/performance) for a few
milliseconds. This extra code is definitely not worth it.

Change-Id: Ia7c8ac3966e96e6bc123bb26dfdba3ccae1e4a4c
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2017-09-28 19:36:43 -07:00
Chanwoo Choi
f5c3fd8328 PM / devfreq: Fix memory leak when fail to register device
commit 9e14de1077e9c34f141cf98bdba60cdd5193d962 upstream.

When the devfreq_add_device fails to register deivce, the memory
leak of devfreq instance happen. So, this patch fix the memory
leak issue. Before freeing the devfreq instance checks whether
devfreq instance is NULL or not because the device_unregister()
frees the devfreq instance when jumping to the 'err_init'.
It is to prevent the duplicate the kfee(devfreq).

Fixes: ac4b281176 ("PM / devfreq: fix duplicated kfree on devfreq pointer")
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-27 14:39:24 +02:00
Saravana Kannan
6f67be817a PM / devfreq: memlat: Don't ignore extremely latency sensitive workloads
The ratio value that's compared against ratio_ceil tunable can be 0 for
workloads that are extremely latency sensitive. So, we can't ignore cores
that have a ratio of 0 (which was done to ignore idle cores). So, stop
ignoring cores with a ratio of 0 and instead check for instruction or
frequency being 0 to identify idle cores.

Change-Id: I8c6c14f374f016e6612c3b834589d065bad8f488
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2017-09-07 22:28:59 -07:00
Deepak Kumar
b668b4ef09 adreno_tz: Correct tz_buf pointer type to correct pointer arithmetic
Current tz_buf pointer type is causing the end address calcultion
of tz_buf to go wrong. "end_addr = tz_buf + PAGE_ALIGN(size)" is
resulting in an end address way beyond the allocated range because
tz_buf is of type unsigned int. This change changes the tz_buf
pointer type to u8 to fix this issue.

Change-Id: I16db09c565801b56c0c0ee8a8184f6e276512fa3
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2017-07-06 13:14:50 +05:30
Rohit Gupta
aa422df8ab devfreq: simple-dev: Make the freq-table property optional
The call to devfreq_add_device() tries to initialize frequency tables
for simple-dev. This can be a more efficient way of setting up
frequency tables in case there are multiple tables for a single device
depending on hardware version.
Make 'freq-tbl-khz' property an optional one so that probe doesn't
fail in its absence and devfreq_add_device() also gets a chance to
set up the freq table for simple-dev.

Change-Id: I96b5c2d4aef2085512d94dc6792f5ba2711de64b
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2017-06-15 18:12:35 -07:00
Linux Build Service Account
92b0fef624 Merge "adreno_tz: Remove unnecessary devfreq NULL check in tz_handler()" into msm-4.9 2017-06-01 10:42:28 -07:00
Hareesh Gundu
cb6c273fa2 adreno_tz: Remove unnecessary devfreq NULL check in tz_handler()
Caller of tz_handler() is having the NULL check for devfreq,So
we don’t need unnecessary NULL pointer check.

CRs-Fixed: 2046922
Change-Id: I42eb70ab19b4a5af193521d77bca86447a1ecdb8
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
2017-06-01 15:37:28 +05:30
Santosh Mardi
19f4e0dace PM / devfreq: update macro GOVERNOR_BW_HWMON_H in memlat.
In memlat driver we should not use GOVERNOR_BW_HWMON
instead use GOVERNOR_MEMLAT_H.

Change-Id: Ie21259a990deecd1a90391157c72e59b5e72b252
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2017-05-25 19:10:50 +05:30
Linux Build Service Account
59af454625 Merge "PM / devfreq: memlat: Move per-CPU stats inside device nodes" into msm-4.9 2017-05-16 10:59:00 -07:00
Rohit Gupta
bb3ac62b94 PM / devfreq: memlat: Move per-CPU stats inside device nodes
Currently each memlat monitor stores details such as previous sample
timestamp and perf counts in per-CPU structures. This can result in
multiple monitors overwriting each others' data.
Move these stats within per device structures so that each of the
monitors have exclusive access to them.

Change-Id: I0a60e95eebd72f0e602cbf9cba05380324b75b3f
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2017-05-15 16:30:42 -07:00
Stephen Boyd
6d867b909d PM / devfreq: bw_hwmon: Add support for specifying count factor
Not all bandwidth monitors count in units of 1MB. Add a DT
property that indicates the number of bytes the monitor counts in
so we can properly scale the count we read from the hardware to
reflect the traffic. By default, we will assume 1MB units if the
property doesn't exist.

Change-Id: I1b581b2fffda04ba151df6e87221628368ff5b17
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-05-15 11:57:26 -07:00