2034 Commits

Author SHA1 Message Date
Angelo G. Del Regno
e7a8a5f04c Backport new vmalloc for "large performance benefits"
This is a backport from Linux 5.2-rc1 of a patch series to greatly enhance vmalloc's performance
especially on embedded systems, plus all of its dependencies that were missing in kernel 4.9.

For all the informations, refer to LKML: https://lkml.org/lkml/2018/10/19/786

Brief informations:
Currently an allocation of the new VA area is done over busy list iteration until a suitable hole
is found between two busy areas. Therefore each new allocation causes the list being grown.
Due to long list and different permissive parameters an allocation can take a long time on
embedded devices(milliseconds).

This patch organizes the vmalloc memory layout into free areas of the VMALLOC_START-VMALLOC_END range.
It uses a red-black tree that keeps blocks sorted by their offsets in pair with linked list
keeping the free space in order of increasing addresses.

Quote Phoronix:
With this patch from Uladzislau Rezki, calling vmalloc() can take up to 67% less time compared
to the behavior on Linux 5.1 and prior, at least with tests done by the developer under QEMU.

Personal tests are showing that the device is more responsive when memory pressure is
high and when huge allocations are to be done, it's also noticeably faster in this case, like
when starting Chrome with more than 100 opened tabs after a system reboot (so, an
uncached complete load of it).

Shameless kanged from:
https://github.com/sonyxperiadev/kernel / Pull Request 2016
2024-08-13 23:11:50 +05:30
Michael Bestas
87cf1c2fc1 Merge remote-tracking branch 'common/android-4.9-q' into android-msm-pixel-4.9
* common/android-4.9-q:
  Linux 4.9.321
  swiotlb: skip swiotlb_bounce when orig_addr is zero
  kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]
  fdt: Update CRC check for rng-seed
  xen: unexport __init-annotated xen_xlate_map_ballooned_pages()
  drm: remove drm_fb_helper_modinit
  powerpc/pseries: wire up rng during setup_arch()
  modpost: fix section mismatch check for exported init/exit sections
  ARM: cns3xxx: Fix refcount leak in cns3xxx_init
  ARM: Fix refcount leak in axxia_boot_secondary
  ARM: exynos: Fix refcount leak in exynos_map_pmu
  ARM: dts: imx6qdl: correct PU regulator ramp delay
  powerpc: Enable execve syscall exit tracepoint
  xtensa: Fix refcount leak bug in time.c
  xtensa: xtfpga: Fix refcount leak bug in setup
  iio: trigger: sysfs: fix use-after-free on remove
  iio: accel: mma8452: ignore the return value of reset operation
  iio:accel:bma180: rearrange iio trigger get and register
  usb: chipidea: udc: check request status before setting device address
  iio: adc: vf610: fix conversion mode sysfs node name
  igb: Make DMA faster when CPU is active on the PCIe link
  MIPS: Remove repetitive increase irq_err_count
  x86/xen: Remove undefined behavior in setup_features()
  bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers
  USB: serial: option: add Telit LE910Cx 0x1250 composition
  random: quiet urandom warning ratelimit suppression message
  dm era: commit metadata in postsuspend after worker stops
  ata: libata: add qc->flags in ata_qc_complete_template tracepoint
  random: schedule mix_interrupt_randomness() less often
  vt: drop old FONT ioctls
  BACKPORT: l2tp: fix race in pppol2tp_release with session object destroy
  BACKPORT: l2tp: don't use inet_shutdown on ppp session destroy
  Linux 4.9.320
  tcp: drop the hash_32() part from the index calculation
  tcp: increase source port perturb table to 2^16
  tcp: dynamically allocate the perturb table used by source ports
  tcp: add small random increments to the source port
  tcp: use different parts of the port_offset for index and offset
  secure_seq: use the 64 bits of the siphash for port offset calculation
  tcp: add some entropy in __inet_hash_connect()
  tcp: change source port randomizarion at connect() time
  fuse: fix pipe buffer lifetime for direct_io
  Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE""
  swiotlb: fix info leak with DMA_FROM_DEVICE
  xprtrdma: fix incorrect header size calculations
  s390/mm: use non-quiescing sske for KVM switch to keyed guest
  l2tp: fix race in pppol2tp_release with session object destroy
  l2tp: don't use inet_shutdown on ppp session destroy
  ext4: add reserved GDT blocks check
  ext4: make variable "count" signed
  ext4: fix bug_on ext4_mb_use_inode_pa
  serial: 8250: Store to lsr_save_flags after lsr read
  usb: gadget: lpc32xx_udc: Fix refcount leak in lpc32xx_udc_probe
  USB: serial: io_ti: add Agilent E5805A support
  USB: serial: option: add support for Cinterion MV31 with new baseline
  comedi: vmk80xx: fix expression for tx buffer size
  irqchip/gic-v3: Iterate over possible CPUs by for_each_possible_cpu()
  irqchip/gic/realview: Fix refcount leak in realview_gic_of_init
  misc: atmel-ssc: Fix IRQ check in ssc_probe
  pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE
  random: credit cpu and bootloader seeds by default
  net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag
  ipv6: Fix signed integer overflow in l2tp_ip6_sendmsg
  nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred
  virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed
  scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology
  scsi: vmw_pvscsi: Expand vcpuHint to 16 bits
  ASoC: wm8962: Fix suspend while playing music
  ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
  ASoC: cs42l56: Correct typo in minimum level for SX volume controls
  ASoC: cs42l52: Correct TLV for Bypass Volume
  ASoC: cs53l30: Correct number of volume levels on SX controls
  ASoC: cs42l52: Fix TLV scales for mixer controls
  random: account for arch randomness in bits
  random: mark bootloader randomness code as __init
  random: avoid checking crng_ready() twice in random_init()
  crypto: drbg - make reseeding from get_random_bytes() synchronous
  crypto: drbg - always try to free Jitter RNG instance
  crypto: drbg - move dynamic ->reseed_threshold adjustments to __drbg_seed()
  crypto: drbg - track whether DRBG was seeded with !rng_is_initialized()
  crypto: drbg - prepare for more fine-grained tracking of seeding state
  crypto: drbg - always seeded with SP800-90B compliant noise source
  crypto: drbg - add FIPS 140-2 CTRNG for noise source
  Revert "random: use static branch for crng_ready()"
  random: check for signals after page of pool writes
  random: wire up fops->splice_{read,write}_iter()
  random: convert to using fops->write_iter()
  random: move randomize_page() into mm where it belongs
  random: move initialization functions out of hot pages
  random: use proper return types on get_random_{int,long}_wait()
  random: remove extern from functions in header
  random: use static branch for crng_ready()
  random: credit architectural init the exact amount
  random: handle latent entropy and command line from random_init()
  random: use proper jiffies comparison macro
  random: remove ratelimiting for in-kernel unseeded randomness
  random: avoid initializing twice in credit race
  random: use symbolic constants for crng_init states
  siphash: use one source of truth for siphash permutations
  random: help compiler out with fast_mix() by using simpler arguments
  random: do not use input pool from hard IRQs
  random: order timer entropy functions below interrupt functions
  random: do not pretend to handle premature next security model
  random: do not use batches when !crng_ready()
  random: insist on random_get_entropy() existing in order to simplify
  uapi: rename ext2_swab() to swab() and share globally in swab.h
  xtensa: use fallback for random_get_entropy() instead of zero
  sparc: use fallback for random_get_entropy() instead of zero
  um: use fallback for random_get_entropy() instead of zero
  x86/tsc: Use fallback for random_get_entropy() instead of zero
  nios2: use fallback for random_get_entropy() instead of zero
  arm: use fallback for random_get_entropy() instead of zero
  mips: use fallback for random_get_entropy() instead of just c0 random
  m68k: use fallback for random_get_entropy() instead of zero
  timekeeping: Add raw clock fallback for random_get_entropy()
  powerpc: define get_cycles macro for arch-override
  alpha: define get_cycles macro for arch-override
  parisc: define get_cycles macro for arch-override
  s390: define get_cycles macro for arch-override
  ia64: define get_cycles macro for arch-override
  init: call time_init() before rand_initialize()
  random: fix sysctl documentation nits
  random: document crng_fast_key_erasure() destination possibility
  random: make random_get_entropy() return an unsigned long
  random: check for signals every PAGE_SIZE chunk of /dev/[u]random
  random: check for signal_pending() outside of need_resched() check
  random: do not allow user to keep crng key around on stack
  random: do not split fast init input in add_hwgenerator_randomness()
  random: mix build-time latent entropy into pool at init
  random: re-add removed comment about get_random_{u32,u64} reseeding
  random: treat bootloader trust toggle the same way as cpu trust toggle
  random: skip fast_init if hwrng provides large chunk of entropy
  random: check for signal and try earlier when generating entropy
  random: reseed more often immediately after booting
  random: make consistent usage of crng_ready()
  random: use SipHash as interrupt entropy accumulator
  random: replace custom notifier chain with standard one
  random: don't let 644 read-only sysctls be written to
  random: give sysctl_random_min_urandom_seed a more sensible value
  random: do crng pre-init loading in worker rather than irq
  random: unify cycles_t and jiffies usage and types
  random: cleanup UUID handling
  random: only wake up writers after zap if threshold was passed
  random: round-robin registers as ulong, not u32
  random: clear fast pool, crng, and batches in cpuhp bring up
  random: pull add_hwgenerator_randomness() declaration into random.h
  hwrng: remember rng chosen by user
  hwrng: use rng source with best quality
  hwrng: core - remove unused PFX macro
  hwrng: core - Move hwrng miscdev minor number to include/linux/miscdevice.h
  hwrng: core - Rewrite the header
  hwrng: core - rewrite better comparison to NULL
  hwrng: core - do not use multiple blank lines
  random: check for crng_init == 0 in add_device_randomness()
  random: unify early init crng load accounting
  random: do not take pool spinlock at boot
  random: defer fast pool mixing to worker
  workqueue: make workqueue available early during boot
  random: rewrite header introductory comment
  random: group sysctl functions
  random: group userspace read/write functions
  random: group entropy collection functions
  random: group entropy extraction functions
  random: group initialization wait functions
  random: remove whitespace and reorder includes
  random: remove useless header comment
  random: introduce drain_entropy() helper to declutter crng_reseed()
  random: deobfuscate irq u32/u64 contributions
  random: add proper SPDX header
  random: remove unused tracepoints
  random: remove ifdef'd out interrupt bench
  random: tie batched entropy generation to base_crng generation
  random: zero buffer after reading entropy from userspace
  random: remove outdated INT_MAX >> 6 check in urandom_read()
  random: use hash function for crng_slow_load()
  random: absorb fast pool into input pool after fast load
  random: do not xor RDRAND when writing into /dev/random
  random: ensure early RDSEED goes through mixer on init
  random: inline leaves of rand_initialize()
  random: use RDSEED instead of RDRAND in entropy extraction
  random: fix locking in crng_fast_load()
  random: remove batched entropy locking
  random: remove use_input_pool parameter from crng_reseed()
  random: make credit_entropy_bits() always safe
  random: always wake up entropy writers after extraction
  random: use linear min-entropy accumulation crediting
  random: simplify entropy debiting
  random: use computational hash for entropy extraction
  random: only call crng_finalize_init() for primary_crng
  random: access primary_pool directly rather than through pointer
  random: continually use hwgenerator randomness
  random: simplify arithmetic function flow in account()
  random: access input_pool_data directly rather than through pointer
  random: cleanup fractional entropy shift constants
  random: prepend remaining pool constants with POOL_
  random: de-duplicate INPUT_POOL constants
  random: remove unused OUTPUT_POOL constants
  random: rather than entropy_store abstraction, use global
  random: try to actively add entropy rather than passively wait for it
  random: remove unused extract_entropy() reserved argument
  random: remove incomplete last_data logic
  random: cleanup integer types
  crypto: chacha20 - Fix chacha20_block() keystream alignment (again)
  random: cleanup poolinfo abstraction
  random: fix typo in comments
  random: don't reset crng_init_cnt on urandom_read()
  random: avoid superfluous call to RDRAND in CRNG extraction
  random: early initialization of ChaCha constants
  random: initialize ChaCha20 constants with correct endianness
  random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs
  random: harmonize "crng init done" messages
  random: mix bootloader randomness into pool
  random: do not re-init if crng_reseed completes before primary init
  random: do not sign extend bytes for rotation when mixing
  random: use BLAKE2s instead of SHA1 in extraction
  random: remove unused irq_flags argument from add_interrupt_randomness()
  random: document add_hwgenerator_randomness() with other input functions
  crypto: blake2s - adjust include guard naming
  crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h>
  MAINTAINERS: co-maintain random.c
  random: remove dead code left over from blocking pool
  random: avoid arch_get_random_seed_long() when collecting IRQ randomness
  random: add arch_get_random_*long_early()
  powerpc: Use bool in archrandom.h
  linux/random.h: Mark CONFIG_ARCH_RANDOM functions __must_check
  linux/random.h: Use false with bool
  linux/random.h: Remove arch_has_random, arch_has_random_seed
  powerpc: Remove arch_has_random, arch_has_random_seed
  x86: Remove arch_has_random, arch_has_random_seed
  random: avoid warnings for !CONFIG_NUMA builds
  random: split primary/secondary crng init paths
  random: remove some dead code of poolinfo
  random: fix typo in add_timer_randomness()
  random: Add and use pr_fmt()
  random: convert to ENTROPY_BITS for better code readability
  random: remove unnecessary unlikely()
  random: remove kernel.random.read_wakeup_threshold
  random: delete code to pull data into pools
  random: remove the blocking pool
  random: fix crash on multiple early calls to add_bootloader_randomness()
  random: make /dev/random be almost like /dev/urandom
  random: ignore GRND_RANDOM in getentropy(2)
  random: add GRND_INSECURE to return best-effort non-cryptographic bytes
  random: Add a urandom_read_nowait() for random APIs that don't warn
  random: Don't wake crng_init_wait when crng_init == 1
  lib/crypto: sha1: re-roll loops to reduce code size
  lib/crypto: blake2s: move hmac construction into wireguard
  crypto: blake2s - generic C library implementation and selftest
  crypto: Deduplicate le32_to_cpu_array() and cpu_to_le32_array()
  Revert "hwrng: core - Freeze khwrng thread during suspend"
  char/random: Add a newline at the end of the file
  random: Use wait_event_freezable() in add_hwgenerator_randomness()
  fdt: add support for rng-seed
  random: Support freezable kthreads in add_hwgenerator_randomness()
  random: fix soft lockup when trying to read from an uninitialized blocking pool
  latent_entropy: avoid build error when plugin cflags are not set
  random: document get_random_int() family
  random: move rand_initialize() earlier
  random: only read from /dev/random after its pool has received 128 bits
  drivers/char/random.c: make primary_crng static
  drivers/char/random.c: remove unused stuct poolinfo::poolbits
  drivers/char/random.c: constify poolinfo_table
  random: make CPU trust a boot parameter
  random: Make crng state queryable
  random: remove preempt disabled region
  random: add a config option to trust the CPU's hwrng
  random: Return nbytes filled from hw RNG
  random: Fix whitespace pre random-bytes work
  drivers/char/random.c: remove unused dont_count_entropy
  random: optimize add_interrupt_randomness
  random: always fill buffer in get_random_bytes_wait
  crypto: chacha20 - Fix keystream alignment for chacha20_block()
  random: fix data race on crng_node_pool
  random: always use batched entropy for get_random_u{32,64}
  Revert "char/random: silence a lockdep splat with printk()"
  char/random: silence a lockdep splat with printk()
  random: add a spinlock_t to struct batched_entropy
  random: rate limit unseeded randomness warnings
  random: fix possible sleeping allocation from irq context
  random: set up the NUMA crng instances after the CRNG is fully initialized
  random: use a different mixing algorithm for add_device_randomness()
  random: fix warning message on ia64 and parisc
  random: reorder READ_ONCE() in get_random_uXX
  random: suppress spammy warnings about unseeded randomness
  random: do not ignore early device randomness
  random: warn when kernel uses unseeded randomness
  random: add get_random_{bytes,u32,u64,int,long,once}_wait family
  random: add wait_for_random_bytes() API
  random: silence compiler warnings and fix race
  random: invalidate batched entropy after crng init
  random: move random_min_urandom_seed into CONFIG_SYSCTL ifdef block
  random: convert get_random_int/long into get_random_u32/u64
  random: fix comment for unused random_min_urandom_seed
  random: remove variable limit
  random: remove stale urandom_init_wait
  random: remove stale maybe_reseed_primary_crng
  9p: missing chunk of "fs/9p: Don't update file type when updating file attributes"
  Linux 4.9.319
  x86/speculation/mmio: Print SMT warning
  KVM: x86/speculation: Disable Fill buffer clear within guests
  x86/speculation/mmio: Reuse SRBDS mitigation for SBDS
  x86/speculation/srbds: Update SRBDS mitigation selection
  x86/speculation/mmio: Add sysfs reporting for Processor MMIO Stale Data
  x86/speculation/mmio: Enable CPU Fill buffer clearing on idle
  x86/bugs: Group MDS, TAA & Processor MMIO Stale Data mitigations
  x86/speculation/mmio: Add mitigation for Processor MMIO Stale Data
  x86/speculation: Add a common function for MD_CLEAR mitigation update
  x86/speculation/mmio: Enumerate Processor MMIO Stale Data bug
  Documentation: Add documentation for Processor MMIO Stale Data
  x86/cpu: Add another Alder Lake CPU to the Intel family
  x86/cpu: Add Lakefield, Alder Lake and Rocket Lake models to the to Intel CPU family
  x86/cpu: Add Comet Lake to the Intel CPU models header
  x86/CPU: Add more Icelake model numbers
  x86/CPU: Add Icelake model number
  x86/cpu: Add Cannonlake to Intel family
  x86/cpu: Add Jasper Lake to Intel family
  cpu/speculation: Add prototype for cpu_show_srbds()
  x86/cpu: Add Elkhart Lake to Intel family
  ANDROID: arch: fix backported syscall numbers
  Linux 4.9.318
  tcp: fix tcp_mtup_probe_success vs wrong snd_cwnd
  PCI: qcom: Fix unbalanced PHY init on probe errors
  mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N
  mtd: cfi_cmdset_0002: Move and rename chip_check/chip_ready/chip_good_for_write
  powerpc/32: Fix overread/overwrite of thread_struct via ptrace
  Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag
  nfc: st21nfca: fix memory leaks in EVT_TRANSACTION handling
  nfc: st21nfca: fix incorrect validating logic in EVT_TRANSACTION
  ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files
  cifs: return errors during session setup during reconnects
  ALSA: hda/conexant - Fix loopback issue with CX20632
  vringh: Fix loop descriptors check in the indirect cases
  nodemask: Fix return values to be unsigned
  modpost: fix undefined behavior of is_arm_mapping_symbol()
  drm/radeon: fix a possible null pointer dereference
  Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process"
  md: protect md_unregister_thread from reentrancy
  serial: msm_serial: disable interrupts in __msm_console_write()
  staging: rtl8712: fix uninit-value in r871xu_drv_init()
  clocksource/drivers/sp804: Avoid error on multiple instances
  misc: rtsx: set NULL intfdata when probe fails
  usb: dwc2: gadget: don't reset gadget's driver->bus
  USB: hcd-pci: Fully suspend across freeze/thaw cycle
  drivers: usb: host: Fix deadlock in oxu_bus_suspend()
  drivers: tty: serial: Fix deadlock in sa1100_set_termios()
  USB: host: isp116x: check return value after calling platform_get_resource()
  drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()
  tty: Fix a possible resource leak in icom_probe
  tty: synclink_gt: Fix null-pointer-dereference in slgt_clean()
  lkdtm/usercopy: Expand size of "out of frame" object
  iio: dummy: iio_simple_dummy: check the return value of kstrdup()
  net: altera: Fix refcount leak in altera_tse_mdio_create
  net: xfrm: unexport __init-annotated xfrm4_protocol_init()
  SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()
  net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure
  ata: pata_octeon_cf: Fix refcount leak in octeon_cf_probe
  net: fix nla_strcmp to handle more then one trailing null character
  video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()
  m68knommu: fix undefined reference to `_init_sp'
  m68knommu: set ZERO_PAGE() to the allocated zeroed page
  i2c: cadence: Increase timeout per message if necessary
  tracing: Avoid adding tracer option before update_tracer_options
  tcp: tcp_rtx_synack() can be called from process context
  jffs2: fix memory leak in jffs2_do_fill_super
  modpost: fix removing numeric suffixes
  net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry()
  clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
  firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle
  serial: st-asc: Sanitize CSIZE and correct PARENB for CS7
  serial: sh-sci: Don't allow CS5-6
  serial: txx9: Don't allow CS5-6
  serial: digicolor-usart: Don't allow CS5-6
  serial: meson: acquire port->lock in startup()
  rtc: mt6397: check return value after calling platform_get_resource()
  rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value
  pwm: lp3943: Fix duty calculation in case period was clamped
  USB: storage: karma: fix rio_karma_init return
  usb: usbip: add missing device lock on tweak configuration cmd
  usb: usbip: fix a refcount leak in stub_probe()
  staging: greybus: codecs: fix type confusion of list iterator variable
  pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards
  netfilter: nf_tables: disallow non-stateful expression in sets earlier
  MIPS: IP27: Remove incorrect `cpu_has_fpu' override
  RDMA/rxe: Generate a completion for unsupported/invalid opcode
  dt-bindings: gpio: altera: correct interrupt-cells
  docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0
  gma500: fix an incorrect NULL check on list iterator
  carl9170: tx: fix an incorrect use of list iterator
  ASoC: rt5514: Fix event generation for "DSP Voice Wake Up" control
  rtl818x: Prevent using not initialized queues
  hugetlb: fix huge_pmd_unshare address update
  nodemask.h: fix compilation error with GCC12
  iommu/msm: Fix an incorrect NULL check on list iterator
  um: Fix out-of-bounds read in LDT setup
  um: chan_user: Fix winch_tramp() return value
  mac80211: upgrade passive scan to active scan on DFS channels after beacon rx
  irqchip: irq-xtensa-mx: fix initial IRQ affinity
  irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x
  RDMA/hfi1: Fix potential integer multiplication overflow errors
  md: fix an incorrect NULL check in md_reload_sb
  md: fix an incorrect NULL check in does_sb_need_changing
  drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX
  drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
  scsi: ufs: qcom: Add a readl() to make sure ref_clk gets enabled
  scsi: dc395x: Fix a missing check on list iterator
  ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock
  dlm: fix missing lkb refcount handling
  dlm: fix plock invalid read
  ext4: verify dir block before splitting it
  ext4: fix bug_on in ext4_writepages
  ext4: fix use-after-free in ext4_rename_dir_prepare
  fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages
  iwlwifi: mvm: fix assert 1F04 upon reconfig
  wifi: mac80211: fix use-after-free in chanctx code
  iommu/amd: Increase timeout waiting for GA log enablement
  video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup
  Input: sparcspkr - fix refcount leak in bbc_beep_probe
  tty: fix deadlock caused by calling printk() under tty_port->lock
  powerpc/4xx/cpm: Fix return value of __setup() handler
  powerpc/idle: Fix return value of __setup() handler
  powerpc/8xx: export 'cpm_setbrg' for modules
  drivers/base/node.c: fix compaction sysfs file leak
  scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac()
  mfd: ipaq-micro: Fix error check return value of platform_get_irq()
  soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc
  soc: qcom: smp2p: Fix missing of_node_put() in smp2p_parse_ipc
  rxrpc: Don't try to resend the request if we're receiving the reply
  rxrpc: Fix listen() setting the bar too high for the prealloc rings
  ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
  sctp: read sk->sk_bound_dev_if once in sctp_rcv()
  m68k: math-emu: Fix dependencies of math emulation support
  Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout
  media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init
  media: exynos4-is: Change clk_disable to clk_disable_unprepare
  regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt
  ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe
  media: uvcvideo: Fix missing check to determine if element is found in list
  drm/msm: return an error pointer in msm_gem_prime_get_sg_table()
  x86/mm: Cleanup the control_va_addr_alignment() __setup handler
  drm/rockchip: vop: fix possible null-ptr-deref in vop_bind()
  drm/msm/hdmi: check return value after calling platform_get_resource_byname()
  drm/msm/dsi: fix error checks and return values for DSI xmit functions
  x86/pm: Fix false positive kmemleak report in msr_build_context()
  inotify: show inotify mask flags in proc fdinfo
  ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix
  spi: img-spfi: Fix pm_runtime_get_sync() error checking
  HID: hid-led: fix maximum brightness for Dream Cheeky
  NFC: NULL out the dev->rfkill to prevent UAF
  spi: spi-ti-qspi: Fix return value handling of wait_for_completion_timeout
  drm/mediatek: Fix mtk_cec_mask()
  x86/delay: Fix the wrong asm constraint in delay_loop()
  ASoC: mediatek: Fix error handling in mt8173_max98090_dev_probe
  drm: fix EDID struct for old ARM OABI format
  macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled
  powerpc/xics: fix refcount leak in icp_opal_init()
  PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store()
  ARM: hisi: Add missing of_node_put after of_find_compatible_node
  ARM: dts: exynos: add atmel,24c128 fallback to Samsung EEPROM
  ARM: versatile: Add missing of_node_put in dcscb_init
  fat: add ratelimit to fat*_ent_bread()
  ARM: OMAP1: clock: Fix UART rate reporting algorithm
  fs: jfs: fix possible NULL pointer dereference in dbFree()
  eth: tg3: silence the GCC 12 array-bounds warning
  rxrpc: Return an error to sendmsg if call failed
  media: exynos4-is: Fix compile warning
  ASoC: rt5645: Fix errorenous cleanup order
  nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags
  openrisc: start CPU timer early in boot
  ipmi:ssif: Check for NULL msg when handling events and messages
  dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
  ASoC: dapm: Don't fold register value changes into notifications
  ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL
  drm/amd/pm: fix the compile warning
  scsi: megaraid: Fix error check return value of register_chrdev()
  media: cx25821: Fix the warning when removing the module
  ath9k: fix QCA9561 PA bias level
  drm/amd/pm: fix double free in si_parse_power_table()
  ALSA: jack: Access input_dev under mutex
  ACPICA: Avoid cache flush inside virtual machines
  ipw2x00: Fix potential NULL dereference in libipw_xmit()
  b43: Fix assigning negative value to unsigned variable
  b43legacy: Fix assigning negative value to unsigned variable
  mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue
  drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes
  btrfs: add "0x" prefix for unsupported optional features
  ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
  ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
  USB: new quirk for Dell Gen 2 devices
  BACKPORT: psi: Fix uaf issue when psi trigger is destroyed while being polled

 Conflicts:
	drivers/char/Kconfig
	drivers/char/random.c
	fs/fat/fatent.c
	include/linux/random.h
	init/main.c
	kernel/cpu.c
	lib/Makefile

Change-Id: I06579fa22a0347a0d8d2fa32bd6b7b6b54db626f
2022-08-09 06:05:50 +03:00
Greg Kroah-Hartman
b6d1c4dd97 Merge 4.9.318 into android-4.9-q
Changes in 4.9.318
	USB: new quirk for Dell Gen 2 devices
	ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
	ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
	btrfs: add "0x" prefix for unsupported optional features
	drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes
	mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue
	b43legacy: Fix assigning negative value to unsigned variable
	b43: Fix assigning negative value to unsigned variable
	ipw2x00: Fix potential NULL dereference in libipw_xmit()
	ACPICA: Avoid cache flush inside virtual machines
	ALSA: jack: Access input_dev under mutex
	drm/amd/pm: fix double free in si_parse_power_table()
	ath9k: fix QCA9561 PA bias level
	media: cx25821: Fix the warning when removing the module
	scsi: megaraid: Fix error check return value of register_chrdev()
	drm/amd/pm: fix the compile warning
	ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL
	ASoC: dapm: Don't fold register value changes into notifications
	dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
	ipmi:ssif: Check for NULL msg when handling events and messages
	openrisc: start CPU timer early in boot
	nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags
	ASoC: rt5645: Fix errorenous cleanup order
	media: exynos4-is: Fix compile warning
	rxrpc: Return an error to sendmsg if call failed
	eth: tg3: silence the GCC 12 array-bounds warning
	fs: jfs: fix possible NULL pointer dereference in dbFree()
	ARM: OMAP1: clock: Fix UART rate reporting algorithm
	fat: add ratelimit to fat*_ent_bread()
	ARM: versatile: Add missing of_node_put in dcscb_init
	ARM: dts: exynos: add atmel,24c128 fallback to Samsung EEPROM
	ARM: hisi: Add missing of_node_put after of_find_compatible_node
	PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store()
	powerpc/xics: fix refcount leak in icp_opal_init()
	macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled
	drm: fix EDID struct for old ARM OABI format
	ASoC: mediatek: Fix error handling in mt8173_max98090_dev_probe
	x86/delay: Fix the wrong asm constraint in delay_loop()
	drm/mediatek: Fix mtk_cec_mask()
	spi: spi-ti-qspi: Fix return value handling of wait_for_completion_timeout
	NFC: NULL out the dev->rfkill to prevent UAF
	HID: hid-led: fix maximum brightness for Dream Cheeky
	spi: img-spfi: Fix pm_runtime_get_sync() error checking
	ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix
	inotify: show inotify mask flags in proc fdinfo
	x86/pm: Fix false positive kmemleak report in msr_build_context()
	drm/msm/dsi: fix error checks and return values for DSI xmit functions
	drm/msm/hdmi: check return value after calling platform_get_resource_byname()
	drm/rockchip: vop: fix possible null-ptr-deref in vop_bind()
	x86/mm: Cleanup the control_va_addr_alignment() __setup handler
	drm/msm: return an error pointer in msm_gem_prime_get_sg_table()
	media: uvcvideo: Fix missing check to determine if element is found in list
	ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe
	regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt
	media: exynos4-is: Change clk_disable to clk_disable_unprepare
	media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init
	Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout
	m68k: math-emu: Fix dependencies of math emulation support
	sctp: read sk->sk_bound_dev_if once in sctp_rcv()
	ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
	rxrpc: Fix listen() setting the bar too high for the prealloc rings
	rxrpc: Don't try to resend the request if we're receiving the reply
	soc: qcom: smp2p: Fix missing of_node_put() in smp2p_parse_ipc
	soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc
	mfd: ipaq-micro: Fix error check return value of platform_get_irq()
	scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac()
	drivers/base/node.c: fix compaction sysfs file leak
	powerpc/8xx: export 'cpm_setbrg' for modules
	powerpc/idle: Fix return value of __setup() handler
	powerpc/4xx/cpm: Fix return value of __setup() handler
	tty: fix deadlock caused by calling printk() under tty_port->lock
	Input: sparcspkr - fix refcount leak in bbc_beep_probe
	video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup
	iommu/amd: Increase timeout waiting for GA log enablement
	wifi: mac80211: fix use-after-free in chanctx code
	iwlwifi: mvm: fix assert 1F04 upon reconfig
	fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages
	ext4: fix use-after-free in ext4_rename_dir_prepare
	ext4: fix bug_on in ext4_writepages
	ext4: verify dir block before splitting it
	dlm: fix plock invalid read
	dlm: fix missing lkb refcount handling
	ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock
	scsi: dc395x: Fix a missing check on list iterator
	scsi: ufs: qcom: Add a readl() to make sure ref_clk gets enabled
	drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
	drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX
	md: fix an incorrect NULL check in does_sb_need_changing
	md: fix an incorrect NULL check in md_reload_sb
	RDMA/hfi1: Fix potential integer multiplication overflow errors
	irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x
	irqchip: irq-xtensa-mx: fix initial IRQ affinity
	mac80211: upgrade passive scan to active scan on DFS channels after beacon rx
	um: chan_user: Fix winch_tramp() return value
	um: Fix out-of-bounds read in LDT setup
	iommu/msm: Fix an incorrect NULL check on list iterator
	nodemask.h: fix compilation error with GCC12
	hugetlb: fix huge_pmd_unshare address update
	rtl818x: Prevent using not initialized queues
	ASoC: rt5514: Fix event generation for "DSP Voice Wake Up" control
	carl9170: tx: fix an incorrect use of list iterator
	gma500: fix an incorrect NULL check on list iterator
	docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0
	dt-bindings: gpio: altera: correct interrupt-cells
	RDMA/rxe: Generate a completion for unsupported/invalid opcode
	MIPS: IP27: Remove incorrect `cpu_has_fpu' override
	netfilter: nf_tables: disallow non-stateful expression in sets earlier
	pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards
	staging: greybus: codecs: fix type confusion of list iterator variable
	usb: usbip: fix a refcount leak in stub_probe()
	usb: usbip: add missing device lock on tweak configuration cmd
	USB: storage: karma: fix rio_karma_init return
	pwm: lp3943: Fix duty calculation in case period was clamped
	rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value
	rtc: mt6397: check return value after calling platform_get_resource()
	serial: meson: acquire port->lock in startup()
	serial: digicolor-usart: Don't allow CS5-6
	serial: txx9: Don't allow CS5-6
	serial: sh-sci: Don't allow CS5-6
	serial: st-asc: Sanitize CSIZE and correct PARENB for CS7
	firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle
	clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
	net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry()
	modpost: fix removing numeric suffixes
	jffs2: fix memory leak in jffs2_do_fill_super
	tcp: tcp_rtx_synack() can be called from process context
	tracing: Avoid adding tracer option before update_tracer_options
	i2c: cadence: Increase timeout per message if necessary
	m68knommu: set ZERO_PAGE() to the allocated zeroed page
	m68knommu: fix undefined reference to `_init_sp'
	video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()
	net: fix nla_strcmp to handle more then one trailing null character
	ata: pata_octeon_cf: Fix refcount leak in octeon_cf_probe
	net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure
	SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()
	net: xfrm: unexport __init-annotated xfrm4_protocol_init()
	net: altera: Fix refcount leak in altera_tse_mdio_create
	iio: dummy: iio_simple_dummy: check the return value of kstrdup()
	lkdtm/usercopy: Expand size of "out of frame" object
	tty: synclink_gt: Fix null-pointer-dereference in slgt_clean()
	tty: Fix a possible resource leak in icom_probe
	drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()
	USB: host: isp116x: check return value after calling platform_get_resource()
	drivers: tty: serial: Fix deadlock in sa1100_set_termios()
	drivers: usb: host: Fix deadlock in oxu_bus_suspend()
	USB: hcd-pci: Fully suspend across freeze/thaw cycle
	usb: dwc2: gadget: don't reset gadget's driver->bus
	misc: rtsx: set NULL intfdata when probe fails
	clocksource/drivers/sp804: Avoid error on multiple instances
	staging: rtl8712: fix uninit-value in r871xu_drv_init()
	serial: msm_serial: disable interrupts in __msm_console_write()
	md: protect md_unregister_thread from reentrancy
	Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process"
	drm/radeon: fix a possible null pointer dereference
	modpost: fix undefined behavior of is_arm_mapping_symbol()
	nodemask: Fix return values to be unsigned
	vringh: Fix loop descriptors check in the indirect cases
	ALSA: hda/conexant - Fix loopback issue with CX20632
	cifs: return errors during session setup during reconnects
	ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files
	nfc: st21nfca: fix incorrect validating logic in EVT_TRANSACTION
	nfc: st21nfca: fix memory leaks in EVT_TRANSACTION handling
	Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag
	powerpc/32: Fix overread/overwrite of thread_struct via ptrace
	mtd: cfi_cmdset_0002: Move and rename chip_check/chip_ready/chip_good_for_write
	mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N
	PCI: qcom: Fix unbalanced PHY init on probe errors
	tcp: fix tcp_mtup_probe_success vs wrong snd_cwnd
	Linux 4.9.318

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2028f3dcd422886bf997ec7e1d2ae86515f1bfb9
2022-06-14 17:02:23 +02:00
Linus Torvalds
4188758b53 drm: fix EDID struct for old ARM OABI format
[ Upstream commit 47f15561b69e226bfc034e94ff6dbec51a4662af ]

When building the kernel for arm with the "-mabi=apcs-gnu" option, gcc
will force alignment of all structures and unions to a word boundary
(see also STRUCTURE_SIZE_BOUNDARY and the "-mstructure-size-boundary=XX"
option if you're a gcc person), even when the members of said structures
do not want or need said alignment.

This completely messes up the structure alignment of 'struct edid' on
those targets, because even though all the embedded structures are
marked with "__attribute__((packed))", the unions that contain them are
not.

This was exposed by commit f1e4c916f97f ("drm/edid: add EDID block count
and size helpers"), but the bug is pre-existing.  That commit just made
the structure layout problem cause a build failure due to the addition
of the

        BUILD_BUG_ON(sizeof(*edid) != EDID_LENGTH);

sanity check in drivers/gpu/drm/drm_edid.c:edid_block_data().

This legacy union alignment should probably not be used in the first
place, but we can fix the layout by adding the packed attribute to the
union entries even when each member is already packed and it shouldn't
matter in a sane build environment.

You can see this issue with a trivial test program:

  union {
	struct {
		char c[5];
	};
	struct {
		char d;
		unsigned e;
	} __attribute__((packed));
  } a = { "1234" };

where building this with a normal "gcc -S" will result in the expected
5-byte size of said union:

	.type	a, @object
	.size	a, 5

but with an ARM compiler and the old ABI:

    arm-linux-gnu-gcc -mabi=apcs-gnu -mfloat-abi=soft -S t.c

you get

	.type	a, %object
	.size	a, 8

instead, because even though each member of the union is packed, the
union itself still gets aligned.

This was reported by Sudip for the spear3xx_defconfig target.

Link: https://lore.kernel.org/lkml/YpCUzStDnSgQLNFN@debian/
Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 16:52:30 +02: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
Greg Kroah-Hartman
9759f952fd Merge 4.9.208 into android-4.9-q
Changes in 4.9.208
	btrfs: skip log replay on orphaned roots
	btrfs: do not leak reloc root if we fail to read the fs root
	btrfs: handle ENOENT in btrfs_uuid_tree_iterate
	ALSA: pcm: Avoid possible info leaks from PCM stream buffers
	ALSA: hda/ca0132 - Keep power on during processing DSP response
	ALSA: hda/ca0132 - Avoid endless loop
	drm: mst: Fix query_payload ack reply struct
	drm/bridge: analogix-anx78xx: silence -EPROBE_DEFER warnings
	iio: light: bh1750: Resolve compiler warning and make code more readable
	spi: Add call to spi_slave_abort() function when spidev driver is released
	staging: rtl8192u: fix multiple memory leaks on error path
	staging: rtl8188eu: fix possible null dereference
	rtlwifi: prevent memory leak in rtl_usb_probe
	libertas: fix a potential NULL pointer dereference
	IB/iser: bound protection_sg size by data_sg size
	media: am437x-vpfe: Setting STD to current value is not an error
	media: i2c: ov2659: fix s_stream return value
	media: i2c: ov2659: Fix missing 720p register config
	media: ov6650: Fix stored frame format not in sync with hardware
	tools/power/cpupower: Fix initializer override in hsw_ext_cstates
	usb: renesas_usbhs: add suspend event support in gadget mode
	hwrng: omap3-rom - Call clk_disable_unprepare() on exit only if not idled
	regulator: max8907: Fix the usage of uninitialized variable in max8907_regulator_probe()
	media: flexcop-usb: fix NULL-ptr deref in flexcop_usb_transfer_init()
	media: cec-funcs.h: add status_req checks
	samples: pktgen: fix proc_cmd command result check logic
	mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring
	media: ti-vpe: vpe: fix a v4l2-compliance warning about invalid pixel format
	media: ti-vpe: vpe: fix a v4l2-compliance failure about frame sequence number
	media: ti-vpe: vpe: Make sure YUYV is set as default format
	extcon: sm5502: Reset registers during initialization
	x86/mm: Use the correct function type for native_set_fixmap()
	perf test: Report failure for mmap events
	perf report: Add warning when libunwind not compiled in
	usb: usbfs: Suppress problematic bind and unbind uevents.
	iio: adc: max1027: Reset the device at probe time
	Bluetooth: hci_core: fix init for HCI_USER_CHANNEL
	x86/mce: Lower throttling MCE messages' priority to warning
	drm/gma500: fix memory disclosures due to uninitialized bytes
	rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
	x86/ioapic: Prevent inconsistent state when moving an interrupt
	arm64: psci: Reduce the waiting time for cpu_psci_cpu_kill()
	libata: Ensure ata_port probe has completed before detach
	pinctrl: sh-pfc: sh7734: Fix duplicate TCLK1_B
	Bluetooth: Fix advertising duplicated flags
	bnx2x: Fix PF-VF communication over multi-cos queues.
	spi: img-spfi: fix potential double release
	ALSA: timer: Limit max amount of slave instances
	rtlwifi: fix memory leak in rtl92c_set_fw_rsvdpagepkt()
	perf probe: Fix to find range-only function instance
	perf probe: Fix to list probe event with correct line number
	perf probe: Walk function lines in lexical blocks
	perf probe: Fix to probe an inline function which has no entry pc
	perf probe: Fix to show ranges of variables in functions without entry_pc
	perf probe: Fix to show inlined function callsite without entry_pc
	perf probe: Fix to probe a function which has no entry pc
	perf probe: Skip overlapped location on searching variables
	perf probe: Return a better scope DIE if there is no best scope
	perf probe: Fix to show calling lines of inlined functions
	perf probe: Skip end-of-sequence and non statement lines
	perf probe: Filter out instances except for inlined subroutine and subprogram
	ath10k: fix get invalid tx rate for Mesh metric
	media: pvrusb2: Fix oops on tear-down when radio support is not present
	media: si470x-i2c: add missed operations in remove
	EDAC/ghes: Fix grain calculation
	spi: pxa2xx: Add missed security checks
	ASoC: rt5677: Mark reg RT5677_PWR_ANLG2 as volatile
	s390/disassembler: don't hide instruction addresses
	parport: load lowlevel driver if ports not found
	cpufreq: Register drivers only after CPU devices have been registered
	x86/crash: Add a forward declaration of struct kimage
	iwlwifi: mvm: fix unaligned read of rx_pkt_status
	spi: tegra20-slink: add missed clk_unprepare
	mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests
	btrfs: don't prematurely free work in end_workqueue_fn()
	btrfs: don't prematurely free work in run_ordered_work()
	spi: st-ssc4: add missed pm_runtime_disable
	x86/insn: Add some Intel instructions to the opcode map
	iwlwifi: check kasprintf() return value
	fbtft: Make sure string is NULL terminated
	crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c
	crypto: vmx - Avoid weird build failures
	libtraceevent: Fix memory leakage in copy_filter_type
	net: phy: initialise phydev speed and duplex sanely
	btrfs: don't prematurely free work in reada_start_machine_worker()
	Revert "mmc: sdhci: Fix incorrect switch to HS mode"
	usb: xhci: Fix build warning seen with CONFIG_PM=n
	btrfs: don't double lock the subvol_sem for rename exchange
	btrfs: do not call synchronize_srcu() in inode_tree_del
	btrfs: return error pointer from alloc_test_extent_buffer
	btrfs: abort transaction after failed inode updates in create_subvol
	Btrfs: fix removal logic of the tree mod log that leads to use-after-free issues
	af_packet: set defaule value for tmo
	fjes: fix missed check in fjes_acpi_add
	mod_devicetable: fix PHY module format
	net: hisilicon: Fix a BUG trigered by wrong bytes_compl
	net: nfc: nci: fix a possible sleep-in-atomic-context bug in nci_uart_tty_receive()
	net: qlogic: Fix error paths in ql_alloc_large_buffers()
	net: usb: lan78xx: Fix suspend/resume PHY register access error
	sctp: fully initialize v4 addr in some functions
	net: dst: Force 4-byte alignment of dst_metrics
	usbip: Fix error path of vhci_recv_ret_submit()
	USB: EHCI: Do not return -EPIPE when hub is disconnected
	platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes
	staging: comedi: gsc_hpdi: check dma_alloc_coherent() return value
	ext4: fix ext4_empty_dir() for directories with holes
	ext4: check for directory entries too close to block end
	powerpc/irq: fix stack overflow verification
	mmc: sdhci-of-esdhc: fix P2020 errata handling
	perf probe: Fix to show function entry line as probe-able
	scsi: mpt3sas: Fix clear pending bit in ioctl status
	scsi: lpfc: Fix locking on mailbox command completion
	Input: atmel_mxt_ts - disable IRQ across suspend
	iommu/tegra-smmu: Fix page tables in > 4 GiB memory
	scsi: target: compare full CHAP_A Algorithm strings
	scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices
	scsi: csiostor: Don't enable IRQs too early
	powerpc/pseries: Mark accumulate_stolen_time() as notrace
	powerpc/pseries: Don't fail hash page table insert for bolted mapping
	dma-debug: add a schedule point in debug_dma_dump_mappings()
	clocksource/drivers/asm9260: Add a check for of_clk_get
	powerpc/security/book3s64: Report L1TF status in sysfs
	powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning
	jbd2: Fix statistics for the number of logged blocks
	scsi: tracing: Fix handling of TRANSFER LENGTH == 0 for READ(6) and WRITE(6)
	scsi: lpfc: Fix duplicate unreg_rpi error in port offline flow
	clk: qcom: Allow constant ratio freq tables for rcg
	irqchip/irq-bcm7038-l1: Enable parent IRQ if necessary
	irqchip: ingenic: Error out if IRQ domain creation failed
	fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long
	scsi: lpfc: fix: Coverity: lpfc_cmpl_els_rsp(): Null pointer dereferences
	scsi: ufs: fix potential bug which ends in system hang
	powerpc/pseries/cmm: Implement release() function for sysfs device
	powerpc/security: Fix wrong message when RFI Flush is disable
	scsi: atari_scsi: sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE
	clk: pxa: fix one of the pxa RTC clocks
	bcache: at least try to shrink 1 node in bch_mca_scan()
	HID: Improve Windows Precision Touchpad detection.
	ext4: work around deleting a file with i_nlink == 0 safely
	scsi: pm80xx: Fix for SATA device discovery
	scsi: scsi_debug: num_tgts must be >= 0
	scsi: target: iscsi: Wait for all commands to finish before freeing a session
	gpio: mpc8xxx: Don't overwrite default irq_set_type callback
	scripts/kallsyms: fix definitely-lost memory leak
	cdrom: respect device capabilities during opening action
	perf regs: Make perf_reg_name() return "unknown" instead of NULL
	libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h
	s390/cpum_sf: Check for SDBT and SDB consistency
	ocfs2: fix passing zero to 'PTR_ERR' warning
	kernel: sysctl: make drop_caches write-only
	x86/mce: Fix possibly incorrect severity calculation on AMD
	net, sysctl: Fix compiler warning when only cBPF is present
	ALSA: hda - Downgrade error message for single-cmd fallback
	perf strbuf: Remove redundant va_end() in strbuf_addv()
	Make filldir[64]() verify the directory entry filename is valid
	filldir[64]: remove WARN_ON_ONCE() for bad directory entries
	netfilter: ebtables: compat: reject all padding in matches/watchers
	6pack,mkiss: fix possible deadlock
	netfilter: bridge: make sure to pull arp header in br_nf_forward_arp()
	net: icmp: fix data-race in cmp_global_allow()
	hrtimer: Annotate lockless access to timer->state
	tty/serial: atmel: fix out of range clock divider handling
	pinctrl: baytrail: Really serialize all register accesses
	mmc: sdhci: Update the tuning failed messages to pr_debug level
	net: ena: fix napi handler misbehavior when the napi budget is zero
	vhost/vsock: accept only packets with the right dst_cid
	tcp/dccp: fix possible race __inet_lookup_established()
	tcp: do not send empty skb from tcp_write_xmit()
	gtp: fix wrong condition in gtp_genl_dump_pdp()
	gtp: avoid zero size hashtable
	Linux 4.9.208

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-01-04 13:57:22 +01:00
Sean Paul
56d26381f7 drm: mst: Fix query_payload ack reply struct
[ Upstream commit 268de6530aa18fe5773062367fd119f0045f6e88 ]

Spec says[1] Allocated_PBN is 16 bits

[1]- DisplayPort 1.2 Spec, Section 2.11.9.8, Table 2-98

Fixes: ad7f8a1f9c ("drm/helper: add Displayport multi-stream helper (v0.6)")
Cc: Lyude Paul <lyude@redhat.com>
Cc: Todd Previte <tprevite@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190829165223.129662-1-sean@poorly.run
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-04 13:39:00 +01:00
lucaswei
43c545b2a8 Merge android-4.9-q (4.9.205) into android-msm-pixel-4.9-lts
Merge 4.9.205 into android-4.9-q
Linux 4.9.205
  * Revert "sock: Reset dst when changing sk_mark via setsockopt"
      net/core/sock.c
    Merge 4.9.204 into android-4.9-q
Linux 4.9.204
    KVM: PPC: Book3S HV: Flush link stack on guest exit to host kernel
    powerpc/book3s64: Fix link stack flush on context switch
    powerpc/64s: support nospectre_v2 cmdline option
    staging: comedi: usbduxfast: usbduxfast_ai_cmdtest rounding error
    USB: serial: option: add support for Foxconn T77W968 LTE modules
    USB: serial: option: add support for DW5821e with eSIM support
    USB: serial: mos7840: fix remote wakeup
    USB: serial: mos7720: fix remote wakeup
    USB: serial: mos7840: add USB ID to support Moxa UPort 2210
    appledisplay: fix error handling in the scheduled work
    USB: chaoskey: fix error case of a timeout
    usb-serial: cp201x: support Mark-10 digital force gauge
    usbip: tools: fix fd leakage in the function of read_attr_usbip_status
    virtio_console: move removal code
    virtio_console: drop custom control queue cleanup
    virtio_console: fix uninitialized variable use
    virtio_ring: fix return code on DMA mapping fails
    virtio_console: allocate inbufs in add_port() only if it is needed
    virtio_console: don't tie bufs to a vq
    virtio_console: reset on out of memory
    media: imon: invalid dereference in imon_touch_event
    media: cxusb: detect cxusb_ctrl_msg error in query
    media: b2c2-flexcop-usb: add sanity checking
    media: uvcvideo: Fix error path in control parsing failure
  * cpufreq: Add NULL checks to show() and store() methods of cpufreq
      drivers/cpufreq/cpufreq.c
    media: usbvision: Fix races among open, close, and disconnect
    media: vivid: Fix wrong locking that causes race conditions on streaming stop
    media: vivid: Set vid_cap_streaming and vid_out_streaming to true
  * l2tp: don't use l2tp_tunnel_find() in l2tp_ip and l2tp_ip6
      net/l2tp/l2tp_ip.c
      net/l2tp/l2tp_ip6.c
    nfc: port100: handle command failure cleanly
    x86/speculation: Fix redundant MDS mitigation message
    x86/speculation: Fix incorrect MDS/TAA mitigation status
    x86/insn: Fix awk regexp warnings
    ARC: perf: Accommodate big-endian CPU
    ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary
    ocfs2: remove ocfs2_is_o2cb_active()
  * cpufreq: Skip cpufreq resume if it's not suspended
      drivers/cpufreq/cpufreq.c
  * arm64: fix for bad_mode() handler to always result in panic
      arch/arm64/kernel/traps.c
  * dm: use blk_set_queue_dying() in __dm_destroy()
      drivers/md/dm.c
    ath9k_hw: fix uninitialized variable data
  * KVM: MMU: Do not treat ZONE_DEVICE pages as being reserved
      include/linux/kvm_host.h
    Bluetooth: Fix invalid-free in bcsp_close()
    mm/memory_hotplug: Do not unlock when fails to take the device_hotplug_lock
    spi: omap2-mcspi: Fix DMA and FIFO event trigger size mismatch
    PCI: keystone: Use quirk to limit MRRS for K2G
    pinctrl: zynq: Use define directive for PIN_CONFIG_IO_STANDARD
    pinctrl: lpc18xx: Use define directive for PIN_CONFIG_GPIO_PIN_INT
  * pinctrl: qcom: spmi-gpio: fix gpio-hog related boot issues
      drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
  * sock: Reset dst when changing sk_mark via setsockopt
      net/core/sock.c
    net: bcmgenet: return correct value 'ret' from bcmgenet_power_down
    ACPICA: Use %d for signed int print formatting instead of %u
    dlm: don't leak kernel pointer to userspace
    dlm: fix invalid free
    scsi: lpfc: fcoe: Fix link down issue after 1000+ link bounces
    scsi: megaraid_sas: Fix msleep granularity
    scsi: mpt3sas: Fix driver modifying persistent data in Manufacturing page11
    scsi: mpt3sas: Fix Sync cache command failure during driver unload
    rtlwifi: rtl8192de: Fix misleading REG_MCUFWDL information
    wireless: airo: potential buffer overflow in sprintf()
    brcmsmac: never log "tid x is not agg'able" by default
    rtl8xxxu: Fix missing break in switch
    wlcore: Fix the return value in case of error in 'wlcore_vendor_cmd_smart_config_start()'
    audit: print empty EXECVE args
  * sched/fair: Don't increase sd->balance_interval on newidle balance
      kernel/sched/fair.c
  * net: do not abort bulk send on BQL status
      net/core/dev.c
    ocfs2: fix clusters leak in ocfs2_defrag_extent()
    ocfs2: don't put and assigning null to bh allocated outside
  * arm64: makefile fix build of .i file in external module case
      arch/arm64/Makefile
    ntb: intel: fix return value for ndev_vec_mask()
    ntb_netdev: fix sleep time mismatch
    igb: shorten maximum PHC timecounter update interval
  * mm/memory_hotplug: make add_memory() take the device_hotplug_lock
      include/linux/memory_hotplug.h
    fs/hfs/extent.c: fix array out of bounds read of array extent
    hfs: update timestamp on truncate()
    hfsplus: update timestamps on truncate()
    hfs: fix return value of hfs_get_block()
    hfsplus: fix return value of hfsplus_get_block()
    hfs: prevent btree data loss on ENOSPC
    hfsplus: prevent btree data loss on ENOSPC
    hfs: fix BUG on bnode parent update
    hfsplus: fix BUG on bnode parent update
  * linux/bitmap.h: fix type of nbits in bitmap_shift_right()
      include/linux/bitmap.h
  * linux/bitmap.h: handle constant zero-size bitmaps correctly
      include/linux/bitmap.h
    um: Make line/tty semantics use true write IRQ
    macsec: let the administrator set UP state even if lowerdev is down
    macsec: update operstate when lower device changes
  * mm/page-writeback.c: fix range_cyclic writeback vs writepages deadlock
      mm/page-writeback.c
    fs/ocfs2/dlm/dlmdebug.c: fix a sleep-in-atomic-context bug in dlm_print_one_mle()
    sparc64: Rework xchg() definition to avoid warnings.
    powerpc/process: Fix flush_all_to_thread for SPE
    thermal: rcar_thermal: Prevent hardware access during system suspend
    selftests/ftrace: Fix to test kprobe $comm arg only if available
    mfd: max8997: Enale irq-wakeup unconditionally
    mfd: mc13xxx-core: Fix PMIC shutdown when reading ADC values
    mfd: arizona: Correct calling of runtime_put_sync
    net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode
    qlcnic: fix a return in qlcnic_dcb_get_capability()
    mISDN: Fix type of switch control variable in ctrl_teimanager
  * f2fs: fix to spread clear_cold_data()
      fs/f2fs/data.c
      fs/f2fs/dir.c
      fs/f2fs/segment.c
    rtc: s35390a: Change buf's type to u8 in s35390a_init
    ceph: fix dentry leak in ceph_readdir_prepopulate
    sparc: Fix parport build warnings.
    spi: omap2-mcspi: Set FIFO DMA trigger level to word length
    s390/perf: Return error when debug_register fails
    atm: zatm: Fix empty body Clang warnings
    sunrpc: safely reallow resvport min/max inversion
    SUNRPC: Fix a compile warning for cmpxchg64()
    usbip: tools: fix atoi() on non-null terminated string
    USB: misc: appledisplay: fix backlight update_status return code
    macintosh/windfarm_smu_sat: Fix debug output
    ALSA: i2c/cs8427: Fix int to char conversion
    kprobes, x86/ptrace.h: Make regs_get_kernel_stack_nth() not fault on bad stack
    xfs: fix use-after-free race in xfs_buf_rele
  * net: ena: Fix Kconfig dependency on X86
      drivers/net/ethernet/amazon/Kconfig
  * net: fix warning in af_unix
      net/unix/af_unix.c
    scsi: dc395x: fix DMA API usage in sg_update_list
    scsi: dc395x: fix dma API usage in srb_done
    ASoC: tegra_sgtl5000: fix device_node refcounting
    clk: mmp2: fix the clock id for sdh2_clk and sdh3_clk
    scsi: iscsi_tcp: Explicitly cast param in iscsi_sw_tcp_host_get_param
    scsi: isci: Change sci_controller_start_task's return type to sci_status
    scsi: isci: Use proper enumerated type in atapi_d2h_reg_frame_handler
    KVM/x86: Fix invvpid and invept register operand size in 64-bit mode
    scsi: ips: fix missing break in switch
    amiflop: clean up on errors during setup
    m68k: fix command-line parsing when passed from u-boot
    misc: mic: fix a DMA pool free failure
    gsmi: Fix bug in append_to_eventlog sysfs handler
    btrfs: handle error of get_old_root
    mmc: mediatek: fix cannot receive new request when msdc_cmd_is_ready fail
    spi: sh-msiof: fix deferred probing
    ath10k: allocate small size dma memory in ath10k_pci_diag_write_mem
    brcmsmac: AP mode: update beacon when TIM changes
    powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field
    powerpc: Fix signedness bug in update_flash_db()
    synclink_gt(): fix compat_ioctl()
    gfs2: Fix marking bitmaps non-full
  * printk: fix integer overflow in setup_log_buf()
      kernel/printk/printk.c
    ALSA: isight: fix leak of reference to firewire unit in error path of .probe callback
    mwifiex: Fix NL80211_TX_POWER_LIMITED
    platform/x86: asus-wmi: Only Tell EC the OS will handle display hotkeys from asus_nb_wmi
    platform/x86: asus-nb-wmi: Support ALS on the Zenbook UX430UQ
    mm/ksm.c: don't WARN if page is still mapped in remove_stable_node()
    Revert "fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()"
    tools: gpio: Correctly add make dependencies for gpio_utils
    gpio: max77620: Fixup debounce delays
    net/sched: act_pedit: fix WARN() in the traffic path
    net/mlx5e: Fix set vf link state error flow
    sfc: Only cancel the PPS workqueue if it exists
  * net: rtnetlink: prevent underflows in do_setvfinfo()
      net/core/rtnetlink.c
    net/mlx4_en: fix mlx4 ethtool -N insertion
    Merge 4.9.203 into android-4.9-q
Linux 4.9.203
  * arm64: uaccess: Ensure PAN is re-enabled after unhandled uaccess fault
      arch/arm64/lib/clear_user.S
      arch/arm64/lib/copy_from_user.S
      arch/arm64/lib/copy_in_user.S
      arch/arm64/lib/copy_to_user.S
    ARM: dts: omap5: Fix dual-role mode on Super-Speed port
    spi: rockchip: initialize dma_slave_config properly
    mac80211: minstrel: fix CCK rate group streams value
    misc: cxl: Fix possible null pointer dereference
    hwmon: (ina3221) Fix INA3221_CONFIG_MODE macros
    hwmon: (pwm-fan) Silence error on probe deferral
    orangefs: rate limit the client not running info message
    ARM: 8802/1: Call syscall_trace_exit even when system call skipped
  * spi: spidev: Fix OF tree warning logic
      drivers/spi/spidev.c
    gpio: syscon: Fix possible NULL ptr usage
    x86/kexec: Correct KEXEC_BACKUP_SRC_END off-by-one error
    media: cx231xx: fix potential sign-extension overflow on large shift
    GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads
    media: isif: fix a NULL pointer dereference bug
  * printk: Give error on attempt to set log buffer length to over 2G
      kernel/printk/printk.c
    mfd: ti_am335x_tscadc: Keep ADC interface on if child is wakeup capable
    backlight: lm3639: Unconditionally call led_classdev_unregister
    proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypted()
    s390/kasan: avoid vdso instrumentation
    bcache: recal cached_dev_sectors on detach
  * reset: Fix potential use-after-free in __of_reset_control_get()
      drivers/reset/core.c
    fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper()
    fbdev: sbuslib: use checked version of put_user()
    iwlwifi: mvm: don't send keys when entering D3
    ACPI / SBS: Fix rare oops when removing modules
    crypto: mxs-dcp - Fix AES issues
    crypto: mxs-dcp - Fix SHA null hashes and output length
    x86/olpc: Fix build error with CONFIG_MFD_CS5535=m
    Input: silead - try firmware reload after unsuccessful resume
    Input: st1232 - set INPUT_PROP_DIRECT property
    dmaengine: ioat: fix prototype of ioat_enumerate_channels
    NFSv4.x: fix lock recovery during delegation recall
  * i2c: brcmstb: Allow enabling the driver on DSL SoCs
      drivers/i2c/busses/Kconfig
    clk: samsung: Use clk_hw API for calling clk framework from clk notifiers
    brcmfmac: fix full timeout waiting for action frame on-channel tx
    brcmfmac: reduce timeout for action frame scan
  * cpu/SMT: State SMT is disabled even with nosmt and without "=force"
      kernel/cpu.c
    mtd: physmap_of: Release resources on error
    USB: serial: cypress_m8: fix interrupt-out transfer length
    KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR
    ALSA: hda/sigmatel - Disable automute for Elo VuPoint
    media: pxa_camera: Fix check for pdev->dev.of_node
    ata: ep93xx: Use proper enums for directions
    ACPICA: Never run _REG on system_memory and system_IO
    IB/mlx4: Avoid implicit enumerated type conversion
    IB/mthca: Fix error return code in __mthca_init_one()
    ixgbe: Fix crash with VFs and flow director on interface flap
    mtd: rawnand: sh_flctl: Use proper enum for flctl_dma_fifo0_transfer
    powerpc/pseries: Fix how we iterate over the DTL entries
    powerpc/pseries: Fix DTL buffer registration
    cxgb4: Use proper enum in IEEE_FAUX_SYNC
    cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update
    mei: samples: fix a signedness bug in amt_host_if_call()
    dmaengine: timb_dma: Use proper enum in td_prep_slave_sg
    dmaengine: ep93xx: Return proper enum in ep93xx_dma_chan_direction
  * nl80211: Fix a GET_KEY reply attribute
      net/wireless/nl80211.c
    usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status()
    ath9k: fix reporting calculated new FFT upper max
  * ata: ahci_brcm: Allow using driver or DSL SoCs
      drivers/ata/Kconfig
    ath10k: fix vdev-start timeout on error
    arm64/numa: Report correct memblock range for the dummy node
    kvm: arm/arm64: Fix stage2_flush_memslot for 4 level page table
  * SUNRPC: Fix priority queue fairness
      include/linux/sunrpc/sched.h
  * f2fs: return correct errno in f2fs_gc
      fs/f2fs/gc.c
    ARM: dts: omap5: enable OTG role for DWC3 controller
    net: xen-netback: fix return type of ndo_start_xmit function
    net: ovs: fix return type of ndo_start_xmit function
    libata: have ata_scsi_rw_xlat() fail invalid passthrough requests
  * block: introduce blk_rq_is_passthrough
      include/linux/blkdev.h
  * fbdev: Ditch fb_edid_add_monspecs
      drivers/video/fbdev/core/fbmon.c
      drivers/video/fbdev/core/modedb.c
      include/linux/fb.h
    uprobes/x86: Prohibit probing on MOV SS instruction
    kprobes/x86: Prohibit probing on exception masking instructions
    x86/atomic: Fix smp_mb__{before,after}_atomic()
  * net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size()
      drivers/net/usb/cdc_ncm.c
    slcan: Fix memory leak in error path
  * memfd: Use radix_tree_deref_slot_protected to avoid the warning.
      mm/shmem.c
    IB/iser: Fix possible NULL deref at iser_inv_desc()
  * fuse: use READ_ONCE on congestion_threshold and max_background
      fs/fuse/control.c
    usb: xhci-mtk: fix ISOC error when interval is zero
    ARM: dts: lpc32xx: Fix SPI controller node names
    arm64: dts: lg: Fix SPI controller node names
    arm64: dts: amd: Fix SPI bus warnings
    scsi: NCR5380: Handle BUS FREE during reselection
    scsi: NCR5380: Don't call dsprintk() following reselection interrupt
    scsi: NCR5380: Don't clear busy flag when abort fails
    scsi: NCR5380: Check for invalid reselection target
    scsi: NCR5380: Use DRIVER_SENSE to indicate valid sense data
    scsi: NCR5380: Clear all unissued commands on host reset
  * crypto: fix a memory leak in rsa-kcs1pad's encryption mode
      crypto/rsa-pkcs1pad.c
    crypto: s5p-sss: Fix Fix argument list alignment
  * Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS
      net/bluetooth/l2cap_core.c
    ARM: dts: realview: Fix SPI controller node names
  * EDAC: Raise the maximum number of memory controllers
      include/linux/edac.h
    net: smsc: fix return type of ndo_start_xmit function
    ARM: dts: paz00: fix wakeup gpio keycode
    ARM: tegra: apalis_t30: fix mmc1 cmd pull-up
    ARM: dts: tegra30: fix xcvr-setup-use-fuses
    scsi: libsas: always unregister the old device if going to discover new
    vfio/pci: Mask buggy SR-IOV VF INTx support
    vfio/pci: Fix potential memory leak in vfio_msi_cap_len
    misc: genwqe: should return proper error value.
    misc: kgdbts: Fix restrict error
    coresight: tmc: Fix byte-address alignment for RRP
    coresight: etm4x: Configure EL2 exception level when kernel is running in HYP
    coresight: Fix handling of sinks
    usb: gadget: uvc: Only halt video streaming endpoint in bulk mode
    usb: gadget: uvc: Factor out video USB request queueing
    phy: phy-twl4030-usb: fix denied runtime access
    usb: gadget: uvc: configfs: Prevent format changes after linking header
    usb: gadget: uvc: configfs: Drop leaked references to config items
    media: davinci: Fix implicit enum conversion warning
    media: au0828: Fix incorrect error messages
    media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init()
    MIPS: kexec: Relax memory restriction
    x86/CPU: Use correct macros for Cyrix calls
    net: micrel: fix return type of ndo_start_xmit function
    bnx2x: Ignore bandwidth attention in single function mode
    ARM: dts: marvell: Fix SPI and I2C bus warnings
  * cpufeature: avoid warning when compiling with clang
      include/linux/cpufeature.h
    spi: pic32: Use proper enum in dmaengine_prep_slave_rg
    ARM: dts: ste: Fix SPI controller node names
    ARM: dts: ux500: Fix LCDA clock line muxing
    ARM: dts: ux500: Correct SCU unit address
  * f2fs: fix to recover inode's uid/gid during POR
      fs/f2fs/recovery.c
    ARM: dts: am335x-evm: fix number of cpsw
    mlxsw: spectrum: Init shaper for TCs 8..15
    usb: chipidea: Fix otg event handler
    usb: chipidea: imx: enable OTG overcurrent in case USB subsystem is already started
    net: amd: fix return type of ndo_start_xmit function
    net: broadcom: fix return type of ndo_start_xmit function
    net: xilinx: fix return type of ndo_start_xmit function
    net: toshiba: fix return type of ndo_start_xmit function
    power: supply: twl4030_charger: disable eoc interrupt on linear charge
    power: supply: twl4030_charger: fix charging current out-of-bounds
  * libfdt: Ensure INT_MAX is defined in libfdt_env.h
      include/linux/libfdt_env.h
    RDMA/i40iw: Fix incorrect iterator type
    powerpc/pseries: Disable CPU hotplug across migrations
    powerpc/64s/hash: Fix stab_rr off by one initialization
    powerpc/iommu: Avoid derefence before pointer check
    serial: mxs-auart: Fix potential infinite loop
    PCI/ACPI: Correct error message for ASPM disabling
    s390/qeth: invoke softirqs after napi_schedule()
    ath9k: Fix a locking bug in ath9k_add_interface()
    ARM: dts: rockchip: Fix erroneous SPI bus dtc warnings on rk3036
    ip_gre: fix parsing gre header in ipgre_err
  * kernfs: Fix range checks in kernfs_get_target_path
      fs/kernfs/symlink.c
  * component: fix loop condition to call unbind() if bind() fails
      drivers/base/component.c
    power: supply: max8998-charger: Fix platform data retrieval
    power: reset: at91-poweroff: do not procede if at91_shdwc is allocated
    power: supply: ab8500_fg: silence uninitialized variable warnings
    cxgb4: Fix endianness issue in t4_fwcache()
    pinctrl: at91: don't use the same irqchip with multiple gpiochips
    ARM: dts: socfpga: Fix I2C bus unit-address error
    powerpc/vdso: Correct call frame information
    ARM: dts: qcom: ipq4019: fix cpu0's qcom,saw2 reg value
  * llc: avoid blocking in llc_sap_close()
      include/net/llc.h
      net/llc/llc_core.c
    pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()
    ALSA: intel8x0m: Register irq handler after register initializations
  * media: dvb: fix compat ioctl translation
      fs/compat_ioctl.c
    media: fix: media: pci: meye: validate offset to avoid arbitrary access
  * nvmem: core: return error code instead of NULL from nvmem_device_get
      drivers/nvmem/core.c
  * kprobes: Don't call BUG_ON() if there is a kprobe in use on free list
      kernel/kprobes.c
    scsi: pm80xx: Fixed system hang issue during kexec boot
    scsi: pm80xx: Corrected dma_unmap_sg() parameter
    ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set
    scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir()
  * f2fs: fix memory leak of percpu counter in fill_super()
      fs/f2fs/super.c
    signal: Properly deliver SIGSEGV from x86 uprobes
    signal: Properly deliver SIGILL from uprobes
  * signal: Always ignore SIGKILL and SIGSTOP sent to the global init
      kernel/signal.c
    ath9k: add back support for using active monitor interfaces for tx99
    dmaengine: dma-jz4780: Further residue status fix
  * dmaengine: dma-jz4780: Don't depend on MACH_JZ4780
      drivers/dma/Kconfig
    ARM: dts: omap3-gta04: keep vpll2 always on
    ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot
    ARM: dts: omap3-gta04: fix touchscreen tsc2007
    ARM: dts: omap3-gta04: tvout: enable as display1 alias
    ARM: dts: omap3-gta04: fixes for tvout / venc
    ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files
  * of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC
      drivers/of/base.c
    ASoC: Intel: hdac_hdmi: Limit sampling rates at dai creation
    mips: txx9: fix iounmap related issue
    ath10k: wmi: disable softirq's while calling ieee80211_rx
    ARM: dts: exynos: Disable pull control for S5M8767 PMIC
    ASoC: sgtl5000: avoid division by zero if lo_vag is zero
    net: lan78xx: Bail out if lan78xx_get_endpoints fails
    rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument
    ARM: dts: pxa: fix power i2c base address
    iwlwifi: mvm: avoid sending too many BARs
    IB/rxe: fixes for rdma read retry
    i40e: Prevent deleting MAC address from VF when set by PF
    i40e: hold the rtnl lock on clearing interrupt scheme
    i40e: use correct length for strncpy
    ARM: dts: exynos: Fix regulators configuration on Peach Pi/Pit Chromebooks
    ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook
    MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
  * ASoC: dpcm: Properly initialise hw->rate_max
      sound/soc/soc-pcm.c
    gfs2: Don't set GFS2_RDF_UPTODATE when the lvb is updated
    ath9k: fix tx99 with monitor mode interface
    ALSA: seq: Do error checks at creating system ports
  * cfg80211: Avoid regulatory restore when COUNTRY_IE_IGNORE is set
      net/wireless/reg.c
    ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45
    arm64: dts: tegra210-p2180: Correct sdmmc4 vqmmc-supply
    ALSA: pcm: signedness bug in snd_pcm_plug_alloc()
    iio: dac: mcp4922: fix error handling in mcp4922_write_raw
    ath10k: fix kernel panic by moving pci flush after napi_disable
    mmc: sdhci-of-at91: fix quirk2 overwrite
    mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
  * mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()
      mm/memcontrol.c
    iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros
  * ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either
      fs/ecryptfs/inode.c
  * ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable
      fs/ecryptfs/inode.c
    IB/hfi1: Ensure full Gen3 speed in a Gen4 system
    Input: synaptics-rmi4 - destroy F54 poller workqueue when removing
    Input: synaptics-rmi4 - clear IRQ enables for F54
    Input: synaptics-rmi4 - fix video buffer size
  * Input: ff-memless - kill timer in destroy()
      drivers/input/ff-memless.c
  * ALSA: usb-audio: not submit urb for stopped endpoint
      sound/usb/endpoint.c
  * ALSA: usb-audio: Fix missing error check at mixer resolution test
      sound/usb/mixer.c
    slip: Fix memory leak in slip_open error path
  * ax88172a: fix information leak on short answers
      drivers/net/usb/ax88172a.c
    Merge 4.9.202 into android-4.9-q
Linux 4.9.202
    Documentation: Add ITLB_MULTIHIT documentation
    kvm: x86: mmu: Recovery of shattered NX large pages
  * kvm: Add helper function for creating VM worker threads
      include/linux/kvm_host.h
    kvm: mmu: ITLB_MULTIHIT mitigation
  * cpu/speculation: Uninline and export CPU mitigations helpers
      include/linux/cpu.h
      kernel/cpu.c
  * x86/bugs: Add ITLB_MULTIHIT bug infrastructure
      drivers/base/cpu.c
      include/linux/cpu.h
    KVM: vmx, svm: always run with EFER.NXE=1 when shadow paging is active
    KVM: x86: add tracepoints around __direct_map and FNAME(fetch)
    KVM: x86: Add is_executable_pte()
    KVM: x86: change kvm_mmu_page_get_gfn BUG_ON to WARN_ON
    KVM: x86: remove now unneeded hugepage gfn adjustment
    KVM: x86: make FNAME(fetch) and __direct_map more similar
    kvm: x86: Do not release the page inside mmu_set_spte()
  * kvm: Convert kvm_lock to a mutex
      include/linux/kvm_host.h
    KVM: x86: extend usage of RET_MMIO_PF_* constants
    KVM: x86: simplify ept_misconfig
    x86/speculation/taa: Fix printing of TAA_MSG_SMT on IBRS_ALL CPUs
    x86/tsx: Add config options to set tsx=on|off|auto
    x86/speculation/taa: Add documentation for TSX Async Abort
    x86/tsx: Add "auto" option to the tsx= cmdline parameter
    kvm/x86: Export MDS_NO=0 to guests when TSX is enabled
  * x86/speculation/taa: Add sysfs reporting for TSX Async Abort
      drivers/base/cpu.c
      include/linux/cpu.h
    x86/speculation/taa: Add mitigation for TSX Async Abort
    x86/cpu: Add a "tsx=" cmdline option with TSX disabled by default
    x86/cpu: Add a helper function x86_read_arch_cap_msr()
    x86/msr: Add the IA32_TSX_CTRL MSR
    KVM: x86: use Intel speculation bugs and features as derived in generic x86 code
  * usb: gadget: core: unmap request from DMA only if previously mapped
      drivers/usb/gadget/udc/core.c
      include/linux/usb/gadget.h
    MIPS: BCM63XX: fix switch core reset on BCM6368
    Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()
    kvm: mmu: Don't read PDPTEs when paging is not enabled
    Merge 4.9.201 into android-4.9-q
Linux 4.9.201
    drm/i915/cmdparser: Fix jump whitelist clearing
    drm/i915/gen8+: Add RC6 CTX corruption WA
    drm/i915: Lower RM timeout to avoid DSI hard hangs
    drm/i915/cmdparser: Ignore Length operands during command matching
    drm/i915/cmdparser: Add support for backward jumps
    drm/i915/cmdparser: Use explicit goto for error paths
    drm/i915: Add gen9 BCS cmdparsing
    drm/i915: Allow parsing of unsized batches
    drm/i915: Support ro ppgtt mapped cmdparser shadow buffers
    drm/i915: Add support for mandatory cmdparsing
    drm/i915: Remove Master tables from cmdparser
    drm/i915: Disable Secure Batches for gen6+
    drm/i915: Rename gen7 cmdparser tables
    drm/i915: Move engine->needs_cmd_parser to engine->flags
    drm/i915: Silence smatch for cmdparser
    drm/i915/cmdparser: Do not check past the cmd length.
    drm/i915/cmdparser: Check reg_table_count before derefencing.
  * drm/i915: Prevent writing into a read-only object via a GGTT mmap
      drivers/gpu/drm/drm_gem.c
      include/drm/drm_vma_manager.h
    drm/i915/gtt: Disable read-only support under GVT
    drm/i915/gtt: Read-only pages for insert_entries on bdw+
    drm/i915/gtt: Add read only pages to gen8_pte_encode
    drm/i915/cmdparser: Limit clflush to active cachelines
    drm/i915: Use the precomputed value for whether to enable command parsing
    drm/i915: don't whitelist oacontrol in cmd parser
    drm/i915: return EACCES for check_cmd() failures
    drm/i915: cleanup use of INSTR_CLIENT_MASK
    drm/i915: kick out cmd_parser specific structs from i915_drv.h
  * net: prevent load/store tearing on sk->sk_stamp
      include/net/sock.h
  * cgroup,writeback: don't switch wbs immediately on dead wbs if the memcg is dead
      fs/fs-writeback.c
  * mm/filemap.c: don't initiate writeback if mapping has no dirty pages
      mm/filemap.c
    can: flexcan: disable completely the ECC mechanism
    x86/apic/32: Avoid bogus LDR warnings
    x86/apic: Drop logical_smp_processor_id() inline
    x86/apic: Move pending interrupt check code into it's own function
    e1000: fix memory leaks
    igb: Fix constant media auto sense switching when no cable is connected
    net: ethernet: arc: add the missed clk_disable_unprepare
    NFSv4: Don't allow a cached open with a revoked delegation
    net: hisilicon: Fix "Trying to free already-free IRQ"
    fjes: Handle workqueue allocation failure
    scsi: qla2xxx: stop timer in shutdown path
    RDMA/iw_cxgb4: Avoid freeing skb twice in arp failure case
  * USB: Skip endpoints with 0 maxpacket length
      drivers/usb/core/config.c
    perf/x86/amd/ibs: Handle erratum #420 only on the affected CPU family (10h)
    perf/x86/amd/ibs: Fix reading of the IBS OpData register and thus precise RIP validity
  * usb: dwc3: remove the call trace of USBx_GFLADJ
      drivers/usb/dwc3/core.c
  * usb: gadget: configfs: fix concurrent issue between composite APIs
      drivers/usb/gadget/configfs.c
  * usb: gadget: composite: Fix possible double free memory bug
      drivers/usb/gadget/composite.c
    usb: gadget: udc: atmel: Fix interrupt storm in FIFO mode.
    usb: fsl: Check memory resource before releasing it
  * bonding: fix unexpected IFF_BONDING bit unset
      drivers/net/bonding/bond_main.c
    ipvs: move old_secure_tcp into struct netns_ipvs
    scsi: lpfc: Honor module parameter lpfc_use_adisc
    scsi: qla2xxx: fixup incorrect usage of host_byte
    HID: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring()
    dmaengine: xilinx_dma: Fix control reg update in vdma_channel_set_config
    PCI: tegra: Enable Relaxed Ordering only for Tegra20 & Tegra30
    drivers: usb: usbip: Add missing break statement to switch
    usbip: fix possibility of dereference by NULLL pointer in vhci_hcd.c
    usbip: Fix vhci_urb_enqueue() URB null transfer buffer error path
    usbip: stub_rx: fix static checker warning on unnecessary checks
  * configfs: fix a deadlock in configfs_symlink()
      fs/configfs/symlink.c
  * configfs: provide exclusion between IO and removals
      fs/configfs/dir.c
      fs/configfs/file.c
  * configfs: new object reprsenting tree fragments
      fs/configfs/configfs_internal.h
      fs/configfs/dir.c
      fs/configfs/file.c
  * configfs_register_group() shouldn't be (and isn't) called in rmdirable parts
      fs/configfs/dir.c
  * configfs: stash the data we need into configfs_buffer at open time
      fs/configfs/file.c
  * configfs: Fix bool initialization/comparison
      fs/configfs/file.c
    can: peak_usb: fix slab info leak
    can: gs_usb: gs_can_open(): prevent memory leak
    can: peak_usb: fix a potential out-of-sync while decoding packets
    can: c_can: c_can_poll(): only read status register after status IRQ
    can: usb_8dev: fix use-after-free on disconnect
    netfilter: ipset: Fix an error code in ip_set_sockfn_get()
    netfilter: nf_tables: Align nft_expr private data to 64-bit
    iio: imu: adis16480: make sure provided frequency is positive
    ceph: fix use-after-free in __ceph_remove_cap()
    drm/radeon: fix si_enable_smc_cac() failed issue
    perf tools: Fix time sorting
  * dump_stack: avoid the livelock of the dump_lock
      lib/dump_stack.c
  * mm, vmstat: hide /proc/pagetypeinfo from normal users
      mm/vmstat.c
  * mm: thp: handle page cache THP correctly in PageTransCompoundMap
      include/linux/mm.h
      include/linux/mm_types.h
      include/linux/page-flags.h
    ALSA: hda/ca0132 - Fix possible workqueue stall
    ALSA: bebob: fix to detect configured source of sampling clock for Focusrite Saffire Pro i/o series
  * ALSA: timer: Fix incorrectly assigned timer instance
      sound/core/timer.c
    qede: fix NULL pointer deref in __qede_remove()
    NFC: st21nfca: fix double free
    nfc: netlink: fix double device reference drop
    NFC: fdp: fix incorrect free object
    net: usb: qmi_wwan: add support for DW5821e with eSIM support
  * net: fix data-race in neigh_event_send()
      include/net/neighbour.h
  * ipv4: Fix table id reference in fib_sync_down_addr
      net/ipv4/fib_semantics.c
  * CDC-NCM: handle incomplete transfer of MTU
      drivers/net/usb/cdc_ncm.c

Change-Id: Ifaaf6cdd987868ca6419f420861770830d999f9c
Signed-off-by: lucaswei <lucaswei@google.com>
2019-12-17 13:25:36 +08:00
Greg Kroah-Hartman
09bf7fb0bd Merge 4.9.201 into android-4.9-q
Changes in 4.9.201
	CDC-NCM: handle incomplete transfer of MTU
	ipv4: Fix table id reference in fib_sync_down_addr
	net: fix data-race in neigh_event_send()
	net: usb: qmi_wwan: add support for DW5821e with eSIM support
	NFC: fdp: fix incorrect free object
	nfc: netlink: fix double device reference drop
	NFC: st21nfca: fix double free
	qede: fix NULL pointer deref in __qede_remove()
	ALSA: timer: Fix incorrectly assigned timer instance
	ALSA: bebob: fix to detect configured source of sampling clock for Focusrite Saffire Pro i/o series
	ALSA: hda/ca0132 - Fix possible workqueue stall
	mm: thp: handle page cache THP correctly in PageTransCompoundMap
	mm, vmstat: hide /proc/pagetypeinfo from normal users
	dump_stack: avoid the livelock of the dump_lock
	perf tools: Fix time sorting
	drm/radeon: fix si_enable_smc_cac() failed issue
	ceph: fix use-after-free in __ceph_remove_cap()
	iio: imu: adis16480: make sure provided frequency is positive
	netfilter: nf_tables: Align nft_expr private data to 64-bit
	netfilter: ipset: Fix an error code in ip_set_sockfn_get()
	can: usb_8dev: fix use-after-free on disconnect
	can: c_can: c_can_poll(): only read status register after status IRQ
	can: peak_usb: fix a potential out-of-sync while decoding packets
	can: gs_usb: gs_can_open(): prevent memory leak
	can: peak_usb: fix slab info leak
	configfs: Fix bool initialization/comparison
	configfs: stash the data we need into configfs_buffer at open time
	configfs_register_group() shouldn't be (and isn't) called in rmdirable parts
	configfs: new object reprsenting tree fragments
	configfs: provide exclusion between IO and removals
	configfs: fix a deadlock in configfs_symlink()
	usbip: stub_rx: fix static checker warning on unnecessary checks
	usbip: Fix vhci_urb_enqueue() URB null transfer buffer error path
	usbip: fix possibility of dereference by NULLL pointer in vhci_hcd.c
	drivers: usb: usbip: Add missing break statement to switch
	PCI: tegra: Enable Relaxed Ordering only for Tegra20 & Tegra30
	dmaengine: xilinx_dma: Fix control reg update in vdma_channel_set_config
	HID: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring()
	scsi: qla2xxx: fixup incorrect usage of host_byte
	scsi: lpfc: Honor module parameter lpfc_use_adisc
	ipvs: move old_secure_tcp into struct netns_ipvs
	bonding: fix unexpected IFF_BONDING bit unset
	usb: fsl: Check memory resource before releasing it
	usb: gadget: udc: atmel: Fix interrupt storm in FIFO mode.
	usb: gadget: composite: Fix possible double free memory bug
	usb: gadget: configfs: fix concurrent issue between composite APIs
	usb: dwc3: remove the call trace of USBx_GFLADJ
	perf/x86/amd/ibs: Fix reading of the IBS OpData register and thus precise RIP validity
	perf/x86/amd/ibs: Handle erratum #420 only on the affected CPU family (10h)
	USB: Skip endpoints with 0 maxpacket length
	RDMA/iw_cxgb4: Avoid freeing skb twice in arp failure case
	scsi: qla2xxx: stop timer in shutdown path
	fjes: Handle workqueue allocation failure
	net: hisilicon: Fix "Trying to free already-free IRQ"
	NFSv4: Don't allow a cached open with a revoked delegation
	net: ethernet: arc: add the missed clk_disable_unprepare
	igb: Fix constant media auto sense switching when no cable is connected
	e1000: fix memory leaks
	x86/apic: Move pending interrupt check code into it's own function
	x86/apic: Drop logical_smp_processor_id() inline
	x86/apic/32: Avoid bogus LDR warnings
	can: flexcan: disable completely the ECC mechanism
	mm/filemap.c: don't initiate writeback if mapping has no dirty pages
	cgroup,writeback: don't switch wbs immediately on dead wbs if the memcg is dead
	net: prevent load/store tearing on sk->sk_stamp
	drm/i915: kick out cmd_parser specific structs from i915_drv.h
	drm/i915: cleanup use of INSTR_CLIENT_MASK
	drm/i915: return EACCES for check_cmd() failures
	drm/i915: don't whitelist oacontrol in cmd parser
	drm/i915: Use the precomputed value for whether to enable command parsing
	drm/i915/cmdparser: Limit clflush to active cachelines
	drm/i915/gtt: Add read only pages to gen8_pte_encode
	drm/i915/gtt: Read-only pages for insert_entries on bdw+
	drm/i915/gtt: Disable read-only support under GVT
	drm/i915: Prevent writing into a read-only object via a GGTT mmap
	drm/i915/cmdparser: Check reg_table_count before derefencing.
	drm/i915/cmdparser: Do not check past the cmd length.
	drm/i915: Silence smatch for cmdparser
	drm/i915: Move engine->needs_cmd_parser to engine->flags
	drm/i915: Rename gen7 cmdparser tables
	drm/i915: Disable Secure Batches for gen6+
	drm/i915: Remove Master tables from cmdparser
	drm/i915: Add support for mandatory cmdparsing
	drm/i915: Support ro ppgtt mapped cmdparser shadow buffers
	drm/i915: Allow parsing of unsized batches
	drm/i915: Add gen9 BCS cmdparsing
	drm/i915/cmdparser: Use explicit goto for error paths
	drm/i915/cmdparser: Add support for backward jumps
	drm/i915/cmdparser: Ignore Length operands during command matching
	drm/i915: Lower RM timeout to avoid DSI hard hangs
	drm/i915/gen8+: Add RC6 CTX corruption WA
	drm/i915/cmdparser: Fix jump whitelist clearing
	Linux 4.9.201

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-11-14 14:28:42 +08:00
Chris Wilson
91b712cffa drm/i915: Prevent writing into a read-only object via a GGTT mmap
commit 3e977ac6179b39faa3c0eda5fce4f00663ae298d upstream.

If the user has created a read-only object, they should not be allowed
to circumvent the write protection by using a GGTT mmapping. Deny it.

Also most machines do not support read-only GGTT PTEs, so again we have
to reject attempted writes. Fortunately, this is known a priori, so we
can at least reject in the call to create the mmap (with a sanity check
in the fault handler).

v2: Check the vma->vm_flags during mmap() to allow readonly access.
v3: Remove VM_MAYWRITE to curtail mprotect()

Testcase: igt/gem_userptr_blits/readonly_mmap*
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jon Bloomfield <jon.bloomfield@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Matthew Auld <matthew.william.auld@gmail.com> #v1
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712185315.3288-4-chris@chris-wilson.co.uk
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Jon Bloomfield <jon.bloomfield@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-12 19:16:16 +01:00
Petri Gynther
695d3f735a Merge android-4.9 (4.9.163) into android-msm-bluecross-4.9-lts
Merge 4.9.163 into android-4.9
Linux 4.9.163
    x86: Add TSX Force Abort CPUID/MSR
    perf/x86/intel: Generalize dynamic constraint creation
    perf/x86/intel: Make cpuc allocations consistent
    ARM: dts: exynos: Do not ignore real-world fuse values for thermal zone 0 on Exynos5420
    ARM: 8781/1: Fix Thumb-2 syscall return for binutils 2.29+
    drm: disable uncached DMA optimization for ARM and arm64
    ARM: dts: exynos: Add minimal clkout parameters to Exynos3250 PMU
    ARM: dts: exynos: Fix pinctrl definition for eMMC RTSN line on Odroid X2/U3
  * futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock()
      kernel/futex.c
      kernel/locking/rtmutex.c
      kernel/locking/rtmutex_common.h
    scsi: aacraid: Fix missing break in switch statement
    iscsi_ibft: Fix missing break in switch statement
    Input: elan_i2c - add id for touchpad found in Lenovo s21e-20
    Input: wacom_serial4 - add support for Wacom ArtPad II tablet
  * fs: ratelimit __find_get_block_slow() failure message.
      fs/buffer.c
    MIPS: Remove function size check in get_frame_info()
    perf symbols: Filter out hidden symbols from labels
    s390/qeth: fix use-after-free in error path
  * netfilter: nf_nat: skip nat clash resolution for same-origin entries
      net/netfilter/nf_conntrack_core.c
    selftests: netfilter: add simple masq/redirect test cases
    selftests: netfilter: fix config fragment CONFIG_NF_TABLES_INET
    dmaengine: dmatest: Abort test in case of mapping error
    vsock/virtio: reset connected sockets on device removal
    vsock/virtio: fix kernel panic after device hot-unplug
    dmaengine: at_xdmac: Fix wrongfull report of a channel as in use
    drm/sun4i: tcon: Prepare and enable TCON channel 0 clock at init
    irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable
  * usb: phy: fix link errors
      drivers/usb/phy/Kconfig
    arm64: dts: add msm8996 compatible to gicv3
    ARM: pxa: ssp: unneeded to free devm_ allocated data
    soc: fsl: qbman: avoid race in clearing QMan interrupt
    autofs: fix error return in autofs_fill_super()
    autofs: drop dentry reference only when it is never used
  * fs/drop_caches.c: avoid softlockups in drop_pagecache_sb()
      fs/drop_caches.c
    mm, memory_hotplug: test_pages_in_a_zone do not pass the end of zone
    mm, memory_hotplug: is_mem_section_removable do not pass the end of a zone
    x86_64: increase stack size for KASAN_EXTRA
    x86/kexec: Don't setup EFI info if EFI runtime is not enabled
  * arm64: kprobe: Always blacklist the KVM world-switch code
      arch/arm64/kernel/probes/kprobes.c
    cifs: fix computation for MAX_SMB2_HDR_SIZE
  * platform/x86: Fix unmet dependency warning for SAMSUNG_Q10
      drivers/platform/x86/Kconfig
    scsi: libfc: free skb when receiving invalid flogi resp
    qed: Fix VF probe failure while FLR
    nfs: Fix NULL pointer dereference of dev_name
    gpio: vf610: Mask all GPIO interrupts
    net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup()
    net: hns: Fix wrong read accesses via Clause 45 MDIO protocol
    net: hns: Fix for missing of_node_put() after of_parse_phandle()
    net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case
    xtensa: SMP: limit number of possible CPUs by NR_CPUS
    xtensa: SMP: mark each possible CPU as present
    xtensa: smp_lx200_defconfig: fix vectors clash
    xtensa: SMP: fix secondary CPU initialization
    xtensa: SMP: fix ccount_timer_shutdown
    iommu/amd: Fix IOMMU page flush when detach device from a domain
    ipvs: Fix signed integer overflow when setsockopt timeout
    iommu/amd: Unmap all mapped pages in error path of map_sg
    iommu/amd: Call free_iova_fast with pfn in map_sg
    IB/{hfi1, qib}: Fix WC.byte_len calculation for UD_SEND_WITH_IMM
    perf tools: Handle TOPOLOGY headers with no CPU
  * perf core: Fix perf_proc_update_handler() bug
      kernel/events/core.c
  * vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel
      net/ipv4/ip_vti.c
    media: uvcvideo: Fix 'type' check leading to overflow
  * exec: Fix mem leak in kernel_read_file
      fs/exec.c
  * hugetlbfs: fix races and page leaks during migration
      mm/migrate.c
    MIPS: irq: Allocate accurate order pages for irq stack
    applicom: Fix potential Spectre v1 vulnerabilities
    x86/CPU/AMD: Set the CPB bit unconditionally on F17h
    net: phy: Micrel KSZ8061: link failure after cable connect
  * tun: remove unnecessary memory barrier
      drivers/net/tun.c
  * tun: fix blocking read
      drivers/net/tun.c
  * net: avoid use IPCB in cipso_v4_error
      include/net/ip.h
      net/ipv4/cipso_ipv4.c
      net/ipv4/ip_options.c
  * net: Add __icmp_send helper.
      include/net/icmp.h
      net/ipv4/icmp.c
    xen-netback: fix occasional leak of grant ref mappings under memory pressure
    xen-netback: don't populate the hash cache on XenBus disconnect
  * net: sit: fix memory leak in sit_init_net()
      net/ipv6/sit.c
    net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails
  * net: netem: fix skb length BUG_ON in __skb_to_sgvec
      net/sched/sch_netem.c
  * netlabel: fix out-of-bounds memory accesses
      net/ipv4/cipso_ipv4.c
      net/netlabel/netlabel_kapi.c
    net: dsa: mv88e6xxx: Fix u64 statistics
    hv_netvsc: Fix IP header checksum for coalesced packets
    bnxt_en: Drop oversize TX packets to prevent errors.
    team: Free BPF filter when unregistering netdev
    sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79
  * net-sysfs: Fix mem leak in netdev_register_kobject
      net/core/net-sysfs.c
    ip6mr: Do not call __IP6_INC_STATS() from preemptible context
  * staging: android: ion: fix sys heap pool's gfp_flags
      drivers/staging/android/ion/ion_system_heap.c
    staging: wilc1000: fix to set correct value for 'vif_num'
    staging: comedi: ni_660x: fix missing break in switch statement
    isdn: isdn_tty: fix build warning of strncpy
    ncpfs: fix build warning of strncpy
  * cpufreq: Use struct kobj_attribute instead of struct global_attr
      drivers/cpufreq/cpufreq.c
      include/linux/cpufreq.h
    USB: serial: ftdi_sio: add ID for Hjelmslund Electronics USB485
    USB: serial: cp210x: add ID for Ingenico 3070
    USB: serial: option: add Telit ME910 ECM composition
    ANDROID: cuttlefish: enable CONFIG_INET_UDP_DIAG=y

Change-Id: I897874d0b99a6316f7e1c7e0c04c543e5469355a
Signed-off-by: Petri Gynther <pgynther@google.com>
2019-03-14 13:45:04 -07:00
Greg Kroah-Hartman
429c144a84 Merge 4.9.163 into android-4.9
Changes in 4.9.163
	USB: serial: option: add Telit ME910 ECM composition
	USB: serial: cp210x: add ID for Ingenico 3070
	USB: serial: ftdi_sio: add ID for Hjelmslund Electronics USB485
	cpufreq: Use struct kobj_attribute instead of struct global_attr
	ncpfs: fix build warning of strncpy
	isdn: isdn_tty: fix build warning of strncpy
	staging: comedi: ni_660x: fix missing break in switch statement
	staging: wilc1000: fix to set correct value for 'vif_num'
	staging: android: ion: fix sys heap pool's gfp_flags
	ip6mr: Do not call __IP6_INC_STATS() from preemptible context
	net-sysfs: Fix mem leak in netdev_register_kobject
	sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79
	team: Free BPF filter when unregistering netdev
	bnxt_en: Drop oversize TX packets to prevent errors.
	hv_netvsc: Fix IP header checksum for coalesced packets
	net: dsa: mv88e6xxx: Fix u64 statistics
	netlabel: fix out-of-bounds memory accesses
	net: netem: fix skb length BUG_ON in __skb_to_sgvec
	net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails
	net: sit: fix memory leak in sit_init_net()
	xen-netback: don't populate the hash cache on XenBus disconnect
	xen-netback: fix occasional leak of grant ref mappings under memory pressure
	net: Add __icmp_send helper.
	net: avoid use IPCB in cipso_v4_error
	tun: fix blocking read
	tun: remove unnecessary memory barrier
	net: phy: Micrel KSZ8061: link failure after cable connect
	x86/CPU/AMD: Set the CPB bit unconditionally on F17h
	applicom: Fix potential Spectre v1 vulnerabilities
	MIPS: irq: Allocate accurate order pages for irq stack
	hugetlbfs: fix races and page leaks during migration
	exec: Fix mem leak in kernel_read_file
	media: uvcvideo: Fix 'type' check leading to overflow
	vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel
	perf core: Fix perf_proc_update_handler() bug
	perf tools: Handle TOPOLOGY headers with no CPU
	IB/{hfi1, qib}: Fix WC.byte_len calculation for UD_SEND_WITH_IMM
	iommu/amd: Call free_iova_fast with pfn in map_sg
	iommu/amd: Unmap all mapped pages in error path of map_sg
	ipvs: Fix signed integer overflow when setsockopt timeout
	iommu/amd: Fix IOMMU page flush when detach device from a domain
	xtensa: SMP: fix ccount_timer_shutdown
	xtensa: SMP: fix secondary CPU initialization
	xtensa: smp_lx200_defconfig: fix vectors clash
	xtensa: SMP: mark each possible CPU as present
	xtensa: SMP: limit number of possible CPUs by NR_CPUS
	net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case
	net: hns: Fix for missing of_node_put() after of_parse_phandle()
	net: hns: Fix wrong read accesses via Clause 45 MDIO protocol
	net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup()
	gpio: vf610: Mask all GPIO interrupts
	nfs: Fix NULL pointer dereference of dev_name
	qed: Fix VF probe failure while FLR
	scsi: libfc: free skb when receiving invalid flogi resp
	platform/x86: Fix unmet dependency warning for SAMSUNG_Q10
	cifs: fix computation for MAX_SMB2_HDR_SIZE
	arm64: kprobe: Always blacklist the KVM world-switch code
	x86/kexec: Don't setup EFI info if EFI runtime is not enabled
	x86_64: increase stack size for KASAN_EXTRA
	mm, memory_hotplug: is_mem_section_removable do not pass the end of a zone
	mm, memory_hotplug: test_pages_in_a_zone do not pass the end of zone
	fs/drop_caches.c: avoid softlockups in drop_pagecache_sb()
	autofs: drop dentry reference only when it is never used
	autofs: fix error return in autofs_fill_super()
	soc: fsl: qbman: avoid race in clearing QMan interrupt
	ARM: pxa: ssp: unneeded to free devm_ allocated data
	arm64: dts: add msm8996 compatible to gicv3
	usb: phy: fix link errors
	irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable
	drm/sun4i: tcon: Prepare and enable TCON channel 0 clock at init
	dmaengine: at_xdmac: Fix wrongfull report of a channel as in use
	vsock/virtio: fix kernel panic after device hot-unplug
	vsock/virtio: reset connected sockets on device removal
	dmaengine: dmatest: Abort test in case of mapping error
	selftests: netfilter: fix config fragment CONFIG_NF_TABLES_INET
	selftests: netfilter: add simple masq/redirect test cases
	netfilter: nf_nat: skip nat clash resolution for same-origin entries
	s390/qeth: fix use-after-free in error path
	perf symbols: Filter out hidden symbols from labels
	MIPS: Remove function size check in get_frame_info()
	fs: ratelimit __find_get_block_slow() failure message.
	Input: wacom_serial4 - add support for Wacom ArtPad II tablet
	Input: elan_i2c - add id for touchpad found in Lenovo s21e-20
	iscsi_ibft: Fix missing break in switch statement
	scsi: aacraid: Fix missing break in switch statement
	futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock()
	ARM: dts: exynos: Fix pinctrl definition for eMMC RTSN line on Odroid X2/U3
	ARM: dts: exynos: Add minimal clkout parameters to Exynos3250 PMU
	drm: disable uncached DMA optimization for ARM and arm64
	ARM: 8781/1: Fix Thumb-2 syscall return for binutils 2.29+
	ARM: dts: exynos: Do not ignore real-world fuse values for thermal zone 0 on Exynos5420
	perf/x86/intel: Make cpuc allocations consistent
	perf/x86/intel: Generalize dynamic constraint creation
	x86: Add TSX Force Abort CPUID/MSR
	Linux 4.9.163

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-03-13 14:20:38 -07:00
Ard Biesheuvel
660e1bf847 drm: disable uncached DMA optimization for ARM and arm64
[ Upstream commit e02f5c1bb2283cfcee68f2f0feddcc06150f13aa ]

The DRM driver stack is designed to work with cache coherent devices
only, but permits an optimization to be enabled in some cases, where
for some buffers, both the CPU and the GPU use uncached mappings,
removing the need for DMA snooping and allocation in the CPU caches.

The use of uncached GPU mappings relies on the correct implementation
of the PCIe NoSnoop TLP attribute by the platform, otherwise the GPU
will use cached mappings nonetheless. On x86 platforms, this does not
seem to matter, as uncached CPU mappings will snoop the caches in any
case. However, on ARM and arm64, enabling this optimization on a
platform where NoSnoop is ignored results in loss of coherency, which
breaks correct operation of the device. Since we have no way of
detecting whether NoSnoop works or not, just disable this
optimization entirely for ARM and arm64.

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: David Zhou <David1.Zhou@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Michel Daenzer <michel.daenzer@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Reported-by: Carsten Haitzler <Carsten.Haitzler@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.kernel.org/patch/10778815/
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:01 -07:00
Petri Gynther
a7d848ab42 Merge 4.9.117 into android-msm-bluecross-4.9-lts
Linux 4.9.117
    net: dsa: qca8k: Allow overwriting CPU port setting
    net: dsa: qca8k: Add QCA8334 binding documentation
    net: dsa: qca8k: Enable RXMAC when bringing up a port
    net: dsa: qca8k: Force CPU port to its highest bandwidth
    RDMA/uverbs: Protect from attempts to create flows on unsupported QP
  * ext4: check for allocation block validity with block group locked
      fs/ext4/balloc.c
      fs/ext4/ialloc.c
  * ext4: fix inline data updates with checksums enabled
      fs/ext4/inline.c
      fs/ext4/inode.c
  * squashfs: be more careful about metadata corruption
      fs/squashfs/squashfs_fs.h
  * random: mix rdrand with entropy sent in from userspace
      drivers/char/random.c
  * drm: Add DP PSR2 sink enable bit
      include/drm/drm_dp_helper.h
    media: si470x: fix __be16 annotations
    scsi: megaraid_sas: Increase timeout by 1 sec for non-RAID fastpath IOs
    scsi: scsi_dh: replace too broad "TP9" string with the exact models
    media: omap3isp: fix unbalanced dma_iommu_mapping
  * crypto: authenc - don't leak pointers to authenc keys
      crypto/authenc.c
  * crypto: authencesn - don't leak pointers to authenc keys
      crypto/authencesn.c
  * usb: hub: Don't wait for connect state at resume for powered-off ports
      drivers/usb/core/hub.c
    microblaze: Fix simpleImage format generation
  * serial: core: Make sure compiler barfs for 16-byte earlycon names
      include/linux/serial_core.h
    staging: lustre: ldlm: free resource when ldlm_lock_create() fails.
    staging: lustre: llite: correct removexattr detection
  * audit: allow not equal op for audit by executable
      kernel/auditfilter.c
    rsi: Fix 'invalid vdd' warning in mmc
  * ipconfig: Correctly initialise ic_nameservers
      net/ipv4/ipconfig.c
    drm/gma500: fix psb_intel_lvds_mode_valid()'s return type
    arm64: defconfig: Enable Rockchip io-domain driver
    memory: tegra: Apply interrupts mask per SoC
    memory: tegra: Do not handle spurious interrupts
  * stop_machine: Use raw spinlocks
      kernel/stop_machine.c
    dt-bindings: net: meson-dwmac: new compatible name for AXG SoC
    dt-bindings: pinctrl: meson: add support for the Meson8m2 SoC
    mmc: pwrseq: Use kmalloc_array instead of stack VLA
    mmc: dw_mmc: update actual clock for mmc debugfs
    ALSA: hda/ca0132: fix build failure when a local macro is defined
  * drm/atomic: Handling the case when setting old crtc for plane
      drivers/gpu/drm/drm_atomic.c
    media: siano: get rid of __le32/__le16 cast warnings
  * bpf: fix references to free_bpf_prog_info() in comments
      kernel/bpf/verifier.c
    thermal: exynos: fix setting rising_threshold for Exynos5433
    staging: lustre: o2iblnd: fix race at kiblnd_connect_peer
    scsi: megaraid: silence a static checker bug
    scsi: 3w-xxxx: fix a missing-check bug
    scsi: 3w-9xxx: fix a missing-check bug
    bnxt_en: Check unsupported speeds in bnxt_update_link() on PF only.
    perf: fix invalid bit in diagnostic entry
    s390/cpum_sf: Add data entry sizes to sampling trailer entry
    brcmfmac: Add support for bcm43364 wireless chipset
    mtd: rawnand: fsl_ifc: fix FSL NAND driver to read all ONFI parameter pages
    media: saa7164: Fix driver name in debug output
  * media: media-device: fix ioctl function types
      drivers/media/media-device.c
    libata: Fix command retry decision
    media: rcar_jpu: Add missing clk_disable_unprepare() on error in jpu_open()
  * dma-iommu: Fix compilation when !CONFIG_IOMMU_DMA
      include/linux/dma-iommu.h
  * tty: Fix data race in tty_insert_flip_string_fixed_flag
      drivers/tty/pty.c
    nvmem: properly handle returned value nvmem_reg_read
    ARM: dts: sh73a0: Add missing interrupt-affinity to PMU node
    ARM: dts: emev2: Add missing interrupt-affinity to PMU node
    EDAC, altera: Fix ARM64 build warning
    HID: i2c-hid: check if device is there before really probing
    powerpc/embedded6xx/hlwd-pic: Prevent interrupts from being handled by Starlet
    drm/radeon: fix mode_valid's return type
  * HID: hid-plantronics: Re-resend Update to map button for PTT products
      drivers/hid/hid-plantronics.c
  * arm64: cmpwait: Clear event register before arming exclusive monitor
      arch/arm64/include/asm/cmpxchg.h
  * ALSA: usb-audio: Apply rate limit to warning messages in URB complete callback
      sound/usb/pcm.c
    net: ethernet: ti: cpsw-phy-sel: check bus_find_device() ret value
    media: smiapp: fix timeout checking in smiapp_read_nvm
    ixgbevf: fix MAC address changes through ixgbevf_set_mac()
    md: fix NULL dereference of mddev->pers in remove_and_add_spares()
    regulator: pfuze100: add .is_enable() for pfuze100_swb_regulator_ops
    ALSA: emu10k1: Rate-limit error messages about page errors
  * scsi: ufs: fix exception event handling
      drivers/scsi/ufs/ufshcd.c
  * fscrypt: use unbound workqueue for decryption
      fs/crypto/crypto.c
    drivers/perf: arm-ccn: don't log to dmesg in event_init
    ima: based on policy verify firmware signatures (pre-allocated buffer)
    mwifiex: correct histogram data with appropriate index
    net: dsa: qca8k: Add support for QCA8334 switch
    PCI: pciehp: Request control of native hotplug only if supported
    bpf: powerpc64: pad function address loads with NOPs
    pinctrl: at91-pio4: add missing of_node_put
    powerpc/8xx: fix invalid register expression in head_8xx.S
    powerpc/powermac: Mark variable x as unused
    powerpc/powermac: Add missing prototype for note_bootable_part()
    powerpc/chrp/time: Make some functions static, add missing header include
    powerpc/32: Add a missing include header
    ath: Add regulatory mapping for Bahamas
    ath: Add regulatory mapping for Bermuda
    ath: Add regulatory mapping for Serbia
    ath: Add regulatory mapping for Tanzania
    ath: Add regulatory mapping for Uganda
    ath: Add regulatory mapping for APL2_FCCA
    ath: Add regulatory mapping for APL13_WORLD
    ath: Add regulatory mapping for ETSI8_WORLD
    ath: Add regulatory mapping for FCC3_ETSIC
  * PCI: Prevent sysfs disable of device while driver is attached
      drivers/pci/pci-sysfs.c
    btrfs: qgroup: Finish rescan when hit the last leaf of extent tree
    btrfs: add barriers to btrfs_sync_log before log_commit_wait wakeups
  * media: videobuf2-core: don't call memop 'finish' when queueing
      drivers/media/v4l2-core/videobuf2-core.c
    media: tw686x: Fix incorrect vb2_mem_ops GFP flags
    wlcore: sdio: check for valid platform device data before suspend
    mwifiex: handle race during mwifiex_usb_disconnect
    mfd: cros_ec: Fail early if we cannot identify the EC
  * ASoC: dpcm: fix BE dai not hw_free and shutdown
      sound/soc/soc-pcm.c
    Bluetooth: btusb: Add a new Realtek 8723DE ID 2ff8:b011
    Bluetooth: hci_qca: Fix "Sleep inside atomic section" warning
    iwlwifi: pcie: fix race in Rx buffer allocator
    selftests/intel_pstate: Improve test, minor fixes
    perf/x86/intel/uncore: Correct fixed counter index check for NHM
    perf/x86/intel/uncore: Correct fixed counter index check in generic code
    usbip: usbip_detach: Fix memory, udev context and udev leak
  * f2fs: fix race in between GC and atomic open
      fs/f2fs/file.c
  * f2fs: Fix deadlock in shutdown ioctl
      fs/f2fs/file.c
  * f2fs: fix to wait page writeback during revoking atomic write
      fs/f2fs/segment.c
  * f2fs: fix to don't trigger writeback during recovery
      fs/f2fs/segment.c
  * f2fs: fix error path of move_data_page
      fs/f2fs/gc.c
  * disable loading f2fs module on PAGE_SIZE > 4KB
      fs/f2fs/super.c
    pnfs: Don't release the sequence slot until we've processed layoutget on open
    netfilter: nf_tables: check msg_type before nft_trans_set(trans)
    RDMA/mad: Convert BUG_ONs to error flows
    powerpc/64s: Fix compiler store ordering to SLB shadow area
    hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common()
    powerpc/eeh: Fix use-after-release of EEH driver
    infiniband: fix a possible use-after-free bug
    netfilter: ipset: List timing out entries with "timeout 1" instead of zero
    perf tools: Fix pmu events parsing rule
  * rtc: ensure rtc_set_alarm fails when alarms are not supported
      drivers/rtc/interface.c
  * mm/slub.c: add __printf verification to slab_err()
      mm/slub.c
  * mm: vmalloc: avoid racy handling of debugobjects in vunmap
      mm/vmalloc.c
    vfio: platform: Fix reset module leak in error path
    nfsd: fix potential use-after-free in nfsd4_decode_getdeviceinfo
    ALSA: fm801: add error handling for snd_ctl_add
    ALSA: emu10k1: add error handling for snd_ctl_add
    xen/netfront: raise max number of slots in xennet_get_responses()
    kcov: ensure irq code sees a valid area
    usb: dwc2: Fix DMA alignment to start at allocated boundary
  * arm64: fix vmemmap BUILD_BUG_ON() triggering on !vmemmap setups
      arch/arm64/mm/init.c
  * tracing: Quiet gcc warning about maybe unused link variable
      kernel/trace/trace_kprobe.c
  * tracing/kprobes: Fix trace_probe flags on enable_trace_kprobe() failure
      kernel/trace/trace_kprobe.c
  * kthread, tracing: Don't expose half-written comm when creating kthreads
      kernel/kthread.c
  * tracing: Fix possible double free in event_enable_trigger_func()
      kernel/trace/trace_events_trigger.c
  * tracing: Fix double free of event_trigger_data
      kernel/trace/trace_events_trigger.c
    kvm, mm: account shadow page tables to kmemcg
    Input: elan_i2c - add another ACPI ID for Lenovo Ideapad 330-15AST
    Input: i8042 - add Lenovo LaVie Z to the i8042 reset list
    Input: elan_i2c - add ACPI ID for lenovo ideapad 330

Change-Id: Ibdefd19225c51396172426223364ca861da5f5a0
Signed-off-by: Petri Gynther <pgynther@google.com>
2018-09-20 18:54:56 -07:00
Greg Kroah-Hartman
8b21e85d91 Merge 4.9.117 into android-4.9
Changes in 4.9.117
	Input: elan_i2c - add ACPI ID for lenovo ideapad 330
	Input: i8042 - add Lenovo LaVie Z to the i8042 reset list
	Input: elan_i2c - add another ACPI ID for Lenovo Ideapad 330-15AST
	kvm, mm: account shadow page tables to kmemcg
	tracing: Fix double free of event_trigger_data
	tracing: Fix possible double free in event_enable_trigger_func()
	kthread, tracing: Don't expose half-written comm when creating kthreads
	tracing/kprobes: Fix trace_probe flags on enable_trace_kprobe() failure
	tracing: Quiet gcc warning about maybe unused link variable
	arm64: fix vmemmap BUILD_BUG_ON() triggering on !vmemmap setups
	usb: dwc2: Fix DMA alignment to start at allocated boundary
	kcov: ensure irq code sees a valid area
	xen/netfront: raise max number of slots in xennet_get_responses()
	ALSA: emu10k1: add error handling for snd_ctl_add
	ALSA: fm801: add error handling for snd_ctl_add
	nfsd: fix potential use-after-free in nfsd4_decode_getdeviceinfo
	vfio: platform: Fix reset module leak in error path
	mm: vmalloc: avoid racy handling of debugobjects in vunmap
	mm/slub.c: add __printf verification to slab_err()
	rtc: ensure rtc_set_alarm fails when alarms are not supported
	perf tools: Fix pmu events parsing rule
	netfilter: ipset: List timing out entries with "timeout 1" instead of zero
	infiniband: fix a possible use-after-free bug
	powerpc/eeh: Fix use-after-release of EEH driver
	hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common()
	powerpc/64s: Fix compiler store ordering to SLB shadow area
	RDMA/mad: Convert BUG_ONs to error flows
	netfilter: nf_tables: check msg_type before nft_trans_set(trans)
	pnfs: Don't release the sequence slot until we've processed layoutget on open
	disable loading f2fs module on PAGE_SIZE > 4KB
	f2fs: fix error path of move_data_page
	f2fs: fix to don't trigger writeback during recovery
	f2fs: fix to wait page writeback during revoking atomic write
	f2fs: Fix deadlock in shutdown ioctl
	f2fs: fix race in between GC and atomic open
	usbip: usbip_detach: Fix memory, udev context and udev leak
	perf/x86/intel/uncore: Correct fixed counter index check in generic code
	perf/x86/intel/uncore: Correct fixed counter index check for NHM
	selftests/intel_pstate: Improve test, minor fixes
	iwlwifi: pcie: fix race in Rx buffer allocator
	Bluetooth: hci_qca: Fix "Sleep inside atomic section" warning
	Bluetooth: btusb: Add a new Realtek 8723DE ID 2ff8:b011
	ASoC: dpcm: fix BE dai not hw_free and shutdown
	mfd: cros_ec: Fail early if we cannot identify the EC
	mwifiex: handle race during mwifiex_usb_disconnect
	wlcore: sdio: check for valid platform device data before suspend
	media: tw686x: Fix incorrect vb2_mem_ops GFP flags
	media: videobuf2-core: don't call memop 'finish' when queueing
	btrfs: add barriers to btrfs_sync_log before log_commit_wait wakeups
	btrfs: qgroup: Finish rescan when hit the last leaf of extent tree
	PCI: Prevent sysfs disable of device while driver is attached
	ath: Add regulatory mapping for FCC3_ETSIC
	ath: Add regulatory mapping for ETSI8_WORLD
	ath: Add regulatory mapping for APL13_WORLD
	ath: Add regulatory mapping for APL2_FCCA
	ath: Add regulatory mapping for Uganda
	ath: Add regulatory mapping for Tanzania
	ath: Add regulatory mapping for Serbia
	ath: Add regulatory mapping for Bermuda
	ath: Add regulatory mapping for Bahamas
	powerpc/32: Add a missing include header
	powerpc/chrp/time: Make some functions static, add missing header include
	powerpc/powermac: Add missing prototype for note_bootable_part()
	powerpc/powermac: Mark variable x as unused
	powerpc/8xx: fix invalid register expression in head_8xx.S
	pinctrl: at91-pio4: add missing of_node_put
	bpf: powerpc64: pad function address loads with NOPs
	PCI: pciehp: Request control of native hotplug only if supported
	net: dsa: qca8k: Add support for QCA8334 switch
	mwifiex: correct histogram data with appropriate index
	ima: based on policy verify firmware signatures (pre-allocated buffer)
	drivers/perf: arm-ccn: don't log to dmesg in event_init
	fscrypt: use unbound workqueue for decryption
	scsi: ufs: fix exception event handling
	ALSA: emu10k1: Rate-limit error messages about page errors
	regulator: pfuze100: add .is_enable() for pfuze100_swb_regulator_ops
	md: fix NULL dereference of mddev->pers in remove_and_add_spares()
	ixgbevf: fix MAC address changes through ixgbevf_set_mac()
	media: smiapp: fix timeout checking in smiapp_read_nvm
	net: ethernet: ti: cpsw-phy-sel: check bus_find_device() ret value
	ALSA: usb-audio: Apply rate limit to warning messages in URB complete callback
	arm64: cmpwait: Clear event register before arming exclusive monitor
	HID: hid-plantronics: Re-resend Update to map button for PTT products
	drm/radeon: fix mode_valid's return type
	powerpc/embedded6xx/hlwd-pic: Prevent interrupts from being handled by Starlet
	HID: i2c-hid: check if device is there before really probing
	EDAC, altera: Fix ARM64 build warning
	ARM: dts: emev2: Add missing interrupt-affinity to PMU node
	ARM: dts: sh73a0: Add missing interrupt-affinity to PMU node
	nvmem: properly handle returned value nvmem_reg_read
	tty: Fix data race in tty_insert_flip_string_fixed_flag
	dma-iommu: Fix compilation when !CONFIG_IOMMU_DMA
	media: rcar_jpu: Add missing clk_disable_unprepare() on error in jpu_open()
	libata: Fix command retry decision
	media: media-device: fix ioctl function types
	media: saa7164: Fix driver name in debug output
	mtd: rawnand: fsl_ifc: fix FSL NAND driver to read all ONFI parameter pages
	brcmfmac: Add support for bcm43364 wireless chipset
	s390/cpum_sf: Add data entry sizes to sampling trailer entry
	perf: fix invalid bit in diagnostic entry
	bnxt_en: Check unsupported speeds in bnxt_update_link() on PF only.
	scsi: 3w-9xxx: fix a missing-check bug
	scsi: 3w-xxxx: fix a missing-check bug
	scsi: megaraid: silence a static checker bug
	staging: lustre: o2iblnd: fix race at kiblnd_connect_peer
	thermal: exynos: fix setting rising_threshold for Exynos5433
	bpf: fix references to free_bpf_prog_info() in comments
	media: siano: get rid of __le32/__le16 cast warnings
	drm/atomic: Handling the case when setting old crtc for plane
	ALSA: hda/ca0132: fix build failure when a local macro is defined
	mmc: dw_mmc: update actual clock for mmc debugfs
	mmc: pwrseq: Use kmalloc_array instead of stack VLA
	dt-bindings: pinctrl: meson: add support for the Meson8m2 SoC
	dt-bindings: net: meson-dwmac: new compatible name for AXG SoC
	stop_machine: Use raw spinlocks
	memory: tegra: Do not handle spurious interrupts
	memory: tegra: Apply interrupts mask per SoC
	arm64: defconfig: Enable Rockchip io-domain driver
	drm/gma500: fix psb_intel_lvds_mode_valid()'s return type
	ipconfig: Correctly initialise ic_nameservers
	rsi: Fix 'invalid vdd' warning in mmc
	audit: allow not equal op for audit by executable
	staging: lustre: llite: correct removexattr detection
	staging: lustre: ldlm: free resource when ldlm_lock_create() fails.
	serial: core: Make sure compiler barfs for 16-byte earlycon names
	microblaze: Fix simpleImage format generation
	usb: hub: Don't wait for connect state at resume for powered-off ports
	crypto: authencesn - don't leak pointers to authenc keys
	crypto: authenc - don't leak pointers to authenc keys
	media: omap3isp: fix unbalanced dma_iommu_mapping
	scsi: scsi_dh: replace too broad "TP9" string with the exact models
	scsi: megaraid_sas: Increase timeout by 1 sec for non-RAID fastpath IOs
	media: si470x: fix __be16 annotations
	drm: Add DP PSR2 sink enable bit
	random: mix rdrand with entropy sent in from userspace
	squashfs: be more careful about metadata corruption
	ext4: fix inline data updates with checksums enabled
	ext4: check for allocation block validity with block group locked
	RDMA/uverbs: Protect from attempts to create flows on unsupported QP
	net: dsa: qca8k: Force CPU port to its highest bandwidth
	net: dsa: qca8k: Enable RXMAC when bringing up a port
	net: dsa: qca8k: Add QCA8334 binding documentation
	net: dsa: qca8k: Allow overwriting CPU port setting
	Linux 4.9.117

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-08-03 08:50:05 +02:00
José Roberto de Souza
f685597b13 drm: Add DP PSR2 sink enable bit
[ Upstream commit 4f212e40468650e220c1770876c7f25b8e0c1ff5 ]

To comply with eDP1.4a this bit should be set when enabling PSR2.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180328223046.16125-1-jose.souza@intel.com
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-03 07:55:26 +02:00
Cyan_Hsieh
dcfd484d24 Merge LA.UM.7.3.9.08.00.00.385.356 via branch qcom-msm-4.9 into android-msm-bluecross-4.9
Merge Qualcomm's LA.UM.7.3.9.08.00.00.385.356

Removed camera related changes with

git checkout partner/android-msm-bluecross-4.9 -- drivers/media/platform/msm/camera/ \
drivers/media/platform/msm/camera_v2/ \
include/uapi/media/cam_req_mgr.h

Conflicts:
	block/bio.c
	block/blk-merge.c
	drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c
	drivers/gpu/drm/msm/sde/sde_crtc.c
	drivers/gpu/drm/msm/sde/sde_crtc.h
	drivers/input/misc/Makefile
	drivers/input/touchscreen/Makefile
	drivers/platform/msm/ipa/Makefile
	drivers/power/supply/power_supply_sysfs.c
	drivers/scsi/ufs/ufs-qcom-ice.c
	drivers/soc/qcom/Kconfig
	drivers/soc/qcom/Makefile
	drivers/spi/spi-geni-qcom.c
	fs/crypto/fscrypt_private.h
	fs/crypto/keyinfo.c
	fs/direct-io.c
	fs/ext4/inode.c
	fs/ext4/page-io.c
	include/linux/pfk.h
	include/linux/power_supply.h
	include/linux/security.h
	security/Kconfig
	security/pfe/Kconfig
	security/pfe/Makefile
	security/pfe/pfk.c
	security/pfe/pfk_ice.h
	security/pfe/pfk_internal.h
	security/pfe/pfk_kc.c
	security/pfe/pfk_kc.h
	security/security.c
	security/selinux/include/objsec.h

Bug: 109547412
Change-Id: I236523a91c58491e65ff2915b26da15e50dc2b8c
Signed-off-by: aaronding <aaronding@google.com>
Signed-off-by: Cyan_Hsieh <cyanhsieh@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2018-06-07 18:40:58 +08:00
Cyan_Hsieh
e9eb3984e2 Merge LA.UM.7.3.9.08.00.00.385.328 via branch qcom-msm-4.9 into android-msm-bluecross-4.9
Merge Qualcomm's LA.UM.7.3.9.08.00.00.385.328

Removed camera related changes with

git checkout partner/android-msm-bluecross-4.9 -- drivers/media/platform/msm/camera/ \
drivers/media/platform/msm/camera_v2/ \
include/uapi/media/cam_req_mgr.h

Conflicts:
	Documentation/devicetree/bindings/drm/msm/mdss-dsi-panel.txt
	Documentation/filesystems/f2fs.txt
	Makefile
	arch/Kconfig
	arch/arm64/Kconfig
	arch/arm64/boot/dts/qcom/sdm845-v2.dtsi
	arch/arm64/crypto/Makefile
	arch/arm64/kernel/entry.S
	arch/arm64/kernel/vdso/Makefile
	drivers/firmware/efi/libstub/Makefile
	drivers/gpu/drm/msm/dsi-staging/dsi_display.c
	drivers/gpu/drm/msm/sde/sde_kms.c
	drivers/hwtracing/coresight/coresight-event.c
	drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.c
	drivers/misc/Makefile
	drivers/power/supply/qcom/Kconfig
	drivers/power/supply/qcom/Makefile
	fs/crypto/fscrypt_private.h
	fs/f2fs/data.c
	fs/f2fs/f2fs.h
	fs/f2fs/file.c
	fs/f2fs/segment.c
	fs/f2fs/super.c
	fs/f2fs/inode.c
	fs/f2fs/sysfs.c
	include/linux/compiler-clang.h
	include/linux/compiler.h
	include/linux/fscrypt.h
	include/linux/init.h
	include/linux/jiffies.h
	include/trace/events/sched.h
	kernel/Makefile
	kernel/cfi.c
	kernel/sched/core.c
	kernel/sched/fair.c
	mm/filemap.c

Bug: 80274434
Change-Id: I8640c44aa3978666364fd08bb9b8748e95a1e3ff
Signed-off-by: aaronding <aaronding@google.com>
Signed-off-by: Cyan_Hsieh <cyanhsieh@google.com>
2018-06-01 15:59:44 +08:00
Sandeep Panda
ae2b028a2a drm/msm/dsi-staging: add support to wait post dsi command rx
Some display panel have the requirement of waiting for certain
duration before dsi host can read back the response from panel,
to a DCS read command. This change adds the support to store
the delay required in dsi message structure it self.

Change-Id: I82f53d811f82195eb900e4594b01c6e0f23fed53
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2018-05-09 15:47:57 +05:30
Blagovest Kolenichev
aa71c72742 Merge android-4.9.88 (bb52bba) into msm-4.9
* refs/heads/tmp-bb52bba:
  Linux 4.9.88
  PCI: dwc: Fix enumeration end when reaching root subordinate
  earlycon: add reg-offset to physical address before mapping
  serial: core: mark port as initialized in autoconfig
  serial: 8250_pci: Add Brainboxes UC-260 4 port serial device
  usb: gadget: f_fs: Fix use-after-free in ffs_fs_kill_sb()
  usb: usbmon: Read text within supplied buffer size
  usb: quirks: add control message delay for 1b1c:1b20
  usbip: vudc: fix null pointer dereference on udc->lock
  USB: storage: Add JMicron bridge 152d:2567 to unusual_devs.h
  staging: android: ashmem: Fix lockdep issue during llseek
  staging: comedi: fix comedi_nsamples_left.
  uas: fix comparison for error code
  tty/serial: atmel: add new version check for usart
  serial: sh-sci: prevent lockup on full TTY buffers
  ASoC: rt5651: Fix regcache sync errors on resume
  ASoC: sgtl5000: Fix suspend/resume
  x86: Treat R_X86_64_PLT32 as R_X86_64_PC32
  x86/module: Detect and skip invalid relocations
  NFS: Fix unstable write completion
  NFS: Fix an incorrect type in struct nfs_direct_req
  scsi: qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport
  ubi: Fix race condition between ubi volume creation and udev
  ext4: inplace xattr block update fails to deduplicate blocks
  netfilter: x_tables: pack percpu counter allocations
  netfilter: x_tables: pass xt_counters struct to counter allocator
  netfilter: x_tables: pass xt_counters struct instead of packet counter
  netfilter: ipv6: fix use-after-free Write in nf_nat_ipv6_manip_pkt
  netfilter: bridge: ebt_among: add missing match size checks
  netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets
  netfilter: IDLETIMER: be syzkaller friendly
  netfilter: nat: cope with negative port range
  netfilter: x_tables: fix missing timer initialization in xt_LED
  netfilter: add back stackpointer size checks
  tc358743: fix register i2c_rd/wr function fix
  Input: tca8418_keypad - remove double read of key event register
  ARM: omap2: hide omap3_save_secure_ram on non-OMAP3 builds
  watchdog: hpwdt: Remove legacy NMI sourcing.
  watchdog: hpwdt: fix unused variable warning
  watchdog: hpwdt: Check source of NMI
  watchdog: hpwdt: SMBIOS check
  x86/paravirt, objtool: Annotate indirect calls
  x86/speculation: Move firmware_restrict_branch_speculation_*() from C to CPP
  x86/boot, objtool: Annotate indirect jump in secondary_startup_64()
  x86/speculation, objtool: Annotate indirect calls/jumps for objtool
  x86/retpoline: Support retpoline builds with Clang
  x86/speculation: Use IBRS if available before calling into firmware
  Revert "x86/retpoline: Simplify vmexit_fill_RSB()"
  nospec: Include <asm/barrier.h> dependency
  nospec: Kill array_index_nospec_mask_check()
  ALSA: hda: add dock and led support for HP ProBook 640 G2
  ALSA: hda: add dock and led support for HP EliteBook 820 G3
  ALSA: seq: More protection for concurrent write and ioctl races
  ALSA: seq: Don't allow resizing pool in use
  ALSA: hda/realtek - Make dock sound work on ThinkPad L570
  ALSA: hda/realtek - Fix dock line-out volume on Dell Precision 7520
  ALSA: hda/realtek: Limit mic boost on T480
  x86/spectre_v2: Don't check microcode versions when running under hypervisors
  perf tools: Fix trigger class trigger_on()
  x86/MCE: Serialize sysfs changes
  bcache: don't attach backing with duplicate UUID
  bcache: fix crashes in duplicate cache device register
  IB/mlx5: Fix incorrect size of klms in the memory region
  kbuild: Handle builtin dtb file names containing hyphens
  KVM: s390: fix memory overwrites when not using SCA entries
  virtio_ring: fix num_free handling in error case
  loop: Fix lost writes caused by missing flag
  Input: matrix_keypad - fix race when disabling interrupts
  MIPS: OCTEON: irq: Check for null return on kzalloc allocation
  MIPS: ath25: Check for kzalloc allocation failure
  MIPS: BMIPS: Do not mask IPIs during suspend
  drm/amdgpu:Always save uvd vcpu_bo in VM Mode
  drm/amdgpu:Correct max uvd handles
  drm/amdgpu: fix KV harvesting
  drm/radeon: fix KV harvesting
  drm/amdgpu: Notify sbios device ready before send request
  drm/amdgpu: Fix deadlock on runtime suspend
  drm/radeon: Fix deadlock on runtime suspend
  drm/nouveau: Fix deadlock on runtime suspend
  drm: Allow determining if current task is output poll worker
  workqueue: Allow retrieval of current task's work struct
  drm/i915: Always call to intel_display_set_init_power() in resume_early.
  scsi: qla2xxx: Fix NULL pointer crash due to active timer for ABTS
  drm/i915: Try EDID bitbanging on HDMI after failed read
  RDMA/mlx5: Fix integer overflow while resizing CQ
  RDMA/ucma: Check that user doesn't overflow QP state
  RDMA/ucma: Limit possible option size
  ANDROID: sdcardfs: fix lock issue on 32 bit/SMP architectures
  UPSTREAM: kasan: add functions for unpoisoning stack variables
  UPSTREAM: kasan: add tests for alloca poisoning
  UPSTREAM: kasan: support alloca() poisoning
  UPSTREAM: kasan/Makefile: support LLVM style asan parameters
  BACKPORT: kasan: add compiler support for clang
  kbuild: fix --gc-sections
  BACKPORT: fix "netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'"
  UPSTREAM: netfilter: xt_bpf: add overflow checks
  UPSTREAM: netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'
  UPSTREAM: netfilter: xt_bpf: support ebpf
  FROMLIST: f2fs: don't put dentry page in pagecache into highmem

Change-Id: I7f13fedc725fe5333e18e4e5b6639eee27ea1120
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2018-04-17 10:43:29 -07:00
Greg Kroah-Hartman
bb52bba67e Merge 4.9.88 into android-4.9
Changes in 4.9.88
	RDMA/ucma: Limit possible option size
	RDMA/ucma: Check that user doesn't overflow QP state
	RDMA/mlx5: Fix integer overflow while resizing CQ
	drm/i915: Try EDID bitbanging on HDMI after failed read
	scsi: qla2xxx: Fix NULL pointer crash due to active timer for ABTS
	drm/i915: Always call to intel_display_set_init_power() in resume_early.
	workqueue: Allow retrieval of current task's work struct
	drm: Allow determining if current task is output poll worker
	drm/nouveau: Fix deadlock on runtime suspend
	drm/radeon: Fix deadlock on runtime suspend
	drm/amdgpu: Fix deadlock on runtime suspend
	drm/amdgpu: Notify sbios device ready before send request
	drm/radeon: fix KV harvesting
	drm/amdgpu: fix KV harvesting
	drm/amdgpu:Correct max uvd handles
	drm/amdgpu:Always save uvd vcpu_bo in VM Mode
	MIPS: BMIPS: Do not mask IPIs during suspend
	MIPS: ath25: Check for kzalloc allocation failure
	MIPS: OCTEON: irq: Check for null return on kzalloc allocation
	Input: matrix_keypad - fix race when disabling interrupts
	loop: Fix lost writes caused by missing flag
	virtio_ring: fix num_free handling in error case
	KVM: s390: fix memory overwrites when not using SCA entries
	kbuild: Handle builtin dtb file names containing hyphens
	IB/mlx5: Fix incorrect size of klms in the memory region
	bcache: fix crashes in duplicate cache device register
	bcache: don't attach backing with duplicate UUID
	x86/MCE: Serialize sysfs changes
	perf tools: Fix trigger class trigger_on()
	x86/spectre_v2: Don't check microcode versions when running under hypervisors
	ALSA: hda/realtek: Limit mic boost on T480
	ALSA: hda/realtek - Fix dock line-out volume on Dell Precision 7520
	ALSA: hda/realtek - Make dock sound work on ThinkPad L570
	ALSA: seq: Don't allow resizing pool in use
	ALSA: seq: More protection for concurrent write and ioctl races
	ALSA: hda: add dock and led support for HP EliteBook 820 G3
	ALSA: hda: add dock and led support for HP ProBook 640 G2
	nospec: Kill array_index_nospec_mask_check()
	nospec: Include <asm/barrier.h> dependency
	Revert "x86/retpoline: Simplify vmexit_fill_RSB()"
	x86/speculation: Use IBRS if available before calling into firmware
	x86/retpoline: Support retpoline builds with Clang
	x86/speculation, objtool: Annotate indirect calls/jumps for objtool
	x86/boot, objtool: Annotate indirect jump in secondary_startup_64()
	x86/speculation: Move firmware_restrict_branch_speculation_*() from C to CPP
	x86/paravirt, objtool: Annotate indirect calls
	watchdog: hpwdt: SMBIOS check
	watchdog: hpwdt: Check source of NMI
	watchdog: hpwdt: fix unused variable warning
	watchdog: hpwdt: Remove legacy NMI sourcing.
	ARM: omap2: hide omap3_save_secure_ram on non-OMAP3 builds
	Input: tca8418_keypad - remove double read of key event register
	tc358743: fix register i2c_rd/wr function fix
	netfilter: add back stackpointer size checks
	netfilter: x_tables: fix missing timer initialization in xt_LED
	netfilter: nat: cope with negative port range
	netfilter: IDLETIMER: be syzkaller friendly
	netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets
	netfilter: bridge: ebt_among: add missing match size checks
	netfilter: ipv6: fix use-after-free Write in nf_nat_ipv6_manip_pkt
	netfilter: x_tables: pass xt_counters struct instead of packet counter
	netfilter: x_tables: pass xt_counters struct to counter allocator
	netfilter: x_tables: pack percpu counter allocations
	ext4: inplace xattr block update fails to deduplicate blocks
	ubi: Fix race condition between ubi volume creation and udev
	scsi: qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport
	NFS: Fix an incorrect type in struct nfs_direct_req
	NFS: Fix unstable write completion
	x86/module: Detect and skip invalid relocations
	x86: Treat R_X86_64_PLT32 as R_X86_64_PC32
	ASoC: sgtl5000: Fix suspend/resume
	ASoC: rt5651: Fix regcache sync errors on resume
	serial: sh-sci: prevent lockup on full TTY buffers
	tty/serial: atmel: add new version check for usart
	uas: fix comparison for error code
	staging: comedi: fix comedi_nsamples_left.
	staging: android: ashmem: Fix lockdep issue during llseek
	USB: storage: Add JMicron bridge 152d:2567 to unusual_devs.h
	usbip: vudc: fix null pointer dereference on udc->lock
	usb: quirks: add control message delay for 1b1c:1b20
	usb: usbmon: Read text within supplied buffer size
	usb: gadget: f_fs: Fix use-after-free in ffs_fs_kill_sb()
	serial: 8250_pci: Add Brainboxes UC-260 4 port serial device
	serial: core: mark port as initialized in autoconfig
	earlycon: add reg-offset to physical address before mapping
	PCI: dwc: Fix enumeration end when reaching root subordinate
	Linux 4.9.88

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-03-18 12:07:50 +01:00
Lukas Wunner
d006d9047c drm: Allow determining if current task is output poll worker
commit 25c058ccaf2ebbc3e250ec1e199e161f91fe27d4 upstream.

Introduce a helper to determine if the current task is an output poll
worker.

This allows us to fix a long-standing deadlock in several DRM drivers
wherein the ->runtime_suspend callback waits for the output poll worker
to finish and the worker in turn calls a ->detect callback which waits
for runtime suspend to finish.  The ->detect callback is invoked from
multiple call sites and waiting for runtime suspend to finish is the
correct thing to do except if it's executing in the context of the
worker.

v2: Expand kerneldoc to specifically mention deadlock between
    output poll worker and autosuspend worker as use case. (Lyude)

Cc: Dave Airlie <airlied@redhat.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Link: https://patchwork.freedesktop.org/patch/msgid/3549ce32e7f1467102e70d3e9cbf70c46bfe108e.1518593424.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-18 11:18:48 +01:00
Daniel Mentz
2502678cbf Merge branch 'qcom-msm-4.9' into android-msm-bluecross-4.9
Merge Qualcomm's LA.UM.7.3.9.08.00.00.385.165

Conflicts:
	drivers/gpu/drm/msm/dsi-staging/dsi_panel.c
	drivers/media/platform/msm/camera/cam_fd/cam_fd_dev.c
	drivers/power/supply/power_supply_sysfs.c
	drivers/thermal/Makefile
	include/linux/init.h
	include/linux/power_supply.h

Change-Id: I1b5421163a17278dc391d8d16db78bc4b347640c
2018-03-06 17:00:49 -08:00
Ray Zhang
7a126ad96c drm: add private data member to drm_connector
Add a private data member to drm_connector. This is needed
by some driver to keep its own driver specific data. For
example, when connector and bridge are created in different
modules, and the bridge driver will overwrite some ops of
the connector, so the these overwritten connector ops have
to access the bridge driver specific data in order for the
device specific implementation. In this case the private
member could be utilized.

CRs-Fixed: 2140653
Change-Id: Ib1f1d1c43a67ee4390a7f0451c315fd075601741
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2018-02-04 21:39:53 -08:00
Ray Zhang
c05fa3d9c8 drm/dsi: add two DSI mode flags for BLLP
Add two more dsi mode_flags. MIPI_DSI_MODE_VIDEO_BLLP
means DSI is allowed to enter low power stop mode
during BLLP period, and MIPI_DSI_MODE_VIDEO_EOF_BLLP
means DSI is allowed to enter low power stop  mode in
the BLLP area of the last line of a frame.

CRs-Fixed: 2140653
Change-Id: Idf1550a4d34be17e74301a65fdccf5a9e145598b
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2018-01-31 13:04:43 +08:00
Ray Zhang
5b7c53118d drm/bridge: add connector_init interface in drm_bridge_funcs
Add the connector_init callback so a bridge is allowed to
initialize the connector passed to itself. This is useful
in certain cases like, the connector and bridge are created
in two different modules, while the connector funcs need
access extra information of the bridge. This callback offers
the opportunity to override the connector's behavior.

CRs-Fixed: 2140653
Change-Id: Iee228dd610d2e72d0a9e0bd960b0715b4ea6c644
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2018-01-30 10:00:09 +08:00
Thierry Strudel
a9005a996c Merge branch 'qcom-msm-4.9' into android-msm-bluecross-4.9
Conflicts:
	drivers/media/platform/msm/camera/cam_core/cam_context.h
	drivers/soc/qcom/Makefile

Change-Id: I92d84fdeaeef7a31346c3a8ad01e6f6158a0fd87
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2017-12-08 16:30:20 -08:00
Daniel Mentz
9ddf6d826b Merge remote-tracking branch 'partner/qcom-msm-4.9' into android-msm-bluecross-4.9
ANDROID_LA.UM.6.3.R1.08.00.00.301.060

Conflicts:
	.gitignore
	drivers/platform/msm/ipa/ipa_v3/ipahal/Makefile
	net/netfilter/xt_qtaguid.c

Change-Id: Ie62ff53469217a8e186853b9ea616016c5fde137
2017-11-17 12:31:33 -08:00
Tatenda Chipeperekwa
4e2346e16e drm/msm/dp: add support for PHY CTS 1.4 tests
Add support for PHY CTS 1.4 tests by adding the definitions for
the new test patterns, and programming the DisplayPort controller
to generate the patterns.

CRs-Fixed: 2139669
Change-Id: Ia9ec33dfc83a3db9c87af81d347ee86cdd28350a
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-11-06 17:20:06 -08:00
Daniel Mentz
754affd62d drm/dsi: Fix byte order of DCS set/get brightness
The MIPI DCS specification demands that brightness values are sent in
big endian byte order. It also states that one parameter (i.e. one byte)
shall be sent/received for 8 bit wide values, and two parameters shall
be used for values that are between 9 and 16 bits wide.

Fixes: 1a9d759331 ("drm/dsi: Implement DCS set/get display brightness")
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Change-Id: I24306e21ec6a5ff48ea121d977419a81d5b44152
2017-10-25 20:32:38 -07:00
Vara Reddy
326612b316 drm/msm/dsi-staging: add support to batch commands and kickoff
Add support to group commands until last_command
bit is set in the dtsi commands packing array
and transfer the batch of commands in one dma kickoff.

Change-Id: I0b6d91f2e26553c37f1e6adfc44542312c18340f
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2017-10-10 23:03:48 -07:00
Linux Build Service Account
5a5c56cc0a Merge "drm/msm/dp: align the DP link CTS parameters to DRM upstream" 2017-08-24 16:15:56 -07:00
Aravind Venkateswaran
cbbf8c79be drm/dp: add HBR3 link rate definitions
Add the bandwidth codes and the related definitions to support
HBR3 link rate.

CRs-Fixed: 2096419
Change-Id: Id37e3faffd3431be82ad940eead83a2df4135a2f
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2017-08-21 13:41:44 -07:00
Padmanabhan Komanduru
10db84de48 drm: dp: add the definitions for DP Link Compliance tests
Add the definitions for various DPCD register offsets and
corresponding parameter values for DP Link compliance tests
for PHY/audio/link training/link status tests.

Change-Id: If0dd5f7c95b8577aebeada3b225af7f7fde5210d
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-08-16 15:35:51 +05:30
Manasi Navare
aff0c1ff67 drm: Add definitions for DP compliance Video pattern tests
v4:
* Remove redundant single bit defs (Jani Nikula)
v3:
* Fix the conventions in bit definitions (Jani Nikula)
v2:
* Add all the other DP Complianec TEST register defs (Jani Nikula)

Change-Id: I944460c46428ff519066ccb7afd3e087c2db2ef9
Cc: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Git-commit: 08b79f62a1a3f6774cf27db4d12f3f938486c4f9
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Link: http://patchwork.freedesktop.org/patch/msgid/1484968170-12467-4-git-send-email-manasi.d.navare@intel.com
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-08-16 15:34:32 +05:30
Linux Build Service Account
cf54bfd68e Merge "drm/msm: add support for parsing YUV 420 deep color" 2017-07-09 06:50:25 -07:00
Abhinav Kumar
cd18751fd8 drm/msm: add support for parsing YUV 420 deep color
Current upstream parser only handles RGB deep color
modes.

Add support in the SDE EDID parser module to parse
HDMI VSDB block and indicate support for YUV 420
deep color modes in the sink.

Change-Id: If6c007263094e7716a29cae503d3e3471ae04306
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-07-05 17:01:24 -07:00
Kyle Yan
2506cb5328 Merge remote-tracking branch '4.9/tmp-75d78c7' into 4.9
* 4.9/tmp-75d78c7:
  Linux 4.9.35
  brcmfmac: fix uninitialized warning in brcmf_usb_probe_phase2()
  jump label: fix passing kbuild_cflags when checking for asm goto support
  net: phy: fix marvell phy status reading
  spi: double time out tolerance
  dmaengine: bcm2835: Fix cyclic DMA period splitting
  net: phy: Initialize mdio clock at probe function
  rt2x00: avoid introducing a USB dependency in the rt2x00lib module
  usb: gadget: f_fs: avoid out of bounds access on comp_desc
  mtd: spi-nor: fix spansion quad enable
  of: Add check to of_scan_flat_dt() before accessing initial_boot_params
  rxrpc: Fix several cases where a padded len isn't checked in ticket decode
  drm/amdgpu: adjust default display clock
  drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating
  drm/radeon: add a quirk for Toshiba Satellite L20-183
  drm/radeon: add a PX quirk for another K53TK variant
  iscsi-target: Reject immediate data underflow larger than SCSI transfer length
  iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP
  target: Fix kref->refcount underflow in transport_cmd_finish_abort
  arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW
  time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting
  time: Fix clock->read(clock) race around clocksource changes
  brcmfmac: unbind all devices upon failure in firmware callback
  brcmfmac: use firmware callback upon failure to load
  brcmfmac: add parameter to pass error code in firmware callback
  Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list
  powerpc/64s: Handle data breakpoints in Radix mode
  powerpc/kprobes: Pause function_graph tracing during jprobes handling
  signal: Only reschedule timers on signals timers have sent
  HID: Add quirk for Dell PIXART OEM mouse
  cxgb4: notify uP to route ctrlq compl to rdma rspq
  CIFS: Improve readdir verbosity
  KVM: PPC: Book3S HV: Context-switch EBB registers properly
  KVM: PPC: Book3S HV: Preserve userspace HTM state properly
  KVM: s390: gaccess: fix real-space designation asce handling for gmap shadows
  perf/x86/intel: Add 1G DTLB load/store miss support for SKL
  lib/cmdline.c: fix get_options() overflow while parsing ranges
  autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL
  powerpc/perf: Fix oops when kthread execs user process
  fs/exec.c: account for argv/envp pointers
  ALSA: pcm: Don't treat NULL chmap as a fatal error
  ALSA: firewire-lib: Fix stall of process context at packet error
  xen-blkback: don't leak stack data via response ring
  xen/blkback: fix disconnect while I/Os in flight
  clk: sunxi-ng: a31: Correct lcd1-ch1 clock register offset
  Revert "ANDROID: hardlockup: detect hard lockups without NMIs using secondary cpus"
  Revert "ANDROID: kernel/watchdog: fix unused variable warning"
  UPSTREAM: usb: gadget: f_fs: avoid out of bounds access on comp_desc
  Linux 4.9.34
  mm: fix new crash in unmapped_area_topdown()
  Allow stack to grow up to address space limit
  mm: larger stack guard gap, between vmas
  alarmtimer: Rate limit periodic intervals
  crypto: Work around deallocated stack frame reference gcc bug on sparc.
  vTPM: Fix missing NULL check
  MIPS: .its targets depend on vmlinux
  MIPS: Fix bnezc/jialc return address calculation
  usb: dwc3: exynos fix axius clock error path to do cleanup
  usb: gadget: composite: Fix function used to free memory
  alarmtimer: Prevent overflow of relative timers
  genirq: Release resources in __setup_irq() error path
  sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()
  iio: imu: inv_mpu6050: add accel lpf setting for chip >= MPU6500
  swap: cond_resched in swap_cgroup_prepare()
  mm/memory-failure.c: use compound_head() flags for huge pages
  USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks
  USB: gadget: fix GPF in gadgetfs
  usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk
  usb: xhci: Fix USB 3.1 supported protocol parsing
  drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR()
  misc: mic: double free on ioctl error path
  ath10k: fix napi crash during rmmod when probe firmware fails
  usb: r8a66597-hcd: decrease timeout
  usb: r8a66597-hcd: select a different endpoint on timeout
  USB: gadget: dummy_hcd: fix hub-descriptor removable fields
  pvrusb2: reduce stack usage pvr2_eeprom_analyze()
  USB: usbip: fix nonconforming hub descriptor
  usb: core: fix potential memory leak in error path during hcd creation
  USB: hub: fix SS max number of ports
  usb: gadget: udc: renesas_usb3: lock for PN_ registers access
  usb: gadget: udc: renesas_usb3: fix deadlock by spinlock
  usb: gadget: udc: renesas_usb3: fix pm_runtime functions calling
  IB/mlx5: Fix kernel to user leak prevention logic
  iio: adc: ti_am335x_adc: allocating too much in probe
  iio: proximity: as3935: recalibrate RCO after resume
  iio: st_pressure: Fix data sign
  staging: iio: tsl2x7x_core: Fix standard deviation calculation
  staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()
  mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
  x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
  serial: sh-sci: Fix late enablement of AUTORTS
  serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'
  drm/vc4: Fix OOPSes from trying to cache a partially constructed BO.
  drm/mediatek: fix mtk_hdmi_setup_vendor_specific_infoframe mistake
  mac80211: don't send SMPS action frame in AP mode when not needed
  mac80211: fix dropped counter in multiqueue RX
  mac80211: strictly check mesh address extension mode
  mac80211: fix IBSS presp allocation size
  mac80211: fix packet statistics for fast-RX
  mac80211: fix CSA in IBSS mode
  usb: musb: dsps: keep VBUS on for host-only mode
  drm/i915: Fix GVT-g PVINFO version compatibility check
  drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions.
  mac80211/wpa: use constant time memory comparison for MACs
  mac80211: don't look at the PM bit of BAR frames
  vb2: Fix an off by one error in 'vb2_plane_vaddr'
  cpufreq: conservative: Allow down_threshold to take values from 1 to 10
  ila_xlat: add missing hash secret initialization
  can: gs_usb: fix memory leak in gs_cmd_reset()
  configfs: Fix race between create_link and configfs_rmdir
  fs: pass on flags in compat_writev
  ANDROID: sdcardfs: remove dead function open_flags_to_access_mode()
  ANDROID: android-base.cfg: split out arm64-specific configs
  Linux 4.9.33
  sparc64: make string buffers large enough
  drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2.
  drm/i915: Workaround VLV/CHV DSI scanline counter hardware fail
  s390/kvm: do not rely on the ILC on kvm host protection fauls
  xtensa: don't use linux IRQ #0
  RDMA/qedr: Return max inline data in QP query result
  RDMA/qedr: Don't spam dmesg if QP is in error state
  RDMA/qedr: Don't reset QP when queues aren't flushed
  RDMA/qedr: Fix and simplify memory leak in PD alloc
  RDMA/qedr: Dispatch port active event from qedr_add
  netfilter: nft_log: restrict the log prefix length to 127
  netfilter: nf_tables: fix set->nelems counting with no NLM_F_EXCL
  tipc: fix nametbl_lock soft lockup at node/link events
  tipc: add subscription refcount to avoid invalid delete
  tipc: fix connection refcount error
  tipc: ignore requests when the connection state is not CONNECTED
  ARCv2: smp-boot: wake_flag polling by non-Masters needs to be uncached
  ARC: smp-boot: Decouple Non masters waiting API from jump to entry point
  vhost/vsock: handle vhost_vq_init_access() error
  kernel/watchdog: prevent false hardlockup on overloaded system
  kernel/watchdog.c: move shared definitions to nmi.h
  kernel/watchdog.c: move hardlockup detector to separate file
  userfaultfd: fix SIGBUS resulting from false rwsem wakeups
  proc: add a schedule point in proc_pid_readdir()
  frv: add missing atomic64 operations
  frv: add atomic64_add_unless()
  romfs: use different way to generate fsid for BLOCK or MTD
  mn10300: fix build error of missing fpu_save()
  usb: musb: Fix external abort on non-linefetch for musb_irq_work()
  sctp: sctp_addr_id2transport should verify the addr before looking up assoc
  sctp: sctp gso should set feature with NETIF_F_SG when calling skb_segment
  bnxt_en: Fix RTNL lock usage on bnxt_get_port_module_status().
  bnxt_en: Fix RTNL lock usage on bnxt_update_link().
  bnxt_en: Enhance autoneg support.
  bnxt_en: Fix bnxt_reset() in the slow path task.
  net-next: ethernet: mediatek: change the compatible string
  r8152: avoid start_xmit to schedule napi when napi is disabled
  r8152: fix rtl8152_post_reset function
  r8152: re-schedule napi for tx
  r8152: check rx after napi is enabled
  r8152: avoid start_xmit to call napi_schedule during autosuspend
  nvmet-rdma: Fix missing dma sync to nvme data structures
  nfs: Fix "Don't increment lock sequence ID after NFS4ERR_MOVED"
  ravb: unmap descriptors when freeing rings
  drm/ast: Fixed system hanged if disable P2A
  drm/nouveau: Fix drm poll_helper handling
  drm/nouveau: Don't enabling polling twice on runtime resume
  drm/nouveau: Handle fbcon suspend/resume in seperate worker
  drm/nouveau: Rename acpi_work to hpd_work
  drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE
  gtp: add genl family modules alias
  net: phy: micrel: add support for KSZ8795
  parisc, parport_gsc: Fixes for printk continuation lines
  net/mlx5: Return EOPNOTSUPP when failing to get steering name-space
  net/mlx5: E-Switch, Err when retrieving steering name-space fails
  drm/i915: Check for NULL i915_vma in intel_unpin_fb_obj()
  net: adaptec: starfire: add checks for dma mapping errors
  pinctrl: berlin-bg4ct: fix the value for "sd1a" of pin SCRD0_CRD_PRES
  drm: Don't race connector registration
  drm: prevent double-(un)registration for connectors
  cec: fix wrong last_la determination
  pinctrl: baytrail: Rectify debounce support (part 2)
  gianfar: synchronize DMA API usage by free_skb_rx_queue w/ gfar_new_page
  net/mlx4_core: Avoid command timeouts during VF driver device shutdown
  drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers
  drm/nouveau: prevent userspace from deleting client object
  ipv6: fix flow labels when the traffic class is non-0
  FS-Cache: Initialise stores_lock in netfs cookie
  fscache: Clear outstanding writes when disabling a cookie
  fscache: Fix dead object requeue
  net: fix ndo_features_check/ndo_fix_features comment ordering
  net: phy: Fix PHY module checks and NULL deref in phy_attach_direct()
  net: phy: Fix lack of reference count on PHY driver
  ethtool: do not vzalloc(0) on registers dump
  log2: make order_base_2() behave correctly on const input value zero
  kasan: respect /proc/sys/kernel/traceoff_on_warning
  shmem: fix sleeping from atomic context
  jump label: pass kbuild_cflags when checking for asm goto support
  PM / runtime: Avoid false-positive warnings from might_sleep_if()
  ARM: defconfigs: make NF_CT_PROTO_SCTP and NF_CT_PROTO_UDPLITE built-in
  ipv6: Fix IPv6 packet loss in scenarios involving roaming + snooping switches
  vfio/spapr_tce: Set window when adding additional groups to container
  ipv6: addrconf: fix generation of new temporary addresses
  net: thunderx: Fix PHY autoneg for SGMII QLM mode
  kernel/ucount.c: mark user_header with kmemleak_ignore()
  powerpc/powernv: Properly set "host-ipi" on IPIs
  i2c: piix4: Fix request_region size
  i2c: piix4: Request the SMBUS semaphore inside the mutex
  sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications
  sierra_net: Skip validating irrelevant fields for IDLE LSIs
  net: hns: Fix the device being used for dma mapping during TX
  NET: mkiss: Fix panic
  ibmvnic: Initialize completion variables before starting work
  ibmvnic: Call napi_disable instead of napi_enable in failure path
  NET: Fix /proc/net/arp for AX.25
  gfs2: Use rhashtable walk interface in glock_hash_walk
  tipc: Fix tipc_sk_reinit race conditions
  ipv6: Inhibit IPv4-mapped src address on the wire.
  ipv6: Handle IPv4-mapped src to in6addr_any dst.
  tcp: tcp_probe: use spin_lock_bh()
  net: xilinx_emaclite: fix receive buffer overflow
  net: xilinx_emaclite: fix freezes due to unordered I/O
  ibmvnic: Fix endian error when requesting device capabilities
  ibmvnic: Fix endian errors in error reporting output
  netfilter: nf_conntrack_sip: fix wrong memory initialisation
  partitions/msdos: FreeBSD UFS2 file systems are not recognized
  drm/i915: Prevent the system suspend complete optimization
  PCI/PM: Add needs_resume flag to avoid suspend complete optimization
  usb: gadget: f_fs: Fix possibe deadlock
  FROMLIST: Remove the redundant skb->dev initialization in ip6_fragment
  FROMLIST: bpf: Remove duplicate tcp_filter hook in ipv6
  FROMLIST: ipv6: Initial skb->dev and skb->protocol in ip6_output
  FROMLIST: bpf: cgroup skb progs cannot access ld_abs/ind
  ANDROID: uid_sys_stats: check previous uid_entry before call find_or_register_uid

Conflicts:
	drivers/usb/gadget/function/f_fs.c
	kernel/watchdog.c

Change-Id: Ib91e6121cace8bcdc4dd8b1727792dd5bb6f1535
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-07-05 13:17:33 -07:00
Greg Kroah-Hartman
0d21cf1656 Merge 4.9.33 into android-4.9
Changes in 4.9.33
	PCI/PM: Add needs_resume flag to avoid suspend complete optimization
	drm/i915: Prevent the system suspend complete optimization
	partitions/msdos: FreeBSD UFS2 file systems are not recognized
	netfilter: nf_conntrack_sip: fix wrong memory initialisation
	ibmvnic: Fix endian errors in error reporting output
	ibmvnic: Fix endian error when requesting device capabilities
	net: xilinx_emaclite: fix freezes due to unordered I/O
	net: xilinx_emaclite: fix receive buffer overflow
	tcp: tcp_probe: use spin_lock_bh()
	ipv6: Handle IPv4-mapped src to in6addr_any dst.
	ipv6: Inhibit IPv4-mapped src address on the wire.
	tipc: Fix tipc_sk_reinit race conditions
	gfs2: Use rhashtable walk interface in glock_hash_walk
	NET: Fix /proc/net/arp for AX.25
	ibmvnic: Call napi_disable instead of napi_enable in failure path
	ibmvnic: Initialize completion variables before starting work
	NET: mkiss: Fix panic
	net: hns: Fix the device being used for dma mapping during TX
	sierra_net: Skip validating irrelevant fields for IDLE LSIs
	sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications
	i2c: piix4: Request the SMBUS semaphore inside the mutex
	i2c: piix4: Fix request_region size
	powerpc/powernv: Properly set "host-ipi" on IPIs
	kernel/ucount.c: mark user_header with kmemleak_ignore()
	net: thunderx: Fix PHY autoneg for SGMII QLM mode
	ipv6: addrconf: fix generation of new temporary addresses
	vfio/spapr_tce: Set window when adding additional groups to container
	ipv6: Fix IPv6 packet loss in scenarios involving roaming + snooping switches
	ARM: defconfigs: make NF_CT_PROTO_SCTP and NF_CT_PROTO_UDPLITE built-in
	PM / runtime: Avoid false-positive warnings from might_sleep_if()
	jump label: pass kbuild_cflags when checking for asm goto support
	shmem: fix sleeping from atomic context
	kasan: respect /proc/sys/kernel/traceoff_on_warning
	log2: make order_base_2() behave correctly on const input value zero
	ethtool: do not vzalloc(0) on registers dump
	net: phy: Fix lack of reference count on PHY driver
	net: phy: Fix PHY module checks and NULL deref in phy_attach_direct()
	net: fix ndo_features_check/ndo_fix_features comment ordering
	fscache: Fix dead object requeue
	fscache: Clear outstanding writes when disabling a cookie
	FS-Cache: Initialise stores_lock in netfs cookie
	ipv6: fix flow labels when the traffic class is non-0
	drm/nouveau: prevent userspace from deleting client object
	drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers
	net/mlx4_core: Avoid command timeouts during VF driver device shutdown
	gianfar: synchronize DMA API usage by free_skb_rx_queue w/ gfar_new_page
	pinctrl: baytrail: Rectify debounce support (part 2)
	cec: fix wrong last_la determination
	drm: prevent double-(un)registration for connectors
	drm: Don't race connector registration
	pinctrl: berlin-bg4ct: fix the value for "sd1a" of pin SCRD0_CRD_PRES
	net: adaptec: starfire: add checks for dma mapping errors
	drm/i915: Check for NULL i915_vma in intel_unpin_fb_obj()
	net/mlx5: E-Switch, Err when retrieving steering name-space fails
	net/mlx5: Return EOPNOTSUPP when failing to get steering name-space
	parisc, parport_gsc: Fixes for printk continuation lines
	net: phy: micrel: add support for KSZ8795
	gtp: add genl family modules alias
	drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE
	drm/nouveau: Rename acpi_work to hpd_work
	drm/nouveau: Handle fbcon suspend/resume in seperate worker
	drm/nouveau: Don't enabling polling twice on runtime resume
	drm/nouveau: Fix drm poll_helper handling
	drm/ast: Fixed system hanged if disable P2A
	ravb: unmap descriptors when freeing rings
	nfs: Fix "Don't increment lock sequence ID after NFS4ERR_MOVED"
	nvmet-rdma: Fix missing dma sync to nvme data structures
	r8152: avoid start_xmit to call napi_schedule during autosuspend
	r8152: check rx after napi is enabled
	r8152: re-schedule napi for tx
	r8152: fix rtl8152_post_reset function
	r8152: avoid start_xmit to schedule napi when napi is disabled
	net-next: ethernet: mediatek: change the compatible string
	bnxt_en: Fix bnxt_reset() in the slow path task.
	bnxt_en: Enhance autoneg support.
	bnxt_en: Fix RTNL lock usage on bnxt_update_link().
	bnxt_en: Fix RTNL lock usage on bnxt_get_port_module_status().
	sctp: sctp gso should set feature with NETIF_F_SG when calling skb_segment
	sctp: sctp_addr_id2transport should verify the addr before looking up assoc
	usb: musb: Fix external abort on non-linefetch for musb_irq_work()
	mn10300: fix build error of missing fpu_save()
	romfs: use different way to generate fsid for BLOCK or MTD
	frv: add atomic64_add_unless()
	frv: add missing atomic64 operations
	proc: add a schedule point in proc_pid_readdir()
	userfaultfd: fix SIGBUS resulting from false rwsem wakeups
	kernel/watchdog.c: move hardlockup detector to separate file
	kernel/watchdog.c: move shared definitions to nmi.h
	kernel/watchdog: prevent false hardlockup on overloaded system
	vhost/vsock: handle vhost_vq_init_access() error
	ARC: smp-boot: Decouple Non masters waiting API from jump to entry point
	ARCv2: smp-boot: wake_flag polling by non-Masters needs to be uncached
	tipc: ignore requests when the connection state is not CONNECTED
	tipc: fix connection refcount error
	tipc: add subscription refcount to avoid invalid delete
	tipc: fix nametbl_lock soft lockup at node/link events
	netfilter: nf_tables: fix set->nelems counting with no NLM_F_EXCL
	netfilter: nft_log: restrict the log prefix length to 127
	RDMA/qedr: Dispatch port active event from qedr_add
	RDMA/qedr: Fix and simplify memory leak in PD alloc
	RDMA/qedr: Don't reset QP when queues aren't flushed
	RDMA/qedr: Don't spam dmesg if QP is in error state
	RDMA/qedr: Return max inline data in QP query result
	xtensa: don't use linux IRQ #0
	s390/kvm: do not rely on the ILC on kvm host protection fauls
	drm/i915: Workaround VLV/CHV DSI scanline counter hardware fail
	drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2.
	sparc64: make string buffers large enough
	Linux 4.9.33

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-06-27 10:43:04 +02:00
Daniel Vetter
326fdffd70 drm: Don't race connector registration
[ Upstream commit e6e7b48b295afa5a5ab440de0a94d9ad8b3ce2d0 ]

I was under the misconception that the sysfs dev stuff can be fully
set up, and then registered all in one step with device_add. That's
true for properties and property groups, but not for parents and child
devices. Those must be fully registered before you can register a
child.

Add a bit of tracking to make sure that asynchronous mst connector
hotplugging gets this right. For consistency we rely upon the implicit
barriers of the connector->mutex, which is taken anyway, to ensure
that at least either the connector or device registration call will
work out.

Mildly tested since I can't reliably reproduce this on my mst box
here.

Reported-by: Dave Hansen <dave.hansen@intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1484237756-2720-1-git-send-email-daniel.vetter@ffwll.ch
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-17 06:41:53 +02:00
Daniel Vetter
82b6693bd4 drm: prevent double-(un)registration for connectors
[ Upstream commit e73ab00e9a0f1731f34d0620a9c55f5c30c4ad4e ]

If we're unlucky then the registration from a hotplugged connector
might race with the final registration step on driver load. And since
MST topology discover is asynchronous that's even somewhat likely.

v2: Also update the kerneldoc for @registered!

v3: Review from Chris:
- Improve kerneldoc for late_register/early_unregister callbacks.
- Use mutex_destroy.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161218133545.2106-1-daniel.vetter@ffwll.ch
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-17 06:41:53 +02:00
Kyle Yan
d523ad4fa3 Merge remote-tracking branch '4.9/tmp-951d823' into msm-4.9
* 4.9/tmp-951d823:
  Linux 4.9.30
  drm/i915/gvt: Disable access to stolen memory as a guest
  drivers: char: mem: Check for address space wraparound with mmap()
  nfsd: encoders mustn't use unitialized values in error cases
  nfsd: fix undefined behavior in nfsd4_layout_verify
  NFS: Use GFP_NOIO for two allocations in writeback
  NFS: Fix use after free in write error path
  NFSv4: Fix a hang in OPEN related to server reboot
  drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2
  mtd: nand: add ooblayout for old hamming layout
  mtd: nand: omap2: Fix partition creation via cmdline mtdparts
  mtd: nand: orion: fix clk handling
  PCI: Freeze PME scan before suspending devices
  PCI: Only allow WC mmap on prefetchable resources
  PCI: Fix another sanity check bug in /proc/pci mmap
  PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
  PCI: hv: Specify CPU_AFFINITY_ALL for MSI affinity when >= 32 CPUs
  PCI: hv: Allocate interrupt descriptors with GFP_ATOMIC
  tracing/kprobes: Enforce kprobes teardown after testing
  um: Fix to call read_initrd after init_bootmem
  osf_wait4(): fix infoleak
  MIPS: Loongson-3: Select MIPS_L1_CACHE_SHIFT_6
  nvme: unmap CMB and remove sysfs file in reset path
  genirq: Fix chained interrupt data ordering
  uwb: fix device quirk on big-endian hosts
  stackprotector: Increase the per-task stack canary's random range from 32 bits to 64 bits on 64-bit platforms
  metag/uaccess: Check access_ok in strncpy_from_user
  metag/uaccess: Fix access_ok()
  iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings
  staging: rtl8192e: GetTs Fix invalid TID 7 warning.
  staging: rtl8192e: rtl92e_get_eeprom_size Fix read size of EPROM_CMD.
  staging: rtl8192e: fix 2 byte alignment of register BSSIDR.
  staging: rtl8192e: rtl92e_fill_tx_desc fix write to mapped out memory.
  arm64: documentation: document tagged pointer stack constraints
  arm64: uaccess: ensure extension of access_ok() addr
  arm64: armv8_deprecated: ensure extension of addr
  arm64: ensure extension of smp_store_release value
  arm64: xchg: hazard against entire exchange variable
  arm64: dts: hi6220: Reset the mmc hosts
  ARM: dts: imx6sx-sdb: Remove OPP override
  ARM: dts: at91: sama5d3_xplained: not all ADC channels are available
  ARM: dts: at91: sama5d3_xplained: fix ADC vref
  ARM: 8670/1: V7M: Do not corrupt vector table around v7m_invalidate_l1 call
  ARM: 8662/1: module: split core and init PLT sections
  KVM: arm: plug potential guest hardware debug leakage
  arm: KVM: Do not use stack-protector to compile HYP code
  arm64: KVM: Do not use stack-protector to compile EL2 code
  powerpc/tm: Fix FP and VMX register corruption
  powerpc/64e: Fix hang when debugging programs with relocated kernel
  powerpc/iommu: Do not call PageTransHuge() on tail pages
  powerpc/pseries: Fix of_node_put() underflow during DLPAR remove
  powerpc/book3s/mce: Move add_taint() later in virtual mode
  powerpc/eeh: Avoid use after free in eeh_handle_special_event()
  powerpc/mm: Ensure IRQs are off in switch_mm()
  cx231xx-cards: fix NULL-deref at probe
  cx231xx-audio: fix NULL-deref at probe
  cx231xx-audio: fix init error path
  dw2102: limit messages to buffer size
  digitv: limit messages to buffer size
  dvb-frontends/cxd2841er: define symbol_rate_min/max in T/C fe-ops
  zr364xx: enforce minimum size when reading header
  dib0700: fix NULL-deref at probe
  s5p-mfc: Fix unbalanced call to clock management
  gspca: konica: add missing endpoint sanity check
  s5p-mfc: Fix race between interrupt routine and device functions
  iio: hid-sensor: Store restore poll and hysteresis on S3
  iio: proximity: as3935: fix as3935_write
  ipx: call ipxitf_put() in ioctl error path
  USB: hub: fix non-SS hub-descriptor handling
  USB: hub: fix SS hub-descriptor handling
  USB: serial: io_ti: fix div-by-zero in set_termios
  USB: serial: mct_u232: fix big-endian baud-rate handling
  USB: serial: qcserial: add more Lenovo EM74xx device IDs
  usb: serial: option: add Telit ME910 support
  USB: iowarrior: fix info ioctl on big-endian hosts
  usb: musb: Fix trying to suspend while active for OTG configurations
  usb: musb: tusb6010_omap: Do not reset the other direction's packet size
  usb: dwc3: gadget: Prevent losing events in event cache
  dvb-usb-dibusb-mc-common: Add MODULE_LICENSE
  ttusb2: limit messages to buffer size
  mceusb: fix NULL-deref at probe
  usbvision: fix NULL-deref at probe
  net: irda: irda-usb: fix firmware name on big-endian hosts
  usb: host: xhci-mem: allocate zeroed Scratchpad Buffer
  xhci: apply PME_STUCK_QUIRK and MISSING_CAS quirk for Denverton
  usb: host: xhci-plat: propagate return value of platform_get_irq()
  xhci: remove GFP_DMA flag from allocation
  libnvdimm: fix clear length of nvdimm_forget_poison()
  fscrypt: avoid collisions when presenting long encrypted filenames
  f2fs: check entire encrypted bigname when finding a dentry
  USB: chaoskey: fix Alea quirk on big-endian hosts
  USB: serial: ftdi_sio: add Olimex ARM-USB-TINY(H) PIDs
  USB: serial: ftdi_sio: fix setting latency for unprivileged users
  pid_ns: Fix race between setns'ed fork() and zap_pid_ns_processes()
  pid_ns: Sleep in TASK_INTERRUPTIBLE in zap_pid_ns_processes
  IB/hfi1: Fix a subcontext memory leak
  IB/hfi1: Return an error on memory allocation failure
  IIO: bmp280-core.c: fix error in humidity calculation
  iio: dac: ad7303: fix channel description
  ibmvscsis: Do not send aborted task response
  of: fdt: add missing allocation-failure check
  of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes()
  of: fix sparse warning in of_pci_range_parser_one
  proc: Fix unbalanced hard link numbers
  cxl: Route eeh events to all drivers in cxl_pci_error_detected()
  cxl: Force context lock during EEH flow
  ohci-pci: add qemu quirk
  cdc-acm: fix possible invalid access when processing notification
  gpio: omap: return error if requested debounce time is not possible
  drm/nouveau/tmr: handle races with hw when updating the next alarm time
  drm/nouveau/tmr: avoid processing completed alarms when adding a new one
  drm/nouveau/tmr: fix corruption of the pending list when rescheduling an alarm
  drm/nouveau/tmr: ack interrupt before processing alarms
  drm/nouveau/therm: remove ineffective workarounds for alarm bugs
  drm/amdgpu: Add missing lb_vblank_lead_lines setup to DCE-6 path.
  drm/amdgpu: Avoid overflows/divide-by-zero in latency_watermark calculations.
  drm/amdgpu: Make display watermark calculations more accurate
  ath9k_htc: fix NULL-deref at probe
  ath9k_htc: Add support of AirTies 1eda:2315 AR9271 device
  s390/cputime: fix incorrect system time
  s390/kdump: Add final note
  regulator: tps65023: Fix inverted core enable logic.
  regulator: rk808: Fix RK818 LDO2
  x86: fix 32-bit case of __get_user_asm_u64()
  KVM: X86: Fix read out-of-bounds vulnerability in kvm pio emulation
  KVM: x86: Fix potential preemption when get the current kvmclock timestamp
  KVM: x86: Fix load damaged SSEx MXCSR register
  ima: accept previously set IMA_NEW_FILE
  mwifiex: pcie: fix cmd_buf use-after-free in remove/reset
  mwifiex: MAC randomization should not be persistent
  rtlwifi: rtl8821ae: setup 8812ae RFE according to device type
  md: MD_CLOSING needs to be cleared after called md_set_readonly or do_md_stop
  md: update slab_cache before releasing new stripes when stripes resizing
  dm space map disk: fix some book keeping in the disk space map
  dm thin metadata: call precommit before saving the roots
  dm bufio: make the parameter "retain_bytes" unsigned long
  dm cache metadata: fail operations if fail_io mode has been established
  dm mpath: split and rename activate_path() to prepare for its expanded use
  dm bufio: check new buffer allocation watermark every 30 seconds
  dm bufio: avoid a possible ABBA deadlock
  dm raid: select the Kconfig option CONFIG_MD_RAID0
  dm btree: fix for dm_btree_find_lowest_key()
  infiniband: call ipv6 route lookup via the stub interface
  mlx5: Fix mlx5_ib_map_mr_sg mr length
  ASoC: cs4271: configure reset GPIO as output
  tpm_crb: check for bad response size
  tpm: add sleep only for retry in i2c_nuvoton_write_status()
  tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver
  tpm_tis_spi: Add small delay after last transfer
  tpm_tis_spi: Remove limitation of transfers to MAX_SPI_FRAMESIZE bytes
  tpm_tis_spi: Check correct byte for wait state indicator
  tpm_tis_spi: Abort transfer when too many wait states are signaled
  tpm_tis_spi: Use single function to transfer data
  fanotify: don't expose EOPENSTALE to userspace
  ARM: tegra: paz00: Mark panel regulator as enabled on boot
  ALSA: hda: Fix cpu lockup when stopping the cmd dmas
  tpm_tis_core: Choose appropriate timeout for reading burstcount
  USB: core: replace %p with %pK
  char: lp: fix possible integer overflow in lp_setup()
  watchdog: pcwd_usb: fix NULL-deref at probe
  USB: ene_usb6250: fix DMA to the stack
  usb: misc: legousbtower: Fix memory leak
  usb: misc: legousbtower: Fix buffers on stack
  UPSTREAM: drm/fb_cma_helper: Add missing forward declaration
  ANDROID: uid_sys_stats: defer io stats calulation for dead tasks
  BACKPORT: drm/fence: fix memory overwrite when setting out_fence fd
  BACKPORT: drm/fence: add drm_crtc_create_fence()
  UPSTREAM: drm/fences: add DOC: for explicit fencing
  UPSTREAM: drm/atomic: Fix double free in drm_atomic_state_default_clear
  BACKPORT: drm/fence: add out-fences support
  BACKPORT: drm/fence: add fence timeline to drm_crtc
  BACKPORT: drm/fence: add in-fences support
  BACKPORT: dma-buf: Use fence_get_rcu_safe() for retrieving the exclusive fence
  BACKPORT: drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper
  BACKPORT: drm/atomic: add drm_atomic_set_fence_for_plane()
  UPSTREAM: dma-buf: Update kerneldoc for sync_file_create
  UPSTREAM: Revert "dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)"
  UPSTREAM: reservation: revert "wait only with non-zero timeout specified (v3)" v2
  BACKPORT: dma-buf/fence: revert "don't wait when specified timeout is zero" (v2)
  UPSTREAM: dma-buf/sw_sync: put fence reference from the fence creation
  UPSTREAM: dma-buf/fence: add an lockdep_assert_held()
  UPSTREAM: dma-buf/sync_file: hold reference to fence when creating sync_file
  UPSTREAM: drm/fence: release fence reference when canceling event
  UPSTREAM: dma-buf: Restart reservation_object_test_signaled_rcu() after writes
  UPSTREAM: dma-buf: Restart reservation_object_wait_timeout_rcu() after writes
  UPSTREAM: dma-buf: Restart reservation_object_get_fences_rcu() after writes
  UPSTREAM: dma-buf: Introduce fence_get_rcu_safe()
  ANDROID: sdcardfs: Check for NULL in revalidate
  ANDROID: Add CGROUP_BPF to android base config
  BACKPORT: UPSTREAM: bpf: pass sk to helper functions
  BACKPORT: UPSTREAM: Add a eBPF helper function to retrieve socket uid
  BACKPORT: UPSTREAM: Add a helper function to get socket cookie in eBPF
  ANDROID: Fix missing uapi headers
  UPSTREAM: cgroup: Fix CGROUP_BPF config
  UPSTREAM: samples: bpf: add userspace example for attaching eBPF programs to cgroups
  UPSTREAM: net: ipv4, ipv6: run cgroup eBPF egress programs
  UPSTREAM: net: filter: run cgroup eBPF ingress programs
  UPSTREAM: bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands
  UPSTREAM: cgroup: add support for eBPF programs
  UPSTREAM: bpf: add new prog type for cgroup socket filtering

Change-Id: Ic92b4df2a2fd08d1ec4bbcf6a5d6e100acfa5b61
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-05-26 15:03:31 -07:00
Marek Vasut
4b593e6071 UPSTREAM: drm/fb_cma_helper: Add missing forward declaration
Add missing forward declaration for struct drm_plane and drm_plane_state,
which causes the following warning in the VC4 driver (can be replicated
by building using bcm2835_defconfig):

In file included from drivers/gpu/drm/vc4/vc4_drv.c:18:0:
include/drm/drm_fb_cma_helper.h:45:13: warning: ‘struct drm_plane_state’ declared inside parameter list will not be visible outside of this definition or declaration
      struct drm_plane_state *state);
             ^~~~~~~~~~~~~~~
include/drm/drm_fb_cma_helper.h:44:34: warning: ‘struct drm_plane’ declared inside parameter list will not be visible outside of this definition or declaration
 int drm_fb_cma_prepare_fb(struct drm_plane *plane,

Change-Id: Ieffc4ce7b13044c323ef8ee0af683c46813eb34a
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161115105529.3227-1-marex@denx.de
(cherry picked from commit 196594efc2b9)
Signed-off-by: Marissa Wall <marissaw@google.com>
2017-05-24 13:53:59 -07:00
Padmanabhan Komanduru
bb107cf5f1 drm: edid: add support for parsing additional EDID blocks
Currently the DRM upstream EDID parser doesn't have support to
parse all EDID blocks such as extension tag blocks.

Add support for parsing these blocks and extract necessary info.

Change-Id: Iae92de79960f6f0e73a8e2ff7944c1bf101d90a6
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-05-24 02:49:15 -07:00
Padmanabhan Komanduru
cb3b9c0dd9 drm: edid: HDMI 2.0 HF-VSDB block parsing
Adds parsing for HDMI 2.0 'HDMI Forum Vendor
Specific Data Block'. This block is present in
some HDMI 2.0 EDID's and gives information about
scrambling support, SCDC, 3D Views, and others.

Parsed parameters are stored in drm_connector
structure.

Change-Id: I018cfefea2fd3827d5f83c8e5717ebd95e497519
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Patch-mainline: dri-devel @ 10 Aug 2016 16:29
Signed-off-by: Jin Li <jinl@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-05-24 02:48:20 -07:00
Gustavo Padovan
d6eefcb2d9 BACKPORT: drm/fence: fix memory overwrite when setting out_fence fd
Currently if the userspace declares a int variable to store the out_fence
fd and pass it to OUT_FENCE_PTR the kernel will overwrite the 32 bits
above the int variable on 64 bits systems.

Fix this by making the internal storage of out_fence in the kernel a s32
pointer.

Reported-by: Chad Versace <chadversary@chromium.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Fixes: beaf5af48034 ("drm/fence: add out-fences support")
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Rafael Antognolli <rafael.antognolli@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-and-Tested-by: Chad Versace <chadversary@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1484317329-9293-1-git-send-email-gustavo@padovan.org
(cherry picked from commit 7e9081c5aac73b8a0bc22e0b3e7a12c3e9cf5256)
Signed-off-by: Marissa Wall <marissaw@google.com>

Change-Id: I67a3d3c27c46d454444c6f195407d6aad59f2343
2017-05-23 15:47:18 -07:00
Gustavo Padovan
710c1edc0e BACKPORT: drm/fence: add out-fences support
Support DRM out-fences by creating a sync_file with a fence for each CRTC
that sets the OUT_FENCE_PTR property.

We use the out_fence pointer received in the OUT_FENCE_PTR prop to send
the sync_file fd back to userspace.

The sync_file and fd are allocated/created before commit, but the
fd_install operation only happens after we know that commit succeed.

v2: Comment by Rob Clark:
	- Squash commit that adds DRM_MODE_ATOMIC_OUT_FENCE flag here.

    Comment by Daniel Vetter:
	- Add clean up code for out_fences

v3: Comments by Daniel Vetter:
	- create DRM_MODE_ATOMIC_EVENT_MASK
	- userspace should fill out_fences_ptr with the crtc_ids for which
	it wants fences back.

v4: Create OUT_FENCE_PTR properties and remove old approach.

v5: Comments by Brian Starkey:
	- Remove extra fence_get() in atomic_ioctl()
	- Check ret before iterating on the crtc_state
	- check ret before fd_install
	- set fence_state to NULL at the beginning
	- check fence_state->out_fence_ptr before put_user()
	- change order of fput() and put_unused_fd() on failure

     - Add access_ok() check to the out_fence_ptr received
     - Rebase after fence -> dma_fence rename [removed in backport
       to Android common kernel 4.9]
     - Store out_fence_ptr in the drm_atomic_state
     - Split crtc_setup_out_fence()
     - return -1 as out_fence with TEST_ONLY flag

v6: Comments by Daniel Vetter
	- Add prepare/unprepare_crtc_signaling()
	- move struct drm_out_fence_state to drm_atomic.c
	- mark get_crtc_fence() as static

    Comments by Brian Starkey
	- proper set fence_ptr fence_state array
	- isolate fence_idx increment

    - improve error handling

v7: Comments by Daniel Vetter
	- remove prefix from internal functions
	- make out_fence_ptr an s64 pointer
	- degrade DRM_INFO to DRM_DEBUG_ATOMIC when put_user fail
	- fix doc issues
	- filter out OUT_FENCE_PTR == NULL and do not fail in this case
	- add complete_crtc_signalling()
	- krealloc fence_state on demand

    Comment by Brian Starkey
	- remove unused crtc_state arg from get_out_fence()

v8: Comment by Brian Starkey
	- cancel events before check for !fence_state
	- convert a few lefovers u64 types for out_fence_ptr
	- fix memleak by assign fence_state earlier after realloc
	- proper accout num_fences in case of error

v9: Comment by Brian Starkey
	- memset last position of fence_state after krealloc
    Comments by Sean Paul
	- pass install_fds in complete_crtc_signaling() instead of ret

     - put_user(-1, fence_ptr) when decoding props

v10: Comment by Brian Starkey
	- remove unneeded num_fences increment on error path
	- kfree fence_state after installing fences fd

v11: rebase against latest drm-misc

v12: rebase again against latest drm-misc

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Brian Starkey <brian.starkey@arm.com> (v10)
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Robert Foss <robert.foss@collabora.com> (v10)
[danvet: Appease checkpatch.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479301221-13056-1-git-send-email-gustavo@padovan.org
(cherry picked from commit beaf5af48034c9e2ebb8b2b1fb12dc4d8aeba99e)
Signed-off-by: Marissa Wall <marissaw@google.com>

Change-Id: I5fed59f7358aaf3f3acd7a4ca9c85091f23cdbf5
2017-05-23 15:47:18 -07:00
Gustavo Padovan
2a38015dd3 BACKPORT: drm/fence: add fence timeline to drm_crtc
Create one timeline context for each CRTC to be able to handle out-fences
and signal them. It adds a few members to struct drm_crtc: fence_context,
where we store the context we get from fence_context_alloc(), the
fence seqno and the fence lock, that we pass in fence_init() to be
used by the fence.

v2: Comment by Daniel Stone:
	- add BUG_ON() to fence_to_crtc() macro

v3: Comment by Ville Syrjälä
	- Use more meaningful name as crtc timeline name

v4: Comments by Brian Starkey
	- Use even more meaninful name for the crtc timeline
	- add doc for timeline_name
    Comment by Daniel Vetter
	- use in-line style for comments

	- rebase after fence -> dma_fence rename [removed in
	  backport to Android common kernel 4.9]

v5: Comment by Daniel Vetter
	- Add doc for drm_crtc_fence_ops

v6: Comment by Chris Wilson
	- Move fence_to_crtc to drm_crtc.c
	- Move export of drm_crtc_fence_ops to drm_crtc_internal.h

    - rebase against latest drm-misc

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v5)
Reviewed-by: Sean Paul <seanpaul@chromium.org> (v5)
Tested-by: Robert Foss <robert.foss@collabora.com> (v5)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479220628-10204-1-git-send-email-gustavo@padovan.org
(cherry picked from commit 6d6003c4b613c93973e4e870d83f4bed2ad9ac34)
Signed-off-by: Marissa Wall <marissaw@google.com>

Change-Id: Id1722e5611757509ec311b56c70fa985a2d5035a
2017-05-23 15:47:18 -07:00
Gustavo Padovan
96e02f4de5 BACKPORT: drm/fence: add in-fences support
There is now a new property called IN_FENCE_FD attached to every plane
state that receives sync_file fds from userspace via the atomic commit
IOCTL.

The fd is then translated to a fence (that may be a fence_array
subclass or just a normal fence) and then used by DRM to fence_wait() for
all fences in the sync_file to signal. So it only commits when all
framebuffers are ready to scanout.

v2: Comments by Daniel Vetter:
	- remove set state->fence = NULL in destroy phase
	- accept fence -1 as valid and just return 0
	- do not call fence_get() - sync_file_fences_get() already calls it
	- fence_put() if state->fence is already set, in case userspace
	set the property more than once.

v3: WARN_ON if fence is set but state has no FB

v4: Comment from Maarten Lankhorst
	- allow set fence with no related fb

v5: rename FENCE_FD to IN_FENCE_FD

v6: Comments by Daniel Vetter:
	- rename plane_state->in_fence back to "fence"
	- re-introduce WARN_ON if fence set but no fb

     - rebase after fence -> dma_fence rename

v7: Comments by Brian Starkey
	- set state->fence to NULL when duplicating the state
	- fail if IN_FENCE_FD was already set

v8: rebase against latest drm-misc

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Robert Foss <robert.foss@collabora.com>
[danvet: Rebase onto extracted drm_mode_config.[hc].]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 9626014258a5957ff120b3987ee72decdbe0c798)
Signed-off-by: Marissa Wall <marissaw@google.com>

Change-Id: I1a4e7395bc7709b457544c5086611122d4602a61
2017-05-23 15:47:18 -07:00
Marek Vasut
cdf014c6a1 BACKPORT: drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper
Add new drm_fb_cma_prepare_fb() helper function extracted from the
imx-drm driver. This function checks if the plane has DMABUF attached
to it, extracts the exclusive fence from it and attaches it to the
plane state for the atomic helper to wait on it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114100732.3446-1-marex@denx.de
(cherry picked from commit 14d7f96f90fb65c2ca0e0ac7df237e06ff001c29)
Signed-off-by: Marissa Wall <marissaw@google.com>

Change-Id: I3b7adb3c3217eed72e45c53c5c749f6218611df0
2017-05-23 15:47:18 -07:00