OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
6 years agoMerge "dev_freq: devfreq_spdm: add null terminator to prevent OOB access"
Linux Build Service Account [Wed, 24 Jan 2018 17:12:36 +0000 (09:12 -0800)]
Merge "dev_freq: devfreq_spdm: add null terminator to prevent OOB access"

6 years agoMerge "drm/edid: CEA mode 64 1080p100 vsync pulse width incorrect"
Linux Build Service Account [Tue, 23 Jan 2018 06:12:35 +0000 (22:12 -0800)]
Merge "drm/edid: CEA mode 64 1080p100 vsync pulse width incorrect"

6 years agoMerge "drm/edid: complete CEA modedb(VIC 1-107)"
Linux Build Service Account [Tue, 23 Jan 2018 06:12:34 +0000 (22:12 -0800)]
Merge "drm/edid: complete CEA modedb(VIC 1-107)"

6 years agoMerge "clocksource: arch_timer: Disable user access to the physical counter"
Linux Build Service Account [Tue, 23 Jan 2018 06:12:32 +0000 (22:12 -0800)]
Merge "clocksource: arch_timer: Disable user access to the physical counter"

6 years agoMerge "msm: vidc: set multistream mode for worst case scratch buffer requirement"
Linux Build Service Account [Tue, 23 Jan 2018 06:12:31 +0000 (22:12 -0800)]
Merge "msm: vidc: set multistream mode for worst case scratch buffer requirement"

6 years agoMerge "dwc3: debugfs: Add check for length before copy data from userspace"
Linux Build Service Account [Tue, 23 Jan 2018 06:12:30 +0000 (22:12 -0800)]
Merge "dwc3: debugfs: Add check for length before copy data from userspace"

6 years agoMerge "msm: ipa: Return error -ENODEV for set data quota failure"
Linux Build Service Account [Sat, 20 Jan 2018 14:06:05 +0000 (06:06 -0800)]
Merge "msm: ipa: Return error -ENODEV for set data quota failure"

6 years agomsm: ipa: Return error -ENODEV for set data quota failure
Mohammed Javid [Wed, 17 Jan 2018 07:49:15 +0000 (13:19 +0530)]
msm: ipa: Return error -ENODEV for set data quota failure

If set data quota fails due to invalid interface
name, return -ENODEV error.

Change-Id: I45f4082cb8026d3757bd4df237e34df14750ea29
Acked-by: Pooja Kumari <kumarip@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
6 years agoMerge "power: qpnp-fg-gen3: add support for configuring cutoff current"
Linux Build Service Account [Sat, 20 Jan 2018 04:10:35 +0000 (20:10 -0800)]
Merge "power: qpnp-fg-gen3: add support for configuring cutoff current"

6 years agoMerge "leds: qpnp-flash-v2: Update IRES for active LEDs"
Linux Build Service Account [Sat, 20 Jan 2018 04:10:34 +0000 (20:10 -0800)]
Merge "leds: qpnp-flash-v2: Update IRES for active LEDs"

6 years agoMerge "soc: qcom: hab: add compat_ioctl support"
Linux Build Service Account [Fri, 19 Jan 2018 17:30:33 +0000 (09:30 -0800)]
Merge "soc: qcom: hab: add compat_ioctl support"

6 years agoMerge "soc: qcom: hab: add dts parsing into hab driver"
Linux Build Service Account [Fri, 19 Jan 2018 17:30:33 +0000 (09:30 -0800)]
Merge "soc: qcom: hab: add dts parsing into hab driver"

6 years agoMerge "Merge android-4.4.110 (5cc8c2e) into msm-4.4"
Linux Build Service Account [Fri, 19 Jan 2018 17:30:28 +0000 (09:30 -0800)]
Merge "Merge android-4.4.110 (5cc8c2e) into msm-4.4"

6 years agoMerge "power: smb1351-charger: Disable parallel charging in shutdown path"
Linux Build Service Account [Fri, 19 Jan 2018 17:30:27 +0000 (09:30 -0800)]
Merge "power: smb1351-charger: Disable parallel charging in shutdown path"

6 years agoleds: qpnp-flash-v2: Update IRES for active LEDs
Subbaraman Narayanamurthy [Mon, 15 Jan 2018 20:40:49 +0000 (12:40 -0800)]
leds: qpnp-flash-v2: Update IRES for active LEDs

Currently, whenever the switch LED device is triggered, IRES is
updated based on the LEDs belonging to that switch LED device.
However, this can overwrite IRES configuration if flash and torch
LED devices have different IRES since they share the same id.

Fix this by checking the active LED status which will be updated
based on the brightness level set so that IRES will be updated
for the correct LED (flash/torch) device.

CRs-Fixed: 2173127
Change-Id: Ic3b5db2f56758ccd68fd80139aeb22f31723130e
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
6 years agoMerge "mmc: sdhci: Remove some redundant stack information"
Linux Build Service Account [Thu, 18 Jan 2018 17:36:24 +0000 (09:36 -0800)]
Merge "mmc: sdhci: Remove some redundant stack information"

6 years agoMerge "dwc3-msm: Introduce sysfs param to indicate usb compliance mode"
Linux Build Service Account [Thu, 18 Jan 2018 17:36:23 +0000 (09:36 -0800)]
Merge "dwc3-msm: Introduce sysfs param to indicate usb compliance mode"

6 years agoMerge "defconfig: msm: sdm660: disable memory cgroups"
Linux Build Service Account [Thu, 18 Jan 2018 17:36:22 +0000 (09:36 -0800)]
Merge "defconfig: msm: sdm660: disable memory cgroups"

6 years agoMerge "usb: pd: avoid out-of-bounds access when reading PDOs"
Linux Build Service Account [Thu, 18 Jan 2018 17:36:20 +0000 (09:36 -0800)]
Merge "usb: pd: avoid out-of-bounds access when reading PDOs"

6 years agoMerge "usb: pd: ensure source hard reset is handled timely"
Linux Build Service Account [Thu, 18 Jan 2018 17:36:19 +0000 (09:36 -0800)]
Merge "usb: pd: ensure source hard reset is handled timely"

6 years agoMerge "msm: ipa: Fix to unsigned integer underflow"
Linux Build Service Account [Thu, 18 Jan 2018 17:36:18 +0000 (09:36 -0800)]
Merge "msm: ipa: Fix to unsigned integer underflow"

6 years agosoc: qcom: hab: add compat_ioctl support
Yong Ding [Tue, 16 Jan 2018 07:32:37 +0000 (15:32 +0800)]
soc: qcom: hab: add compat_ioctl support

This is used to allow 32-bit userland programs to make ioctl
calls on 64-bit kernel.

Change-Id: Ie5066a3445c79859fc0b509159b34ff08d36358a
Signed-off-by: Yong Ding <yongding@codeaurora.org>
6 years agosoc: qcom: hab: add dts parsing into hab driver
Yong Ding [Thu, 11 Jan 2018 09:51:45 +0000 (17:51 +0800)]
soc: qcom: hab: add dts parsing into hab driver

HAB driver can parse its relevant entries from device
tree, and get necessary info, like its local vmid,
physical channel groups, and etc.

Change-Id: Iab0501a442bd3c89dd4b348570108dbe5ab0adca
Signed-off-by: Yong Ding <yongding@codeaurora.org>
6 years agoMerge "msm: ais: sensor: actuator: avoid accessing out of bound memory"
Linux Build Service Account [Thu, 18 Jan 2018 08:05:38 +0000 (00:05 -0800)]
Merge "msm: ais: sensor: actuator: avoid accessing out of bound memory"

6 years agoMerge "clk: msm: Add reset support in virtual clock frontend driver"
Linux Build Service Account [Thu, 18 Jan 2018 08:05:37 +0000 (00:05 -0800)]
Merge "clk: msm: Add reset support in virtual clock frontend driver"

6 years agoMerge "ath10k: wakeup device from wow suspend on GTK rekey failure"
Linux Build Service Account [Thu, 18 Jan 2018 08:05:36 +0000 (00:05 -0800)]
Merge "ath10k: wakeup device from wow suspend on GTK rekey failure"

6 years agoMerge android-4.4.110 (5cc8c2e) into msm-4.4
Srinivasarao P [Tue, 9 Jan 2018 11:00:10 +0000 (16:30 +0530)]
Merge android-4.4.110 (5cc8c2e) into msm-4.4

* refs/heads/tmp-5cc8c2e
  Linux 4.4.110
  kaiser: Set _PAGE_NX only if supported
  x86/kasan: Clear kasan_zero_page after TLB flush
  x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap
  x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader
  KPTI: Report when enabled
  KPTI: Rename to PAGE_TABLE_ISOLATION
  x86/kaiser: Move feature detection up
  kaiser: disabled on Xen PV
  x86/kaiser: Reenable PARAVIRT
  x86/paravirt: Dont patch flush_tlb_single
  kaiser: kaiser_flush_tlb_on_return_to_user() check PCID
  kaiser: asm/tlbflush.h handle noPGE at lower level
  kaiser: drop is_atomic arg to kaiser_pagetable_walk()
  kaiser: use ALTERNATIVE instead of x86_cr3_pcid_noflush
  x86/kaiser: Check boottime cmdline params
  x86/kaiser: Rename and simplify X86_FEATURE_KAISER handling
  kaiser: add "nokaiser" boot option, using ALTERNATIVE
  kaiser: fix unlikely error in alloc_ldt_struct()
  kaiser: _pgd_alloc() without __GFP_REPEAT to avoid stalls
  kaiser: paranoid_entry pass cr3 need to paranoid_exit
  kaiser: x86_cr3_pcid_noflush and x86_cr3_pcid_user
  kaiser: PCID 0 for kernel and 128 for user
  kaiser: load_new_mm_cr3() let SWITCH_USER_CR3 flush user
  kaiser: enhanced by kernel and user PCIDs
  kaiser: vmstat show NR_KAISERTABLE as nr_overhead
  kaiser: delete KAISER_REAL_SWITCH option
  kaiser: name that 0x1000 KAISER_SHADOW_PGD_OFFSET
  kaiser: cleanups while trying for gold link
  kaiser: kaiser_remove_mapping() move along the pgd
  kaiser: tidied up kaiser_add/remove_mapping slightly
  kaiser: tidied up asm/kaiser.h somewhat
  kaiser: ENOMEM if kaiser_pagetable_walk() NULL
  kaiser: fix perf crashes
  kaiser: fix regs to do_nmi() ifndef CONFIG_KAISER
  kaiser: KAISER depends on SMP
  kaiser: fix build and FIXME in alloc_ldt_struct()
  kaiser: stack map PAGE_SIZE at THREAD_SIZE-PAGE_SIZE
  kaiser: do not set _PAGE_NX on pgd_none
  kaiser: merged update
  KAISER: Kernel Address Isolation
  x86/boot: Add early cmdline parsing for options with arguments
  ANDROID: sdcardfs: Add default_normal option
  ANDROID: sdcardfs: notify lower file of opens

Conflicts:
kernel/fork.c

Change-Id: I9c8c12e63321d79dc2c89fb470ca8de587366911
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.109 (8cbe01c) into msm-4.4
Srinivasarao P [Tue, 9 Jan 2018 10:42:59 +0000 (16:12 +0530)]
Merge android-4.4.109 (8cbe01c) into msm-4.4

* refs/heads/tmp-8cbe01c
  Linux 4.4.109
  mm/vmstat: Make NR_TLB_REMOTE_FLUSH_RECEIVED available even on UP
  n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD)
  x86/smpboot: Remove stale TLB flush invocations
  nohz: Prevent a timer interrupt storm in tick_nohz_stop_sched_tick()
  usb: xhci: Add XHCI_TRUST_TX_LENGTH for Renesas uPD720201
  USB: Fix off by one in type-specific length check of BOS SSP capability
  usb: add RESET_RESUME for ELSA MicroLink 56K
  usb: Add device quirk for Logitech HD Pro Webcam C925e
  USB: serial: option: adding support for YUGA CLM920-NC5
  USB: serial: option: add support for Telit ME910 PID 0x1101
  USB: serial: qcserial: add Sierra Wireless EM7565
  USB: serial: ftdi_sio: add id for Airbus DS P8GR
  usbip: vhci: stop printing kernel pointer addresses in messages
  usbip: stub: stop printing kernel pointer addresses in messages
  usbip: fix usbip bind writing random string after command in match_busid
  sock: free skb in skb_complete_tx_timestamp on error
  net: phy: micrel: ksz9031: reconfigure autoneg after phy autoneg workaround
  net: Fix double free and memory corruption in get_net_ns_by_id()
  net: bridge: fix early call to br_stp_change_bridge_id and plug newlink leaks
  ipv4: Fix use-after-free when flushing FIB tables
  sctp: Replace use of sockets_allocated with specified macro.
  net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case
  net: ipv4: fix for a race condition in raw_sendmsg
  tg3: Fix rx hang on MTU change with 5717/5719
  tcp md5sig: Use skb's saddr when replying to an incoming segment
  net: reevalulate autoflowlabel setting after sysctl setting
  net: qmi_wwan: add Sierra EM7565 1199:9091
  netlink: Add netns check on taps
  net: igmp: Use correct source address on IGMPv3 reports
  ipv6: mcast: better catch silly mtu values
  ipv4: igmp: guard against silly MTU values
  kbuild: add '-fno-stack-check' to kernel build options
  x86/mm/64: Fix reboot interaction with CR4.PCIDE
  x86/mm: Enable CR4.PCIDE on supported systems
  x86/mm: Add the 'nopcid' boot option to turn off PCID
  x86/mm: Disable PCID on 32-bit kernels
  x86/mm: Remove the UP asm/tlbflush.h code, always use the (formerly) SMP code
  x86/mm: Reimplement flush_tlb_page() using flush_tlb_mm_range()
  x86/mm: Make flush_tlb_mm_range() more predictable
  x86/mm: Remove flush_tlb() and flush_tlb_current_task()
  x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly()
  ALSA: hda - fix headset mic detection issue on a Dell machine
  ALSA: hda: Drop useless WARN_ON()
  ASoC: twl4030: fix child-node lookup
  ASoC: fsl_ssi: AC'97 ops need regmap, clock and cleaning up on failure
  iw_cxgb4: Only validate the MSN for successful completions
  ring-buffer: Mask out the info bits when returning buffer page length
  tracing: Fix crash when it fails to alloc ring buffer
  tracing: Fix possible double free on failure of allocating trace buffer
  tracing: Remove extra zeroing out of the ring buffer page
  net: mvneta: clear interface link status on port disable
  powerpc/perf: Dereference BHRB entries safely
  kvm: x86: fix RSM when PCID is non-zero
  KVM: X86: Fix load RFLAGS w/o the fixed bit
  spi: xilinx: Detect stall with Unknown commands
  parisc: Hide Diva-built-in serial aux and graphics card
  PCI / PM: Force devices to D0 in pci_pm_thaw_noirq()
  ALSA: usb-audio: Fix the missing ctl name suffix at parsing SU
  ALSA: rawmidi: Avoid racy info ioctl via ctl device
  mfd: twl6040: Fix child-node lookup
  mfd: twl4030-audio: Fix sibling-node lookup
  mfd: cros ec: spi: Don't send first message too soon
  crypto: mcryptd - protect the per-CPU queue with a lock
  ACPI: APEI / ERST: Fix missing error handling in erst_reader()

Change-Id: I3823f793c0c85d1639e9be10358cf70cfcd13afc
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.108 (55b3b8c) into msm-4.4
Srinivasarao P [Tue, 9 Jan 2018 10:40:13 +0000 (16:10 +0530)]
Merge android-4.4.108 (55b3b8c) into msm-4.4

* refs/heads/tmp-55b3b8c
  Linux 4.4.108
  alpha: fix build failures
  ALSA: hda - Fix yet another i915 pointer leftover in error path
  ALSA: hda - Degrade i915 binding failure message
  ALSA: hda - Clear the leftover component assignment at snd_hdac_i915_exit()
  Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature"
  MIPS: math-emu: Fix final emulation phase for certain instructions
  thermal: hisilicon: Handle return value of clk_prepare_enable
  cpuidle: fix broadcast control when broadcast can not be entered
  rtc: set the alarm to the next expiring timer
  tcp: fix under-evaluated ssthresh in TCP Vegas
  fm10k: ensure we process SM mbx when processing VF mbx
  scsi: lpfc: PLOGI failures during NPIV testing
  scsi: lpfc: Fix secure firmware updates
  PCI/AER: Report non-fatal errors only to the affected endpoint
  ixgbe: fix use of uninitialized padding
  igb: check memory allocation failure
  PCI: Create SR-IOV virtfn/physfn links before attaching driver
  scsi: mpt3sas: Fix IO error occurs on pulling out a drive from RAID1 volume created on two SATA drive
  scsi: cxgb4i: fix Tx skb leak
  PCI: Avoid bus reset if bridge itself is broken
  net: phy: at803x: Change error to EINVAL for invalid MAC
  rtc: pl031: make interrupt optional
  crypto: crypto4xx - increase context and scatter ring buffer elements
  backlight: pwm_bl: Fix overflow condition
  bnxt_en: Fix NULL pointer dereference in reopen failure path
  cpuidle: powernv: Pass correct drv->cpumask for registration
  ARM: dma-mapping: disallow dma_get_sgtable() for non-kernel managed memory
  netfilter: nfnetlink_queue: fix secctx memory leak
  xhci: plat: Register shutdown for xhci_plat
  isdn: kcapi: avoid uninitialized data
  KVM: pci-assign: do not map smm memory slot pages in vt-d page tables
  ARM: dts: am335x-evmsk: adjust mmc2 param to allow suspend
  netfilter: nf_nat_snmp: Fix panic when snmp_trap_helper fails to register
  netfilter: nfnl_cthelper: fix a race when walk the nf_ct_helper_hash table
  irda: vlsi_ir: fix check for DMA mapping errors
  RDMA/iser: Fix possible mr leak on device removal event
  i40e: Do not enable NAPI on q_vectors that have no rings
  net: Do not allow negative values for busy_read and busy_poll sysctl interfaces
  bna: avoid writing uninitialized data into hw registers
  s390/qeth: no ETH header for outbound AF_IUCV
  r8152: prevent the driver from transmitting packets with carrier off
  HID: xinmo: fix for out of range for THT 2P arcade controller.
  hwmon: (asus_atk0110) fix uninitialized data access
  ARM: dts: ti: fix PCI bus dtc warnings
  KVM: VMX: Fix enable VPID conditions
  KVM: x86: correct async page present tracepoint
  scsi: lpfc: Fix PT2PT PRLI reject
  pinctrl: st: add irq_request/release_resources callbacks
  inet: frag: release spinlock before calling icmp_send()
  netfilter: nfnl_cthelper: Fix memory leak
  netfilter: nfnl_cthelper: fix runtime expectation policy updates
  usb: gadget: udc: remove pointer dereference after free
  usb: gadget: f_uvc: Sanity check wMaxPacketSize for SuperSpeed
  net: qmi_wwan: Add USB IDs for MDM6600 modem on Motorola Droid 4
  bna: integer overflow bug in debugfs
  sch_dsmark: fix invalid skb_cow() usage
  crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex
  r8152: fix the list rx_done may be used without initialization
  cpuidle: Validate cpu_dev in cpuidle_add_sysfs()
  arm: kprobes: Align stack to 8-bytes in test code
  arm: kprobes: Fix the return address of multiple kretprobes
  ALSA: hda - add support for docking station for HP 840 G3
  ALSA: hda - add support for docking station for HP 820 G2
  x86/irq: Do not substract irq_tlb_count from irq_call_count
  sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()
  ARM: Hide finish_arch_post_lock_switch() from modules
  x86/mm, sched/core: Turn off IRQs in switch_mm()
  x86/mm, sched/core: Uninline switch_mm()
  x86/mm: Build arch/x86/mm/tlb.c even on !SMP
  sched/core: Add switch_mm_irqs_off() and use it in the scheduler
  mm/mmu_context, sched/core: Fix mmu_context.h assumption
  mm/rmap: batched invalidations should use existing api
  x86/mm: If INVPCID is available, use it to flush global mappings
  x86/mm: Add a 'noinvpcid' boot option to turn off INVPCID
  x86/mm: Fix INVPCID asm constraint
  x86/mm: Add INVPCID helpers
  cxl: Check if vphb exists before iterating over AFU devices
  arm64: Initialise high_memory global variable earlier
  ANDROID: binder: Remove obsolete proc waitqueue.

Change-Id: Ie954ccd1dbd861672345bb0ee879273be4d0a441
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.107 (79f138a) into msm-4.4
Srinivasarao P [Tue, 9 Jan 2018 10:35:02 +0000 (16:05 +0530)]
Merge android-4.4.107 (79f138a) into msm-4.4

* refs/heads/tmp-79f138a
  Linux 4.4.107
  ath9k: fix tx99 potential info leak
  IB/ipoib: Grab rtnl lock on heavy flush when calling ndo_open/stop
  RDMA/cma: Avoid triggering undefined behavior
  macvlan: Only deliver one copy of the frame to the macvlan interface
  udf: Avoid overflow when session starts at large offset
  scsi: bfa: integer overflow in debugfs
  scsi: sd: change allow_restart to bool in sysfs interface
  scsi: sd: change manage_start_stop to bool in sysfs interface
  vt6655: Fix a possible sleep-in-atomic bug in vt6655_suspend
  scsi: scsi_devinfo: Add REPORTLUN2 to EMC SYMMETRIX blacklist entry
  raid5: Set R5_Expanded on parity devices as well as data.
  pinctrl: adi2: Fix Kconfig build problem
  usb: musb: da8xx: fix babble condition handling
  tty fix oops when rmmod 8250
  powerpc/perf/hv-24x7: Fix incorrect comparison in memord
  scsi: hpsa: destroy sas transport properties before scsi_host
  scsi: hpsa: cleanup sas_phy structures in sysfs when unloading
  PCI: Detach driver before procfs & sysfs teardown on device remove
  xfs: fix incorrect extent state in xfs_bmap_add_extent_unwritten_real
  xfs: fix log block underflow during recovery cycle verification
  l2tp: cleanup l2tp_tunnel_delete calls
  bcache: fix wrong cache_misses statistics
  bcache: explicitly destroy mutex while exiting
  GFS2: Take inode off order_write list when setting jdata flag
  thermal/drivers/step_wise: Fix temperature regulation misbehavior
  ppp: Destroy the mutex when cleanup
  clk: tegra: Fix cclk_lp divisor register
  clk: imx6: refine hdmi_isfr's parent to make HDMI work on i.MX6 SoCs w/o VPU
  clk: mediatek: add the option for determining PLL source clock
  mm: Handle 0 flags in _calc_vm_trans() macro
  crypto: tcrypt - fix buffer lengths in test_aead_speed()
  arm-ccn: perf: Prevent module unload while PMU is in use
  target/file: Do not return error for UNMAP if length is zero
  target:fix condition return in core_pr_dump_initiator_port()
  iscsi-target: fix memory leak in lio_target_tiqn_addtpg()
  target/iscsi: Fix a race condition in iscsit_add_reject_from_cmd()
  powerpc/ipic: Fix status get and status clear
  powerpc/opal: Fix EBUSY bug in acquiring tokens
  netfilter: ipvs: Fix inappropriate output of procfs
  powerpc/powernv/cpufreq: Fix the frequency read by /proc/cpuinfo
  PCI/PME: Handle invalid data when reading Root Status
  dmaengine: ti-dma-crossbar: Correct am335x/am43xx mux value type
  rtc: pcf8563: fix output clock rate
  video: fbdev: au1200fb: Return an error code if a memory allocation fails
  video: fbdev: au1200fb: Release some resources if a memory allocation fails
  video: udlfb: Fix read EDID timeout
  fbdev: controlfb: Add missing modes to fix out of bounds access
  sfc: don't warn on successful change of MAC
  target: fix race during implicit transition work flushes
  target: fix ALUA transition timeout handling
  target: Use system workqueue for ALUA transitions
  btrfs: add missing memset while reading compressed inline extents
  NFSv4.1 respect server's max size in CREATE_SESSION
  efi/esrt: Cleanup bad memory map log messages
  perf symbols: Fix symbols__fixup_end heuristic for corner cases
  net/mlx4_core: Avoid delays during VF driver device shutdown
  afs: Fix afs_kill_pages()
  afs: Fix page leak in afs_write_begin()
  afs: Populate and use client modification time
  afs: Fix the maths in afs_fs_store_data()
  afs: Prevent callback expiry timer overflow
  afs: Migrate vlocation fields to 64-bit
  afs: Flush outstanding writes when an fd is closed
  afs: Adjust mode bits processing
  afs: Populate group ID from vnode status
  afs: Fix missing put_page()
  drm/radeon: reinstate oland workaround for sclk
  mmc: mediatek: Fixed bug where clock frequency could be set wrong
  sched/deadline: Use deadline instead of period when calculating overflow
  sched/deadline: Throttle a constrained deadline task activated after the deadline
  sched/deadline: Make sure the replenishment timer fires in the next period
  drm/radeon/si: add dpm quirk for Oland
  fjes: Fix wrong netdevice feature flags
  scsi: hpsa: limit outstanding rescans
  scsi: hpsa: update check for logical volume status
  openrisc: fix issue handling 8 byte get_user calls
  intel_th: pci: Add Gemini Lake support
  mlxsw: reg: Fix SPVMLR max record count
  mlxsw: reg: Fix SPVM max record count
  net: Resend IGMP memberships upon peer notification.
  dmaengine: Fix array index out of bounds warning in __get_unmap_pool()
  net: wimax/i2400m: fix NULL-deref at probe
  writeback: fix memory leak in wb_queue_work()
  netfilter: bridge: honor frag_max_size when refragmenting
  drm/omap: fix dmabuf mmap for dma_alloc'ed buffers
  Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list
  NFSD: fix nfsd_reset_versions for NFSv4.
  NFSD: fix nfsd_minorversion(.., NFSD_AVAIL)
  net: bcmgenet: Power up the internal PHY before probing the MII
  net: bcmgenet: power down internal phy if open or resume fails
  net: bcmgenet: reserved phy revisions must be checked first
  net: bcmgenet: correct MIB access of UniMAC RUNT counters
  net: bcmgenet: correct the RBUF_OVFL_CNT and RBUF_ERR_CNT MIB values
  net: initialize msg.msg_flags in recvfrom
  userfaultfd: selftest: vm: allow to build in vm/ directory
  userfaultfd: shmem: __do_fault requires VM_FAULT_NOPAGE
  md-cluster: free md_cluster_info if node leave cluster
  usb: phy: isp1301: Add OF device ID table
  mac80211: Fix addition of mesh configuration element
  KEYS: add missing permission check for request_key() destination
  ext4: fix crash when a directory's i_size is too small
  ext4: fix fdatasync(2) after fallocate(2) operation
  dmaengine: dmatest: move callback wait queue to thread context
  sched/rt: Do not pull from current CPU if only one CPU to pull
  xhci: Don't add a virt_dev to the devs array before it's fully allocated
  Bluetooth: btusb: driver to enable the usb-wakeup feature
  ceph: drop negative child dentries before try pruning inode's alias
  usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer
  USB: core: prevent malicious bNumInterfaces overflow
  USB: uas and storage: Add US_FL_BROKEN_FUA for another JMicron JMS567 ID
  tracing: Allocate mask_str buffer dynamically
  autofs: fix careless error in recent commit
  crypto: salsa20 - fix blkcipher_walk API usage
  crypto: hmac - require that the underlying hash algorithm is unkeyed
  UPSTREAM: arm64: setup: introduce kaslr_offset()
  UPSTREAM: kcov: fix comparison callback signature
  UPSTREAM: kcov: support comparison operands collection
  UPSTREAM: kcov: remove pointless current != NULL check
  UPSTREAM: kcov: support compat processes
  UPSTREAM: kcov: simplify interrupt check
  UPSTREAM: kcov: make kcov work properly with KASLR enabled
  UPSTREAM: kcov: add more missing includes
  UPSTREAM: kcov: add missing #include <linux/sched.h>
  UPSTREAM: kcov: properly check if we are in an interrupt
  UPSTREAM: kcov: don't profile branches in kcov
  UPSTREAM: kcov: don't trace the code coverage code
  BACKPORT: kernel: add kcov code coverage

Conflicts:
Makefile
mm/kasan/Makefile
scripts/Makefile.lib

Change-Id: Ic19953706ea2e700621b0ba94d1c90bbffa4f471
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.106 (2fea039) into msm-4.4
Srinivasarao P [Tue, 9 Jan 2018 10:29:02 +0000 (15:59 +0530)]
Merge android-4.4.106 (2fea039) into msm-4.4

* refs/heads/tmp-2fea039
  Linux 4.4.106
  usb: gadget: ffs: Forbid usb_ep_alloc_request from sleeping
  arm: KVM: Fix VTTBR_BADDR_MASK BUG_ON off-by-one
  Revert "x86/mm/pat: Ensure cpa->pfn only contains page frame numbers"
  Revert "x86/efi: Hoist page table switching code into efi_call_virt()"
  Revert "x86/efi: Build our own page table structures"
  net/packet: fix a race in packet_bind() and packet_notifier()
  packet: fix crash in fanout_demux_rollover()
  sit: update frag_off info
  rds: Fix NULL pointer dereference in __rds_rdma_map
  tipc: fix memory leak in tipc_accept_from_sock()
  more bio_map_user_iov() leak fixes
  s390: always save and restore all registers on context switch
  ipmi: Stop timers before cleaning up the module
  audit: ensure that 'audit=1' actually enables audit for PID 1
  ipvlan: fix ipv6 outbound device
  afs: Connect up the CB.ProbeUuid
  IB/mlx5: Assign send CQ and recv CQ of UMR QP
  IB/mlx4: Increase maximal message size under UD QP
  xfrm: Copy policy family in clone_policy
  jump_label: Invoke jump_label_test() via early_initcall()
  atm: horizon: Fix irq release error
  sctp: use the right sk after waking up from wait_buf sleep
  sctp: do not free asoc when it is already dead in sctp_sendmsg
  sparc64/mm: set fields in deferred pages
  block: wake up all tasks blocked in get_request()
  sunrpc: Fix rpc_task_begin trace point
  NFS: Fix a typo in nfs_rename()
  dynamic-debug-howto: fix optional/omitted ending line number to be LARGE instead of 0
  lib/genalloc.c: make the avail variable an atomic_long_t
  route: update fnhe_expires for redirect when the fnhe exists
  route: also update fnhe_genid when updating a route cache
  mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl()
  kbuild: pkg: use --transform option to prefix paths in tar
  EDAC, i5000, i5400: Fix definition of NRECMEMB register
  EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro
  powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested
  drm/amd/amdgpu: fix console deadlock if late init failed
  axonram: Fix gendisk handling
  netfilter: don't track fragmented packets
  zram: set physical queue limits to avoid array out of bounds accesses
  i2c: riic: fix restart condition
  crypto: s5p-sss - Fix completing crypto request in IRQ handler
  ipv6: reorder icmpv6_init() and ip6_mr_init()
  bnx2x: do not rollback VF MAC/VLAN filters we did not configure
  bnx2x: fix possible overrun of VFPF multicast addresses array
  bnx2x: prevent crash when accessing PTP with interface down
  spi_ks8995: fix "BUG: key accdaa28 not in .data!"
  arm64: KVM: Survive unknown traps from guests
  arm: KVM: Survive unknown traps from guests
  KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset
  irqchip/crossbar: Fix incorrect type of register size
  scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters
  workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq
  libata: drop WARN from protocol error in ata_sff_qc_issue()
  kvm: nVMX: VMCLEAR should not cause the vCPU to shut down
  USB: gadgetfs: Fix a potential memory leak in 'dev_config()'
  usb: gadget: configs: plug memory leak
  HID: chicony: Add support for another ASUS Zen AiO keyboard
  gpio: altera: Use handle_level_irq when configured as a level_high
  ARM: OMAP2+: Release device node after it is no longer needed.
  ARM: OMAP2+: Fix device node reference counts
  module: set __jump_table alignment to 8
  selftest/powerpc: Fix false failures for skipped tests
  x86/hpet: Prevent might sleep splat on resume
  ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure
  vti6: Don't report path MTU below IPV6_MIN_MTU.
  Revert "s390/kbuild: enable modversions for symbols exported from asm"
  Revert "spi: SPI_FSL_DSPI should depend on HAS_DMA"
  Revert "drm/armada: Fix compile fail"
  mm: drop unused pmdp_huge_get_and_clear_notify()
  thp: fix MADV_DONTNEED vs. numa balancing race
  thp: reduce indentation level in change_huge_pmd()
  scsi: storvsc: Workaround for virtual DVD SCSI version
  ARM: avoid faulting on qemu
  ARM: BUG if jumping to usermode address in kernel mode
  arm64: fpsimd: Prevent registers leaking from dead tasks
  KVM: VMX: remove I/O port 0x80 bypass on Intel hosts
  arm64: KVM: fix VTTBR_BADDR_MASK BUG_ON off-by-one
  media: dvb: i2c transfers over usb cannot be done from stack
  drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU
  drm: extra printk() wrapper macros
  kdb: Fix handling of kallsyms_symbol_next() return value
  s390: fix compat system call table
  iommu/vt-d: Fix scatterlist offset handling
  ALSA: usb-audio: Add check return value for usb_string()
  ALSA: usb-audio: Fix out-of-bound error
  ALSA: seq: Remove spurious WARN_ON() at timer check
  ALSA: pcm: prevent UAF in snd_pcm_info
  x86/PCI: Make broadcom_postcore_init() check acpi_disabled
  X.509: reject invalid BIT STRING for subjectPublicKey
  ASN.1: check for error from ASN1_OP_END__ACT actions
  ASN.1: fix out-of-bounds read when parsing indefinite length item
  efi: Move some sysfs files to be read-only by root
  scsi: libsas: align sata_device's rps_resp on a cacheline
  isa: Prevent NULL dereference in isa_bus driver callbacks
  hv: kvp: Avoid reading past allocated blocks from KVP file
  virtio: release virtio index when fail to device_register
  can: usb_8dev: cancel urb on -EPIPE and -EPROTO
  can: esd_usb2: cancel urb on -EPIPE and -EPROTO
  can: ems_usb: cancel urb on -EPIPE and -EPROTO
  can: kvaser_usb: cancel urb on -EPIPE and -EPROTO
  can: kvaser_usb: ratelimit errors if incomplete messages are received
  can: kvaser_usb: Fix comparison bug in kvaser_usb_read_bulk_callback()
  can: kvaser_usb: free buf in error paths
  can: ti_hecc: Fix napi poll return value for repoll
  BACKPORT: irq: Make the irqentry text section unconditional
  UPSTREAM: arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections
  UPSTREAM: x86, kasan, ftrace: Put APIC interrupt handlers into .irqentry.text
  UPSTREAM: kasan: make get_wild_bug_type() static
  UPSTREAM: kasan: separate report parts by empty lines
  UPSTREAM: kasan: improve double-free report format
  UPSTREAM: kasan: print page description after stacks
  UPSTREAM: kasan: improve slab object description
  UPSTREAM: kasan: change report header
  UPSTREAM: kasan: simplify address description logic
  UPSTREAM: kasan: change allocation and freeing stack traces headers
  UPSTREAM: kasan: unify report headers
  UPSTREAM: kasan: introduce helper functions for determining bug type
  BACKPORT: kasan: report only the first error by default
  UPSTREAM: kasan: fix races in quarantine_remove_cache()
  UPSTREAM: kasan: resched in quarantine_remove_cache()
  BACKPORT: kasan, sched/headers: Uninline kasan_enable/disable_current()
  BACKPORT: kasan: drain quarantine of memcg slab objects
  UPSTREAM: kasan: eliminate long stalls during quarantine reduction
  UPSTREAM: kasan: support panic_on_warn
  UPSTREAM: x86/suspend: fix false positive KASAN warning on suspend/resume
  UPSTREAM: kasan: support use-after-scope detection
  UPSTREAM: kasan/tests: add tests for user memory access functions
  UPSTREAM: mm, kasan: add a ksize() test
  UPSTREAM: kasan: test fix: warn if the UAF could not be detected in kmalloc_uaf2
  UPSTREAM: kasan: modify kmalloc_large_oob_right(), add kmalloc_pagealloc_oob_right()
  UPSTREAM: lib/stackdepot: export save/fetch stack for drivers
  UPSTREAM: lib/stackdepot.c: bump stackdepot capacity from 16MB to 128MB
  BACKPORT: kprobes: Unpoison stack in jprobe_return() for KASAN
  UPSTREAM: kasan: remove the unnecessary WARN_ONCE from quarantine.c
  UPSTREAM: kasan: avoid overflowing quarantine size on low memory systems
  UPSTREAM: kasan: improve double-free reports
  BACKPORT: mm: coalesce split strings
  BACKPORT: mm/kasan: get rid of ->state in struct kasan_alloc_meta
  UPSTREAM: mm/kasan: get rid of ->alloc_size in struct kasan_alloc_meta
  UPSTREAM: mm: kasan: remove unused 'reserved' field from struct kasan_alloc_meta
  UPSTREAM: mm/kasan, slub: don't disable interrupts when object leaves quarantine
  UPSTREAM: mm/kasan: don't reduce quarantine in atomic contexts
  UPSTREAM: mm/kasan: fix corruptions and false positive reports
  UPSTREAM: lib/stackdepot.c: use __GFP_NOWARN for stack allocations
  BACKPORT: mm, kasan: switch SLUB to stackdepot, enable memory quarantine for SLUB
  UPSTREAM: kasan/quarantine: fix bugs on qlist_move_cache()
  UPSTREAM: mm: mempool: kasan: don't poot mempool objects in quarantine
  UPSTREAM: kasan: change memory hot-add error messages to info messages
  BACKPORT: mm/kasan: add API to check memory regions
  UPSTREAM: mm/kasan: print name of mem[set,cpy,move]() caller in report
  UPSTREAM: mm: kasan: initial memory quarantine implementation
  UPSTREAM: lib/stackdepot: avoid to return 0 handle
  UPSTREAM: lib/stackdepot.c: allow the stack trace hash to be zero
  UPSTREAM: mm, kasan: fix compilation for CONFIG_SLAB
  BACKPORT: mm, kasan: stackdepot implementation. Enable stackdepot for SLAB
  BACKPORT: mm, kasan: add GFP flags to KASAN API
  UPSTREAM: mm, kasan: SLAB support
  UPSTREAM: mm/slab: align cache size first before determination of OFF_SLAB candidate
  UPSTREAM: mm/slab: use more appropriate condition check for debug_pagealloc
  UPSTREAM: mm/slab: factor out debugging initialization in cache_init_objs()
  UPSTREAM: mm/slab: remove object status buffer for DEBUG_SLAB_LEAK
  UPSTREAM: mm/slab: alternative implementation for DEBUG_SLAB_LEAK
  UPSTREAM: mm/slab: clean up DEBUG_PAGEALLOC processing code
  UPSTREAM: mm/slab: activate debug_pagealloc in SLAB when it is actually enabled
  sched: EAS/WALT: Don't take into account of running task's util
  BACKPORT: schedutil: Reset cached freq if it is not in sync with next_freq
  UPSTREAM: kasan: add functions to clear stack poison

Conflicts:
arch/arm/include/asm/kvm_arm.h
arch/arm64/kernel/vmlinux.lds.S
include/linux/kasan.h
kernel/softirq.c
lib/Kconfig
lib/Kconfig.kasan
lib/Makefile
lib/stackdepot.c
mm/kasan/kasan.c
sound/usb/mixer.c

Change-Id: If70ced6da5f19be3dd92d10a8d8cd4d5841e5870
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agodwc3-msm: Introduce sysfs param to indicate usb compliance mode
Vamsi Krishna Samavedam [Tue, 9 Jan 2018 23:21:33 +0000 (15:21 -0800)]
dwc3-msm: Introduce sysfs param to indicate usb compliance mode

Currently usb stack is teared down if no activity is detected for
10 seconds when floating charger is connected. USB 3.1 compliance
equipment usually reported as floating charger. Introduce sysfs
parameter to indicate if usb compliance in progress and do not
tear down the stack based on this parameter.

Change-Id: I26013c281827f35eac7f21ed68b3880e541d82b9
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
6 years agousb: pd: avoid out-of-bounds access when reading PDOs
Jack Pham [Mon, 23 Oct 2017 16:47:49 +0000 (09:47 -0700)]
usb: pd: avoid out-of-bounds access when reading PDOs

Most often a source will send fewer than the maximum number
of PDOs (7). Since the rx_msg buffer is now allocated up to
the size of the actual data, honor the rx_msg->data_len when
copying to pd->received_pdos rather than always 28 bytes.
This fixes out-of-bounds read access as reported by KASAN.

Change-Id: I5f98f7ccba027c1ab436ccf6fc822e2a319bafa1
Signed-off-by: Jack Pham <jackp@codeaurora.org>
6 years agousb: pd: ensure source hard reset is handled timely
Jack Pham [Fri, 3 Nov 2017 19:24:59 +0000 (12:24 -0700)]
usb: pd: ensure source hard reset is handled timely

When in source mode if a hard reset is received just before or
while usbpd_sm() is in the middle of trying to send an outgoing
message, the signal handling would get delayed due waiting for
the PD PHY to complete retrying and failing both the message as
well as the subsequent Soft_Reset message. Instead, treat the
incoming hard reset with priority try to bail out of further
attempts to send a message so that we can immeidately re-queue and
process the hard reset on the next usbpd_sm() invocation.

In case the TX attempt still manages to win the race, this will
cause delay that affects our tPSHardReset (25-35ms) required time
resulting in VBUS getting turned off too late. Handle this by
keeping track of when the hard reset signal arrived so that
we can schedule SRC_TRANSITION_TO_DEFAULT within this window.

Also promote the error message when a hard reset is received
from KERN_DEBUG to KERN_ERR, as this is abnormal enough
to deserve printing to the kernel log with higher priority.

Change-Id: Ie503f7b776022067ec3a4788d5229ec508b9c55f
Signed-off-by: Jack Pham <jackp@codeaurora.org>
6 years agousb: pd: Support revision 3.0 in sink-only mode
Hemant Kumar [Thu, 20 Jul 2017 20:51:49 +0000 (13:51 -0700)]
usb: pd: Support revision 3.0 in sink-only mode

commit 07040df2790e ("usb: pd: policy_engine: Handle spec revision
properly") changed the spec revision handling to be 2.0 mode unless
a programmable power supply is seen. Extend this via a module
parameter to allow PD 3.0 in sink-only mode regardless of PPS when
a 3.0 source is connected.

Since the revision of the source is first encountered when
receiving the Source Capabilities message, this information is
lost by the time pd_eval_src_caps() is called. So bring back the
handling in phy_msg_received() removed in commit 07040df2790e ("usb:
pd: policy_engine: Handle spec revision properly").

Change-Id: I0485224aeadcffbfaecd0c7942c6dbcd9ddd3813
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
6 years agoMerge "msm: thermal: use cluster frequency to request lmh dcvs from KTM"
Linux Build Service Account [Wed, 17 Jan 2018 17:55:06 +0000 (09:55 -0800)]
Merge "msm: thermal: use cluster frequency to request lmh dcvs from KTM"

6 years agomsm: ais: sensor: actuator: avoid accessing out of bound memory
Rahul Sharma [Fri, 29 Dec 2017 08:31:12 +0000 (14:01 +0530)]
msm: ais: sensor: actuator: avoid accessing out of bound memory

Issue:
When total_steps is updated, after that, copy_from_user
fails with an error, then, i2c_reg_tbl is not allocated.
In this case, when calling msm_actuator_parse_i2c_params,
it lead to out-of-bound memory write.
Fix:
1) Assign total_steps to zero when error from copying.
2) Add NULL pointer check for i2c tbl.
3) Fixing the issue where the function can return
with an error code leaving "a_ctrl->i2c_reg_tbl"
and "a_ctrl->total_steps" out of sync.

Change-Id: Ib46deceb7bd8efff1cb606b894396e7016271dd3
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
6 years agodefconfig: msm: sdm660: disable memory cgroups
Vinayak Menon [Wed, 17 Jan 2018 09:47:50 +0000 (15:17 +0530)]
defconfig: msm: sdm660: disable memory cgroups

Memory cgroups is an unused feature on sdm660. But
enabling it in kernel means that user space can
configure it. Avoid such user configurations until
the feature is decided to be deployed.

Change-Id: Ie77a4de51a59179ff3cb543e3cc955ce48412a59
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
6 years agoMerge "cnss2: Fix compilation warning maybe as error"
Linux Build Service Account [Wed, 17 Jan 2018 04:01:41 +0000 (20:01 -0800)]
Merge "cnss2: Fix compilation warning maybe as error"

6 years agoMerge "msm: adsprpc: Fix race conditions on same buffer"
Linux Build Service Account [Wed, 17 Jan 2018 04:01:39 +0000 (20:01 -0800)]
Merge "msm: adsprpc: Fix race conditions on same buffer"

6 years agoMerge "scsi: ufs-qcom: Fix compilation error in ufs bus voting"
Linux Build Service Account [Tue, 16 Jan 2018 18:03:35 +0000 (10:03 -0800)]
Merge "scsi: ufs-qcom: Fix compilation error in ufs bus voting"

6 years agoMerge "drm/msm-hyp: add get/put function to cache FB"
Linux Build Service Account [Tue, 16 Jan 2018 18:03:33 +0000 (10:03 -0800)]
Merge "drm/msm-hyp: add get/put function to cache FB"

6 years agoMerge "msm: ais: Camera clock voting fixes for LA XO"
Linux Build Service Account [Tue, 16 Jan 2018 18:03:29 +0000 (10:03 -0800)]
Merge "msm: ais: Camera clock voting fixes for LA XO"

6 years agoath10k: wakeup device from wow suspend on GTK rekey failure
Sarada Prasanna Garnayak [Fri, 29 Dec 2017 09:27:27 +0000 (14:57 +0530)]
ath10k: wakeup device from wow suspend on GTK rekey failure

The ath10k wlan firmware supports GTK rekeying while asleep.
Enable GTK rekeying failure wakeup source in wow suspend.
This adds support to wakeup the device from wow suspend
state if GTK rekeying process failed in the wlan firmware.

CRs-Fixed: 2169340
Change-Id: I321a6139d74b0fcf476e961ba83879fae9c39f04
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
6 years agodwc3: debugfs: Add check for length before copy data from userspace
Vijayavardhan Vennapusa [Tue, 16 Jan 2018 09:21:15 +0000 (14:51 +0530)]
dwc3: debugfs: Add check for length before copy data from userspace

Add boundary check before copying data from userspace buffer to dwc3
local buffer. The third parameter passed to copy_from_user() should be
minimum of the two values between userpsace buffer size count and
(local_buffer size - 1). The last one byte in local_buffer should be
reserved for null terminator.

Change-Id: I9b2e3db4d5ad6b5f14515cadafa6264f9e8b786c
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
6 years agomsm: ipa: Fix to unsigned integer underflow
Mohammed Javid [Fri, 12 Jan 2018 08:02:37 +0000 (13:32 +0530)]
msm: ipa: Fix to unsigned integer underflow

Added code changes to fix the unsigned integer underflow
leads to accessing unmapped memory.

Change-Id: I8148aebd3597ec6ae8c184199afe816f3d80636e
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
6 years agomsm: adsprpc: Fix race conditions on same buffer
Tharun Kumar Merugu [Tue, 2 Jan 2018 06:12:45 +0000 (11:42 +0530)]
msm: adsprpc: Fix race conditions on same buffer

Variable map may pointing to the same buffer on race conditions
in functions fastrpc_internal_mmap and fastrpc_internal_munmap,
use mutex to avoid race conditions on same buffer.

Change-Id: I96ed884c44a36f574677ba3ba189dfbf2ce3751d
Acked-by: Krishnaiah Tadakamalla <ktadakam@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
6 years agopower: qpnp-fg-gen3: Adjust recharge SOC after early termination
Subbaraman Narayanamurthy [Fri, 22 Dec 2017 01:39:07 +0000 (17:39 -0800)]
power: qpnp-fg-gen3: Adjust recharge SOC after early termination

Currently, recharge SOC is adjusted based on the SOC at which
charge termination occurs. However, it gets reset back to the
original threshold only if input is removed. This does not work
well if charging resumes again once the battery is out of JEITA
as the recharge SOC threshold stays configured at a lower value.
Fix it by adjusting recharge SOC to the original threshold once
charging begins.

CRs-Fixed: 2163058
Change-Id: I07c714d32ba0005d3b0ff61142928eda58f049d0
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
6 years agomsm: thermal: use cluster frequency to request lmh dcvs from KTM
Manaf Meethalavalappu Pallikunhi [Fri, 29 Dec 2017 14:24:48 +0000 (19:54 +0530)]
msm: thermal: use cluster frequency to request lmh dcvs from KTM

KTM lmh dcvs frequency mitigation uses given online/first cpu max/min
mitigation request. There can be cases like emergency frequency
mitigation where mitigation request is for a particular cpu only and
online/first cpu may be one of the other cpus from the same cluster.
In this case lmh dcvs takes online/first cpu max request which can be
in no mitigation state. It leads to unmitigated state even though one
of the cpus is triggered.

If device supports cluster mitigation, use min/max request of that
cluster instead of min/max request of given online/first cpu.
It ensures lmh dcvs mitigation if one of the cpu mitigation is
triggered and other unmitigated cpu of same cluster is given as
online/first cpu.

Change-Id: Ibbb913eb67a7f84d4c3658d0edae495990ca9010
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
6 years agomsm: vidc: set multistream mode for worst case scratch buffer requirement
Deepak Kushwah [Tue, 24 Oct 2017 16:02:32 +0000 (21:32 +0530)]
msm: vidc: set multistream mode for worst case scratch buffer requirement

In case of secure mode, worst case scratch buffer requimrement is
calulated upfront to avoid any delay in reallocation during the
resolution change. Worst case buffer requirement will be calulated
for max resolution and multistream mode enabled. This commit will
enable multistream mode if required to get worst case buffer requirements.

Change-Id: Iaafed40218d8a79e07584c87172bdadb62276cc6
Signed-off-by: Deepak Kushwah <dkushwah@codeaurora.org>
6 years agoclk: msm: Add reset support in virtual clock frontend driver
Zhiqiang Tu [Tue, 9 Jan 2018 07:45:52 +0000 (15:45 +0800)]
clk: msm: Add reset support in virtual clock frontend driver

To support reset function in virtual clock driver, we register
a reset controller in virtual clock front driver. It is a virtual
reset controller which talks with host backend via virtual clock
message.

Change-Id: I13d48180534110260d66e42f3a02b63c2afcaeca
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
6 years agocnss2: Fix compilation warning maybe as error
Ferry Zhou [Thu, 11 Jan 2018 09:21:22 +0000 (17:21 +0800)]
cnss2: Fix compilation warning maybe as error

Fix warning that the variable is used before initialized, which
might be treated as error in strict case.

Change-Id: I95a34fa31e87fde2055af745f46f65a0d0402efc
Signed-off-by: Ferry Zhou <tianguiz@codeaurora.org>
6 years agoMerge "msm: sensor: actuator: add null pointer check for i2c array"
Linux Build Service Account [Sat, 13 Jan 2018 11:50:16 +0000 (03:50 -0800)]
Merge "msm: sensor: actuator: add null pointer check for i2c array"

6 years agoMerge "soc: qcom: glink: Add sub system up notification in glink"
Linux Build Service Account [Sat, 13 Jan 2018 11:50:14 +0000 (03:50 -0800)]
Merge "soc: qcom: glink: Add sub system up notification in glink"

6 years agoMerge "clocksource: arch_timer: make virtual counter access configurable"
Linux Build Service Account [Fri, 12 Jan 2018 23:34:04 +0000 (15:34 -0800)]
Merge "clocksource: arch_timer: make virtual counter access configurable"

6 years agoMerge "arm64: issue isb when trapping CNTVCT_EL0 access"
Linux Build Service Account [Fri, 12 Jan 2018 23:34:03 +0000 (15:34 -0800)]
Merge "arm64: issue isb when trapping CNTVCT_EL0 access"

6 years agoMerge "BACKPORT: arm64: Add CNTFRQ_EL0 trap handler"
Linux Build Service Account [Fri, 12 Jan 2018 23:34:02 +0000 (15:34 -0800)]
Merge "BACKPORT: arm64: Add CNTFRQ_EL0 trap handler"

6 years agoMerge "BACKPORT: arm64: Add CNTVCT_EL0 trap handler"
Linux Build Service Account [Fri, 12 Jan 2018 23:34:02 +0000 (15:34 -0800)]
Merge "BACKPORT: arm64: Add CNTVCT_EL0 trap handler"

6 years agoMerge "ASoC: msm: add kcontrol for sec tdm slot config"
Linux Build Service Account [Fri, 12 Jan 2018 23:34:00 +0000 (15:34 -0800)]
Merge "ASoC: msm: add kcontrol for sec tdm slot config"

6 years agoMerge "netfilter: nf_defrag_ipv4: Add sysctl to disable per interface"
Linux Build Service Account [Fri, 12 Jan 2018 23:33:59 +0000 (15:33 -0800)]
Merge "netfilter: nf_defrag_ipv4: Add sysctl to disable per interface"

6 years agoMerge "ARM: dts: msm: smmu and modem switch to virtual clock on msm8996 vplatform"
Linux Build Service Account [Fri, 12 Jan 2018 23:33:58 +0000 (15:33 -0800)]
Merge "ARM: dts: msm: smmu and modem switch to virtual clock on msm8996 vplatform"

6 years agomsm: ais: Camera clock voting fixes for LA XO
Rahul Sharma [Thu, 4 Jan 2018 06:57:55 +0000 (12:27 +0530)]
msm: ais: Camera clock voting fixes for LA XO

AIS camera voting on VFE and ISPIF clocks cause XO shutdown failure.
So, add new AIS manager driver, to control AIS camera clock votes.
Also add a new method in early camera driver to turn on/off clocks
when it's needed.

Change-Id: I43090b51cb29ca9de62dfa191f77b7aa9dae8613
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
6 years agomsm: sensor: actuator: add null pointer check for i2c array
Haibin Liu [Tue, 5 Dec 2017 07:06:18 +0000 (15:06 +0800)]
msm: sensor: actuator: add null pointer check for i2c array

Issue:
i2c_reg_tbl may be null under error condition when set param.
then, other actuator function still may use the i2c_reg_tbl as null.
Fix:
1) the assignment total_steps follow on kmalloc buffer.
2) Add NULL pointer check for i2c tbl.

CRs-Fixed: 2152401
Change-Id: Ieec3d88e6dae0177787da0906f53d59ac4f5a624
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
6 years agoMerge "leds: qpnp-wled: add stepper algorithm using brightness map"
Linux Build Service Account [Thu, 11 Jan 2018 12:15:02 +0000 (04:15 -0800)]
Merge "leds: qpnp-wled: add stepper algorithm using brightness map"

6 years agoMerge "leds: qpnp-wled: add support for brightness mapping"
Linux Build Service Account [Thu, 11 Jan 2018 12:15:01 +0000 (04:15 -0800)]
Merge "leds: qpnp-wled: add support for brightness mapping"

6 years agoMerge "ARM: dts: msm: Add missing entries for XO on msm8996 agave"
Linux Build Service Account [Thu, 11 Jan 2018 12:15:00 +0000 (04:15 -0800)]
Merge "ARM: dts: msm: Add missing entries for XO on msm8996 agave"

6 years agoMerge "mmc: host: Add device_prepare pm for mmc_host"
Linux Build Service Account [Thu, 11 Jan 2018 12:14:59 +0000 (04:14 -0800)]
Merge "mmc: host: Add device_prepare pm for mmc_host"

6 years agoMerge "drivers: cpuidle: lpm-levels: Fix untrusted pointer dereference."
Linux Build Service Account [Thu, 11 Jan 2018 12:14:58 +0000 (04:14 -0800)]
Merge "drivers: cpuidle: lpm-levels: Fix untrusted pointer dereference."

6 years agoMerge "soc: msm: qdsp6v2: fix compile warning in ion vm driver"
Linux Build Service Account [Thu, 11 Jan 2018 12:14:57 +0000 (04:14 -0800)]
Merge "soc: msm: qdsp6v2: fix compile warning in ion vm driver"

6 years agoMerge "ASoC: msm: qdsp6v2: add spin lock to protect ac"
Linux Build Service Account [Thu, 11 Jan 2018 12:14:55 +0000 (04:14 -0800)]
Merge "ASoC: msm: qdsp6v2: add spin lock to protect ac"

6 years agoMerge "icnss: Add size check before assigning msa permission"
Linux Build Service Account [Thu, 11 Jan 2018 12:14:54 +0000 (04:14 -0800)]
Merge "icnss: Add size check before assigning msa permission"

6 years agoMerge "drm/msm: Fix prototypes of the stub functions"
Linux Build Service Account [Thu, 11 Jan 2018 12:14:53 +0000 (04:14 -0800)]
Merge "drm/msm: Fix prototypes of the stub functions"

6 years agoMerge "oc: qcom: rpm-smd-debug: Fix potential memory leaks"
Linux Build Service Account [Thu, 11 Jan 2018 12:14:52 +0000 (04:14 -0800)]
Merge "oc: qcom: rpm-smd-debug: Fix potential memory leaks"

6 years agoMerge "Merge android-4.4.105 (8a53962) into msm-4.4"
Linux Build Service Account [Thu, 11 Jan 2018 12:14:46 +0000 (04:14 -0800)]
Merge "Merge android-4.4.105 (8a53962) into msm-4.4"

6 years agoMerge "Merge android-4.4.104 (8bc4213) into msm-4.4"
Linux Build Service Account [Thu, 11 Jan 2018 12:14:45 +0000 (04:14 -0800)]
Merge "Merge android-4.4.104 (8bc4213) into msm-4.4"

6 years agoscsi: ufs-qcom: Fix compilation error in ufs bus voting
Sayali Lokhande [Thu, 11 Jan 2018 03:34:28 +0000 (09:04 +0530)]
scsi: ufs-qcom: Fix compilation error in ufs bus voting

When CONFIG_QCOM_BUS_SCALING is not defined, compilation
error is observed for ufs_qcom_set_bus_vote(), as incorrect
arguments are being passed in its defination. This change
fixes compilation error by passing correct arguments to
ufs_qcom_set_bus_vote() function.

Change-Id: I4c502482bf8dda46fd1352a097ade90f67fe1d73
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
6 years agonetfilter: nf_defrag_ipv4: Add sysctl to disable per interface
Subash Abhinov Kasiviswanathan [Mon, 6 Nov 2017 00:36:53 +0000 (17:36 -0700)]
netfilter: nf_defrag_ipv4: Add sysctl to disable per interface

Add a sysctl nf_ipv4_defrag_skip to skip defragmentation per
interface. This is set 0 to preserve existing behavior (always
defrag per interface).

This is useful for pure ipv4 forwarding scenarios (without NAT)
in conjunction with xfrm. It appears that network stack defrags
the packets and then forwards them to xfrm which then encrypts
and then later fragments them on a different boundary compared
to the source.

CRs-Fixed: 2140310
Change-Id: I11956284a9692579274e8626f61cc6432232254c
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
6 years agodrm/msm-hyp: add get/put function to cache FB
Camus Wong [Fri, 15 Dec 2017 02:58:51 +0000 (21:58 -0500)]
drm/msm-hyp: add get/put function to cache FB

add vendor defined get/put function to cache FB and improve hyp performance

Change-Id: I10f7faedc565819aed24c71c0815af571df10b85
Signed-off-by: Camus Wong <camusw@codeaurora.org>
6 years agoASoC: msm: add kcontrol for sec tdm slot config
Derek Chen [Wed, 10 Jan 2018 16:39:47 +0000 (11:39 -0500)]
ASoC: msm: add kcontrol for sec tdm slot config

Add kcontrol support for TDM slot width and
slot number configuration for secondary TDM
interface.

CRs-fixed: 2170145
Signed-off-by: Derek Chen <chenche@codeaurora.org>
Change-Id: I573421d005618c07c5735196490385d67f36f89a

6 years agoARM: dts: msm: Add missing entries for XO on msm8996 agave
Rahul Sharma [Thu, 4 Jan 2018 07:30:35 +0000 (13:00 +0530)]
ARM: dts: msm: Add missing entries for XO on msm8996 agave

Some camera entries are missing in camera dtsi files which are
causing failure on LA XO shutdown. Added all missing automotive
camera entries to dtsi files which are used by camera driver
during LA XO shutdown.

Change-Id: I633ed0788bb1dd6c512c6d6349c3750c19bcdd26
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
6 years agosoc: qcom: glink: Add sub system up notification in glink
Dhoat Harpal [Mon, 18 Dec 2017 15:35:20 +0000 (21:05 +0530)]
soc: qcom: glink: Add sub system up notification in glink

Glink does not wait for pil to inform about subsystem up. It triggers
link up on first interrupt processed after ssr, this can cause stability
issues if some delayed interrupt is processed after ssr.

Glink waits for PIL to notify about subsystem up and initializes
its state only after that.

CRs-Fixed: 2165753
Change-Id: I71614e6d7e68bf2fa12ac7f27894492019bd3829
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
6 years agoARM: dts: msm: smmu and modem switch to virtual clock on msm8996 vplatform
Zhiqiang Tu [Tue, 19 Dec 2017 03:37:20 +0000 (11:37 +0800)]
ARM: dts: msm: smmu and modem switch to virtual clock on msm8996 vplatform

Enable virtual clock for smmu and modem.

Change-Id: I0a399eb3535ea919ed2919a041ff467572c40e8b
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
6 years agodrivers: cpuidle: lpm-levels: Fix untrusted pointer dereference.
Mahesh Sivasubramanian [Tue, 28 Nov 2017 17:06:17 +0000 (10:06 -0700)]
drivers: cpuidle: lpm-levels: Fix untrusted pointer dereference.

The list_for_each macro was not used correctly, where the intermediate
variable would be LIST_POISON, resulting in a untrusted pointer
dereference. Switch to using list_for_each_entry_safe to for safe
removal of a list entry.

Change-Id: I0e0fd5dd9f251b5093d6e9d6335387512ec59249
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
6 years agommc: host: Add device_prepare pm for mmc_host
Vijay Viswanath [Thu, 21 Dec 2017 10:03:33 +0000 (15:33 +0530)]
mmc: host: Add device_prepare pm for mmc_host

mmc_host is a virtual device and it doesn't have any pm ops and so during
pm registration of device, no_pm_callback gets set as true. The
mmc_host device is not runtime enabled as it is a virtual device and
mmc_host is the parent device of mmc_card. As the mmc_host is runtime
disabled, mmc_card can runtime suspend/resume without depending on
state of mmc_host during normal operations. During system suspend, the
direct_complete flag of mmc_host device gets set as it has no pm_ops.
When mmc_card successfully suspends, it clears the direct_complete flag
of its parent (mmc_host).

But in certain cases during dpm_suspend, an async error can occur after
suspend work for mmc_card is scheduled and before it gets executed. In
that case, mmc_card suspend work will not clear the direct_complete flag
of mmc_host. When mmc_host suspend comes after that of mmc_card,
it too will skip all actions.

But by this time, the mmc_host device has been added to device_suspended
list. So during resume, mmc_host resume will do dpm resume of mmc_host.
In dpm_resume, all devices which has direct_complete flag set will be
runtime_enabled. This is because, in dpm_suspend, any device with
direct_complete flag will be runtime_disabled. Thus, mmc_host which has
direct_complete flag set, will get runtime enabled during dpm_resume.
This is a problem in pm framework with direct_complete flag
(runtime enabling a device in resume when it was not runtime disabled
in suspend path).

Now that mmc_host device is runtime enabled, to runtime resume the
mmc_card, the pm framework will try to runtime resume the mmc_host
device as well and will fail. This prevents mmc_card from runtime
resuming after a runtime_suspend.

Fix this by adding a dummy suspend_prepare() fn for mmc_host. This
prevents the direct_complete flag of mmc_host device from getting set.

Change-Id: Ib739399027958d17e418e0240684b0b517a02941
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
6 years agoicnss: Add size check before assigning msa permission
Yuanyuan Liu [Fri, 1 Sep 2017 17:34:25 +0000 (10:34 -0700)]
icnss: Add size check before assigning msa permission

While assigning msa permission, number of memory region is passed
as an argument within platform private data. This number could
exceed the range of memory region buffer that preallocated. Hence
add size check before accessing region buffer.

Change-Id: I45f4efc7edaa636c861458dab74b1956767d2019
CRs-Fixed: 2101134
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
6 years agoMerge "msm: camera: Prevent buffer overread in write_logsync."
Linux Build Service Account [Tue, 9 Jan 2018 23:40:52 +0000 (15:40 -0800)]
Merge "msm: camera: Prevent buffer overread in write_logsync."

6 years agoMerge "drm: add picture aspect ratio flags"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:42 +0000 (15:40 -0800)]
Merge "drm: add picture aspect ratio flags"

6 years agoMerge "ARM: dts: msm: Add support for FHD+ Video Mode Panel on SDM660"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:41 +0000 (15:40 -0800)]
Merge "ARM: dts: msm: Add support for FHD+ Video Mode Panel on SDM660"

6 years agoMerge "sched: Restore previous implementation of check_for_migration()"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:40 +0000 (15:40 -0800)]
Merge "sched: Restore previous implementation of check_for_migration()"

6 years agoMerge "sched: core: Exclude isolated cpus in sched_getaffinity cpumask"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:38 +0000 (15:40 -0800)]
Merge "sched: core: Exclude isolated cpus in sched_getaffinity cpumask"

6 years agoMerge "sched: Update tracepoint to include task info"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:36 +0000 (15:40 -0800)]
Merge "sched: Update tracepoint to include task info"

6 years agoMerge "ARM: dts: msm: Add cnss sdio dsrc on msm8996 vplatform"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:34 +0000 (15:40 -0800)]
Merge "ARM: dts: msm: Add cnss sdio dsrc on msm8996 vplatform"

6 years agoMerge "defconfig: msm: enable tv tuner driver for MSM8996"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:32 +0000 (15:40 -0800)]
Merge "defconfig: msm: enable tv tuner driver for MSM8996"

6 years agoMerge "ath10k: Define wlan hardware param for pdev suspend option"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:31 +0000 (15:40 -0800)]
Merge "ath10k: Define wlan hardware param for pdev suspend option"

6 years agoMerge "UPSTREAM: ALSA: timer: Call notifier in the same spinlock"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:29 +0000 (15:40 -0800)]
Merge "UPSTREAM: ALSA: timer: Call notifier in the same spinlock"

6 years agoMerge "sched: Fix spinlock recursion in sched_exit()"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:28 +0000 (15:40 -0800)]
Merge "sched: Fix spinlock recursion in sched_exit()"

6 years agoMerge "drm/msm/sde: clear blend stages of all mixers"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:26 +0000 (15:40 -0800)]
Merge "drm/msm/sde: clear blend stages of all mixers"

6 years agoMerge "soc: qcom: glink: Modify glink logging in tx_common"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:25 +0000 (15:40 -0800)]
Merge "soc: qcom: glink: Modify glink logging in tx_common"

6 years agoMerge "soc: qcom: glink_pkt: Exit if device handle is NULL"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:24 +0000 (15:40 -0800)]
Merge "soc: qcom: glink_pkt: Exit if device handle is NULL"

6 years agoMerge "usb: gadget: Update default class subclass and protocol for rndis"
Linux Build Service Account [Tue, 9 Jan 2018 23:40:22 +0000 (15:40 -0800)]
Merge "usb: gadget: Update default class subclass and protocol for rndis"