summaryrefslogtreecommitdiff
path: root/drivers/leds
AgeCommit message (Collapse)Author
2020-05-01leds: qpnp-wled: Import Xiaomi MI changesdianlujitao
Change-Id: Ie71d330889404166e6fb593ed43b483c152bd217
2020-05-01leds: Import xiaomi longcheer changesDavide Garberi
* Changed an ifdef * Removed partial lavender changes Signed-off-by: Isaac Chen <tingyi364@gmail.com> drivers: leds: Revert xiaomi changes on leds-qpnp * We want things to be actually working huh This partially reverts commit feb2e318159c8ad38371c992b9138f38a0f22b71. Change-Id: Ib5722008533bdca43ff941a419e9bc5f68280a0c
2019-12-23leds: leds-qpnp: add synchronized rgb controlScott Mertz
Change-Id: I0833d298a6568cb490ac87561e884552cb1d0488
2019-10-30Merge android-4.4-p.195 (4af3204) into msm-4.4Srinivasarao P
* refs/heads/tmp-4af3204 Linux 4.4.195 Btrfs: fix race setting up and completing qgroup rescan workers btrfs: Relinquish CPUs in btrfs_compare_trees Btrfs: fix use-after-free when using the tree modification log ovl: filter of trusted xattr results in audit CIFS: Fix oplock handling for SMB 2.1+ protocols i2c: riic: Clear NACK in tend isr hwrng: core - don't wait on add_early_randomness() quota: fix wrong condition in is_quota_modification() ext4: fix punch hole for inline_data file systems /dev/mem: Bail out upon SIGKILL. cfg80211: Purge frame registrations on iftype change md/raid6: Set R5_ReadError when there is read failure on parity disk alarmtimer: Use EOPNOTSUPP instead of ENOTSUPP ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up ASoC: Intel: Fix use of potentially uninitialized variable media: sn9c20x: Add MSI MS-1039 laptop to flip_dmi_table KVM: x86: Manually calculate reserved bits when loading PDPTRS KVM: x86: set ctxt->have_exception in x86_decode_insn() KVM: x86: always stop emulation on page fault parisc: Disable HP HSC-PCI Cards to prevent kernel crash fuse: fix missing unlock_page in fuse_writepage() printk: Do not lose last line in kmsg buffer dump ALSA: firewire-tascam: check intermediate state of clock status and retry ALSA: firewire-tascam: handle error code when getting current source of clock media: omap3isp: Set device on omap3isp subdevs btrfs: extent-tree: Make sure we only allocate extents from block groups with the same type ALSA: hda/realtek - Blacklist PC beep for Lenovo ThinkCentre M73/93 media: ttusb-dec: Fix info-leak in ttusb_dec_send_command() libertas: Add missing sentinel at end of if_usb.c fw_table mmc: sdhci: Fix incorrect switch to HS mode ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set kprobes: Prohibit probing on BUG() and WARN() address dmaengine: ti: edma: Do not reset reserved paRAM slots md/raid1: fail run raid1 array when active disk less than one hwmon: (acpi_power_meter) Change log level for 'unsafe software power cap' ACPI: custom_method: fix memory leaks libtraceevent: Change users plugin directory ACPI / CPPC: do not require the _PSD method media: ov9650: add a sanity check media: saa7134: fix terminology around saa7134_i2c_eeprom_md7134_gate() media: cpia2_usb: fix memory leaks media: saa7146: add cleanup in hexium_attach() media: hdpvr: add terminating 0 at end of string media: radio/si470x: kill urb on error net: lpc-enet: fix printk format strings media: omap3isp: Don't set streaming state on random subdevs dmaengine: iop-adma: use correct printk format strings media: gspca: zero usb_buf on error efi: cper: print AER info of PCIe fatal error md: don't set In_sync if array is frozen md: don't call spare_active in md_reap_sync_thread if all member devices can't work ia64:unwind: fix double free for mod->arch.init_unw_table ALSA: usb-audio: Skip bSynchAddress endpoint check if it is invalid base: soc: Export soc_device_register/unregister APIs media: iguanair: add sanity checks ALSA: i2c: ak4xxx-adda: Fix a possible null pointer dereference in build_adc_controls() ALSA: hda - Show the fatal CORB/RIRB error more clearly x86/apic: Soft disable APIC before initializing it x86/reboot: Always use NMI fallback when shutdown via reboot vector IPI fails sched/core: Fix CPU controller for !RT_GROUP_SCHED sched/fair: Fix imbalance due to CPU affinity media: hdpvr: Add device num check and handling media: dib0700: fix link error for dibx000_i2c_set_speed leds: leds-lp5562 allow firmware files up to the maximum length dmaengine: bcm2835: Print error in case setting DMA mask fails ASoC: sgtl5000: Fix charge pump source assignment ALSA: hda: Flush interrupts on disabling nfc: enforce CAP_NET_RAW for raw sockets ieee802154: enforce CAP_NET_RAW for raw sockets ax25: enforce CAP_NET_RAW for raw sockets appletalk: enforce CAP_NET_RAW for raw sockets mISDN: enforce CAP_NET_RAW for raw sockets usbnet: sanity checking of packet sizes and device mtu usbnet: ignore endpoints with invalid wMaxPacketSize skge: fix checksum byte order sch_netem: fix a divide by zero in tabledist() openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC net/phy: fix DP83865 10 Mbps HDX loopback disable function cdc_ncm: fix divide-by-zero caused by invalid wMaxPacketSize arcnet: provide a buffer big enough to actually receive packets Bluetooth: btrtl: Additional Realtek 8822CE Bluetooth devices drm: Flush output polling on shutdown f2fs: fix to do sanity check on segment bitmap of LFS curseg Revert "f2fs: avoid out-of-range memory access" f2fs: check all the data segments against all node ones irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices locking/lockdep: Add debug_locks check in __lock_downgrade() mac80211: handle deauthentication/disassociation from TDLS peer mac80211: Print text for disassociation reason ALSA: hda - Add laptop imic fixup for ASUS M9V laptop ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt() net: rds: Fix NULL ptr use in rds_tcp_kill_sock crypto: talitos - fix missing break in switch statement mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword() HID: hidraw: Fix invalid read in hidraw_ioctl HID: logitech: Fix general protection fault caused by Logitech driver HID: lg: make transfer buffers DMA capable HID: prodikeys: Fix general protection fault during probe Revert "Bluetooth: validate BLE connection interval updates" ANDROID: usb: gadget: Fix dependency for f_accessory Remove taskname from lowmemorykiller kill reports ANDROID: Fixes to locking around handle_lmk_event Conflicts: drivers/staging/android/lowmemorykiller.c fs/f2fs/segment.c fs/f2fs/super.c Change-Id: Id4b74ec2b0512aa13bc4392d61d5092f633fed0e Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2019-10-05leds: leds-lp5562 allow firmware files up to the maximum lengthNick Stoughton
[ Upstream commit ed2abfebb041473092b41527903f93390d38afa7 ] Firmware files are in ASCII, using 2 hex characters per byte. The maximum length of a firmware string is therefore 16 (commands) * 2 (bytes per command) * 2 (characters per byte) = 64 Fixes: ff45262a85db ("leds: add new LP5562 LED driver") Signed-off-by: Nick Stoughton <nstoughton@logitech.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-05-02Merge android-4.4.179 (aab9adb) into msm-4.4Srinivasarao P
* refs/heads/tmp-aab9adb Linux 4.4.179 kernel/sysctl.c: fix out-of-bounds access when setting file-max Revert "locking/lockdep: Add debug_locks check in __lock_downgrade()" ALSA: info: Fix racy addition/deletion of nodes mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n device_cgroup: fix RCU imbalance in error case sched/fair: Limit sched_cfs_period_timer() loop to avoid hard lockup Revert "kbuild: use -Oz instead of -Os when using clang" mac80211: do not call driver wake_tx_queue op during reconfig kprobes: Fix error check when reusing optimized probes kprobes: Mark ftrace mcount handler functions nokprobe x86/kprobes: Verify stack frame on kretprobe arm64: futex: Restore oldval initialization to work around buggy compilers crypto: x86/poly1305 - fix overflow during partial reduction ALSA: core: Fix card races between register and disconnect staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf staging: comedi: ni_usb6501: Fix use of uninitialized mutex staging: comedi: vmk80xx: Fix possible double-free of ->usb_rx_buf staging: comedi: vmk80xx: Fix use of uninitialized semaphore io: accel: kxcjk1013: restore the range after resume. iio: adc: at91: disable adc channel interrupt in timeout case iio: ad_sigma_delta: select channel when reading register iio/gyro/bmg160: Use millidegrees for temperature scale KVM: x86: Don't clear EFER during SMM transitions for 32-bit vCPU tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is incomplete modpost: file2alias: check prototype of handler modpost: file2alias: go back to simple devtable lookup crypto: crypto4xx - properly set IV after de- and encrypt ipv4: ensure rcu_read_lock() in ipv4_link_failure() ipv4: recompile ip options in ipv4_link_failure tcp: tcp_grow_window() needs to respect tcp_space() net: fou: do not use guehdr after iptunnel_pull_offloads in gue_udp_recv net: bridge: multicast: use rcu to access port list from br_multicast_start_querier net: atm: Fix potential Spectre v1 vulnerabilities bonding: fix event handling for stacked bonds appletalk: Fix compile regression ovl: fix uid/gid when creating over whiteout tpm/tpm_crb: Avoid unaligned reads in crb_recv() include/linux/swap.h: use offsetof() instead of custom __swapoffset macro lib/div64.c: off by one in shift appletalk: Fix use-after-free in atalk_proc_exit ARM: 8839/1: kprobe: make patch_lock a raw_spinlock_t iommu/dmar: Fix buffer overflow during PCI bus notification crypto: sha512/arm - fix crash bug in Thumb2 build crypto: sha256/arm - fix crash bug in Thumb2 build cifs: fallback to older infolevels on findfirst queryinfo retry ACPI / SBS: Fix GPE storm on recent MacBookPro's ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms serial: uartps: console_setup() can't be placed to init section f2fs: fix to do sanity check with current segment number 9p locks: add mount option for lock retry interval 9p: do not trust pdu content for stat item size rsi: improve kernel thread handling to fix kernel panic ext4: prohibit fstrim in norecovery mode fix incorrect error code mapping for OBJECTID_NOT_FOUND x86/hw_breakpoints: Make default case in hw_breakpoint_arch_parse() return an error iommu/vt-d: Check capability before disabling protected memory x86/cpu/cyrix: Use correct macros for Cyrix calls on Geode processors x86/hpet: Prevent potential NULL pointer dereference perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test() perf tests: Fix a memory leak of cpu_map object in the openat_syscall_event_on_all_cpus test perf evsel: Free evsel->counts in perf_evsel__exit() perf top: Fix error handling in cmd_top() tools/power turbostat: return the exit status of a command thermal/int340x_thermal: fix mode setting thermal/int340x_thermal: Add additional UUIDs ALSA: opl3: fix mismatch between snd_opl3_drum_switch definition and declaration mmc: davinci: remove extraneous __init annotation IB/mlx4: Fix race condition between catas error reset and aliasguid flows ALSA: sb8: add a check for request_region ALSA: echoaudio: add a check for ioremap_nocache ext4: report real fs size after failed resize ext4: add missing brelse() in add_new_gdb_meta_bg() perf/core: Restore mmap record type correctly PCI: Add function 1 DMA alias quirk for Marvell 9170 SATA controller xtensa: fix return_address sched/fair: Do not re-read ->h_load_next during hierarchical load calculation xen: Prevent buffer overflow in privcmd ioctl arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value ARM: dts: at91: Fix typo in ISC_D0 on PC9 genirq: Respect IRQCHIP_SKIP_SET_WAKE in irq_chip_set_wake_parent() block: do not leak memory in bio_copy_user_iov() ASoC: fsl_esai: fix channel swap issue when stream starts include/linux/bitrev.h: fix constant bitrev ALSA: seq: Fix OOB-reads from strlcpy ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type net: ethtool: not call vzalloc for zero sized memory request netns: provide pure entropy for net_hash_mix() tcp: Ensure DCTCP reacts to losses sctp: initialize _pad of sockaddr_in before copying to user memory qmi_wwan: add Olicard 600 openvswitch: fix flow actions reallocation net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock(). ipv6: sit: reset ip header pointer in ipip6_rcv ipv6: Fix dangling pointer when ipv6 fragment tty: ldisc: add sysctl to prevent autoloading of ldiscs tty: mark Siemens R3964 line discipline as BROKEN lib/string.c: implement a basic bcmp x86/vdso: Drop implicit common-page-size linker flag x86: vdso: Use $LD instead of $CC to link x86/build: Specify elf_i386 linker emulation explicitly for i386 objects kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD binfmt_elf: switch to new creds when switching to new mm drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers dmaengine: tegra: avoid overflow of byte tracking x86/build: Mark per-CPU symbols as absolute explicitly for LLD wlcore: Fix memory leak in case wl12xx_fetch_firmware failure regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration netfilter: physdev: relax br_netfilter dependency dmaengine: imx-dma: fix warning comparison of distinct pointer types hpet: Fix missing '=' character in the __setup() code of hpet_mmap_enable soc/tegra: fuse: Fix illegal free of IO base address hwrng: virtio - Avoid repeated init of completion media: mt9m111: set initial frame size other than 0x0 tty: increase the default flip buffer limit to 2*640K ARM: avoid Cortex-A9 livelock on tight dmb loops mt7601u: bump supported EEPROM version soc: qcom: gsbi: Fix error handling in gsbi_probe() ASoC: fsl-asoc-card: fix object reference leaks in fsl_asoc_card_probe cdrom: Fix race condition in cdrom_sysctl_register fbdev: fbmem: fix memory access if logo is bigger than the screen bcache: improve sysfs_strtoul_clamp() bcache: fix input overflow to sequential_cutoff bcache: fix input overflow to cache set sysfs file io_error_halflife ALSA: PCM: check if ops are defined before suspending PCM ARM: 8833/1: Ensure that NEON code always compiles with Clang kprobes: Prohibit probing on bsearch() leds: lp55xx: fix null deref on firmware load failure media: mx2_emmaprp: Correct return type for mem2mem buffer helpers media: s5p-g2d: Correct return type for mem2mem buffer helpers media: s5p-jpeg: Correct return type for mem2mem buffer helpers media: sh_veu: Correct return type for mem2mem buffer helpers SoC: imx-sgtl5000: add missing put_device() perf test: Fix failure of 'evsel-tp-sched' test on s390 scsi: megaraid_sas: return error when create DMA pool failed IB/mlx4: Increase the timeout for CM cache e1000e: Fix -Wformat-truncation warnings mmc: omap: fix the maximum timeout setting ARM: 8840/1: use a raw_spinlock_t in unwind coresight: etm4x: Add support to enable ETMv4.2 scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c usb: chipidea: Grab the (legacy) USB PHY by phandle first tools lib traceevent: Fix buffer overflow in arg_eval fs: fix guard_bio_eod to check for real EOD errors cifs: Fix NULL pointer dereference of devname dm thin: add sanity checks to thin-pool and external snapshot creation cifs: use correct format characters fs/file.c: initialize init_files.resize_wait f2fs: do not use mutex lock in atomic context ocfs2: fix a panic problem caused by o2cb_ctl mm/slab.c: kmemleak no scan alien caches mm/vmalloc.c: fix kernel BUG at mm/vmalloc.c:512! mm/page_ext.c: fix an imbalance with kmemleak mm/cma.c: cma_declare_contiguous: correct err handling enic: fix build warning without CONFIG_CPUMASK_OFFSTACK sysctl: handle overflow for file-max gpio: gpio-omap: fix level interrupt idling tracing: kdb: Fix ftdump to not sleep h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- CIFS: fix POSIX lock leak and invalid ptr deref tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped Bluetooth: Fix decrementing reference count twice in releasing socket i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified tty/serial: atmel: Add is_half_duplex helper lib/int_sqrt: optimize initial value compute ext4: cleanup bh release code in ext4_ind_remove_space() arm64: debug: Ensure debug handlers check triggering exception level arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug signals Make arm64 serial port config compatible with crosvm Fix merge issue with 4.4.178 Fix merge issue with 4.4.177 ANDROID: cuttlefish_defconfig: Enable CONFIG_OVERLAY_FS Change-Id: I0d6e7b00f0198867803d5fe305ce13e205cc7518 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2019-04-27leds: lp55xx: fix null deref on firmware load failureMichal Kazior
[ Upstream commit 5ddb0869bfc1bca6cfc592c74c64a026f936638c ] I've stumbled upon a kernel crash and the logs pointed me towards the lp5562 driver: > <4>[306013.841294] lp5562 0-0030: Direct firmware load for lp5562 failed with error -2 > <4>[306013.894990] lp5562 0-0030: Falling back to user helper > ... > <3>[306073.924886] lp5562 0-0030: firmware request failed > <1>[306073.939456] Unable to handle kernel NULL pointer dereference at virtual address 00000000 > <4>[306074.251011] PC is at _raw_spin_lock+0x1c/0x58 > <4>[306074.255539] LR is at release_firmware+0x6c/0x138 > ... After taking a look I noticed firmware_release() could be called with either NULL or a dangling pointer. Fixes: 10c06d178df11 ("leds-lp55xx: support firmware interface") Signed-off-by: Michal Kazior <michal@plume.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-25Merge android-4.4.177 (0c3b8c4) into msm-4.4Srinivasarao P
* refs/heads/tmp-0c3b8c4 Linux 4.4.177 KVM: X86: Fix residual mmio emulation request to userspace KVM: nVMX: Ignore limit checks on VMX instructions using flat segments KVM: nVMX: Sign extend displacements of VMX instr's mem operands drm/radeon/evergreen_cs: fix missing break in switch statement media: uvcvideo: Avoid NULL pointer dereference at the end of streaming rcu: Do RCU GP kthread self-wakeup from softirq and interrupt PM / wakeup: Rework wakeup source timer cancellation nfsd: fix wrong check in write_v4_end_grace() nfsd: fix memory corruption caused by readdir NFS: Don't recoalesce on error in nfs_pageio_complete_mirror() NFS: Fix an I/O request leakage in nfs_do_recoalesce md: Fix failed allocation of md_register_thread perf intel-pt: Fix overlap calculation for padding perf auxtrace: Define auxtrace record alignment perf intel-pt: Fix CYC timestamp calculation after OVF NFS41: pop some layoutget errors to application dm: fix to_sector() for 32bit ARM: s3c24xx: Fix boolean expressions in osiris_dvs_notify powerpc/83xx: Also save/restore SPRG4-7 during suspend powerpc/powernv: Make opal log only readable by root powerpc/wii: properly disable use of BATs when requested. powerpc/32: Clear on-stack exception marker upon exception return jbd2: fix compile warning when using JBUFFER_TRACE jbd2: clear dirty flag when revoking a buffer from an older transaction serial: 8250_pci: Have ACCES cards that use the four port Pericom PI7C9X7954 chip use the pci_pericom_setup() serial: 8250_pci: Fix number of ports for ACCES serial cards perf bench: Copy kernel files needed to build mem{cpy,set} x86_64 benchmarks i2c: tegra: fix maximum transfer size parport_pc: fix find_superio io compare code, should use equal test. intel_th: Don't reference unassigned outputs kernel/sysctl.c: add missing range check in do_proc_dointvec_minmax_conv mm/vmalloc: fix size check for remap_vmalloc_range_partial() dmaengine: usb-dmac: Make DMAC system sleep callbacks explicit clk: ingenic: Fix round_rate misbehaving with non-integer dividers ext2: Fix underflow in ext2_max_size() ext4: fix crash during online resizing cpufreq: pxa2xx: remove incorrect __init annotation cpufreq: tegra124: add missing of_node_put() crypto: pcbc - remove bogus memcpy()s with src == dest Btrfs: fix corruption reading shared and compressed extents after hole punching btrfs: ensure that a DUP or RAID1 block group has exactly two stripes m68k: Add -ffreestanding to CFLAGS scsi: target/iscsi: Avoid iscsit_release_commands_from_conn() deadlock scsi: virtio_scsi: don't send sc payload with tmfs s390/virtio: handle find on invalid queue gracefully clocksource/drivers/exynos_mct: Clear timer interrupt when shutdown clocksource/drivers/exynos_mct: Move one-shot check from tick clear to ISR regulator: s2mpa01: Fix step values for some LDOs regulator: s2mps11: Fix steps for buck7, buck8 and LDO35 ACPI / device_sysfs: Avoid OF modalias creation for removed device tracing: Do not free iter->trace in fail path of tracing_open_pipe() CIFS: Fix read after write for files with read caching crypto: arm64/aes-ccm - fix logical bug in AAD MAC handling stm class: Prevent division by zero tmpfs: fix uninitialized return value in shmem_link net: set static variable an initial value in atl2_probe() mac80211_hwsim: propagate genlmsg_reply return code phonet: fix building with clang ARC: uacces: remove lp_start, lp_end from clobber list tmpfs: fix link accounting when a tmpfile is linked in arm64: Relax GIC version check during early boot ASoC: topology: free created components in tplg load error net: mv643xx_eth: disable clk on error path in mv643xx_eth_shared_probe() pinctrl: meson: meson8b: fix the sdxc_a data 1..3 pins net: systemport: Fix reception of BPDUs scsi: libiscsi: Fix race between iscsi_xmit_task and iscsi_complete_task assoc_array: Fix shortcut creation ARM: 8824/1: fix a migrating irq bug when hotplug cpu Input: st-keyscan - fix potential zalloc NULL dereference i2c: cadence: Fix the hold bit setting Input: matrix_keypad - use flush_delayed_work() ARM: OMAP2+: Variable "reg" in function omap4_dsi_mux_pads() could be uninitialized s390/dasd: fix using offset into zero size array error gpu: ipu-v3: Fix CSI offsets for imx53 gpu: ipu-v3: Fix i.MX51 CSI control registers offset crypto: ahash - fix another early termination in hash walk crypto: caam - fixed handling of sg list stm class: Fix an endless loop in channel allocation ASoC: fsl_esai: fix register setting issue in RIGHT_J mode 9p/net: fix memory leak in p9_client_create 9p: use inode->i_lock to protect i_size_write() under 32-bit media: videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused() It's wrong to add len to sector_nr in raid10 reshape twice fs/9p: use fscache mutex rather than spinlock ALSA: bebob: use more identical mod_alias for Saffire Pro 10 I/O against Liquid Saffire 56 tcp/dccp: remove reqsk_put() from inet_child_forget() gro_cells: make sure device is up in gro_cells_receive() net/hsr: fix possible crash in add_timer() vxlan: Fix GRO cells race condition between receive and link delete vxlan: test dev->flags & IFF_UP before calling gro_cells_receive() ipvlan: disallow userns cap_net_admin to change global mode/flags missing barriers in some of unix_sock ->addr and ->path accesses net: Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255 mdio_bus: Fix use-after-free on device_register fails net/x25: fix a race in x25_bind() net/mlx4_core: Fix qp mtt size calculation net/mlx4_core: Fix reset flow when in command polling mode tcp: handle inet_csk_reqsk_queue_add() failures route: set the deleted fnhe fnhe_daddr to 0 in ip_del_fnhe to fix a race ravb: Decrease TxFIFO depth of Q3 and Q2 to one pptp: dst_release sk_dst_cache in pptp_sock_destruct net/x25: reset state in x25_connect() net/x25: fix use-after-free in x25_device_event() net: sit: fix UBSAN Undefined behaviour in check_6rd net: hsr: fix memory leak in hsr_dev_finalize() l2tp: fix infoleak in l2tp_ip6_recvmsg() KEYS: restrict /proc/keys by credentials at open time netfilter: nf_conntrack_tcp: Fix stack out of bounds when parsing TCP options netfilter: nfnetlink_acct: validate NFACCT_FILTER parameters netfilter: nfnetlink_log: just returns error for unknown command netfilter: x_tables: enforce nul-terminated table name from getsockopt GET_ENTRIES udplite: call proper backlog handlers ARM: dts: exynos: Do not ignore real-world fuse values for thermal zone 0 on Exynos5420 Revert "x86/platform/UV: Use efi_runtime_lock to serialise BIOS calls" ARM: dts: exynos: Add minimal clkout parameters to Exynos3250 PMU futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock() 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 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 dmaengine: dmatest: Abort test in case of mapping error dmaengine: at_xdmac: Fix wrongfull report of a channel as in use irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable ARM: pxa: ssp: unneeded to free devm_ allocated data 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() 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 cifs: fix computation for MAX_SMB2_HDR_SIZE platform/x86: Fix unmet dependency warning for SAMSUNG_Q10 scsi: libfc: free skb when receiving invalid flogi resp 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: 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 IB/{hfi1, qib}: Fix WC.byte_len calculation for UD_SEND_WITH_IMM perf tools: Handle TOPOLOGY headers with no CPU vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel media: uvcvideo: Fix 'type' check leading to overflow ip6mr: Do not call __IP6_INC_STATS() from preemptible context net: dsa: mv88e6xxx: Fix u64 statistics netlabel: fix out-of-bounds memory accesses hugetlbfs: fix races and page leaks during migration 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 net: avoid use IPCB in cipso_v4_error net: Add __icmp_send helper. xen-netback: fix occasional leak of grant ref mappings under memory pressure net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails 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 staging: lustre: fix buffer overflow of string buffer isdn: isdn_tty: fix build warning of strncpy ncpfs: fix build warning of strncpy sockfs: getxattr: Fail with -EOPNOTSUPP for invalid attribute names cpufreq: Use struct kobj_attribute instead of struct global_attr 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 x86/uaccess: Don't leak the AC flag into __put_user() value evaluation mm: enforce min addr even if capable() in expand_downwards() mmc: spi: Fix card detection during probe powerpc: Always initialize input array when calling epapr_hypercall() KVM: arm/arm64: Fix MMIO emulation data handling arm/arm64: KVM: Feed initialized memory to MMIO accesses KVM: nSVM: clear events pending from svm_complete_interrupts() when exiting to L1 cfg80211: extend range deviation for DMG mac80211: don't initiate TDLS connection if station is not associated to AP ibmveth: Do not process frames after calling napi_reschedule net: altera_tse: fix connect_local_phy error path scsi: csiostor: fix NULL pointer dereference in csio_vport_set_state() serial: fsl_lpuart: fix maximum acceptable baud rate with over-sampling mac80211: fix miscounting of ttl-dropped frames ARC: fix __ffs return value to avoid build warnings ASoC: imx-audmux: change snprintf to scnprintf for possible overflow ASoC: dapm: change snprintf to scnprintf for possible overflow usb: gadget: Potential NULL dereference on allocation error usb: dwc3: gadget: Fix the uninitialized link_state when udc starts thermal: int340x_thermal: Fix a NULL vs IS_ERR() check ALSA: compress: prevent potential divide by zero bugs ASoC: Intel: Haswell/Broadwell: fix setting for .dynamic field drm/msm: Unblock writer if reader closes file scsi: libsas: Fix rphy phy_identifier for PHYs with end devices attached libceph: handle an empty authorize reply Revert "bridge: do not add port to router list when receives query with source 0.0.0.0" ARCv2: Enable unaligned access in early ASM code net/mlx4_en: Force CHECKSUM_NONE for short ethernet frames sit: check if IPv6 enabled before calling ip6_err_gen_icmpv6_unreach() team: avoid complex list operations in team_nl_cmd_options_set() net/packet: fix 4gb buffer limit due to overflow check batman-adv: fix uninit-value in batadv_interface_tx() KEYS: always initialize keyring_index_key::desc_len KEYS: user: Align the payload buffer RDMA/srp: Rework SCSI device reset handling isdn: avm: Fix string plus integer warning from Clang leds: lp5523: fix a missing check of return value of lp55xx_read atm: he: fix sign-extension overflow on large shift isdn: i4l: isdn_tty: Fix some concurrency double-free bugs MIPS: jazz: fix 64bit build scsi: isci: initialize shost fully before calling scsi_add_host() scsi: qla4xxx: check return code of qla4xxx_copy_from_fwddb_param MIPS: ath79: Enable OF serial ports in the default config net: hns: Fix use after free identified by SLUB debug mfd: mc13xxx: Fix a missing check of a register-read failure mfd: wm5110: Add missing ASRC rate register mfd: qcom_rpm: write fw_version to CTRL_REG mfd: ab8500-core: Return zero in get_register_interruptible() mfd: db8500-prcmu: Fix some section annotations mfd: twl-core: Fix section annotations on {,un}protect_pm_master mfd: ti_am335x_tscadc: Use PLATFORM_DEVID_AUTO while registering mfd cells KEYS: allow reaching the keys quotas exactly numa: change get_mempolicy() to use nr_node_ids instead of MAX_NUMNODES ceph: avoid repeatedly adding inode to mdsc->snap_flush_list Revert "ANDROID: arm: process: Add display of memory around registers when displaying regs." ANDROID: mnt: Propagate remount correctly ANDROID: cuttlefish_defconfig: Add support for AC97 audio ANDROID: overlayfs: override_creds=off option bypass creator_cred FROMGIT: binder: create node flag to request sender's security context Conflicts: arch/arm/kernel/irq.c drivers/media/v4l2-core/videobuf2-v4l2.c sound/core/compress_offload.c Change-Id: I998f8d53b0c5b8a7102816034452b1779a3b69a3 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2019-03-23leds: lp5523: fix a missing check of return value of lp55xx_readKangjie Lu
[ Upstream commit 248b57015f35c94d4eae2fdd8c6febf5cd703900 ] When lp55xx_read() fails, "status" is an uninitialized variable and thus may contain random value; using it leads to undefined behaviors. The fix inserts a check for the return value of lp55xx_read: if it fails, returns with its error code. Signed-off-by: Kangjie Lu <kjlu@umn.edu> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-15leds: qpnp-haptics: Update auto mode configurationSubbaraman Narayanamurthy
Based on the hardware recommendation, update the LRA auto mode configuration. Change-Id: I23e1fe0a232db1759294fc061fa8a08f2d3ae13f Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org> Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
2019-02-15drivers: leds-qpnp-flash: fix issues raised by static analyserAbinaya P
Fix the below mentioned issues raised by static analyser: 1. use of uninitialized values in the function. a) 'root' may be uninitialized when it reaches line:2599. Hence, modify the error path accordingly. b) 'j' may be uninitialized when it reaches the for loop in line: 2593 and may hold garbage value due to which the condition in the for loop may become true and this may lead to erroneous results. Hence, initialize it to -1 so that the error path will be handled correctly. 2. Comparison of unsigned value against 0 is always false. CRs-fixed: 2206448 Change-Id: I56950779d221acf3572cba70a64874299f127004 Signed-off-by: Kiran Gunda <kgunda@codeaurora.org> Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
2019-02-15leds: qpnp-flash: Introduce a function pointer for qpnp_flash_led_prepareKiran Gunda
Introduce a function pointer to avoid the compilation error due the same function name used in the legacy and v2 flash drivers. These two drivers need to be enabled in a single defconfig that supports multiple hardware platforms to achieve the binary compatibility. Change-Id: I1ded3d4d9013c6f7f56e0a8952f4b45d20b07326 Signed-off-by: Kiran Gunda <kgunda@codeaurora.org> Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
2019-02-15leds: qpnp-flash: Add snapshot of leds-qpnp-flash driverKiran Gunda
This is snapshot of the leds-qpnp-flash driver as of msm-4.4 'commit d851b0621739 ("leds: qpnp-flash: Fix Use-after-free(UAF) for debugfs")'. Change-Id: I9753ab4e0fee03a957960003efc2941bc48616ac Signed-off-by: Kiran Gunda <kgunda@codeaurora.org> Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
2019-02-15msm: qpnp-haptic: Force disable haptics during shutdownAnirudh Ghayal
Force disable haptics during shutdown to avoid the device from vibrating during TWM entry. Change-Id: I6bfdf4d9a634dec1aa56a1fdc5553cefe4a94a73 Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org> Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
2019-02-15leds: qpnp-haptic: Manage the state of PON regulatorVamshi Krishna B V
Control the PON regulator (required to force MBG_ON) based on the current state of haptic and maintain the regulator state to avoid frequent enable/disable. CRs-Fixed: 1111145 Change-Id: I7e5656808b04a52fe3cfd57ab0d23a8e4e0db5f2 Signed-off-by: Vamshi Krishna B V <vbv@codeaurora.org> Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
2019-02-15leds: qpnp-haptics: Allow duration for buffer modeSubbaraman Narayanamurthy
Currently, duration is not allowed to be set while playing the pattern in buffer mode. This works fine. However when playing multiple sample sets, the last sample set might be stopped early as the play interrupt fires immediately after configuring the new sample set. Fix this by calculating the duration based on the wave samples configured and the play rate. Change-Id: I67b1741d435e07bf7332f7e36231fefa9129a9a6 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org> Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
2019-02-15drivers: fix 32bit compilation for QPNP driversTirupathi Reddy
Use div_s64() for signed 64bit division with 32bit divider and div64_s64() for signed 64bit division with 64bit divider. CRs-Fixed: 2170745 Change-Id: I1dcf9e83ba492559df2a8b6be9484196f53d6193 Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org> Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
2019-02-15leds: qpnp-haptics: Add haptics driverSubbaraman Narayanamurthy
Existing haptics driver is coupled with timed_output class driver which was existing under staging/android. Since the vibrator HAL in AOSP had been modified to support vibrator device under LED class and also the timed_output class driver had been dropped in newer kernel versions, create a new haptics driver that registers with LED class framework. As before, haptics module supports multiple play modes, direct, buffer, audio and PWM. It supports different actuators, ERM and LRA. Driver supports to play multiple set of wave samples (upto 32) in buffer mode which can be configured by the user instead of just based on the duration. For example, to enable haptics for 30 ms, echo 30 > /sys/class/leds/vibrator/duration echo 1 > /sys/class/leds/vibrator/activate Change-Id: I250089212c5da403531ae012c6e48e58bb1d18b3 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org> Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
2018-12-14Merge android-4.4.167 (ad9ce19) into msm-4.4Srinivasarao P
* refs/heads/tmp-ad9ce19 Linux 4.4.167 mac80211: ignore NullFunc frames in the duplicate detection mac80211: fix reordering of buffered broadcast packets mac80211: ignore tx status for PS stations in ieee80211_tx_status_ext mac80211: Clear beacon_int in ieee80211_do_stop mac80211_hwsim: Timer should be initialized before device registered kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var() tty: serial: 8250_mtk: always resume the device in probe. cifs: Fix separator when building path from dentry Staging: lustre: remove two build warnings xhci: Prevent U1/U2 link pm states if exit latency is too long SUNRPC: Fix leak of krb5p encode pages virtio/s390: fix race in ccw_io_helper() virtio/s390: avoid race on vcdev->config ALSA: pcm: Fix interval evaluation with openmin/max ALSA: pcm: Call snd_pcm_unlink() conditionally at closing ALSA: pcm: Fix starvation on down_write_nonblock() ALSA: hda: Add support for AMD Stoney Ridge ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c USB: check usb_get_extra_descriptor for proper size usb: appledisplay: Add 27" Apple Cinema Display usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device net: amd: add missing of_node_put() iommu/vt-d: Use memunmap to free memremap net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts net/mlx4: Fix UBSAN warning of signed integer overflow net/mlx4_core: Fix uninitialized variable compilation warning net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command qed: Fix reading wrong value in loop condition qed: Fix PTT leak in qed_drain() bnx2x: Assign unique DMAE channel number for FW DMAE transactions. batman-adv: Expand merged fragment buffer for full packet can: rcar_can: Fix erroneous registration iommu/ipmmu-vmsa: Fix crash on early domain free iommu/vt-d: Fix NULL pointer dereference in prq_event_thread() usb: gadget: dummy: fix nonsensical comparisons mm: mlock: avoid increase mm->locked_vm on mlock() when already mlock2(,MLOCK_ONFAULT) mm: cleancache: fix corruption on missed inode invalidation arc: [devboards] Add support of NFSv3 ACL ARC: change defconfig defaults to ARCv2 Btrfs: fix use-after-free when dumping free space btrfs: Always try all copies when reading extent buffers Input: elan_i2c - add support for ELAN0621 touchpad Input: elan_i2c - add ACPI ID for Lenovo IdeaPad 330-15ARR Input: elan_i2c - add ELAN0620 to the ACPI table Input: matrix_keypad - check for errors from of_get_named_gpio() Input: xpad - quirk all PDP Xbox One gamepads leds: leds-gpio: Fix return value check in create_gpio_led() leds: turn off the LED and wait for completion on unregistering LED class device leds: call led_pwm_set() in leds-pwm to enforce default LED_OFF kgdboc: Fix warning with module build kgdboc: Fix restrict error scsi: csiostor: Avoid content leaks and casts ALSA: trident: Suppress gcc string warning scsi: scsi_devinfo: cleanly zero-pad devinfo strings drm/ast: Fix incorrect free on ioregs mips: fix mips_get_syscall_arg o32 check MIPS: ralink: Fix mt7620 nd_sd pinmux uprobes: Fix handle_swbp() vs. unregister() + register() race once more iser: set sector for ambiguous mr status errors kdb: use memmove instead of overlapping memcpy staging: rts5208: fix gcc-8 logic error warning scsi: bfa: convert to strlcpy/strlcat drm: gma500: fix logic error ip_tunnel: Fix name string concatenate in __ip_tunnel_create() kernfs: Replace strncpy with memcpy unifdef: use memcpy instead of strncpy kobject: Replace strncpy with memcpy disable stringop truncation warnings for now exec: avoid gcc-8 warning for get_task_comm Kbuild: suppress packed-not-aligned warning for default setting only misc: mic/scif: fix copy-paste error in scif_create_remote_lookup usb: core: quirks: add RESET_RESUME quirk for Cherry G230 Stream series USB: usb-storage: Add new IDs to ums-realtek btrfs: release metadata before running delayed refs dmaengine: at_hdmac: fix module unloading dmaengine: at_hdmac: fix memory leak in at_dma_xlate() ext2: fix potential use after free ALSA: sparc: Fix invalid snd_free_pages() at error path ALSA: control: Fix race between adding and removing a user element ALSA: ac97: Fix incorrect bit shift at AC97-SPSA control write ALSA: wss: Fix invalid snd_free_pages() at error path Btrfs: ensure path name is null terminated at btrfs_control_ioctl xtensa: fix coprocessor context offset definitions xtensa: enable coprocessors that are being flushed kvm: mmu: Fix race in emulated page table writes usbnet: ipheth: fix potential recvmsg bug and recvmsg bug 2 s390/qeth: fix length check in SNMP processing rapidio/rionet: do not free skb before reading its length Revert "wlcore: Add missing PM call for wlcore_cmd_wait_for_event_or_timeout()" media: em28xx: Fix use-after-free when disconnecting ANDROID: cuttlefish_defconfig: Enable VIRT_WIFI FROMGIT, BACKPORT: mac80211-next: rtnetlink wifi simulation device ANDROID: Move from clang r328903 to r346389b. UPSTREAM: binder: fix race that allows malicious free of live buffer Change-Id: If4e5a3a45f6f0b7de31f203c09fce5bae1466e49 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-12-13leds: leds-gpio: Fix return value check in create_gpio_led()Wei Yongjun
commit 2d88a331e48095cf60ad9bdf3177bd401bf99727 upstream. In case of error, the function gpio_to_desc() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13leds: turn off the LED and wait for completion on unregistering LED class deviceMilo Kim
commit d1aa577f5e191d77d3ad62da93729b5af9532bb4 upstream. Workqueue, 'set_brightness_work' is used for scheduling brightness control. This workqueue is canceled when the LED class device is unregistered. Currently, LED subsystem handles like below. cancel_work_sync(&led_cdev->set_brightness_work) led_set_brightness(led_cdev, LED_OFF) However, this could be a problem. Workqueue is going to be canceled but LED device needs to be off. The worst case is null pointer access due to scheduling a workqueue. LED module is loaded. LED driver private data is allocated by using devm_zalloc(). LED module is unloaded. led_classdev_unregister() is called. cancel_work_sync() led_set_brightness(led_cdev, LED_OFF) schedule_work() if LED driver uses brightness_set_blocking() In the meantime, driver private data will be freed. ..scheduling.. brightness_set_blocking() callback is invoked. For the brightness control, LED driver tries to access private data but resource is removed! To avoid this problem, LED subsystem should turn off the brightness first and wait for completion. led_set_brightness(led_cdev, LED_OFF) flush_work(&led_cdev->set_brightness_work) It guarantees that LED driver turns off the brightness prior to resource management. Cc: linux-leds@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13leds: call led_pwm_set() in leds-pwm to enforce default LED_OFFMarkus Hofstaetter
commit f16703360da7731a057df2ffa902306819c22398 upstream. Some PWMs are disabled by default or the default pin setting does not match the LED_OFF state (e.g., active-low leds). Hence, the driver may end up reporting 0 brightness, but the leds are actually on using full brightness, because it never enforces its default configuration. So enforce it by calling led_pwm_set() after successfully registering the device. Tested on a Phytec phyFLEX i.MX6Q board based on kernel v3.19.5. Signed-off-by: Markus Hofstaetter <markus.hofstaetter@ait.ac.at> Tested-by: Markus Hofstaetter <markus.hofstaetter@ait.ac.at> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-02Merge "leds: qpnp-flash-v2: Modify current code calculation"Linux Build Service Account
2018-04-26leds: qpnp-flash-v2: Modify current code calculationSubbaraman Narayanamurthy
Currently, the code calculated for a desired target current and IRES is rounded up since DIV_ROUND_UP is used in the calculation. With a higher IRES (12.5 mA), code can be configured to a higher value. Fix this by using DIV_ROUND_CLOSEST so that the optimal code can be obtained. Change-Id: I51c1b15fff3ff2a23cb256f2ae1d341f5271adf2 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2018-04-20Merge android-4.4.128 (89904cc) into msm-4.4Srinivasarao P
* refs/heads/tmp-89904cc ANDROID: Add build server config for cuttlefish. ANDROID: Add defconfig for cuttlefish. FROMLIST: staging: Android: Add 'vsoc' driver for cuttlefish. Revert "proc: make oom adjustment files user read-only" Revert "fixup! proc: make oom adjustment files user read-only" Linux 4.4.128 Revert "xhci: plat: Register shutdown for xhci_plat" vrf: Fix use after free and double free in vrf_finish_output ipv6: the entire IPv6 header chain must fit the first fragment net/ipv6: Increment OUTxxx counters after netfilter hook net sched actions: fix dumping which requires several messages to user space r8169: fix setting driver_data after register_netdev vti6: better validate user provided tunnel names ip6_tunnel: better validate user provided tunnel names ip6_gre: better validate user provided tunnel names ipv6: sit: better validate user provided tunnel names ip_tunnel: better validate user provided tunnel names net: fool proof dev_valid_name() bonding: process the err returned by dev_set_allmulti properly in bond_enslave bonding: move dev_mc_sync after master_upper_dev_link in bond_enslave bonding: fix the err path for dev hwaddr sync in bond_enslave vlan: also check phy_driver ts_info for vlan's real device vhost: correctly remove wait queue during poll failure sky2: Increase D3 delay to sky2 stops working after suspend sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6 sctp: do not leak kernel memory to user space pptp: remove a buggy dst release in pptp_connect() net/sched: fix NULL dereference in the error path of tcf_bpf_init() netlink: make sure nladdr has correct size in netlink_connect() net/ipv6: Fix route leaking between VRFs net: fix possible out-of-bound read in skb_network_protocol() arp: fix arp_filter on l3slave devices Kbuild: provide a __UNIQUE_ID for clang futex: Remove requirement for lock_page() in get_futex_key() random: use lockless method of accessing and updating f->reg_idx virtio_net: check return value of skb_to_sgvec in one more location virtio_net: check return value of skb_to_sgvec always rxrpc: check return value of skb_to_sgvec always ipsec: check return value of skb_to_sgvec always perf tools: Fix copyfile_offset update of output offset cxgb4vf: Fix SGE FL buffer initialization logic for 64K pages EDAC, mv64x60: Fix an error handling path tty: n_gsm: Allow ADM response in addition to UA for control dlci blk-mq: fix kernel oops in blk_mq_tag_idle() scsi: libsas: initialize sas_phy status according to response of DISCOVER scsi: libsas: fix error when getting phy events scsi: libsas: fix memory leak in sas_smp_get_phy_events() bcache: segregate flash only volume write streams bcache: stop writeback thread after detaching vxlan: dont migrate permanent fdb entries during learn s390/dasd: fix hanging safe offline ACPICA: Disassembler: Abort on an invalid/unknown AML opcode ACPICA: Events: Add runtime stub support for event APIs cpuidle: dt: Add missing 'of_node_put()' Bluetooth: Send HCI Set Event Mask Page 2 command only when needed iio: magnetometer: st_magn_spi: fix spi_device_id table sparc64: ldc abort during vds iso boot sctp: fix recursive locking warning in sctp_do_peeloff bnx2x: Allow vfs to disable txvlan offload xen: avoid type warning in xchg_xen_ulong skbuff: only inherit relevant tx_flags perf tests: Decompress kernel module before objdump net: emac: fix reset timeout with AR8035 phy Fix loop device flush before configure v3 MIPS: kprobes: flush_insn_slot should flush only if probe initialised MIPS: mm: adjust PKMAP location MIPS: mm: fixed mappings: correct initialisation perf/core: Correct event creation with PERF_FORMAT_GROUP e1000e: Undo e1000e_pm_freeze if __e1000_shutdown fails ARM: imx: Add MXC_CPU_IMX6ULL and cpu_is_imx6ull net: phy: avoid genphy_aneg_done() for PHYs without clause 22 support mceusb: sporadic RX truncation corruption fix cx25840: fix unchecked return values e1000e: fix race condition around skb_tstamp_tx() tags: honor COMPILED_SOURCE with apart output directory perf report: Ensure the perf DSO mapping matches what libdw sees perf header: Set proper module name when build-id event found net/mlx4: Check if Granular QoS per VF has been enabled before updating QP qos_vport net/mlx4: Fix the check in attaching steering rules sit: reload iphdr in ipip6_rcv skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow bio-integrity: Do not allocate integrity context for bio w/o data Fix serial console on SNI RM400 machines cxgb4: fix incorrect cim_la output for T6 drm/omap: fix tiled buffer stride calculations mISDN: Fix a sleep-in-atomic bug qlcnic: Fix a sleep-in-atomic bug in qlcnic_82xx_hw_write_wx_2M and qlcnic_82xx_hw_read_wx_2M perf trace: Add mmap alias for s390 powerpc/spufs: Fix coredump of SPU contexts clk: Fix __set_clk_rates error print-string clk: scpi: fix return type of __scpi_dvfs_round_rate KVM: SVM: do not zero out segment attributes if segment is unusable or not present net: freescale: fix potential null pointer dereference SUNRPC: ensure correct error is reported by xs_tcp_setup_socket() rtc: interface: Validate alarm-time before handling rollover rtc: opal: Handle disabled TPO in opal_get_tpo_time() cxgb4: FW upgrade fixes net/mlx5: avoid build warning for uniprocessor arm64: futex: Fix undefined behaviour with FUTEX_OP_OPARG_SHIFT usage dmaengine: imx-sdma: Handle return value of clk_prepare_enable powerpc/[booke|4xx]: Don't clobber TCR[WP] when setting TCR[DIE] ovl: filter trusted xattr for non-admin hdlcdrv: Fix divide by zero in hdlcdrv_ioctl wl1251: check return from call to wl1251_acx_arp_ip_filter ASoC: Intel: sst: Fix the return value of 'sst_send_byte_stream_mrfld()' gpio: label descriptors using the device name vfb: fix video mode and line_length being set when loaded scsi: mpt3sas: Proper handling of set/clear of "ATA command pending" flag. scsi: libiscsi: Allow sd_shutdown on bad transport ASoC: Intel: cht_bsw_rt5645: Analog Mic support media: videobuf2-core: don't go out of the buffer range hwmon: (ina2xx) Make calibration register value fixed rds; Reset rs->rs_bound_addr in rds_add_bound() failure path l2tp: fix missing print session offset info perf probe: Add warning message if there is unexpected event name thermal: power_allocator: fix one race condition issue for thermal_instances list ARM: dts: ls1021a: add "fsl,ls1021a-esdhc" compatible string to esdhc node net: llc: add lock_sock in llc_ui_bind to avoid a race condition KVM: nVMX: Fix handling of lmsw instruction bonding: Don't update slave->link until ready to commit Input: elan_i2c - clear INT before resetting controller net: move somaxconn init from sysctl code tcp: better validation of received ack sequences ext4: fix off-by-one on max nr_pages in ext4_find_unwritten_pgoff() fix race in drivers/char/random.c:get_reg() scsi: bnx2fc: fix race condition in bnx2fc_get_host_stats() ASoC: rsnd: SSI PIO adjust to 24bit mode pNFS/flexfiles: missing error code in ff_layout_alloc_lseg() netfilter: ctnetlink: fix incorrect nf_ct_put during hash resize libceph: NULL deref on crush_decode() error path net: ieee802154: fix net_device reference release too early mlx5: fix bug reading rss_hash_type from CQE block: fix an error code in add_partition() selinux: do not check open permission on sockets net/mlx5: Tolerate irq_set_affinity_hint() failures sched/numa: Use down_read_trylock() for the mmap_sem leds: pca955x: Correct I2C Functionality ray_cs: Avoid reading past end of buffer ARM: davinci: da8xx: Create DSP device only when assigned memory md-cluster: fix potential lock issue in add_new_disk ext4: handle the rest of ext4_mb_load_buddy() ENOMEM errors iio: hi8435: cleanup reset gpio iio: hi8435: avoid garbage event at first enable xfrm: fix state migration copy replay sequence numbers selftests/powerpc: Fix TM resched DSCR test with some compilers ath5k: fix memory leak on buf on failed eeprom read powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash scsi: csiostor: fix use after free in csio_hw_use_fwconfig() sh_eth: Use platform device for printing before register_netdev() serial: sh-sci: Fix race condition causing garbage during shutdown serial: 8250: omap: Disable DMA for console UART USB: ene_usb6250: fix SCSI residue overwriting net: x25: fix one potential use-after-free issue USB: ene_usb6250: fix first command execution usb: chipidea: properly handle host or gadget initialization failure arp: honour gratuitous ARP _replies_ neighbour: update neigh timestamps iff update is effective ata: libahci: properly propagate return value of platform_get_irq() btrfs: fix incorrect error return ret being passed to mapping_set_error usb: dwc3: keystone: check return value async_tx: Fix DMA_PREP_FENCE usage in do_async_gen_syndrome() ipv6: avoid dad-failures for addresses with NODAD ARM: dts: imx6qdl-wandboard: Fix audio channel swap x86/tsc: Provide 'tsc=unstable' boot parameter staging: wlan-ng: prism2mgmt.c: fixed a double endian conversion before calling hfa384x_drvr_setconfig16, also fixes relative sparse warning ARM: dts: imx53-qsrb: Pulldown PMIC IRQ pin PowerCap: Fix an error code in powercap_register_zone() bus: brcmstb_gisb: correct support for 64-bit address output bus: brcmstb_gisb: Use register offsets with writes too SMB2: Fix share type handling vmxnet3: ensure that adapter is in proper state during force_close KVM: PPC: Book3S PR: Check copy_to/from_user return values Input: elantech - force relative mode on a certain module Input: elan_i2c - check if device is there before really probing netxen_nic: set rcode to the return status from the call to netxen_issue_cmd net: qca_spi: Fix alignment issues in rx path blk-mq: NVMe 512B/4K+T10 DIF/DIX format returns I/O error on dd with split op CIFS: silence lockdep splat in cifs_relock_file() NFSv4.1: Work around a Linux server bug... net/mlx4_en: Avoid adding steering rules with invalid ring s390: move _text symbol to address higher than zero pidns: disable pid allocation if pid_ns_prepare_proc() is failed in alloc_pid() drivers/misc/vmw_vmci/vmci_queue_pair.c: fix a couple integer overflow tests lockd: fix lockd shutdown race net: ethernet: ti: cpsw: adjust cpsw fifos depth for fullduplex flow control net: cdc_ncm: Fix TX zero padding ipmi_ssif: unlock on allocation failure qlge: Avoid reading past end of buffer bna: Avoid reading past end of buffer mac80211: bail out from prep_connection() if a reconfig is ongoing af_key: Fix slab-out-of-bounds in pfkey_compile_policy. IB/srpt: Fix abort handling NFSv4.1: RECLAIM_COMPLETE must handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION x86/asm: Don't use RBP as a temporary register in csum_partial_copy_generic() rtc: snvs: fix an incorrect check of return value md/raid5: make use of spin_lock_irq over local_irq_disable + spin_lock cfg80211: make RATE_INFO_BW_20 the default ANDROID: proc: add null check in proc_uid_init f2fs/fscrypt: updates to v4.17-rc1 Reduce amount of casting in drivers/tty/goldfish.c. Conflicts: drivers/staging/android/Kconfig drivers/staging/android/Makefile Change-Id: Ic7aa3df76a0312b8d6d84f8a8e11e793311a239a Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-04-20Merge android-4.4.127 (d6bbe8b) into msm-4.4Srinivasarao P
* refs/heads/tmp-d6bbe8b Linux 4.4.127 Revert "ip6_vti: adjust vti mtu according to mtu of lower device" net: cavium: liquidio: fix up "Avoid dma_unmap_single on uninitialized ndata" spi: davinci: fix up dma_mapping_error() incorrect patch Revert "mtip32xx: use runtime tag to initialize command header" Revert "cpufreq: Fix governor module removal race" Revert "ARM: dts: omap3-n900: Fix the audio CODEC's reset pin" Revert "ARM: dts: am335x-pepper: Fix the audio CODEC's reset pin" Revert "PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown()" nospec: Kill array_index_nospec_mask_check() nospec: Move array_index_nospec() parameter checking into separate macro net: hns: Fix ethtool private flags md/raid10: reset the 'first' at the end of loop ARM: dts: am57xx-beagle-x15-common: Add overide powerhold property ARM: dts: dra7: Add power hold and power controller properties to palmas Documentation: pinctrl: palmas: Add ti,palmas-powerhold-override property definition vt: change SGR 21 to follow the standards Input: i8042 - enable MUX on Sony VAIO VGN-CS series to fix touchpad Input: i8042 - add Lenovo ThinkPad L460 to i8042 reset list staging: comedi: ni_mio_common: ack ai fifo error interrupts. fs/proc: Stop trying to report thread stacks crypto: x86/cast5-avx - fix ECB encryption when long sg follows short one crypto: ahash - Fix early termination in hash walk parport_pc: Add support for WCH CH382L PCI-E single parallel port card. media: usbtv: prevent double free in error case mei: remove dev_err message on an unsupported ioctl USB: serial: cp210x: add ELDAT Easywave RX09 id USB: serial: ftdi_sio: add support for Harman FirmwareHubEmulator USB: serial: ftdi_sio: add RT Systems VX-8 cable usb: dwc2: Improve gadget state disconnection handling scsi: virtio_scsi: always read VPD pages for multiqueue too llist: clang: introduce member_address_is_nonnull() Bluetooth: Fix missing encryption refresh on Security Request netfilter: x_tables: add and use xt_check_proc_name netfilter: bridge: ebt_among: add more missing match size checks xfrm: Refuse to insert 32 bit userspace socket policies on 64 bit systems net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms() RDMA/ucma: Introduce safer rdma_addr_size() variants RDMA/ucma: Don't allow join attempts for unsupported AF family RDMA/ucma: Check that device exists prior to accessing it RDMA/ucma: Check that device is connected prior to access it RDMA/ucma: Ensure that CM_ID exists prior to access it RDMA/ucma: Fix use-after-free access in ucma_close RDMA/ucma: Check AF family prior resolving address xfrm_user: uncoditionally validate esn replay attribute struct arm64: avoid overflow in VA_START and PAGE_OFFSET selinux: Remove redundant check for unknown labeling behavior netfilter: ctnetlink: Make some parameters integer to avoid enum mismatch tty: provide tty_name() even without CONFIG_TTY audit: add tty field to LOGIN event frv: declare jiffies to be located in the .data section jiffies.h: declare jiffies and jiffies_64 with ____cacheline_aligned_in_smp fs: compat: Remove warning from COMPATIBLE_IOCTL selinux: Remove unnecessary check of array base in selinux_set_mapping() cpumask: Add helper cpumask_available() genirq: Use cpumask_available() for check of cpumask variable netfilter: nf_nat_h323: fix logical-not-parentheses warning Input: mousedev - fix implicit conversion warning dm ioctl: remove double parentheses PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant writeback: fix the wrong congested state variable definition ACPI, PCI, irq: remove redundant check for null string pointer kprobes/x86: Fix to set RWX bits correctly before releasing trampoline usb: gadget: f_hid: fix: Prevent accessing released memory usb: gadget: align buffer size when allocating for OUT endpoint usb: gadget: fix usb_ep_align_maybe endianness and new usb_ep_align usb: gadget: change len to size_t on alloc_ep_req() usb: gadget: define free_ep_req as universal function partitions/msdos: Unable to mount UFS 44bsd partitions perf/hwbp: Simplify the perf-hwbp code, fix documentation ALSA: pcm: potential uninitialized return values ALSA: pcm: Use dma_bytes as size parameter in dma_mmap_coherent() mtd: jedec_probe: Fix crash in jedec_read_mfr() Replace #define with enum for better compilation errors. Add missing include to drivers/tty/goldfish.c Fix whitespace in drivers/tty/goldfish.c ANDROID: fuse: Add null terminator to path in canonical path to avoid issue ANDROID: sdcardfs: Fix sdcardfs to stop creating cases-sensitive duplicate entries. ANDROID: add missing include to pdev_bus ANDROID: pdev_bus: replace writel with gf_write_ptr ANDROID: Cleanup type casting in goldfish.h ANDROID: Include missing headers in goldfish.h ANDROID: cpufreq: times: skip printing invalid frequencies ANDROID: xt_qtaguid: Remove unnecessary null checks to device's name ANDROID: xt_qtaguid: Remove unnecessary null checks to ifa_label ANDROID: cpufreq: times: allocate enough space for a uid_entry Linux 4.4.126 net: systemport: Rewrite __bcm_sysport_tx_reclaim() net: fec: Fix unbalanced PM runtime calls ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event() s390/qeth: on channel error, reject further cmd requests s390/qeth: lock read device while queueing next buffer s390/qeth: when thread completes, wake up all waiters s390/qeth: free netdevice when removing a card team: Fix double free in error path skbuff: Fix not waking applications when errors are enqueued net: Only honor ifindex in IP_PKTINFO if non-0 netlink: avoid a double skb free in genlmsg_mcast() net/iucv: Free memory obtained by kzalloc net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred l2tp: do not accept arbitrary sockets ipv6: fix access to non-linear packet in ndisc_fill_redirect_hdr_option() dccp: check sk for closed state in dccp_sendmsg() net: Fix hlist corruptions in inet_evict_bucket() Revert "genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs" scsi: sg: don't return bogus Sg_requests Revert "genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs" UPSTREAM: drm: virtio-gpu: set atomic flag UPSTREAM: drm: virtio-gpu: transfer dumb buffers to host on plane update UPSTREAM: drm: virtio-gpu: ensure plane is flushed to host on atomic update UPSTREAM: drm: virtio-gpu: get the fb from the plane state for atomic updates Linux 4.4.125 bpf, x64: increase number of passes bpf: skip unnecessary capability check kbuild: disable clang's default use of -fmerge-all-constants staging: lustre: ptlrpc: kfree used instead of kvfree perf/x86/intel: Don't accidentally clear high bits in bdw_limit_period() x86/entry/64: Don't use IST entry for #BP stack x86/boot/64: Verify alignment of the LOAD segment x86/build/64: Force the linker to use 2MB page size kvm/x86: fix icebp instruction handling tty: vt: fix up tabstops properly can: cc770: Fix use after free in cc770_tx_interrupt() can: cc770: Fix queue stall & dropped RTR reply can: cc770: Fix stalls on rt-linux, remove redundant IRQ ack staging: ncpfs: memory corruption in ncp_read_kernel() mtd: nand: fsl_ifc: Fix nand waitfunc return value tracing: probeevent: Fix to support minus offset from symbol rtlwifi: rtl8723be: Fix loss of signal brcmfmac: fix P2P_DEVICE ethernet address generation acpi, numa: fix pxm to online numa node associations drm: udl: Properly check framebuffer mmap offsets drm/radeon: Don't turn off DP sink when disconnected drm/vmwgfx: Fix a destoy-while-held mutex problem. x86/mm: implement free pmd/pte page interfaces mm/vmalloc: add interfaces to free unmapped page table libata: Modify quirks for MX100 to limit NCQ_TRIM quirk to MU01 version libata: Make Crucial BX100 500GB LPM quirk apply to all firmware versions libata: Apply NOLPM quirk to Crucial M500 480 and 960GB SSDs libata: Enable queued TRIM for Samsung SSD 860 libata: disable LPM for Crucial BX100 SSD 500GB drive libata: Apply NOLPM quirk to Crucial MX100 512GB SSDs libata: remove WARN() for DMA or PIO command without data libata: fix length validation of ATAPI-relayed SCSI commands Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174 clk: bcm2835: Protect sections updating shared registers ahci: Add PCI-id for the Highpoint Rocketraid 644L card PCI: Add function 1 DMA alias quirk for Highpoint RocketRAID 644L mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs ALSA: hda/realtek - Always immediately update mute LED with pin VREF ALSA: aloop: Fix access to not-yet-ready substream via cable ALSA: aloop: Sync stale timer before release ALSA: usb-audio: Fix parsing descriptor of UAC2 processing unit iio: st_pressure: st_accel: pass correct platform data to init MIPS: ralink: Remove ralink_halt() ANDROID: cpufreq: times: fix proc_time_in_state_show dtc: turn off dtc unit address warnings by default Linux 4.4.124 RDMA/ucma: Fix access to non-initialized CM_ID object dmaengine: ti-dma-crossbar: Fix event mapping for TPCC_EVT_MUX_60_63 clk: si5351: Rename internal plls to avoid name collisions nfsd4: permit layoutget of executable-only files RDMA/ocrdma: Fix permissions for OCRDMA_RESET_STATS ip6_vti: adjust vti mtu according to mtu of lower device iommu/vt-d: clean up pr_irq if request_threaded_irq fails pinctrl: Really force states during suspend/resume coresight: Fix disabling of CoreSight TPIU pty: cancel pty slave port buf's work in tty_release drm/omap: DMM: Check for DMM readiness after successful transaction commit vgacon: Set VGA struct resource types IB/umem: Fix use of npages/nmap fields RDMA/cma: Use correct size when writing netlink stats IB/ipoib: Avoid memory leak if the SA returns a different DGID mmc: avoid removing non-removable hosts during suspend platform/chrome: Use proper protocol transfer function cros_ec: fix nul-termination for firmware build info media: [RESEND] media: dvb-frontends: Add delay to Si2168 restart media: bt8xx: Fix err 'bt878_probe()' rtlwifi: rtl_pci: Fix the bug when inactiveps is enabled. RDMA/iwpm: Fix uninitialized error code in iwpm_send_mapinfo() drm/msm: fix leak in failed get_pages media: c8sectpfe: fix potential NULL pointer dereference in c8sectpfe_timer_interrupt Bluetooth: hci_qca: Avoid setup failure on missing rampatch perf tests kmod-path: Don't fail if compressed modules aren't supported rtc: ds1374: wdt: Fix stop/start ioctl always returning -EINVAL rtc: ds1374: wdt: Fix issue with timeout scaling from secs to wdt ticks cifs: small underflow in cnvrtDosUnixTm() net: hns: fix ethtool_get_strings overflow in hns driver sm501fb: don't return zero on failure path in sm501fb_start() video: fbdev: udlfb: Fix buffer on stack tcm_fileio: Prevent information leak for short reads ia64: fix module loading for gcc-5.4 md/raid10: skip spare disk as 'first' disk Input: twl4030-pwrbutton - use correct device for irq request power: supply: pda_power: move from timer to delayed_work bnx2x: Align RX buffers drm/nouveau/kms: Increase max retries in scanout position queries. ACPI / PMIC: xpower: Fix power_table addresses ipmi/watchdog: fix wdog hang on panic waiting for ipmi response ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a staging: wilc1000: fix unchecked return value staging: unisys: visorhba: fix s-Par to boot with option CONFIG_VMAP_STACK set to y mtip32xx: use runtime tag to initialize command header mfd: palmas: Reset the POWERHOLD mux during power off mac80211: don't parse encrypted management frames in ieee80211_frame_acked Btrfs: send, fix file hole not being preserved due to inline extent rndis_wlan: add return value validation mt7601u: check return value of alloc_skb iio: st_pressure: st_accel: Initialise sensor platform data properly NFS: don't try to cross a mountpount when there isn't one there. infiniband/uverbs: Fix integer overflows scsi: mac_esp: Replace bogus memory barrier with spinlock qlcnic: fix unchecked return value wan: pc300too: abort path on failure mmc: host: omap_hsmmc: checking for NULL instead of IS_ERR() openvswitch: Delete conntrack entry clashing with an expectation. netfilter: xt_CT: fix refcnt leak on error path Fix driver usage of 128B WQEs when WQ_CREATE is V1. ASoC: Intel: Skylake: Uninitialized variable in probe_codec() IB/mlx4: Change vma from shared to private IB/mlx4: Take write semaphore when changing the vma struct HSI: ssi_protocol: double free in ssip_pn_xmit() IB/ipoib: Update broadcast object if PKey value was changed in index 0 IB/ipoib: Fix deadlock between ipoib_stop and mcast join flow ALSA: hda - Fix headset microphone detection for ASUS N551 and N751 e1000e: fix timing for 82579 Gigabit Ethernet controller tcp: remove poll() flakes with FastOpen NFS: Fix missing pg_cleanup after nfs_pageio_cond_complete() md/raid10: wait up frozen array in handle_write_completed iommu/omap: Register driver before setting IOMMU ops ARM: 8668/1: ftrace: Fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER KVM: PPC: Book3S PR: Exit KVM on failed mapping scsi: virtio_scsi: Always try to read VPD pages clk: ns2: Correct SDIO bits ath: Fix updating radar flags for coutry code India spi: dw: Disable clock after unregistering the host media/dvb-core: Race condition when writing to CAM net: ipv6: send unsolicited NA on admin up i2c: i2c-scmi: add a MS HID genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs cpufreq/sh: Replace racy task affinity logic ACPI/processor: Replace racy task affinity logic ACPI/processor: Fix error handling in __acpi_processor_start() time: Change posix clocks ops interfaces to use timespec64 Input: ar1021_i2c - fix too long name in driver's device table rtc: cmos: Do not assume irq 8 for rtc when there are no legacy irqs x86: i8259: export legacy_pic symbol regulator: anatop: set default voltage selector for pcie platform/x86: asus-nb-wmi: Add wapf4 quirk for the X302UA staging: android: ashmem: Fix possible deadlock in ashmem_ioctl CIFS: Enable encryption during session setup phase SMB3: Validate negotiate request must always be signed tpm_tis: fix potential buffer overruns caused by bit glitches on the bus tpm: fix potential buffer overruns caused by bit glitches on the bus BACKPORT, FROMLIST: crypto: arm64/speck - add NEON-accelerated implementation of Speck-XTS Linux 4.4.123 bpf: fix incorrect sign extension in check_alu_op() usb: gadget: bdc: 64-bit pointer capability check USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe() btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device btrfs: alloc_chunk: fix DUP stripe size handling ARM: dts: LogicPD Torpedo: Fix I2C1 pinmux scsi: sg: only check for dxfer_len greater than 256M scsi: sg: fix static checker warning in sg_is_valid_dxfer scsi: sg: fix SG_DXFER_FROM_DEV transfers irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis fs/aio: Use RCU accessors for kioctx_table->table[] fs/aio: Add explicit RCU grace period when freeing kioctx lock_parent() needs to recheck if dentry got __dentry_kill'ed under it fs: Teach path_connected to handle nfs filesystems with multiple roots. drm/amdgpu/dce: Don't turn off DP sink when disconnected ALSA: seq: Clear client entry before deleting else at closing ALSA: seq: Fix possible UAF in snd_seq_check_queue() ALSA: hda - Revert power_save option default value ALSA: pcm: Fix UAF in snd_pcm_oss_get_formats() x86/mm: Fix vmalloc_fault to use pXd_large x86/vm86/32: Fix POPF emulation selftests/x86/entry_from_vm86: Add test cases for POPF selftests/x86: Add tests for the STR and SLDT instructions selftests/x86: Add tests for User-Mode Instruction Prevention selftests/x86/entry_from_vm86: Exit with 1 if we fail ima: relax requiring a file signature for new files with zero length rcutorture/configinit: Fix build directory error message ipvlan: add L2 check for packets arriving via virtual devices ASoC: nuc900: Fix a loop timeout test mac80211: remove BUG() when interface type is invalid mac80211_hwsim: enforce PS_MANUAL_POLL to be set after PS_ENABLED agp/intel: Flush all chipset writes after updating the GGTT drm/amdkfd: Fix memory leaks in kfd topology veth: set peer GSO values media: cpia2: Fix a couple off by one bugs scsi: dh: add new rdac devices scsi: devinfo: apply to HP XP the same flags as Hitachi VSP scsi: core: scsi_get_device_flags_keyed(): Always return device flags spi: sun6i: disable/unprepare clocks on remove tools/usbip: fixes build with musl libc toolchain ath10k: fix invalid STS_CAP_OFFSET_MASK clk: qcom: msm8916: fix mnd_width for codec_digcodec cpufreq: Fix governor module removal race ath10k: update tdls teardown state to target ARM: dts: omap3-n900: Fix the audio CODEC's reset pin ARM: dts: am335x-pepper: Fix the audio CODEC's reset pin mtd: nand: fix interpretation of NAND_CMD_NONE in nand_command[_lp]() net: xfrm: allow clearing socket xfrm policies. test_firmware: fix setting old custom fw path back on exit sched: Stop resched_cpu() from sending IPIs to offline CPUs sched: Stop switched_to_rt() from sending IPIs to offline CPUs ARM: dts: exynos: Correct Trats2 panel reset line HID: elo: clear BTN_LEFT mapping video/hdmi: Allow "empty" HDMI infoframes drm/edid: set ELD connector type in drm_edid_to_eld() wil6210: fix memory access violation in wil_memcpy_from/toio_32 pwm: tegra: Increase precision in PWM rate calculation kprobes/x86: Set kprobes pages read-only kprobes/x86: Fix kprobe-booster not to boost far call instructions scsi: sg: close race condition in sg_remove_sfp_usercontext() scsi: sg: check for valid direction before starting the request perf session: Don't rely on evlist in pipe mode perf inject: Copy events when reordering events in pipe mode drivers/perf: arm_pmu: handle no platform_device usb: gadget: dummy_hcd: Fix wrong power status bit clear/reset in dummy_hub_control() usb: dwc2: Make sure we disconnect the gadget state md/raid6: Fix anomily when recovering a single device in RAID6. regulator: isl9305: fix array size MIPS: r2-on-r6-emu: Clear BLTZALL and BGEZALL debugfs counters MIPS: r2-on-r6-emu: Fix BLEZL and BGTZL identification MIPS: BPF: Fix multiple problems in JIT skb access helpers. MIPS: BPF: Quit clobbering callee saved registers in JIT code. coresight: Fixes coresight DT parse to get correct output port ID. drm/amdgpu: Fail fb creation from imported dma-bufs. (v2) drm/radeon: Fail fb creation from imported dma-bufs. video: ARM CLCD: fix dma allocation size iommu/iova: Fix underflow bug in __alloc_and_insert_iova_range apparmor: Make path_max parameter readonly scsi: ses: don't get power status of SES device slot on probe fm10k: correctly check if interface is removed ALSA: firewire-digi00x: handle all MIDI messages on streaming packets reiserfs: Make cancel_old_flush() reliable ARM: dts: koelsch: Correct clock frequency of X2 DU clock input net/faraday: Add missing include of of.h powerpc: Avoid taking a data miss on every userspace instruction miss ARM: dts: r8a7791: Correct parent of SSI[0-9] clocks ARM: dts: r8a7790: Correct parent of SSI[0-9] clocks NFC: nfcmrvl: double free on error path NFC: nfcmrvl: Include unaligned.h instead of access_ok.h vxlan: vxlan dev should inherit lowerdev's gso_max_size drm/vmwgfx: Fixes to vmwgfx_fb braille-console: Fix value returned by _braille_console_setup bonding: refine bond_fold_stats() wrap detection f2fs: relax node version check for victim data in gc blk-throttle: make sure expire time isn't too big mm: Fix false-positive VM_BUG_ON() in page_cache_{get,add}_speculative() driver: (adm1275) set the m,b and R coefficients correctly for power dmaengine: imx-sdma: add 1ms delay to ensure SDMA channel is stopped tcp: sysctl: Fix a race to avoid unexpected 0 window from space spi: omap2-mcspi: poll OMAP2_MCSPI_CHSTAT_RXS for PIO transfer ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT sched: act_csum: don't mangle TCP and UDP GSO packets Input: qt1070 - add OF device ID table sysrq: Reset the watchdog timers while displaying high-resolution timers timers, sched_clock: Update timeout for clock wrap media: i2c/soc_camera: fix ov6650 sensor getting wrong clock scsi: ipr: Fix missed EH wakeup solo6x10: release vb2 buffers in solo_stop_streaming() of: fix of_device_get_modalias returned length when truncating buffers batman-adv: handle race condition for claims between gateways ARM: dts: Adjust moxart IRQ controller and flags net/8021q: create device with all possible features in wanted_features HID: clamp input to logical range if no null state perf probe: Return errno when not hitting any event ath10k: disallow DFS simulation if DFS channel is not enabled drm: Defer disabling the vblank IRQ until the next interrupt (for instant-off) drivers: net: xgene: Fix hardware checksum setting perf tools: Make perf_event__synthesize_mmap_events() scale i40e: fix ethtool to get EEPROM data from X722 interface i40e: Acquire NVM lock before reads on all devices perf sort: Fix segfault with basic block 'cycles' sort dimension selinux: check for address length in selinux_socket_bind() PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown() ath10k: fix a warning during channel switch with multiple vaps drm: qxl: Don't alloc fbdev if emulation is not supported HID: reject input outside logical range only if null state is set staging: wilc1000: add check for kmalloc allocation failure. staging: speakup: Replace BUG_ON() with WARN_ON(). Input: tsc2007 - check for presence and power down tsc2007 during probe blkcg: fix double free of new_blkg in blkcg_init_queue ANDROID: cpufreq: times: avoid prematurely freeing uid_entry ANDROID: Use standard logging functions in goldfish_pipe ANDROID: Fix whitespace in goldfish staging: android: ashmem: Fix possible deadlock in ashmem_ioctl llist: clang: introduce member_address_is_nonnull() Linux 4.4.122 fixup: sctp: verify size of a new chunk in _sctp_make_chunk() 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: usbmon: remove assignment from IS_ERR argument usb: quirks: add control message delay for 1b1c:1b20 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 x86: Treat R_X86_64_PLT32 as R_X86_64_PC32 x86/module: Detect and skip invalid relocations Revert "ARM: dts: LogicPD Torpedo: Fix I2C1 pinmux" 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: use skb_to_full_sk in ip_route_me_harder 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 netfilter: nfnetlink_queue: fix timestamp attribute watchdog: hpwdt: fix unused variable warning watchdog: hpwdt: Check source of NMI watchdog: hpwdt: SMBIOS check nospec: Include <asm/barrier.h> dependency 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 - Fix dock line-out volume on Dell Precision 7520 x86/MCE: Serialize sysfs changes bcache: don't attach backing with duplicate UUID kbuild: Handle builtin dtb file names containing hyphens 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: 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 scsi: qla2xxx: Fix NULL pointer crash due to active timer for ABTS 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: ranchu: 32 bit framebuffer support ANDROID: Address checkpatch warnings in goldfishfb ANDROID: Address checkpatch.pl warnings in goldfish_pipe ANDROID: sdcardfs: fix lock issue on 32 bit/SMP architectures ANDROID: goldfish: Fix typo in goldfish_cmd_locked() call ANDROID: Address checkpatch.pl warnings in goldfish_pipe_v2 FROMLIST: f2fs: don't put dentry page in pagecache into highmem Linux 4.4.121 btrfs: preserve i_mode if __btrfs_set_acl() fails bpf, x64: implement retpoline for tail call dm io: fix duplicate bio completion due to missing ref count mpls, nospec: Sanitize array index in mpls_label_ok() net: mpls: Pull common label check into helper sctp: verify size of a new chunk in _sctp_make_chunk() s390/qeth: fix IPA command submission race s390/qeth: fix SETIP command handling sctp: fix dst refcnt leak in sctp_v6_get_dst() sctp: fix dst refcnt leak in sctp_v4_get_dst udplite: fix partial checksum initialization ppp: prevent unregistered channels from connecting to PPP units netlink: ensure to loop over all netns in genlmsg_multicast_allns() net: ipv4: don't allow setting net.ipv4.route.min_pmtu below 68 net: fix race on decreasing number of TX queues ipv6 sit: work around bogus gcc-8 -Wrestrict warning hdlc_ppp: carrier detect ok, don't turn off negotiation fib_semantics: Don't match route with mismatching tclassid bridge: check brport attr show in brport_show Revert "led: core: Fix brightness setting when setting delay_off=0" x86/spectre: Fix an error message leds: do not overflow sysfs buffer in led_trigger_show x86/apic/vector: Handle legacy irq data correctly ARM: dts: LogicPD Torpedo: Fix I2C1 pinmux btrfs: Don't clear SGID when inheriting ACLs x86/syscall: Sanitize syscall table de-references under speculation fix KVM: mmu: Fix overlap between public and private memslots ARM: mvebu: Fix broken PL310_ERRATA_753970 selects nospec: Allow index argument to have const-qualified type media: m88ds3103: don't call a non-initalized function cpufreq: s3c24xx: Fix broken s3c_cpufreq_init() ALSA: hda: Add a power_save blacklist ALSA: usb-audio: Add a quirck for B&W PX headphones tpm_i2c_nuvoton: fix potential buffer overruns caused by bit glitches on the bus tpm_i2c_infineon: fix potential buffer overruns caused by bit glitches on the bus tpm: st33zp24: fix potential buffer overruns caused by bit glitches on the bus ANDROID: Delete the goldfish_nand driver. ANDROID: Add input support for Android Wear. ANDROID: proc: fix config & includes for /proc/uid FROMLIST: ARM: amba: Don't read past the end of sysfs "driver_override" buffer UPSTREAM: ANDROID: binder: remove WARN() for redundant txn error ANDROID: cpufreq: times: Add missing includes ANDROID: cpufreq: Add time_in_state to /proc/uid directories ANDROID: proc: Add /proc/uid directory ANDROID: cpufreq: times: track per-uid time in state ANDROID: cpufreq: track per-task time in state Conflicts: drivers/gpu/drm/msm/msm_gem.c drivers/net/wireless/ath/regd.c kernel/sched/core.c Change-Id: I9bb7b5a062415da6925a5a56a34e6eb066a53320 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-04-13leds: pca955x: Correct I2C FunctionalityTin Huynh
[ Upstream commit aace34c0bb8ea3c8bdcec865b6a4be4db0a68e33 ] The driver checks an incorrect flag of functionality of adapter. When a driver requires i2c_smbus_read_byte_data and i2c_smbus_write_byte_data, it should check I2C_FUNC_SMBUS_BYTE_DATA instead I2C_FUNC_I2C. This patch fixes the problem. Signed-off-by: Tin Huynh <tnhuynh@apm.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-04leds: qpnp-flash-v2: Fix HW_STROBE configurationKiran Gunda
As per the hardware recommendation, configure the LED1 to HW_STROBE mode when LED2 or LED3 is configured in HW_STROBE mode. This enables hardware strobe option working for LED2/3 channels. CRs-Fixed: 2213325 Change-Id: I1ceaa7477b8d0c18e03fbdea9d5347d0e75fc0f0 Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2018-04-04leds: qpnp-flash-v2: Add support for multi-strobeKiran Gunda
Multi-strobe option is used to enable/disable the LEDs back-to-back without disabling the module in the HW_STROBE mode. Hence, enable the multi-strobe option if the LED is configured in HW_STROBE mode. Change-Id: I3e16254c6dcb4c4ae0b295cd7eea4e8ee8e1c2c7 Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2018-03-11Revert "led: core: Fix brightness setting when setting delay_off=0"Ben Hutchings
This reverts commit 20ac8f72514b3af8b62c520d55656ded865eff00, which was commit 2b83ff96f51d0b039c4561b9f95c824d7bddb85c upstream. The bug that it should fix was only introduced in Linux 4.7, and in 4.4 it causes a regression. Reported-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Cc: Matthieu CASTET <matthieu.castet@parrot.com> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-11leds: do not overflow sysfs buffer in led_trigger_showNathan Sullivan
commit 3b9b95363c45365d606ad4bbba16acca75fdf6d3 upstream. Per the documentation, use scnprintf instead of sprintf to ensure there is never more than PAGE_SIZE bytes of trigger names put into the buffer. Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com> Signed-off-by: Zach Brown <zach.brown@ni.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Cc: Willy Tarreau <w@1wt.eu> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-08Merge android-4.4.120 (d63fdf6) into msm-4.4Srinivasarao P
* refs/heads/tmp-d63fdf6 Linux 4.4.120 MIPS: Implement __multi3 for GCC7 MIPS64r6 builds net: gianfar_ptp: move set_fipers() to spinlock protecting area sctp: make use of pre-calculated len xen/gntdev: Fix partial gntdev_mmap() cleanup xen/gntdev: Fix off-by-one error when unmapping with holes SolutionEngine771x: fix Ether platform data mdio-sun4i: Fix a memory leak xen-netfront: enable device after manual module load bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine. can: flex_can: Correct the checking for frame length in flexcan_start_xmit() mac80211: mesh: drop frames appearing to be from us drm/ttm: check the return value of kzalloc e1000: fix disabling already-disabled warning xfs: quota: check result of register_shrinker() xfs: quota: fix missed destroy of qi_tree_lock IB/ipoib: Fix race condition in neigh creation IB/mlx4: Fix mlx4_ib_alloc_mr error flow s390/dasd: fix wrongly assigned configuration data led: core: Fix brightness setting when setting delay_off=0 bnx2x: Improve reliability in case of nested PCI errors tg3: Enable PHY reset in MTU change path for 5720 tg3: Add workaround to restrict 5762 MRRS to 2048 lib/mpi: Fix umul_ppmm() for MIPS64r6 ARM: dts: ls1021a: fix incorrect clock references scsi: storvsc: Fix scsi_cmd error assignments in storvsc_handle_error net: arc_emac: fix arc_emac_rx() error paths spi: atmel: fixed spin_lock usage inside atmel_spi_remove drm/nouveau/pci: do a msi rearm on init sget(): handle failures of register_shrinker() ARM: 8731/1: Fix csum_partial_copy_from_user() stack mismatch ipv6: icmp6: Allow icmp messages to be looped back mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM f2fs: fix a bug caused by NULL extent tree hrtimer: Ensure POSIX compliance (relative CLOCK_REALTIME hrtimers) ANDROID: keychord: Check for write data size Revert "binder: add missing binder_unlock()" Linux 4.4.119 binder: add missing binder_unlock() drm/amdgpu: Avoid leaking PM domain on driver unbind (v2) usb: renesas_usbhs: missed the "running" flag in usb_dmac with rx path usb: gadget: f_fs: Process all descriptors during bind usb: ldusb: add PIDs for new CASSY devices supported by this driver usb: dwc3: gadget: Set maxpacket size for ep0 IN drm/edid: Add 6 bpc quirk for CPT panel in Asus UX303LA Add delay-init quirk for Corsair K70 RGB keyboards arm64: Disable unhandled signal log messages by default usb: ohci: Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks() irqchip/gic-v3: Use wmb() instead of smb_wmb() in gic_raise_softirq() x86/oprofile: Fix bogus GCC-8 warning in nmi_setup() iio: adis_lib: Initialize trigger before requesting interrupt iio: buffer: check if a buffer has been set up when poll is called cfg80211: fix cfg80211_beacon_dup scsi: ibmvfc: fix misdefined reserved field in ibmvfc_fcp_rsp_info ip_tunnel: fix preempt warning in ip tunnel creation/updating ip_tunnel: replace dst_cache with generic implementation PCI: keystone: Fix interrupt-controller-node lookup powerpc/64s: Fix RFI flush dependency on HARDLOCKUP_DETECTOR netfilter: drop outermost socket lock in getsockopt() ANDROID: sdcardfs: Set num in extension_details during make_item Conflicts: drivers/usb/gadget/function/f_fs.c Change-Id: I594b9686fd64d4b62ebef4452d4f1ccca4f5a77b Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-03-03led: core: Fix brightness setting when setting delay_off=0Matthieu CASTET
[ Upstream commit 2b83ff96f51d0b039c4561b9f95c824d7bddb85c ] With the current code, the following sequence won't work : echo timer > trigger echo 0 > delay_off * at this point we call ** led_delay_off_store ** led_blink_set
2018-01-24leds: qpnp-flash-v2: Fix the macro calculationsSubbaraman Narayanamurthy
Some of the macros used for calculations are incorrect when values like 0 are passed. Fix them. CRs-Fixed: 2165402 Change-Id: I6428704169a83e420236b58b310bdd1acaa3a948 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2018-01-18leds: qpnp-flash-v2: Update IRES for active LEDsSubbaraman Narayanamurthy
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>
2018-01-11Merge "leds: qpnp-wled: add stepper algorithm using brightness map"Linux Build Service Account
2018-01-11Merge "leds: qpnp-wled: add support for brightness mapping"Linux Build Service Account
2017-12-20leds: qpnp-wled: add stepper algorithm using brightness mapSubbaraman Narayanamurthy
Add stepper algorithm support with dynamically calculated step size or delay based on the brightness level change using the brightness map table. To help with running the algorithm efficiently, use a separate workqueue with high priority to process the brightness levels. Change-Id: Iea2a8da73b6bee3eaa7b28a12fd82c2a1507db99 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-12-08leds: qpnp-flash-v2: Return error code separately during current predictionSubbaraman Narayanamurthy
Currently when the maximum available current per flash switch is calculated, it is returned along with the error code. This will be confusing when a real error occurs. Fix this by returning error code separately and obtain the current by passing it by reference. Change-Id: I9e2a3436e19cc37319316603e6dfa45241df8a49 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-12-05leds: qpnp-wled: add support for brightness mappingSubbaraman Narayanamurthy
Currently, WLED driver is being passed with a 12 bit brightness level by the clients and they're set in the hardware registers. Add support for brightness mapping by providing a 256 entry table where each entry can take a 12 bit brightness level value. This will be mapped internally for controlling different brightness regions in an user preferred way. Change-Id: I7adf97918a311bf54b02b383defeb59685aa0d00 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-11-30Merge "leds: qpnp-wled: Fix the check to disable AUTO_PFM"Linux Build Service Account
2017-11-05Merge "leds: qpnp-wled: Fix configuration for AMOLED mode"Linux Build Service Account
2017-11-05Merge "leds: qpnp-wled: Disable module permanently when OVP fault persists"Linux Build Service Account
2017-11-05Merge "leds: qpnp-wled: Configure WLED1_CTRL_SWITCHING_FREQUENCY selectively"Linux Build Service Account
2017-10-28leds: qpnp-flash: Fix Use-after-free(UAF) for debugfsAnkit Sharma
Fix UAF where two threads can open and close the same file. Second open will cause the private data for the first file to be overwritten. When the first file is closed and the private data is freed, this makes the now-shared private data OOB for the second thread. CRs-Fixed: 1109763 Change-Id: I1c4618d5be99e140abf0f3ea0d7f485897db5ab2 Signed-off-by: Ankit Sharma <ansharma@codeaurora.org> Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-10-24leds: qpnp-wled: Fix configuration for AMOLED modeSubbaraman Narayanamurthy
Some registers are configured incorrectly for AMOLED mode in WLED peripheral. Fix them based on the hardware documentation. Change-Id: If021423653b94f1bcc97cdb50b7067af24bcef61 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-10-24leds: qpnp-wled: Disable module permanently when OVP fault persistsSubbaraman Narayanamurthy
Currently, auto calibration will be invoked if an OVP fault is triggered because of an incorrect sink configuration. However, there are certain hardware platforms where the display panel is not used. It is hard to differentiate such platforms as they will be using the same device tree configuration or parameters related to display panel passed through the bootloader. Disable the module permanently and also keep the OVP fault interrupt disabled when a valid sink configuration is not found by auto calibration. Change-Id: I302322020e8d6d4f92901dac468602c357967e18 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-10-24leds: qpnp-wled: Configure WLED1_CTRL_SWITCHING_FREQUENCY selectivelySubbaraman Narayanamurthy
As per the hardware documentation, WLED1_CTRL_SWITCHING_FREQUENCY register is in logic_rb instead of in periph_rb. With overwrite bit (bit 7) set, this can change the switching frequency from 1.6 MHz to 800 KHz for AMOLED whenever the module is disabled and enabled. Fix this by not setting the overwrite bit for AMOLED panel so that the frequency can be selected internally by the hardware based on EN_AMOLED configuration. Change-Id: I1594af40b53f762fa97884c019ad70f24ea78257 CRs-Fixed: 2106094 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-10-24leds: qpnp-wled: Improve auto calibration algorithmSubbaraman Narayanamurthy
If CABC is enabled and auto calibration is attempted, then OVP fault can be seen even with a valid sink configuration and a brightness level greater than or equal to 0.4 % dimming. This is because of the modulation done through CABC pin which if low enough can cause the brightness level to still go further down. Fix this by disabling CABC on all sinks before running auto calibration and re-enable it if the feature is enabled. Also, modify the auto calibration brightness level to 200 so that the load increase on WLED_VOUT can bring the voltage below OVP threshold quick enough on a valid sink configuration. Finally, disable WLED module before switching the sink configuration and enable it after configuring sinks. CRs-Fixed: 2125217 Change-Id: I570dc9eba540cd96328afd7c68f4643a112c4962 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-10-24leds: qpnp-wled: Fix parameters passed to of_get_address_byname()Subbaraman Narayanamurthy
Pass NULL pointer to of_get_address_byname() for size and flags parameters instead of an integer value 0. Change-Id: I53984141bb8f1164c27b6a9a5d90853b4d077ee1 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>