summaryrefslogtreecommitdiff
path: root/drivers/video
AgeCommit message (Collapse)Author
2018-07-03Merge 4.4.139 into android-4.4Greg Kroah-Hartman
Changes in 4.4.139 xfrm6: avoid potential infinite loop in _decode_session6() netfilter: ebtables: handle string from userspace with care ipvs: fix buffer overflow with sync daemon and service atm: zatm: fix memcmp casting net: qmi_wwan: Add Netgear Aircard 779S net/sonic: Use dma_mapping_error() Revert "Btrfs: fix scrub to repair raid6 corruption" tcp: do not overshoot window_clamp in tcp_rcv_space_adjust() Btrfs: make raid6 rebuild retry more usb: musb: fix remote wakeup racing with suspend bonding: re-evaluate force_primary when the primary slave name changes tcp: verify the checksum of the first data segment in a new connection ext4: update mtime in ext4_punch_hole even if no blocks are released ext4: fix fencepost error in check for inode count overflow during resize driver core: Don't ignore class_dir_create_and_add() failure. btrfs: scrub: Don't use inode pages for device replace ALSA: hda - Handle kzalloc() failure in snd_hda_attach_pcm_stream() ALSA: hda: add dock and led support for HP EliteBook 830 G5 ALSA: hda: add dock and led support for HP ProBook 640 G4 cpufreq: Fix new policy initialization during limits updates via sysfs libata: zpodd: make arrays cdb static, reduces object code size libata: zpodd: small read overflow in eject_tray() libata: Drop SanDisk SD7UB3Q*G1001 NOLPM quirk w1: mxc_w1: Enable clock before calling clk_get_rate() on it fs/binfmt_misc.c: do not allow offset overflow x86/spectre_v1: Disable compiler optimizations over array_index_mask_nospec() m68k/mm: Adjust VM area to be unmapped by gap size for __iounmap() serial: sh-sci: Use spin_{try}lock_irqsave instead of open coding version signal/xtensa: Consistenly use SIGBUS in do_unaligned_user usb: do not reset if a low-speed or full-speed device timed out 1wire: family module autoload fails because of upper/lower case mismatch. ASoC: dapm: delete dapm_kcontrol_data paths list before freeing it ASoC: cirrus: i2s: Fix LRCLK configuration ASoC: cirrus: i2s: Fix {TX|RX}LinCtrlData setup lib/vsprintf: Remove atomic-unsafe support for %pCr mips: ftrace: fix static function graph tracing branch-check: fix long->int truncation when profiling branches ipmi:bt: Set the timeout before doing a capabilities check Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader fuse: atomic_o_trunc should truncate pagecache fuse: don't keep dead fuse_conn at fuse_fill_super(). fuse: fix control dir setup and teardown powerpc/mm/hash: Add missing isync prior to kernel stack SLB switch powerpc/ptrace: Fix setting 512B aligned breakpoints with PTRACE_SET_DEBUGREG powerpc/ptrace: Fix enforcement of DAWR constraints cpuidle: powernv: Fix promotion from snooze if next state disabled powerpc/fadump: Unregister fadump on kexec down path. ARM: 8764/1: kgdb: fix NUMREGBYTES so that gdb_regs[] is the correct size of: unittest: for strings, account for trailing \0 in property length field IB/qib: Fix DMA api warning with debug kernel RDMA/mlx4: Discard unknown SQP work requests mtd: cfi_cmdset_0002: Change write buffer to check correct value mtd: cfi_cmdset_0002: Use right chip in do_ppb_xxlock() mtd: cfi_cmdset_0002: fix SEGV unlocking multiple chips mtd: cfi_cmdset_0002: Fix unlocking requests crossing a chip boudary mtd: cfi_cmdset_0002: Avoid walking all chips when unlocking. MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum PCI: pciehp: Clear Presence Detect and Data Link Layer Status Changed on resume MIPS: io: Add barrier after register read in inX() time: Make sure jiffies_to_msecs() preserves non-zero time periods Btrfs: fix clone vs chattr NODATASUM race iio:buffer: make length types match kfifo types scsi: qla2xxx: Fix setting lower transfer speed if GPSC fails scsi: zfcp: fix missing SCSI trace for result of eh_host_reset_handler scsi: zfcp: fix missing SCSI trace for retry of abort / scsi_eh TMF scsi: zfcp: fix misleading REC trigger trace where erp_action setup failed scsi: zfcp: fix missing REC trigger trace on terminate_rport_io early return scsi: zfcp: fix missing REC trigger trace on terminate_rport_io for ERP_FAILED scsi: zfcp: fix missing REC trigger trace for all objects in ERP_FAILED scsi: zfcp: fix missing REC trigger trace on enqueue without ERP thread linvdimm, pmem: Preserve read-only setting for pmem devices md: fix two problems with setting the "re-add" device state. ubi: fastmap: Cancel work upon detach UBIFS: Fix potential integer overflow in allocation xfrm: Ignore socket policies when rebuilding hash tables xfrm: skip policies marked as dead while rehashing backlight: as3711_bl: Fix Device Tree node lookup backlight: max8925_bl: Fix Device Tree node lookup backlight: tps65217_bl: Fix Device Tree node lookup mfd: intel-lpss: Program REMAP register in PIO mode perf tools: Fix symbol and object code resolution for vdso32 and vdsox32 perf intel-pt: Fix sync_switch INTEL_PT_SS_NOT_TRACING perf intel-pt: Fix decoding to accept CBR between FUP and corresponding TIP perf intel-pt: Fix MTC timing after overflow perf intel-pt: Fix "Unexpected indirect branch" error perf intel-pt: Fix packet decoding of CYC packets media: v4l2-compat-ioctl32: prevent go past max size media: cx231xx: Add support for AverMedia DVD EZMaker 7 media: dvb_frontend: fix locking issues at dvb_frontend_get_event() nfsd: restrict rd_maxcount to svc_max_payload in nfsd_encode_readdir NFSv4: Fix possible 1-byte stack overflow in nfs_idmap_read_and_verify_message video: uvesafb: Fix integer overflow in allocation Input: elan_i2c - add ELAN0618 (Lenovo v330 15IKB) ACPI ID xen: Remove unnecessary BUG_ON from __unbind_from_irq() udf: Detect incorrect directory size Input: elan_i2c_smbus - fix more potential stack buffer overflows Input: elantech - enable middle button of touchpads on ThinkPad P52 Input: elantech - fix V4 report decoding for module with middle key ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210 Btrfs: fix unexpected cow in run_delalloc_nocow spi: Fix scatterlist elements size in spi_map_buf block: Fix transfer when chunk sectors exceeds max dm thin: handle running out of data space vs concurrent discard cdc_ncm: avoid padding beyond end of skb Bluetooth: Fix connection if directed advertising and privacy is used Linux 4.4.139 Change-Id: I93013bedf2ebe3e6a8718972d8854723609963cc Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-07-03video: uvesafb: Fix integer overflow in allocationKees Cook
commit 9f645bcc566a1e9f921bdae7528a01ced5bc3713 upstream. cmap->len can get close to INT_MAX/2, allowing for an integer overflow in allocation. This uses kmalloc_array() instead to catch the condition. Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com> Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03backlight: tps65217_bl: Fix Device Tree node lookupJohan Hovold
commit 2b12dfa124dbadf391cb9a616aaa6b056823bf75 upstream. Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. This would only cause trouble if the child node is missing while there is an unrelated node named "backlight" elsewhere in the tree. Cc: stable <stable@vger.kernel.org> # 3.7 Fixes: eebfdc17cc6c ("backlight: Add TPS65217 WLED driver") Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03backlight: max8925_bl: Fix Device Tree node lookupJohan Hovold
commit d1cc0ec3da23e44c23712579515494b374f111c9 upstream. Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent mfd node was also prematurely freed, while the child backlight node was leaked. Cc: stable <stable@vger.kernel.org> # 3.9 Fixes: 47ec340cb8e2 ("mfd: max8925: Support dt for backlight") Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03backlight: as3711_bl: Fix Device Tree node lookupJohan Hovold
commit 4a9c8bb2aca5b5a2a15744333729745dd9903562 upstream. Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent mfd node was also prematurely freed. Cc: stable <stable@vger.kernel.org> # 3.10 Fixes: 59eb2b5e57ea ("drivers/video/backlight/as3711_bl.c: add OF support") Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30Merge 4.4.134 into android-4.4Greg Kroah-Hartman
Changes in 4.4.134 MIPS: ptrace: Expose FIR register through FP regset MIPS: Fix ptrace(2) PTRACE_PEEKUSR and PTRACE_POKEUSR accesses to o32 FGRs KVM: Fix spelling mistake: "cop_unsuable" -> "cop_unusable" affs_lookup(): close a race with affs_remove_link() aio: fix io_destroy(2) vs. lookup_ioctx() race ALSA: timer: Fix pause event notification mmc: sdhci-iproc: fix 32bit writes for TRANSFER_MODE register libata: Blacklist some Sandisk SSDs for NCQ libata: blacklist Micron 500IT SSD with MU01 firmware xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent Revert "ipc/shm: Fix shmat mmap nil-page protection" ipc/shm: fix shmat() nil address after round-down when remapping kasan: fix memory hotplug during boot kernel/sys.c: fix potential Spectre v1 issue kernel/signal.c: avoid undefined behaviour in kill_something_info xfs: remove racy hasattr check from attr ops do d_instantiate/unlock_new_inode combinations safely firewire-ohci: work around oversized DMA reads on JMicron controllers NFSv4: always set NFS_LOCK_LOST when a lock is lost. ALSA: hda - Use IS_REACHABLE() for dependency on input ASoC: au1x: Fix timeout tests in au1xac97c_ac97_read() kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl tracing/hrtimer: Fix tracing bugs by taking all clock bases and modes into account PCI: Add function 1 DMA alias quirk for Marvell 9128 tools lib traceevent: Simplify pointer print logic and fix %pF perf callchain: Fix attr.sample_max_stack setting tools lib traceevent: Fix get_field_str() for dynamic strings dm thin: fix documentation relative to low water mark threshold nfs: Do not convert nfs_idmap_cache_timeout to jiffies watchdog: sp5100_tco: Fix watchdog disable bit kconfig: Don't leak main menus during parsing kconfig: Fix automatic menu creation mem leak kconfig: Fix expr_free() E_NOT leak mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() ipmi/powernv: Fix error return code in ipmi_powernv_probe() Btrfs: set plug for fsync btrfs: Fix out of bounds access in btrfs_search_slot Btrfs: fix scrub to repair raid6 corruption scsi: fas216: fix sense buffer initialization HID: roccat: prevent an out of bounds read in kovaplus_profile_activated() jffs2: Fix use-after-free bug in jffs2_iget()'s error handling path powerpc/numa: Use ibm,max-associativity-domains to discover possible nodes powerpc/numa: Ensure nodes initialized for hotplug RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure ntb_transport: Fix bug with max_mw_size parameter ocfs2: return -EROFS to mount.ocfs2 if inode block is invalid ocfs2/acl: use 'ip_xattr_sem' to protect getting extended attribute ocfs2: return error when we attempt to access a dirty bh in jbd2 mm/mempolicy: fix the check of nodemask from user mm/mempolicy: add nodes_empty check in SYSC_migrate_pages asm-generic: provide generic_pmdp_establish() mm: pin address_space before dereferencing it while isolating an LRU page IB/ipoib: Fix for potential no-carrier state x86/power: Fix swsusp_arch_resume prototype firmware: dmi_scan: Fix handling of empty DMI strings ACPI: processor_perflib: Do not send _PPC change notification if not ready bpf: fix selftests/bpf test_kmod.sh failure when CONFIG_BPF_JIT_ALWAYS_ON=y MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS xen-netfront: Fix race between device setup and open xen/grant-table: Use put_page instead of free_page RDS: IB: Fix null pointer issue arm64: spinlock: Fix theoretical trylock() A-B-A with LSE atomics proc: fix /proc/*/map_files lookup cifs: silence compiler warnings showing up with gcc-8.0.0 bcache: properly set task state in bch_writeback_thread() bcache: fix for allocator and register thread race bcache: fix for data collapse after re-attaching an attached device bcache: return attach error when no cache set exist tools/libbpf: handle issues with bpf ELF objects containing .eh_frames locking/qspinlock: Ensure node->count is updated before initialising node irqchip/gic-v3: Change pr_debug message to pr_devel scsi: ufs: Enable quirk to ignore sending WRITE_SAME command scsi: bnx2fc: Fix check in SCSI completion handler for timed out request scsi: sym53c8xx_2: iterator underflow in sym_getsync() scsi: mptfusion: Add bounds check in mptctl_hp_targetinfo() scsi: qla2xxx: Avoid triggering undefined behavior in qla2x00_mbx_completion() ARC: Fix malformed ARC_EMUL_UNALIGNED default usb: gadget: f_uac2: fix bFirstInterface in composite gadget usb: gadget: fsl_udc_core: fix ep valid checks usb: dwc2: Fix dwc2_hsotg_core_init_disconnected() selftests: memfd: add config fragment for fuse scsi: storvsc: Increase cmd_per_lun for higher speed devices scsi: aacraid: fix shutdown crash when init fails scsi: qla4xxx: skip error recovery in case of register disconnect. ARM: OMAP2+: timer: fix a kmemleak caused in omap_get_timer_dt ARM: OMAP3: Fix prm wake interrupt for resume ARM: OMAP1: clock: Fix debugfs_create_*() usage NFC: llcp: Limit size of SDP URI mac80211: round IEEE80211_TX_STATUS_HEADROOM up to multiple of 4 md raid10: fix NULL deference in handle_write_completed() drm/exynos: fix comparison to bitshift when dealing with a mask usb: musb: fix enumeration after resume locking/xchg/alpha: Add unconditional memory barrier to cmpxchg() md: raid5: avoid string overflow warning kernel/relay.c: limit kmalloc size to KMALLOC_MAX_SIZE powerpc/bpf/jit: Fix 32-bit JIT for seccomp_data access s390/cio: fix return code after missing interrupt s390/cio: clear timer when terminating driver I/O ARM: OMAP: Fix dmtimer init for omap1 smsc75xx: fix smsc75xx_set_features() regulatory: add NUL to request alpha2 locking/xchg/alpha: Fix xchg() and cmpxchg() memory ordering bugs x86/topology: Update the 'cpu cores' field in /proc/cpuinfo correctly across CPU hotplug operations media: dmxdev: fix error code for invalid ioctls md/raid1: fix NULL pointer dereference batman-adv: fix packet checksum in receive path batman-adv: invalidate checksum on fragment reassembly netfilter: ebtables: convert BUG_ONs to WARN_ONs nvme-pci: Fix nvme queue cleanup if IRQ setup fails clocksource/drivers/fsl_ftm_timer: Fix error return checking r8152: fix tx packets accounting virtio-gpu: fix ioctl and expose the fixed status to userspace. dmaengine: rcar-dmac: fix max_chunk_size for R-Car Gen3 bcache: fix kcrashes with fio in RAID5 backend dev sit: fix IFLA_MTU ignored on NEWLINK gianfar: Fix Rx byte accounting for ndev stats net/tcp/illinois: replace broken algorithm reference link xen/pirq: fix error path cleanup when binding MSIs Btrfs: send, fix issuing write op when processing hole in no data mode selftests/powerpc: Skip the subpage_prot tests if the syscall is unavailable KVM: PPC: Book3S HV: Fix VRMA initialization with 2MB or 1GB memory backing watchdog: f71808e_wdt: Fix magic close handling e1000e: Fix check_for_link return value with autoneg off e1000e: allocate ring descriptors with dma_zalloc_coherent usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers scsi: mpt3sas: Do not mark fw_event workqueue as WQ_MEM_RECLAIM scsi: sd: Keep disk read-only when re-reading partition fbdev: Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in sbusfb_ioctl_helper(). xen: xenbus: use put_device() instead of kfree() USB: OHCI: Fix NULL dereference in HCDs using HCD_LOCAL_MEM netfilter: ebtables: fix erroneous reject of last rule bnxt_en: Check valid VNIC ID in bnxt_hwrm_vnic_set_tpa(). workqueue: use put_device() instead of kfree() ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu sunvnet: does not support GSO for sctp net: Fix vlan untag for bridge and vlan_dev with reorder_hdr off batman-adv: fix header size check in batadv_dbg_arp() vti4: Don't count header length twice on tunnel setup vti4: Don't override MTU passed on link creation via IFLA_MTU perf/cgroup: Fix child event counting bug RDMA/ucma: Correct option size check using optlen mm/mempolicy.c: avoid use uninitialized preferred_node selftests: ftrace: Add probe event argument syntax testcase selftests: ftrace: Add a testcase for string type with kprobe_event selftests: ftrace: Add a testcase for probepoint batman-adv: fix multicast-via-unicast transmission with AP isolation batman-adv: fix packet loss for broadcasted DHCP packets to a server ARM: 8748/1: mm: Define vdso_start, vdso_end as array net: qmi_wwan: add BroadMobi BM806U 2020:2033 net/usb/qmi_wwan.c: Add USB id for lt4120 modem net-usb: add qmi_wwan if on lte modem wistron neweb d18q1 llc: properly handle dev_queue_xmit() return value mm/kmemleak.c: wait for scan completion before disabling free net: Fix untag for vlan packets without ethernet header net: mvneta: fix enable of all initialized RXQs sh: fix debug trap failure to process signals before return to user x86/pgtable: Don't set huge PUD/PMD on non-leaf entries fs/proc/proc_sysctl.c: fix potential page fault while unregistering sysctl table swap: divide-by-zero when zero length swap file on ssd sr: get/drop reference to device in revalidate and check_events Force log to disk before reading the AGF during a fstrim cpufreq: CPPC: Initialize shared perf capabilities of CPUs scsi: aacraid: Insure command thread is not recursively stopped dp83640: Ensure against premature access to PHY registers after reset mm/ksm: fix interaction with THP mm: fix races between address_space dereference and free in page_evicatable Btrfs: bail out on error during replay_dir_deletes Btrfs: fix NULL pointer dereference in log_dir_items btrfs: Fix possible softlock on single core machines ocfs2/dlm: don't handle migrate lockres if already in shutdown sched/rt: Fix rq->clock_update_flags < RQCF_ACT_SKIP warning KVM: VMX: raise internal error for exception during invalid protected mode state fscache: Fix hanging wait on page discarded by writeback sparc64: Make atomic_xchg() an inline function rather than a macro. rtc: snvs: Fix usage of snvs_rtc_enable net: bgmac: Fix endian access in bgmac_dma_tx_ring_free() Bluetooth: btusb: Add USB ID 7392:a611 for Edimax EW-7611ULB btrfs: tests/qgroup: Fix wrong tree backref level Btrfs: fix copy_items() return value when logging an inode btrfs: fix lockdep splat in btrfs_alloc_subvolume_writers xen/acpi: off by one in read_acpi_id() ACPI: acpi_pad: Fix memory leak in power saving threads powerpc/mpic: Check if cpu_possible() in mpic_physmask() m68k: set dma and coherent masks for platform FEC ethernets parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode hwmon: (nct6775) Fix writing pwmX_mode rtc: hctosys: Ensure system time doesn't overflow time_t powerpc/perf: Prevent kernel address leak to userspace via BHRB buffer powerpc/perf: Fix kernel address leak via sampling registers tools/thermal: tmon: fix for segfault selftests: Print the test we're running to /dev/kmsg net/mlx5: Protect from command bit overflow ath10k: Fix kernel panic while using worker (ath10k_sta_rc_update_wk) ima: Fix Kconfig to select TPM 2.0 CRB interface ima: Fallback to the builtin hash algorithm virtio-net: Fix operstate for virtio when no VIRTIO_NET_F_STATUS arm: dts: socfpga: fix GIC PPI warning usb: dwc3: Update DWC_usb31 GTXFIFOSIZ reg fields cpufreq: cppc_cpufreq: Fix cppc_cpufreq_init() failure path clk: Don't show the incorrect clock phase zorro: Set up z->dev.dma_mask for the DMA API bcache: quit dc->writeback_thread when BCACHE_DEV_DETACHING is set ACPICA: Events: add a return on failure from acpi_hw_register_read ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c i2c: mv64xxx: Apply errata delay only in standard mode KVM: lapic: stop advertising DIRECTED_EOI when in-kernel IOAPIC is in use xhci: zero usb device slot_id member when disabling and freeing a xhci slot MIPS: ath79: Fix AR724X_PLL_REG_PCIE_CONFIG offset PCI: Restore config space on runtime resume despite being unbound ipmi_ssif: Fix kernel panic at msg_done_handler usb: dwc2: Fix interval type issue usb: gadget: ffs: Let setup() return USB_GADGET_DELAYED_STATUS usb: gadget: ffs: Execute copy_to_user() with USER_DS set powerpc: Add missing prototype for arch_irq_work_raise() ASoC: topology: create TLV data for dapm widgets perf/core: Fix perf_output_read_group() hwmon: (pmbus/max8688) Accept negative page register values hwmon: (pmbus/adm1275) Accept negative page register values cdrom: do not call check_disk_change() inside cdrom_open() gfs2: Fix fallocate chunk size usb: gadget: udc: change comparison to bitshift when dealing with a mask usb: gadget: composite: fix incorrect handling of OS desc requests x86/devicetree: Initialize device tree before using it x86/devicetree: Fix device IRQ settings in DT ALSA: vmaster: Propagate slave error media: cx23885: Override 888 ImpactVCBe crystal frequency media: cx23885: Set subdev host data to clk_freq pointer media: s3c-camif: fix out-of-bounds array access dmaengine: pl330: fix a race condition in case of threaded irqs media: em28xx: USB bulk packet size fix clk: rockchip: Prevent calculating mmc phase if clock rate is zero enic: enable rq before updating rq descriptors hwrng: stm32 - add reset during probe staging: rtl8192u: return -ENOMEM on failed allocation of priv->oldaddr rtc: tx4939: avoid unintended sign extension on a 24 bit shift serial: xuartps: Fix out-of-bounds access through DT alias serial: samsung: Fix out-of-bounds access through serial port index serial: mxs-auart: Fix out-of-bounds access through serial port index serial: imx: Fix out-of-bounds access through serial port index serial: fsl_lpuart: Fix out-of-bounds access through DT alias serial: arc_uart: Fix out-of-bounds access through DT alias PCI: Add function 1 DMA alias quirk for Marvell 88SE9220 udf: Provide saner default for invalid uid / gid media: cx25821: prevent out-of-bounds read on array card clk: samsung: s3c2410: Fix PLL rates clk: samsung: exynos5260: Fix PLL rates clk: samsung: exynos5433: Fix PLL rates clk: samsung: exynos5250: Fix PLL rates clk: samsung: exynos3250: Fix PLL rates crypto: sunxi-ss - Add MODULE_ALIAS to sun4i-ss audit: return on memory error to avoid null pointer dereference MIPS: Octeon: Fix logging messages with spurious periods after newlines drm/rockchip: Respect page offset for PRIME mmap calls x86/apic: Set up through-local-APIC mode on the boot CPU if 'noapic' specified perf tests: Use arch__compare_symbol_names to compare symbols perf report: Fix memory corruption in --branch-history mode --branch-history selftests/net: fixes psock_fanout eBPF test case netlabel: If PF_INET6, check sk_buff ip header version scsi: lpfc: Fix issue_lip if link is disabled scsi: lpfc: Fix soft lockup in lpfc worker thread during LIP testing scsi: lpfc: Fix frequency of Release WQE CQEs regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulator_match()' ASoC: samsung: i2s: Ensure the RCLK rate is properly determined Bluetooth: btusb: Add device ID for RTL8822BE kdb: make "mdr" command repeat s390/ftrace: use expoline for indirect branches Linux 4.4.134 Change-Id: Iababaf9b89bc8d0437b95e1368d8b0a9126a178c Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-05-30fbdev: Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in ↵Peter Malone
sbusfb_ioctl_helper(). [ Upstream commit 250c6c49e3b68756b14983c076183568636e2bde ] Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in sbusfb_ioctl_helper(). 'index' is defined as an int in sbusfb_ioctl_helper(). We retrieve this from the user: if (get_user(index, &c->index) || __get_user(count, &c->count) || __get_user(ured, &c->red) || __get_user(ugreen, &c->green) || __get_user(ublue, &c->blue)) return -EFAULT; and then we use 'index' in the following way: red = cmap->red[index + i] >> 8; green = cmap->green[index + i] >> 8; blue = cmap->blue[index + i] >> 8; This is a classic information leak vulnerability. 'index' should be an unsigned int, given its usage above. This patch is straight-forward; it changes 'index' to unsigned int in two switch-cases: FBIOGETCMAP_SPARC && FBIOPUTCMAP_SPARC. This patch fixes CVE-2018-6412. Signed-off-by: Peter Malone <peter.malone@gmail.com> Acked-by: Mathieu Malaterre <malat@debian.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-14Merge 4.4.128 into android-4.4Greg Kroah-Hartman
Changes in 4.4.128 cfg80211: make RATE_INFO_BW_20 the default md/raid5: make use of spin_lock_irq over local_irq_disable + spin_lock rtc: snvs: fix an incorrect check of return value x86/asm: Don't use RBP as a temporary register in csum_partial_copy_generic() NFSv4.1: RECLAIM_COMPLETE must handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION IB/srpt: Fix abort handling af_key: Fix slab-out-of-bounds in pfkey_compile_policy. mac80211: bail out from prep_connection() if a reconfig is ongoing bna: Avoid reading past end of buffer qlge: Avoid reading past end of buffer ipmi_ssif: unlock on allocation failure net: cdc_ncm: Fix TX zero padding net: ethernet: ti: cpsw: adjust cpsw fifos depth for fullduplex flow control lockd: fix lockd shutdown race drivers/misc/vmw_vmci/vmci_queue_pair.c: fix a couple integer overflow tests pidns: disable pid allocation if pid_ns_prepare_proc() is failed in alloc_pid() s390: move _text symbol to address higher than zero net/mlx4_en: Avoid adding steering rules with invalid ring NFSv4.1: Work around a Linux server bug... CIFS: silence lockdep splat in cifs_relock_file() blk-mq: NVMe 512B/4K+T10 DIF/DIX format returns I/O error on dd with split op net: qca_spi: Fix alignment issues in rx path netxen_nic: set rcode to the return status from the call to netxen_issue_cmd Input: elan_i2c - check if device is there before really probing Input: elantech - force relative mode on a certain module KVM: PPC: Book3S PR: Check copy_to/from_user return values vmxnet3: ensure that adapter is in proper state during force_close SMB2: Fix share type handling bus: brcmstb_gisb: Use register offsets with writes too bus: brcmstb_gisb: correct support for 64-bit address output PowerCap: Fix an error code in powercap_register_zone() ARM: dts: imx53-qsrb: Pulldown PMIC IRQ pin staging: wlan-ng: prism2mgmt.c: fixed a double endian conversion before calling hfa384x_drvr_setconfig16, also fixes relative sparse warning x86/tsc: Provide 'tsc=unstable' boot parameter ARM: dts: imx6qdl-wandboard: Fix audio channel swap ipv6: avoid dad-failures for addresses with NODAD async_tx: Fix DMA_PREP_FENCE usage in do_async_gen_syndrome() usb: dwc3: keystone: check return value btrfs: fix incorrect error return ret being passed to mapping_set_error ata: libahci: properly propagate return value of platform_get_irq() neighbour: update neigh timestamps iff update is effective arp: honour gratuitous ARP _replies_ usb: chipidea: properly handle host or gadget initialization failure USB: ene_usb6250: fix first command execution net: x25: fix one potential use-after-free issue USB: ene_usb6250: fix SCSI residue overwriting serial: 8250: omap: Disable DMA for console UART serial: sh-sci: Fix race condition causing garbage during shutdown sh_eth: Use platform device for printing before register_netdev() scsi: csiostor: fix use after free in csio_hw_use_fwconfig() powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash ath5k: fix memory leak on buf on failed eeprom read selftests/powerpc: Fix TM resched DSCR test with some compilers xfrm: fix state migration copy replay sequence numbers iio: hi8435: avoid garbage event at first enable iio: hi8435: cleanup reset gpio ext4: handle the rest of ext4_mb_load_buddy() ENOMEM errors md-cluster: fix potential lock issue in add_new_disk ARM: davinci: da8xx: Create DSP device only when assigned memory ray_cs: Avoid reading past end of buffer leds: pca955x: Correct I2C Functionality sched/numa: Use down_read_trylock() for the mmap_sem net/mlx5: Tolerate irq_set_affinity_hint() failures selinux: do not check open permission on sockets block: fix an error code in add_partition() mlx5: fix bug reading rss_hash_type from CQE net: ieee802154: fix net_device reference release too early libceph: NULL deref on crush_decode() error path netfilter: ctnetlink: fix incorrect nf_ct_put during hash resize pNFS/flexfiles: missing error code in ff_layout_alloc_lseg() ASoC: rsnd: SSI PIO adjust to 24bit mode scsi: bnx2fc: fix race condition in bnx2fc_get_host_stats() fix race in drivers/char/random.c:get_reg() ext4: fix off-by-one on max nr_pages in ext4_find_unwritten_pgoff() tcp: better validation of received ack sequences net: move somaxconn init from sysctl code Input: elan_i2c - clear INT before resetting controller bonding: Don't update slave->link until ready to commit KVM: nVMX: Fix handling of lmsw instruction net: llc: add lock_sock in llc_ui_bind to avoid a race condition ARM: dts: ls1021a: add "fsl,ls1021a-esdhc" compatible string to esdhc node thermal: power_allocator: fix one race condition issue for thermal_instances list perf probe: Add warning message if there is unexpected event name l2tp: fix missing print session offset info rds; Reset rs->rs_bound_addr in rds_add_bound() failure path hwmon: (ina2xx) Make calibration register value fixed media: videobuf2-core: don't go out of the buffer range ASoC: Intel: cht_bsw_rt5645: Analog Mic support scsi: libiscsi: Allow sd_shutdown on bad transport scsi: mpt3sas: Proper handling of set/clear of "ATA command pending" flag. vfb: fix video mode and line_length being set when loaded gpio: label descriptors using the device name ASoC: Intel: sst: Fix the return value of 'sst_send_byte_stream_mrfld()' wl1251: check return from call to wl1251_acx_arp_ip_filter hdlcdrv: Fix divide by zero in hdlcdrv_ioctl ovl: filter trusted xattr for non-admin powerpc/[booke|4xx]: Don't clobber TCR[WP] when setting TCR[DIE] dmaengine: imx-sdma: Handle return value of clk_prepare_enable arm64: futex: Fix undefined behaviour with FUTEX_OP_OPARG_SHIFT usage net/mlx5: avoid build warning for uniprocessor cxgb4: FW upgrade fixes rtc: opal: Handle disabled TPO in opal_get_tpo_time() rtc: interface: Validate alarm-time before handling rollover SUNRPC: ensure correct error is reported by xs_tcp_setup_socket() net: freescale: fix potential null pointer dereference KVM: SVM: do not zero out segment attributes if segment is unusable or not present clk: scpi: fix return type of __scpi_dvfs_round_rate clk: Fix __set_clk_rates error print-string powerpc/spufs: Fix coredump of SPU contexts perf trace: Add mmap alias for s390 qlcnic: Fix a sleep-in-atomic bug in qlcnic_82xx_hw_write_wx_2M and qlcnic_82xx_hw_read_wx_2M mISDN: Fix a sleep-in-atomic bug drm/omap: fix tiled buffer stride calculations cxgb4: fix incorrect cim_la output for T6 Fix serial console on SNI RM400 machines bio-integrity: Do not allocate integrity context for bio w/o data skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow sit: reload iphdr in ipip6_rcv net/mlx4: Fix the check in attaching steering rules net/mlx4: Check if Granular QoS per VF has been enabled before updating QP qos_vport perf header: Set proper module name when build-id event found perf report: Ensure the perf DSO mapping matches what libdw sees tags: honor COMPILED_SOURCE with apart output directory e1000e: fix race condition around skb_tstamp_tx() cx25840: fix unchecked return values mceusb: sporadic RX truncation corruption fix net: phy: avoid genphy_aneg_done() for PHYs without clause 22 support ARM: imx: Add MXC_CPU_IMX6ULL and cpu_is_imx6ull e1000e: Undo e1000e_pm_freeze if __e1000_shutdown fails perf/core: Correct event creation with PERF_FORMAT_GROUP MIPS: mm: fixed mappings: correct initialisation MIPS: mm: adjust PKMAP location MIPS: kprobes: flush_insn_slot should flush only if probe initialised Fix loop device flush before configure v3 net: emac: fix reset timeout with AR8035 phy perf tests: Decompress kernel module before objdump skbuff: only inherit relevant tx_flags xen: avoid type warning in xchg_xen_ulong bnx2x: Allow vfs to disable txvlan offload sctp: fix recursive locking warning in sctp_do_peeloff sparc64: ldc abort during vds iso boot iio: magnetometer: st_magn_spi: fix spi_device_id table Bluetooth: Send HCI Set Event Mask Page 2 command only when needed cpuidle: dt: Add missing 'of_node_put()' ACPICA: Events: Add runtime stub support for event APIs ACPICA: Disassembler: Abort on an invalid/unknown AML opcode s390/dasd: fix hanging safe offline vxlan: dont migrate permanent fdb entries during learn bcache: stop writeback thread after detaching bcache: segregate flash only volume write streams scsi: libsas: fix memory leak in sas_smp_get_phy_events() scsi: libsas: fix error when getting phy events scsi: libsas: initialize sas_phy status according to response of DISCOVER blk-mq: fix kernel oops in blk_mq_tag_idle() tty: n_gsm: Allow ADM response in addition to UA for control dlci EDAC, mv64x60: Fix an error handling path cxgb4vf: Fix SGE FL buffer initialization logic for 64K pages perf tools: Fix copyfile_offset update of output offset ipsec: check return value of skb_to_sgvec always rxrpc: check return value of skb_to_sgvec always virtio_net: check return value of skb_to_sgvec always virtio_net: check return value of skb_to_sgvec in one more location random: use lockless method of accessing and updating f->reg_idx futex: Remove requirement for lock_page() in get_futex_key() Kbuild: provide a __UNIQUE_ID for clang arp: fix arp_filter on l3slave devices net: fix possible out-of-bound read in skb_network_protocol() net/ipv6: Fix route leaking between VRFs netlink: make sure nladdr has correct size in netlink_connect() net/sched: fix NULL dereference in the error path of tcf_bpf_init() pptp: remove a buggy dst release in pptp_connect() sctp: do not leak kernel memory to user space sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6 sky2: Increase D3 delay to sky2 stops working after suspend vhost: correctly remove wait queue during poll failure vlan: also check phy_driver ts_info for vlan's real device bonding: fix the err path for dev hwaddr sync in bond_enslave bonding: move dev_mc_sync after master_upper_dev_link in bond_enslave bonding: process the err returned by dev_set_allmulti properly in bond_enslave net: fool proof dev_valid_name() ip_tunnel: better validate user provided tunnel names ipv6: sit: better validate user provided tunnel names ip6_gre: better validate user provided tunnel names ip6_tunnel: better validate user provided tunnel names vti6: better validate user provided tunnel names r8169: fix setting driver_data after register_netdev net sched actions: fix dumping which requires several messages to user space net/ipv6: Increment OUTxxx counters after netfilter hook ipv6: the entire IPv6 header chain must fit the first fragment vrf: Fix use after free and double free in vrf_finish_output Revert "xhci: plat: Register shutdown for xhci_plat" Linux 4.4.128 Change-Id: I9c1e58f634cc18f15a840c9d192c892dfcc5ff73 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-04-13vfb: fix video mode and line_length being set when loadedPieter \"PoroCYon\" Sluys
[ Upstream commit 7b9faf5df0ac495a1a3d7cdb64921c179f9008ac ] Currently, when loading the vfb module, the newly created fbdev has a line_length of 0, and its video mode would be PSEUDOCOLOR regardless of color depth. (The former could be worked around by calling the FBIOPUT_VSCREENINFO ioctl with having the FBACTIVIATE_FORCE flag set.) This patch automatically sets the line_length correctly, and the video mode is derived from the bit depth now as well. Thanks to Geert Uytterhoeven for confirming the bug and helping me with the patch. Output of `fbset -i' before the patch: mode "1366x768-60" # D: 72.432 MHz, H: 47.403 kHz, V: 60.004 Hz geometry 1366 768 1366 768 32 timings 13806 120 10 14 3 32 5 rgba 8/0,8/8,8/16,8/24 endmode Frame buffer device information: Name : Virtual FB Address : 0xffffaa1405d85000 Size : 4196352 Type : PACKED PIXELS Visual : PSEUDOCOLOR XPanStep : 1 YPanStep : 1 YWrapStep : 1 LineLength : 0 <-- note this Accelerator : No After: mode "1366x768-60" # D: 72.432 MHz, H: 47.403 kHz, V: 60.004 Hz geometry 1366 768 1366 768 32 timings 13806 120 10 14 3 32 5 rgba 8/0,8/8,8/16,8/24 endmode Frame buffer device information: Name : Virtual FB Address : 0xffffaa1405d85000 Size : 4196352 Type : PACKED PIXELS Visual : TRUECOLOR XPanStep : 1 YPanStep : 1 YWrapStep : 1 LineLength : 5464 Accelerator : No Signed-off-by: "Pieter \"PoroCYon\" Sluys" <pcy@national.shitposting.agency> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> [b.zolnierkie: minor fixups] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-25Merge 4.4.124 into android-4.4Greg Kroah-Hartman
Changes in 4.4.124 tpm: fix potential buffer overruns caused by bit glitches on the bus tpm_tis: fix potential buffer overruns caused by bit glitches on the bus SMB3: Validate negotiate request must always be signed CIFS: Enable encryption during session setup phase staging: android: ashmem: Fix possible deadlock in ashmem_ioctl platform/x86: asus-nb-wmi: Add wapf4 quirk for the X302UA regulator: anatop: set default voltage selector for pcie x86: i8259: export legacy_pic symbol rtc: cmos: Do not assume irq 8 for rtc when there are no legacy irqs Input: ar1021_i2c - fix too long name in driver's device table time: Change posix clocks ops interfaces to use timespec64 ACPI/processor: Fix error handling in __acpi_processor_start() ACPI/processor: Replace racy task affinity logic cpufreq/sh: Replace racy task affinity logic genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs i2c: i2c-scmi: add a MS HID net: ipv6: send unsolicited NA on admin up media/dvb-core: Race condition when writing to CAM spi: dw: Disable clock after unregistering the host ath: Fix updating radar flags for coutry code India clk: ns2: Correct SDIO bits scsi: virtio_scsi: Always try to read VPD pages KVM: PPC: Book3S PR: Exit KVM on failed mapping ARM: 8668/1: ftrace: Fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER iommu/omap: Register driver before setting IOMMU ops md/raid10: wait up frozen array in handle_write_completed NFS: Fix missing pg_cleanup after nfs_pageio_cond_complete() tcp: remove poll() flakes with FastOpen e1000e: fix timing for 82579 Gigabit Ethernet controller ALSA: hda - Fix headset microphone detection for ASUS N551 and N751 IB/ipoib: Fix deadlock between ipoib_stop and mcast join flow IB/ipoib: Update broadcast object if PKey value was changed in index 0 HSI: ssi_protocol: double free in ssip_pn_xmit() IB/mlx4: Take write semaphore when changing the vma struct IB/mlx4: Change vma from shared to private ASoC: Intel: Skylake: Uninitialized variable in probe_codec() Fix driver usage of 128B WQEs when WQ_CREATE is V1. netfilter: xt_CT: fix refcnt leak on error path openvswitch: Delete conntrack entry clashing with an expectation. mmc: host: omap_hsmmc: checking for NULL instead of IS_ERR() wan: pc300too: abort path on failure qlcnic: fix unchecked return value scsi: mac_esp: Replace bogus memory barrier with spinlock infiniband/uverbs: Fix integer overflows NFS: don't try to cross a mountpount when there isn't one there. iio: st_pressure: st_accel: Initialise sensor platform data properly mt7601u: check return value of alloc_skb rndis_wlan: add return value validation Btrfs: send, fix file hole not being preserved due to inline extent mac80211: don't parse encrypted management frames in ieee80211_frame_acked mfd: palmas: Reset the POWERHOLD mux during power off mtip32xx: use runtime tag to initialize command header staging: unisys: visorhba: fix s-Par to boot with option CONFIG_VMAP_STACK set to y staging: wilc1000: fix unchecked return value mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP ipmi/watchdog: fix wdog hang on panic waiting for ipmi response ACPI / PMIC: xpower: Fix power_table addresses drm/nouveau/kms: Increase max retries in scanout position queries. bnx2x: Align RX buffers power: supply: pda_power: move from timer to delayed_work Input: twl4030-pwrbutton - use correct device for irq request md/raid10: skip spare disk as 'first' disk ia64: fix module loading for gcc-5.4 tcm_fileio: Prevent information leak for short reads video: fbdev: udlfb: Fix buffer on stack sm501fb: don't return zero on failure path in sm501fb_start() net: hns: fix ethtool_get_strings overflow in hns driver cifs: small underflow in cnvrtDosUnixTm() rtc: ds1374: wdt: Fix issue with timeout scaling from secs to wdt ticks rtc: ds1374: wdt: Fix stop/start ioctl always returning -EINVAL perf tests kmod-path: Don't fail if compressed modules aren't supported Bluetooth: hci_qca: Avoid setup failure on missing rampatch media: c8sectpfe: fix potential NULL pointer dereference in c8sectpfe_timer_interrupt drm/msm: fix leak in failed get_pages RDMA/iwpm: Fix uninitialized error code in iwpm_send_mapinfo() rtlwifi: rtl_pci: Fix the bug when inactiveps is enabled. media: bt8xx: Fix err 'bt878_probe()' media: [RESEND] media: dvb-frontends: Add delay to Si2168 restart cros_ec: fix nul-termination for firmware build info platform/chrome: Use proper protocol transfer function mmc: avoid removing non-removable hosts during suspend IB/ipoib: Avoid memory leak if the SA returns a different DGID RDMA/cma: Use correct size when writing netlink stats IB/umem: Fix use of npages/nmap fields vgacon: Set VGA struct resource types drm/omap: DMM: Check for DMM readiness after successful transaction commit pty: cancel pty slave port buf's work in tty_release coresight: Fix disabling of CoreSight TPIU pinctrl: Really force states during suspend/resume iommu/vt-d: clean up pr_irq if request_threaded_irq fails ip6_vti: adjust vti mtu according to mtu of lower device RDMA/ocrdma: Fix permissions for OCRDMA_RESET_STATS nfsd4: permit layoutget of executable-only files clk: si5351: Rename internal plls to avoid name collisions dmaengine: ti-dma-crossbar: Fix event mapping for TPCC_EVT_MUX_60_63 RDMA/ucma: Fix access to non-initialized CM_ID object Linux 4.4.124 Change-Id: Iac6f5bda7941f032c5b1f58750e084140b0e3f23 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-03-24vgacon: Set VGA struct resource typesBjorn Helgaas
[ Upstream commit c82084117f79bcae085e40da526253736a247120 ] Set the resource type when we reserve VGA-related I/O port resources. The resource code doesn't actually look at the type, so it inserts resources without a type in the tree correctly even without this change. But if we ever print a resource without a type, it looks like this: vga+ [??? 0x000003c0-0x000003df flags 0x0] Setting the type means it will be printed correctly as: vga+ [io 0x000003c0-0x000003df] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-24sm501fb: don't return zero on failure path in sm501fb_start()Alexey Khoroshilov
[ Upstream commit dc85e9a87420613b3129d5cc5ecd79c58351c546 ] If fbmem iomemory mapping failed, sm501fb_start() breaks off initialization, deallocates resources, but returns zero. As a result, double deallocation can happen in sm501fb_stop(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-24video: fbdev: udlfb: Fix buffer on stackMaksim Salau
[ Upstream commit 45f580c42e5c125d55dbd8099750a1998de3d917 ] Allocate buffers on HEAP instead of STACK for local array that is to be sent using usb_control_msg(). Signed-off-by: Maksim Salau <maksim.salau@gmail.com> Cc: Bernie Thompson <bernie@plugable.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22Merge 4.4.123 into android-4.4Greg Kroah-Hartman
Changes in 4.4.123 blkcg: fix double free of new_blkg in blkcg_init_queue Input: tsc2007 - check for presence and power down tsc2007 during probe staging: speakup: Replace BUG_ON() with WARN_ON(). staging: wilc1000: add check for kmalloc allocation failure. HID: reject input outside logical range only if null state is set drm: qxl: Don't alloc fbdev if emulation is not supported ath10k: fix a warning during channel switch with multiple vaps PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown() selinux: check for address length in selinux_socket_bind() perf sort: Fix segfault with basic block 'cycles' sort dimension i40e: Acquire NVM lock before reads on all devices i40e: fix ethtool to get EEPROM data from X722 interface perf tools: Make perf_event__synthesize_mmap_events() scale drivers: net: xgene: Fix hardware checksum setting drm: Defer disabling the vblank IRQ until the next interrupt (for instant-off) ath10k: disallow DFS simulation if DFS channel is not enabled perf probe: Return errno when not hitting any event HID: clamp input to logical range if no null state net/8021q: create device with all possible features in wanted_features ARM: dts: Adjust moxart IRQ controller and flags batman-adv: handle race condition for claims between gateways of: fix of_device_get_modalias returned length when truncating buffers solo6x10: release vb2 buffers in solo_stop_streaming() scsi: ipr: Fix missed EH wakeup media: i2c/soc_camera: fix ov6650 sensor getting wrong clock timers, sched_clock: Update timeout for clock wrap sysrq: Reset the watchdog timers while displaying high-resolution timers Input: qt1070 - add OF device ID table sched: act_csum: don't mangle TCP and UDP GSO packets ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT spi: omap2-mcspi: poll OMAP2_MCSPI_CHSTAT_RXS for PIO transfer tcp: sysctl: Fix a race to avoid unexpected 0 window from space dmaengine: imx-sdma: add 1ms delay to ensure SDMA channel is stopped driver: (adm1275) set the m,b and R coefficients correctly for power mm: Fix false-positive VM_BUG_ON() in page_cache_{get,add}_speculative() blk-throttle: make sure expire time isn't too big f2fs: relax node version check for victim data in gc bonding: refine bond_fold_stats() wrap detection braille-console: Fix value returned by _braille_console_setup drm/vmwgfx: Fixes to vmwgfx_fb vxlan: vxlan dev should inherit lowerdev's gso_max_size NFC: nfcmrvl: Include unaligned.h instead of access_ok.h NFC: nfcmrvl: double free on error path ARM: dts: r8a7790: Correct parent of SSI[0-9] clocks ARM: dts: r8a7791: Correct parent of SSI[0-9] clocks powerpc: Avoid taking a data miss on every userspace instruction miss net/faraday: Add missing include of of.h ARM: dts: koelsch: Correct clock frequency of X2 DU clock input reiserfs: Make cancel_old_flush() reliable ALSA: firewire-digi00x: handle all MIDI messages on streaming packets fm10k: correctly check if interface is removed scsi: ses: don't get power status of SES device slot on probe apparmor: Make path_max parameter readonly iommu/iova: Fix underflow bug in __alloc_and_insert_iova_range video: ARM CLCD: fix dma allocation size drm/radeon: Fail fb creation from imported dma-bufs. drm/amdgpu: Fail fb creation from imported dma-bufs. (v2) coresight: Fixes coresight DT parse to get correct output port ID. MIPS: BPF: Quit clobbering callee saved registers in JIT code. MIPS: BPF: Fix multiple problems in JIT skb access helpers. MIPS: r2-on-r6-emu: Fix BLEZL and BGTZL identification MIPS: r2-on-r6-emu: Clear BLTZALL and BGEZALL debugfs counters regulator: isl9305: fix array size md/raid6: Fix anomily when recovering a single device in RAID6. usb: dwc2: Make sure we disconnect the gadget state usb: gadget: dummy_hcd: Fix wrong power status bit clear/reset in dummy_hub_control() drivers/perf: arm_pmu: handle no platform_device perf inject: Copy events when reordering events in pipe mode perf session: Don't rely on evlist in pipe mode scsi: sg: check for valid direction before starting the request scsi: sg: close race condition in sg_remove_sfp_usercontext() kprobes/x86: Fix kprobe-booster not to boost far call instructions kprobes/x86: Set kprobes pages read-only pwm: tegra: Increase precision in PWM rate calculation wil6210: fix memory access violation in wil_memcpy_from/toio_32 drm/edid: set ELD connector type in drm_edid_to_eld() video/hdmi: Allow "empty" HDMI infoframes HID: elo: clear BTN_LEFT mapping ARM: dts: exynos: Correct Trats2 panel reset line sched: Stop switched_to_rt() from sending IPIs to offline CPUs sched: Stop resched_cpu() from sending IPIs to offline CPUs test_firmware: fix setting old custom fw path back on exit net: xfrm: allow clearing socket xfrm policies. mtd: nand: fix interpretation of NAND_CMD_NONE in nand_command[_lp]() ARM: dts: am335x-pepper: Fix the audio CODEC's reset pin ARM: dts: omap3-n900: Fix the audio CODEC's reset pin ath10k: update tdls teardown state to target cpufreq: Fix governor module removal race clk: qcom: msm8916: fix mnd_width for codec_digcodec ath10k: fix invalid STS_CAP_OFFSET_MASK tools/usbip: fixes build with musl libc toolchain spi: sun6i: disable/unprepare clocks on remove scsi: core: scsi_get_device_flags_keyed(): Always return device flags scsi: devinfo: apply to HP XP the same flags as Hitachi VSP scsi: dh: add new rdac devices media: cpia2: Fix a couple off by one bugs veth: set peer GSO values drm/amdkfd: Fix memory leaks in kfd topology agp/intel: Flush all chipset writes after updating the GGTT mac80211_hwsim: enforce PS_MANUAL_POLL to be set after PS_ENABLED mac80211: remove BUG() when interface type is invalid ASoC: nuc900: Fix a loop timeout test ipvlan: add L2 check for packets arriving via virtual devices rcutorture/configinit: Fix build directory error message ima: relax requiring a file signature for new files with zero length selftests/x86/entry_from_vm86: Exit with 1 if we fail selftests/x86: Add tests for User-Mode Instruction Prevention selftests/x86: Add tests for the STR and SLDT instructions selftests/x86/entry_from_vm86: Add test cases for POPF x86/vm86/32: Fix POPF emulation x86/mm: Fix vmalloc_fault to use pXd_large ALSA: pcm: Fix UAF in snd_pcm_oss_get_formats() ALSA: hda - Revert power_save option default value ALSA: seq: Fix possible UAF in snd_seq_check_queue() ALSA: seq: Clear client entry before deleting else at closing drm/amdgpu/dce: Don't turn off DP sink when disconnected fs: Teach path_connected to handle nfs filesystems with multiple roots. lock_parent() needs to recheck if dentry got __dentry_kill'ed under it fs/aio: Add explicit RCU grace period when freeing kioctx fs/aio: Use RCU accessors for kioctx_table->table[] irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis scsi: sg: fix SG_DXFER_FROM_DEV transfers scsi: sg: fix static checker warning in sg_is_valid_dxfer scsi: sg: only check for dxfer_len greater than 256M ARM: dts: LogicPD Torpedo: Fix I2C1 pinmux btrfs: alloc_chunk: fix DUP stripe size handling btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe() usb: gadget: bdc: 64-bit pointer capability check bpf: fix incorrect sign extension in check_alu_op() Linux 4.4.123 Change-Id: Ieb89411248f93522dde29edb8581f8ece22e33a7 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-03-22video/hdmi: Allow "empty" HDMI infoframesVille Syrjälä
[ Upstream commit 593f4b19a094c4426bd1e1e3cbab87a48bd13c71 ] HDMI 2.0 Appendix F suggest that we should keep sending the infoframe when switching from 3D to 2D mode, even if the infoframe isn't strictly necessary (ie. not needed to transmit the VIC or stereo information). This is a workaround against some sinks that fail to realize that they should switch from 3D to 2D mode when the source stop transmitting the infoframe. v2: Handle unpack() as well Pull the length calculation into a helper Cc: Shashank Sharma <shashank.sharma@intel.com> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: linux-media@vger.kernel.org Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> #v1 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171113170427.4150-2-ville.syrjala@linux.intel.com Reviewed-by: Shashank Sharma <shashank.sharma@intel.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22video: ARM CLCD: fix dma allocation sizeLiam Beguin
[ Upstream commit 9a1c779e6b06855e41099caa6f15b3b584dfa88c ] This patch forces the frambuffer size to be aligned on kernel pages. During the board startup, the splash screed did appear; the "ts_test" program or our application were not able to start. The following error message was reported: error: failed to map framebuffer device to memory. LinuxFB: driver cannot connect The issue was discovered, on the LPC32xx platform, during the migration of the LCD definition from the board file to the device tree. Signed-off-by: Liam Beguin <lbeguin@tycoint.com> Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com> Cc: Vladimir Zapolskiy <vz@mleia.com> Cc: Russell King <linux@armlinux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-16ANDROID: ranchu: 32 bit framebuffer supportbohu
Support both 16-bit and 32-bit framebuffers. BUG: 72717639 Change-Id: Ib1357ef6c16d66a9d94da57bb97558c5ff820640 Signed-off-by: Bo Hu <bohu@google.com> Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-03-16ANDROID: Address checkpatch warnings in goldfishfbRoman Kiryanov
Change-Id: If16dd322f2635873a8d42c4f455ddb0a20864b6a Signed-off-by: Roman Kiryanov <rkir@google.com>
2018-02-26Merge 4.4.118 into android-4.4Greg Kroah-Hartman
Changes in 4.4.118 net: add dst_cache support net: replace dst_cache ip6_tunnel implementation with the generic one cfg80211: check dev_set_name() return value mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed. xfrm: Fix stack-out-of-bounds read on socket policy lookup. xfrm: check id proto in validate_tmpl() blktrace: fix unlocked registration of tracepoints drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all Provide a function to create a NUL-terminated string from unterminated data selinux: ensure the context is NUL terminated in security_context_to_sid_core() selinux: skip bounded transition processing if the policy isn't loaded crypto: x86/twofish-3way - Fix %rbp usage KVM: x86: fix escape of guest dr6 to the host netfilter: x_tables: fix int overflow in xt_alloc_table_info() netfilter: x_tables: avoid out-of-bounds reads in xt_request_find_{match|target} netfilter: ipt_CLUSTERIP: fix out-of-bounds accesses in clusterip_tg_check() netfilter: on sockopt() acquire sock lock only in the required scope netfilter: xt_RATEEST: acquire xt_rateest_mutex for hash insert net: avoid skb_warn_bad_offload on IS_ERR ASoC: ux500: add MODULE_LICENSE tag video: fbdev/mmp: add MODULE_LICENSE arm64: dts: add #cooling-cells to CPU nodes Make DST_CACHE a silent config option dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock staging: android: ashmem: Fix a race condition in pin ioctls binder: check for binder_thread allocation failure in binder_poll() staging: iio: adc: ad7192: fix external frequency setting usbip: keep usbip_device sockfd state in sync with tcp_socket usb: build drivers/usb/common/ when USB_SUPPORT is set ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen ARM: dts: am4372: Correct the interrupts_properties of McASP perf top: Fix window dimensions change handling perf bench numa: Fixup discontiguous/sparse numa nodes media: s5k6aa: describe some function parameters pinctrl: sunxi: Fix A80 interrupt pin bank RDMA/cma: Make sure that PSN is not over max allowed scripts/kernel-doc: Don't fail with status != 0 if error encountered with -none ipvlan: Add the skb->mark as flow4's member to lookup route powerpc/perf: Fix oops when grouping different pmu events s390/dasd: prevent prefix I/O error gianfar: fix a flooded alignment reports because of padding issue. net_sched: red: Avoid devision by zero net_sched: red: Avoid illegal values btrfs: Fix possible off-by-one in btrfs_search_path_in_tree 509: fix printing uninitialized stack memory when OID is empty dmaengine: ioat: Fix error handling path dmaengine: at_hdmac: fix potential NULL pointer dereference in atc_prep_dma_interleaved clk: fix a panic error caused by accessing NULL pointer ASoC: rockchip: disable clock on error spi: sun4i: disable clocks in the remove function xfrm: Fix stack-out-of-bounds with misconfigured transport mode policies. drm/armada: fix leak of crtc structure dmaengine: jz4740: disable/unprepare clk if probe fails mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep x86/mm/kmmio: Fix mmiotrace for page unaligned addresses xen: XEN_ACPI_PROCESSOR is Dom0-only hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close virtio_balloon: prevent uninitialized variable use isdn: icn: remove a #warning vmxnet3: prevent building with 64K pages gpio: intel-mid: Fix build warning when !CONFIG_PM platform/x86: intel_mid_thermal: Fix suspend handlers unused warning video: fbdev: via: remove possibly unused variables scsi: advansys: fix build warning for PCI=n x86/ras/inject: Make it depend on X86_LOCAL_APIC=y arm64: define BUG() instruction without CONFIG_BUG x86/fpu/math-emu: Fix possible uninitialized variable use tools build: Add tools tree support for 'make -s' x86/build: Silence the build with "make -s" thermal: fix INTEL_SOC_DTS_IOSF_CORE dependencies x86: add MULTIUSER dependency for KVM x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG scsi: advansys: fix uninitialized data access arm64: Kconfig: select COMPAT_BINFMT_ELF only when BINFMT_ELF is set ALSA: hda/ca0132 - fix possible NULL pointer use reiserfs: avoid a -Wmaybe-uninitialized warning ssb: mark ssb_bus_register as __maybe_unused thermal: spear: use __maybe_unused for PM functions x86/boot: Avoid warning for zero-filling .bss scsi: sim710: fix build warning drivers/net: fix eisa_driver probe section mismatch dpt_i2o: fix build warning profile: hide unused functions when !CONFIG_PROC_FS md: avoid warning for 32-bit sector_t mtd: ichxrom: maybe-uninitialized with gcc-4.9 mtd: maps: add __init attribute mptfusion: hide unused seq_mpt_print_ioc_summary function scsi: fdomain: drop fdomain_pci_tbl when built-in video: fbdev: sis: remove unused variable staging: ste_rmi4: avoid unused function warnings fbdev: sis: enforce selection of at least one backend video: Use bool instead int pointer for get_opt_bool() argument scsi: mvumi: use __maybe_unused to hide pm functions SCSI: initio: remove duplicate module device table pwc: hide unused label usb: musb/ux500: remove duplicate check for dma_is_compatible tty: hvc_xen: hide xen_console_remove when unused target/user: Fix cast from pointer to phys_addr_t driver-core: use 'dev' argument in dev_dbg_ratelimited stub fbdev: auo_k190x: avoid unused function warnings amd-xgbe: Fix unused suspend handlers build warning mtd: sh_flctl: pass FIFO as physical address mtd: cfi: enforce valid geometry configuration fbdev: s6e8ax0: avoid unused function warnings modsign: hide openssl output in silent builds Drivers: hv: vmbus: fix build warning fbdev: sm712fb: avoid unused function warnings hwrng: exynos - use __maybe_unused to hide pm functions USB: cdc_subset: only build when one driver is enabled rtlwifi: fix gcc-6 indentation warning staging: wilc1000: fix kbuild test robot error x86/platform/olpc: Fix resume handler build warning netfilter: ipvs: avoid unused variable warnings ipv4: ipconfig: avoid unused ic_proto_used symbol tc1100-wmi: fix build warning when CONFIG_PM not enabled tlan: avoid unused label with PCI=n drm/vmwgfx: use *_32_bits() macros tty: cyclades: cyz_interrupt is only used for PCI genirq/msi: Add stubs for get_cached_msi_msg/pci_write_msi_msg ASoC: mediatek: add i2c dependency iio: adc: axp288: remove redundant duplicate const on axp288_adc_channels infiniband: cxgb4: use %pR format string for printing resources b2c2: flexcop: avoid unused function warnings i2c: remove __init from i2c_register_board_info() staging: unisys: visorinput depends on INPUT tc358743: fix register i2c_rd/wr functions drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-uninitialized warning KVM: add X86_LOCAL_APIC dependency go7007: add MEDIA_CAMERA_SUPPORT dependency em28xx: only use mt9v011 if camera support is enabled ISDN: eicon: reduce stack size of sig_ind function ASoC: rockchip: use __maybe_unused to hide st_irq_syscfg_resume serial: 8250_mid: fix broken DMA dependency drm/gma500: Sanity-check pipe index hdpvr: hide unused variable v4l: remove MEDIA_TUNER dependency for VIDEO_TUNER cw1200: fix bogus maybe-uninitialized warning wireless: cw1200: use __maybe_unused to hide pm functions_ perf/x86: Shut up false-positive -Wmaybe-uninitialized warning dmaengine: zx: fix build warning net: hp100: remove unnecessary #ifdefs gpio: xgene: mark PM functions as __maybe_unused ncpfs: fix unused variable warning Revert "power: bq27xxx_battery: Remove unneeded dependency in Kconfig" power: bq27xxx_battery: mark some symbols __maybe_unused isdn: sc: work around type mismatch warning binfmt_elf: compat: avoid unused function warning idle: i7300: add PCI dependency usb: phy: msm add regulator dependency ncr5380: shut up gcc indentation warning ARM: tegra: select USB_ULPI from EHCI rather than platform ASoC: Intel: Kconfig: fix build when ACPI is not enabled netlink: fix nla_put_{u8,u16,u32} for KASAN dell-wmi, dell-laptop: depends DMI genksyms: Fix segfault with invalid declarations x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug drm/gma500: remove helper function kasan: rework Kconfig settings KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously x86/retpoline: Remove the esp/rsp thunk KVM: x86: Make indirect calls in emulator speculation safe KVM: VMX: Make indirect call speculation safe module/retpoline: Warn about missing retpoline in module x86/nospec: Fix header guards names x86/bugs: Drop one "mitigation" from dmesg x86/cpu/bugs: Make retpoline module warning conditional x86/spectre: Check CONFIG_RETPOLINE in command line parser Documentation: Document array_index_nospec array_index_nospec: Sanitize speculative array de-references x86: Implement array_index_mask_nospec x86: Introduce barrier_nospec x86/get_user: Use pointer masking to limit speculation x86/syscall: Sanitize syscall table de-references under speculation vfs, fdtable: Prevent bounds-check bypass via speculative execution nl80211: Sanitize array index in parse_txq_params x86/spectre: Report get_user mitigation for spectre_v1 x86/spectre: Fix spelling mistake: "vunerable"-> "vulnerable" x86/paravirt: Remove 'noreplace-paravirt' cmdline option x86/kvm: Update spectre-v1 mitigation x86/retpoline: Avoid retpolines for built-in __init functions x86/spectre: Simplify spectre_v2 command line parsing x86/speculation: Fix typo IBRS_ATT, which should be IBRS_ALL KVM: nVMX: kmap() can't fail KVM: nVMX: vmx_complete_nested_posted_interrupt() can't fail kvm: nVMX: Fix kernel panics induced by illegal INVEPT/INVVPID types KVM: VMX: clean up declaration of VPID/EPT invalidation types KVM: nVMX: invvpid handling improvements crypto: s5p-sss - Fix kernel Oops in AES-ECB mode net: dst_cache_per_cpu_dst_set() can be static Linux 4.4.118 Change-Id: I01c76e1c15a611e13a1e98092bc5c01cdb5b6adb Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-25fbdev: sm712fb: avoid unused function warningsArnd Bergmann
commit 24ed78dc2e8b2428eccc70c3162e70d33ab448c4 upstream. The sm712fb framebuffer driver encloses the power-management functions in #ifdef CONFIG_PM, but the smtcfb_pci_suspend/resume functions are only really used when CONFIG_PM_SLEEP is also set, as a frequent gcc warning shows: fbdev/sm712fb.c:1549:12: warning: 'smtcfb_pci_suspend' defined but not used fbdev/sm712fb.c:1572:12: warning: 'smtcfb_pci_resume' defined but not used The driver also avoids using the SIMPLE_DEV_PM_OPS macro when CONFIG_PM is unset, which is redundant. This changes the driver to remove the #ifdef and instead mark the functions as __maybe_unused, which is a nicer anyway, as it provides build testing for all the code in all configurations and is harder to get wrong. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25fbdev: s6e8ax0: avoid unused function warningsArnd Bergmann
commit b54729b6cea7d1f46b1ed70cb7065c6bdefaa780 upstream. The s6e8ax0 suspend/resume functions are hidden inside of an #ifdef when CONFIG_PM is set to avoid unused function warnings, but they call some other functions that nothing else calls, and we get warnings about those: drivers/video/fbdev/exynos/s6e8ax0.c:449:13: error: 's6e8ax0_sleep_in' defined but not used [-Werror=unused-function] drivers/video/fbdev/exynos/s6e8ax0.c:485:13: error: 's6e8ax0_display_off' defined but not used [-Werror=unused-function] This marks the PM functions as __maybe_unused so the compiler can silently drop them when they are not referenced. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25fbdev: auo_k190x: avoid unused function warningsArnd Bergmann
commit a8a31afad5ffa1c7de0cef1c4bc383b50f426bf8 upstream. The auo_k190x framebuffer driver encloses the power-management functions in #ifdef CONFIG_PM, but the auok190x_suspend/resume functions are only really used when CONFIG_PM_SLEEP is also set, as a frequent gcc warning shows: drivers/video/fbdev/auo_k190x.c:859:12: warning: 'auok190x_suspend' defined but not used drivers/video/fbdev/auo_k190x.c:899:12: warning: 'auok190x_resume' defined but not used This changes the driver to remove the #ifdef and instead mark the functions as __maybe_unused, which is a nicer anyway, as it provides build testing for all the code in all configurations and is harder to get wrong. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25video: Use bool instead int pointer for get_opt_bool() argumentDaniel Wagner
commit 206fc20598157ce15597822cf01b94377e30075b upstream. As the function name already indicates that get_opt_bool() parses for a bool. It is not a surprise that compiler is complaining about it when -Werror=incompatible-pointer-types is used: drivers/video/fbdev/intelfb/intelfbdrv.c: In function ‘intelfb_setup’: drivers/video/fbdev/intelfb/intelfbdrv.c:353:39: error: passing argument 3 of ‘get_opt_bool’ from incompatible pointer type [-Werror=incompatible-pointer-types] if (get_opt_bool(this_opt, "accel", &accel)) Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25fbdev: sis: enforce selection of at least one backendArnd Bergmann
commit 5b833fea4377577eafecb888141a05470922ef25 upstream. The sis framebuffer driver complains with a compile-time warning if neither the FB_SIS_300 nor FB_SIS_315 symbols are selected: drivers/video/fbdev/sis/sis_main.c:61:2: warning: #warning Neither CONFIG_FB_SIS_300 nor CONFIG_FB_SIS_315 is se This is reasonable because it doesn't work in that case, but it's also annoying for randconfig builds and is one of the most common warnings I'm seeing on ARM now. This changes the Kconfig logic to prevent the silly configuration, by always selecting the FB_SIS_300 variant if the other one is not set. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25video: fbdev: sis: remove unused variableSudip Mukherjee
commit 32ad61951574d011d363694d6037592e99da9421 upstream. The variables modeflag and resinfo were only assigned some value but were never used. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25video: fbdev: via: remove possibly unused variablesArnd Bergmann
commit 484c7bbf2649831714da3a0fa30213977458e9b5 upstream. When CONFIG_PROC_FS is disabled, we get warnings about unused variables as remove_proc_entry() evaluates to an empty macro. drivers/video/fbdev/via/viafbdev.c: In function 'viafb_remove_proc': drivers/video/fbdev/via/viafbdev.c:1635:4: error: unused variable 'iga2_entry' [-Werror=unused-variable] drivers/video/fbdev/via/viafbdev.c:1634:4: error: unused variable 'iga1_entry' [-Werror=unused-variable] These are easy to avoid by using the pointer from the structure. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25video: fbdev/mmp: add MODULE_LICENSEArnd Bergmann
commit c1530ac5a3ce93a1f02adabc4508b5fbf862dfe2 upstream. Kbuild complains about the lack of a license tag in this driver: WARNING: modpost: missing MODULE_LICENSE() in drivers/video/fbdev/mmp/mmp_disp.o This adds the license, author and description tags. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22Merge 4.4.117 into android-4.4Greg Kroah-Hartman
Changes in 4.4.117 IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports PM / devfreq: Propagate error from devfreq_add_device() s390: fix handling of -1 in set{,fs}[gu]id16 syscalls ARM: dts: STi: Add gpio polarity for "hdmi,hpd-gpio" property arm: spear600: Add missing interrupt-parent of rtc arm: spear13xx: Fix dmas cells arm: spear13xx: Fix spics gpio controller's warning ALSA: seq: Fix regression by incorrect ioctl_mutex usages KVM/x86: Reduce retpoline performance impact in slot_handle_level_range(), by always inlining iterator helper methods x86/cpu: Change type of x86_cache_size variable to unsigned int drm/radeon: adjust tested variable rtc-opal: Fix handling of firmware error codes, prevent busy loops ext4: save error to disk in __ext4_grp_locked_error() ext4: correct documentation for grpid mount option mm: hide a #warning for COMPILE_TEST video: fbdev: atmel_lcdfb: fix display-timings lookup console/dummy: leave .con_font_get set to NULL rtlwifi: rtl8821ae: Fix connection lost problem correctly Btrfs: fix deadlock in run_delalloc_nocow Btrfs: fix crash due to not cleaning up tree log block's dirty bits Btrfs: fix unexpected -EEXIST when creating new inode ALSA: hda - Fix headset mic detection problem for two Dell machines ALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute ALSA: hda/realtek: PCI quirk for Fujitsu U7x7 ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204 ALSA: seq: Fix racy pool initializations mvpp2: fix multicast address filter dm: correctly handle chained bios in dec_pending() x86: fix build warnign with 32-bit PAE vfs: don't do RCU lookup of empty pathnames ARM: pxa/tosa-bt: add MODULE_LICENSE tag ARM: dts: s5pv210: add interrupt-parent for ohci media: r820t: fix r820t_write_reg for KASAN Linux 4.4.117 Change-Id: Id192d691d19a99889dc5d36711f18576f48f2981 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-22console/dummy: leave .con_font_get set to NULLNicolas Pitre
commit 724ba8b30b044aa0d94b1cd374fc15806cdd6f18 upstream. When this method is set, the caller expects struct console_font fields to be properly initialized when it returns. Leave it unset otherwise nonsensical (leaked kernel stack) values are returned to user space. Signed-off-by: Nicolas Pitre <nico@linaro.org> Cc: stable@vger.kernel.org Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22video: fbdev: atmel_lcdfb: fix display-timings lookupJohan Hovold
commit 9cb18db0701f6b74f0c45c23ad767b3ebebe37f6 upstream. Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent display node was also prematurely freed. Note that the display and timings node references are never put after a successful dt-initialisation so the nodes would leak on later probe deferrals and on driver unbind. Fixes: b985172b328a ("video: atmel_lcdfb: add device tree suport") Cc: stable <stable@vger.kernel.org> # 3.13 Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@microchip.com> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-27Merge 4.4.108 into android-4.4Greg Kroah-Hartman
Changes in 4.4.108 arm64: Initialise high_memory global variable earlier cxl: Check if vphb exists before iterating over AFU devices x86/mm: Add INVPCID helpers x86/mm: Fix INVPCID asm constraint x86/mm: Add a 'noinvpcid' boot option to turn off INVPCID x86/mm: If INVPCID is available, use it to flush global mappings mm/rmap: batched invalidations should use existing api mm/mmu_context, sched/core: Fix mmu_context.h assumption sched/core: Add switch_mm_irqs_off() and use it in the scheduler x86/mm: Build arch/x86/mm/tlb.c even on !SMP x86/mm, sched/core: Uninline switch_mm() x86/mm, sched/core: Turn off IRQs in switch_mm() ARM: Hide finish_arch_post_lock_switch() from modules sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off() x86/irq: Do not substract irq_tlb_count from irq_call_count ALSA: hda - add support for docking station for HP 820 G2 ALSA: hda - add support for docking station for HP 840 G3 arm: kprobes: Fix the return address of multiple kretprobes arm: kprobes: Align stack to 8-bytes in test code cpuidle: Validate cpu_dev in cpuidle_add_sysfs() r8152: fix the list rx_done may be used without initialization crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex sch_dsmark: fix invalid skb_cow() usage bna: integer overflow bug in debugfs net: qmi_wwan: Add USB IDs for MDM6600 modem on Motorola Droid 4 usb: gadget: f_uvc: Sanity check wMaxPacketSize for SuperSpeed usb: gadget: udc: remove pointer dereference after free netfilter: nfnl_cthelper: fix runtime expectation policy updates netfilter: nfnl_cthelper: Fix memory leak inet: frag: release spinlock before calling icmp_send() pinctrl: st: add irq_request/release_resources callbacks scsi: lpfc: Fix PT2PT PRLI reject KVM: x86: correct async page present tracepoint KVM: VMX: Fix enable VPID conditions ARM: dts: ti: fix PCI bus dtc warnings hwmon: (asus_atk0110) fix uninitialized data access HID: xinmo: fix for out of range for THT 2P arcade controller. r8152: prevent the driver from transmitting packets with carrier off s390/qeth: no ETH header for outbound AF_IUCV bna: avoid writing uninitialized data into hw registers net: Do not allow negative values for busy_read and busy_poll sysctl interfaces i40e: Do not enable NAPI on q_vectors that have no rings RDMA/iser: Fix possible mr leak on device removal event irda: vlsi_ir: fix check for DMA mapping errors netfilter: nfnl_cthelper: fix a race when walk the nf_ct_helper_hash table netfilter: nf_nat_snmp: Fix panic when snmp_trap_helper fails to register ARM: dts: am335x-evmsk: adjust mmc2 param to allow suspend KVM: pci-assign: do not map smm memory slot pages in vt-d page tables isdn: kcapi: avoid uninitialized data xhci: plat: Register shutdown for xhci_plat netfilter: nfnetlink_queue: fix secctx memory leak ARM: dma-mapping: disallow dma_get_sgtable() for non-kernel managed memory cpuidle: powernv: Pass correct drv->cpumask for registration bnxt_en: Fix NULL pointer dereference in reopen failure path backlight: pwm_bl: Fix overflow condition crypto: crypto4xx - increase context and scatter ring buffer elements rtc: pl031: make interrupt optional net: phy: at803x: Change error to EINVAL for invalid MAC PCI: Avoid bus reset if bridge itself is broken scsi: cxgb4i: fix Tx skb leak scsi: mpt3sas: Fix IO error occurs on pulling out a drive from RAID1 volume created on two SATA drive PCI: Create SR-IOV virtfn/physfn links before attaching driver igb: check memory allocation failure ixgbe: fix use of uninitialized padding PCI/AER: Report non-fatal errors only to the affected endpoint scsi: lpfc: Fix secure firmware updates scsi: lpfc: PLOGI failures during NPIV testing fm10k: ensure we process SM mbx when processing VF mbx tcp: fix under-evaluated ssthresh in TCP Vegas rtc: set the alarm to the next expiring timer cpuidle: fix broadcast control when broadcast can not be entered thermal: hisilicon: Handle return value of clk_prepare_enable MIPS: math-emu: Fix final emulation phase for certain instructions Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature" ALSA: hda - Clear the leftover component assignment at snd_hdac_i915_exit() ALSA: hda - Degrade i915 binding failure message ALSA: hda - Fix yet another i915 pointer leftover in error path alpha: fix build failures Linux 4.4.108 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-12-25backlight: pwm_bl: Fix overflow conditionDerek Basehore
[ Upstream commit 5d0c49acebc9488e37db95f1d4a55644e545ffe7 ] This fixes an overflow condition that can happen with high max brightness and period values in compute_duty_cycle. This fixes it by using a 64 bit variable for computing the duty cycle. Signed-off-by: Derek Basehore <dbasehore@chromium.org> Acked-by: Thierry Reding <thierry.reding@gmail.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20Merge 4.4.107 into android-4.4Greg Kroah-Hartman
Changes in 4.4.107 crypto: hmac - require that the underlying hash algorithm is unkeyed crypto: salsa20 - fix blkcipher_walk API usage autofs: fix careless error in recent commit tracing: Allocate mask_str buffer dynamically USB: uas and storage: Add US_FL_BROKEN_FUA for another JMicron JMS567 ID USB: core: prevent malicious bNumInterfaces overflow usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer ceph: drop negative child dentries before try pruning inode's alias Bluetooth: btusb: driver to enable the usb-wakeup feature xhci: Don't add a virt_dev to the devs array before it's fully allocated sched/rt: Do not pull from current CPU if only one CPU to pull dmaengine: dmatest: move callback wait queue to thread context ext4: fix fdatasync(2) after fallocate(2) operation ext4: fix crash when a directory's i_size is too small KEYS: add missing permission check for request_key() destination mac80211: Fix addition of mesh configuration element usb: phy: isp1301: Add OF device ID table md-cluster: free md_cluster_info if node leave cluster userfaultfd: shmem: __do_fault requires VM_FAULT_NOPAGE userfaultfd: selftest: vm: allow to build in vm/ directory net: initialize msg.msg_flags in recvfrom net: bcmgenet: correct the RBUF_OVFL_CNT and RBUF_ERR_CNT MIB values net: bcmgenet: correct MIB access of UniMAC RUNT counters net: bcmgenet: reserved phy revisions must be checked first net: bcmgenet: power down internal phy if open or resume fails net: bcmgenet: Power up the internal PHY before probing the MII NFSD: fix nfsd_minorversion(.., NFSD_AVAIL) NFSD: fix nfsd_reset_versions for NFSv4. Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list drm/omap: fix dmabuf mmap for dma_alloc'ed buffers netfilter: bridge: honor frag_max_size when refragmenting writeback: fix memory leak in wb_queue_work() net: wimax/i2400m: fix NULL-deref at probe dmaengine: Fix array index out of bounds warning in __get_unmap_pool() net: Resend IGMP memberships upon peer notification. mlxsw: reg: Fix SPVM max record count mlxsw: reg: Fix SPVMLR max record count intel_th: pci: Add Gemini Lake support openrisc: fix issue handling 8 byte get_user calls scsi: hpsa: update check for logical volume status scsi: hpsa: limit outstanding rescans fjes: Fix wrong netdevice feature flags drm/radeon/si: add dpm quirk for Oland sched/deadline: Make sure the replenishment timer fires in the next period sched/deadline: Throttle a constrained deadline task activated after the deadline sched/deadline: Use deadline instead of period when calculating overflow mmc: mediatek: Fixed bug where clock frequency could be set wrong drm/radeon: reinstate oland workaround for sclk afs: Fix missing put_page() afs: Populate group ID from vnode status afs: Adjust mode bits processing afs: Flush outstanding writes when an fd is closed afs: Migrate vlocation fields to 64-bit afs: Prevent callback expiry timer overflow afs: Fix the maths in afs_fs_store_data() afs: Populate and use client modification time afs: Fix page leak in afs_write_begin() afs: Fix afs_kill_pages() net/mlx4_core: Avoid delays during VF driver device shutdown perf symbols: Fix symbols__fixup_end heuristic for corner cases efi/esrt: Cleanup bad memory map log messages NFSv4.1 respect server's max size in CREATE_SESSION btrfs: add missing memset while reading compressed inline extents target: Use system workqueue for ALUA transitions target: fix ALUA transition timeout handling target: fix race during implicit transition work flushes sfc: don't warn on successful change of MAC fbdev: controlfb: Add missing modes to fix out of bounds access video: udlfb: Fix read EDID timeout video: fbdev: au1200fb: Release some resources if a memory allocation fails video: fbdev: au1200fb: Return an error code if a memory allocation fails rtc: pcf8563: fix output clock rate dmaengine: ti-dma-crossbar: Correct am335x/am43xx mux value type PCI/PME: Handle invalid data when reading Root Status powerpc/powernv/cpufreq: Fix the frequency read by /proc/cpuinfo netfilter: ipvs: Fix inappropriate output of procfs powerpc/opal: Fix EBUSY bug in acquiring tokens powerpc/ipic: Fix status get and status clear target/iscsi: Fix a race condition in iscsit_add_reject_from_cmd() iscsi-target: fix memory leak in lio_target_tiqn_addtpg() target:fix condition return in core_pr_dump_initiator_port() target/file: Do not return error for UNMAP if length is zero arm-ccn: perf: Prevent module unload while PMU is in use crypto: tcrypt - fix buffer lengths in test_aead_speed() mm: Handle 0 flags in _calc_vm_trans() macro clk: mediatek: add the option for determining PLL source clock clk: imx6: refine hdmi_isfr's parent to make HDMI work on i.MX6 SoCs w/o VPU clk: tegra: Fix cclk_lp divisor register ppp: Destroy the mutex when cleanup thermal/drivers/step_wise: Fix temperature regulation misbehavior GFS2: Take inode off order_write list when setting jdata flag bcache: explicitly destroy mutex while exiting bcache: fix wrong cache_misses statistics l2tp: cleanup l2tp_tunnel_delete calls xfs: fix log block underflow during recovery cycle verification xfs: fix incorrect extent state in xfs_bmap_add_extent_unwritten_real PCI: Detach driver before procfs & sysfs teardown on device remove scsi: hpsa: cleanup sas_phy structures in sysfs when unloading scsi: hpsa: destroy sas transport properties before scsi_host powerpc/perf/hv-24x7: Fix incorrect comparison in memord tty fix oops when rmmod 8250 usb: musb: da8xx: fix babble condition handling pinctrl: adi2: Fix Kconfig build problem raid5: Set R5_Expanded on parity devices as well as data. scsi: scsi_devinfo: Add REPORTLUN2 to EMC SYMMETRIX blacklist entry vt6655: Fix a possible sleep-in-atomic bug in vt6655_suspend scsi: sd: change manage_start_stop to bool in sysfs interface scsi: sd: change allow_restart to bool in sysfs interface scsi: bfa: integer overflow in debugfs udf: Avoid overflow when session starts at large offset macvlan: Only deliver one copy of the frame to the macvlan interface RDMA/cma: Avoid triggering undefined behavior IB/ipoib: Grab rtnl lock on heavy flush when calling ndo_open/stop ath9k: fix tx99 potential info leak Linux 4.4.107 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-12-20video: fbdev: au1200fb: Return an error code if a memory allocation failsChristophe JAILLET
[ Upstream commit 8cae353e6b01ac3f18097f631cdbceb5ff28c7f3 ] 'ret' is known to be 0 at this point. In case of memory allocation error in 'framebuffer_alloc()', return -ENOMEM instead. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20video: fbdev: au1200fb: Release some resources if a memory allocation failsChristophe JAILLET
[ Upstream commit 451f130602619a17c8883dd0b71b11624faffd51 ] We should go through the error handling code instead of returning -ENOMEM directly. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20video: udlfb: Fix read EDID timeoutLadislav Michl
[ Upstream commit c98769475575c8a585f5b3952f4b5f90266f699b ] While usb_control_msg function expects timeout in miliseconds, a value of HZ is used. Replace it with USB_CTRL_GET_TIMEOUT and also fix error message which looks like: udlfb: Read EDID byte 78 failed err ffffff92 as error is either negative errno or number of bytes transferred use %d format specifier. Returned EDID is in second byte, so return error when less than two bytes are received. Fixes: 18dffdf8913a ("staging: udlfb: enhance EDID and mode handling support") Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Cc: Bernie Thompson <bernie@plugable.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20fbdev: controlfb: Add missing modes to fix out of bounds accessGeert Uytterhoeven
[ Upstream commit ac831a379d34109451b3c41a44a20ee10ecb615f ] Dan's static analysis says: drivers/video/fbdev/controlfb.c:560 control_setup() error: buffer overflow 'control_mac_modes' 20 <= 21 Indeed, control_mac_modes[] has only 20 elements, while VMODE_MAX is 22, which may lead to an out of bounds read when parsing vmode commandline options. The bug was introduced in v2.4.5.6, when 2 new modes were added to macmodes.h, but control_mac_modes[] wasn't updated: https://kernel.opensuse.org/cgit/kernel/diff/include/video/macmodes.h?h=v2.5.2&id=29f279c764808560eaceb88fef36cbc35c529aad Augment control_mac_modes[] with the two new video modes to fix this. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-21Merge 4.4.100 into android-4.4Greg Kroah-Hartman
Changes in 4.4.100 media: imon: Fix null-ptr-deref in imon_probe media: dib0700: fix invalid dvb_detach argument ext4: fix data exposure after a crash KVM: x86: fix singlestepping over syscall bpf: don't let ldimm64 leak map addresses on unprivileged xen-blkback: don't leak stack data via response ring sctp: do not peel off an assoc from one netns to another one net: cdc_ether: fix divide by 0 on bad descriptors net: qmi_wwan: fix divide by 0 on bad descriptors arm: crypto: reduce priority of bit-sliced AES cipher Bluetooth: btusb: fix QCA Rome suspend/resume dmaengine: dmatest: warn user when dma test times out extcon: palmas: Check the parent instance to prevent the NULL fm10k: request reset when mbx->state changes ARM: dts: Fix compatible for ti81xx uarts for 8250 ARM: dts: Fix am335x and dm814x scm syscon to probe children ARM: OMAP2+: Fix init for multiple quirks for the same SoC ARM: dts: Fix omap3 off mode pull defines ata: ATA_BMDMA should depend on HAS_DMA ata: SATA_HIGHBANK should depend on HAS_DMA ata: SATA_MV should depend on HAS_DMA drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache igb: reset the PHY before reading the PHY ID igb: close/suspend race in netif_device_detach igb: Fix hw_dbg logging in igb_update_flash_i210 scsi: ufs-qcom: Fix module autoload scsi: ufs: add capability to keep auto bkops always enabled staging: rtl8188eu: fix incorrect ERROR tags from logs scsi: lpfc: Add missing memory barrier scsi: lpfc: FCoE VPort enable-disable does not bring up the VPort scsi: lpfc: Correct host name in symbolic_name field scsi: lpfc: Correct issue leading to oops during link reset scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload ALSA: vx: Don't try to update capture stream before running ALSA: vx: Fix possible transfer overflow backlight: lcd: Fix race condition during register backlight: adp5520: Fix error handling in adp5520_bl_probe() gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap ALSA: hda/realtek - Add new codec ID ALC299 arm64: dts: NS2: reserve memory for Nitro firmware ixgbe: fix AER error handling ixgbe: handle close/suspend race with netif_device_detach/present ixgbe: Reduce I2C retry count on X550 devices ixgbe: add mask for 64 RSS queues ixgbe: do not disable FEC from the driver staging: rtl8712: fixed little endian problem MIPS: End asm function prologue macros with .insn mm: add PHYS_PFN, use it in __phys_to_pfn() MIPS: init: Ensure bootmem does not corrupt reserved memory MIPS: init: Ensure reserved memory regions are not added to bootmem MIPS: Netlogic: Exclude netlogic,xlp-pic code from XLR builds Revert "crypto: xts - Add ECB dependency" Revert "uapi: fix linux/rds.h userspace compilation errors" uapi: fix linux/rds.h userspace compilation error uapi: fix linux/rds.h userspace compilation errors USB: usbfs: compute urb->actual_length for isochronous USB: Add delay-init quirk for Corsair K70 LUX keyboards USB: serial: qcserial: add pid/vid for Sierra Wireless EM7355 fw update USB: serial: garmin_gps: fix I/O after failed probe and remove USB: serial: garmin_gps: fix memory leak on probe errors Linux 4.4.100 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-11-21backlight: adp5520: Fix error handling in adp5520_bl_probe()Alexey Khoroshilov
[ Upstream commit 0eb3fba8c68275f0122f65f7316efaaf86448016 ] If adp5520_bl_setup() fails, sysfs group left unremoved. By the way, fix overcomplicated assignement of error code. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-21backlight: lcd: Fix race condition during registerUwe Kleine-König
[ Upstream commit cc21942bce652d1a92dae85b785378256e1df1f7 ] Once device_register is called for a device its attributes might be accessed. As the callbacks of a lcd device's attributes make use of the lcd_ops, the respective member must be setup before calling device_register. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-15Merge 4.4.98 into android-4.4Greg Kroah-Hartman
Changes in 4.4.98 adv7604: Initialize drive strength to default when using DT video: fbdev: pmag-ba-fb: Remove bad `__init' annotation PCI: mvebu: Handle changes to the bridge windows while enabled xen/netback: set default upper limit of tx/rx queues to 8 drm: drm_minor_register(): Clean up debugfs on failure KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter iommu/arm-smmu-v3: Clear prior settings when updating STEs powerpc/corenet: explicitly disable the SDHC controller on kmcoge4 ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 crypto: vmx - disable preemption to enable vsx in aes_ctr.c iio: trigger: free trigger resource correctly phy: increase size of MII_BUS_ID_SIZE and bus_id serial: sh-sci: Fix register offsets for the IRDA serial port usb: hcd: initialize hcd->flags to 0 when rm hcd netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family IPsec: do not ignore crypto err in ah4 input Input: mpr121 - handle multiple bits change of status register Input: mpr121 - set missing event capability IB/ipoib: Change list_del to list_del_init in the tx object s390/qeth: issue STARTLAN as first IPA command net: dsa: select NET_SWITCHDEV platform/x86: hp-wmi: Fix detection for dock and tablet mode cdc_ncm: Set NTB format again after altsetting switch for Huawei devices KEYS: trusted: sanitize all key material KEYS: trusted: fix writing past end of buffer in trusted_read() platform/x86: hp-wmi: Fix error value for hp_wmi_tablet_state platform/x86: hp-wmi: Do not shadow error values x86/uaccess, sched/preempt: Verify access_ok() context workqueue: Fix NULL pointer dereference crypto: x86/sha1-mb - fix panic due to unaligned access KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2] ARM: 8720/1: ensure dump_instr() checks addr_limit ALSA: seq: Fix OSS sysex delivery in OSS emulation ALSA: seq: Avoid invalid lockdep class warning MIPS: microMIPS: Fix incorrect mask in insn_table_MM MIPS: Fix CM region target definitions MIPS: SMP: Use a completion event to signal CPU up MIPS: Fix race on setting and getting cpu_online_mask MIPS: SMP: Fix deadlock & online race test: firmware_class: report errors properly on failure selftests: firmware: add empty string and async tests selftests: firmware: send expected errors to /dev/null tools: firmware: check for distro fallback udev cancel rule MIPS: AR7: Defer registration of GPIO MIPS: AR7: Ensure that serial ports are properly set up Input: elan_i2c - add ELAN060C to the ACPI table drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue rbd: use GFP_NOIO for parent stat and data requests can: sun4i: handle overrun in RX FIFO can: c_can: don't indicate triple sampling support for D_CAN x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context PKCS#7: fix unitialized boolean 'want' Linux 4.4.98 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-11-15video: fbdev: pmag-ba-fb: Remove bad `__init' annotationMaciej W. Rozycki
[ Upstream commit 879e5a0df626f39cbb3c61bb90373e56d67012c4 ] Fix: WARNING: drivers/video/fbdev/pmag-ba-fb.o(.text+0x308): Section mismatch in reference from the function pmagbafb_probe() to the function .init.text:pmagbafb_erase_cursor() The function pmagbafb_probe() references the function __init pmagbafb_erase_cursor(). This is often because pmagbafb_probe lacks a __init annotation or the annotation of pmagbafb_erase_cursor is wrong. -- a fallout from a missed update from commit 9625b51350cc ("VIDEO: PMAG-BA: Fix section mismatch") and then commit 48c68c4f1b54 ("Drivers: video: remove __dev* attributes.") Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-05Merge 4.4.90 into android-4.4Greg Kroah-Hartman
Changes in 4.4.90 cifs: release auth_key.response for reconnect. mac80211: flush hw_roc_start work before cancelling the ROC KVM: PPC: Book3S: Fix race and leak in kvm_vm_ioctl_create_spapr_tce() tracing: Fix trace_pipe behavior for instance traces tracing: Erase irqsoff trace with empty write md/raid5: fix a race condition in stripe batch md/raid5: preserve STRIPE_ON_UNPLUG_LIST in break_stripe_batch_list scsi: scsi_transport_iscsi: fix the issue that iscsi_if_rx doesn't parse nlmsg properly crypto: talitos - Don't provide setkey for non hmac hashing algs. crypto: talitos - fix sha224 KEYS: fix writing past end of user-supplied buffer in keyring_read() KEYS: prevent creating a different user's keyrings KEYS: prevent KEYCTL_READ on negative key powerpc/pseries: Fix parent_dn reference leak in add_dt_node() Fix SMB3.1.1 guest authentication to Samba SMB: Validate negotiate (to protect against downgrade) even if signing off SMB3: Don't ignore O_SYNC/O_DSYNC and O_DIRECT flags vfs: Return -ENXIO for negative SEEK_HOLE / SEEK_DATA offsets nl80211: check for the required netlink attributes presence bsg-lib: don't free job in bsg_prepare_job seccomp: fix the usage of get/put_seccomp_filter() in seccomp_get_filter() arm64: Make sure SPsel is always set arm64: fault: Route pte translation faults via do_translation_fault KVM: VMX: Do not BUG() on out-of-bounds guest IRQ kvm: nVMX: Don't allow L2 to access the hardware CR8 PCI: Fix race condition with driver_override btrfs: fix NULL pointer dereference from free_reloc_roots() btrfs: propagate error to btrfs_cmp_data_prepare caller btrfs: prevent to set invalid default subvolid x86/fpu: Don't let userspace set bogus xcomp_bv gfs2: Fix debugfs glocks dump timer/sysclt: Restrict timer migration sysctl values to 0 and 1 KVM: VMX: do not change SN bit in vmx_update_pi_irte() KVM: VMX: remove WARN_ON_ONCE in kvm_vcpu_trigger_posted_interrupt cxl: Fix driver use count dmaengine: mmp-pdma: add number of requestors ARM: pxa: add the number of DMA requestor lines ARM: pxa: fix the number of DMA requestor lines KVM: VMX: use cmpxchg64 video: fbdev: aty: do not leak uninitialized padding in clk to userspace swiotlb-xen: implement xen_swiotlb_dma_mmap callback fix xen_swiotlb_dma_mmap prototype Linux 4.4.90 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-10-05video: fbdev: aty: do not leak uninitialized padding in clk to userspaceVladis Dronov
commit 8e75f7a7a00461ef6d91797a60b606367f6e344d upstream. 'clk' is copied to a userland with padding byte(s) after 'vclk_post_div' field unitialized, leaking data from the stack. Fix this ensuring all of 'clk' is initialized to zero. References: https://github.com/torvalds/linux/pull/441 Reported-by: sohu0106 <sohu0106@126.com> Signed-off-by: Vladis Dronov <vdronov@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-07Merge 4.4.80 into android-4.4Greg Kroah-Hartman
Changes in 4.4.80 af_key: Add lock to key dump pstore: Make spinlock per zone instead of global net: reduce skb_warn_bad_offload() noise powerpc/pseries: Fix of_node_put() underflow during reconfig remove crypto: authencesn - Fix digest_null crash md/raid5: add thread_group worker async_tx_issue_pending_all drm/vmwgfx: Fix gcc-7.1.1 warning drm/nouveau/bar/gf100: fix access to upper half of BAR2 KVM: PPC: Book3S HV: Context-switch EBB registers properly KVM: PPC: Book3S HV: Restore critical SPRs to host values on guest exit KVM: PPC: Book3S HV: Reload HTM registers explicitly KVM: PPC: Book3S HV: Save/restore host values of debug registers Revert "powerpc/numa: Fix percpu allocations to be NUMA aware" Staging: comedi: comedi_fops: Avoid orphaned proc entry drm/rcar: Nuke preclose hook drm: rcar-du: Perform initialization/cleanup at probe/remove time drm: rcar-du: Simplify and fix probe error handling perf intel-pt: Fix ip compression perf intel-pt: Fix last_ip usage perf intel-pt: Use FUP always when scanning for an IP perf intel-pt: Ensure never to set 'last_ip' when packet 'count' is zero xfs: don't BUG() on mixed direct and mapped I/O nfc: fdp: fix NULL pointer dereference net: phy: Do not perform software reset for Generic PHY isdn: Fix a sleep-in-atomic bug isdn/i4l: fix buffer overflow ath10k: fix null deref on wmi-tlv when trying spectral scan wil6210: fix deadlock when using fw_no_recovery option mailbox: always wait in mbox_send_message for blocking Tx mode mailbox: skip complete wait event if timer expired mailbox: handle empty message in tx_tick mpt3sas: Don't overreach ioc->reply_post[] during initialization kaweth: fix firmware download kaweth: fix oops upon failed memory allocation sched/cgroup: Move sched_online_group() back into css_online() to fix crash PM / Domains: defer dev_pm_domain_set() until genpd->attach_dev succeeds if present RDMA/uverbs: Fix the check for port number libnvdimm, btt: fix btt_rw_page not returning errors ipmi/watchdog: fix watchdog timeout set on reboot dentry name snapshots v4l: s5c73m3: fix negation operator Make file credentials available to the seqfile interfaces /proc/iomem: only expose physical resource addresses to privileged users vlan: Propagate MAC address to VLANs pstore: Allow prz to control need for locking pstore: Correctly initialize spinlock and flags pstore: Use dynamic spinlock initializer net: skb_needs_check() accepts CHECKSUM_NONE for tx sched/cputime: Fix prev steal time accouting during CPU hotplug xen/blkback: don't free be structure too early xen/blkback: don't use xen_blkif_get() in xen-blkback kthread tpm: fix a kernel memory leak in tpm-sysfs.c tpm: Replace device number bitmap with IDR x86/mce/AMD: Make the init code more robust r8169: add support for RTL8168 series add-on card. ARM: dts: n900: Mark eMMC slot with no-sdio and no-sd flags ipv6: Should use consistent conditional judgement for ip6 fragment between __ip6_append_data and ip6_finish_output net/mlx4: Remove BUG_ON from ICM allocation routine drm/msm: Ensure that the hardware write pointer is valid drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set vfio-pci: use 32-bit comparisons for register address for gcc-4.5 irqchip/keystone: Fix "scheduling while atomic" on rt ASoC: tlv320aic3x: Mark the RESET register as volatile spi: dw: Make debugfs name unique between instances ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL irqchip/mxs: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND openrisc: Add _text symbol to fix ksym build error dmaengine: ioatdma: Add Skylake PCI Dev ID dmaengine: ioatdma: workaround SKX ioatdma version dmaengine: ti-dma-crossbar: Add some 'of_node_put()' in error path. ARM64: zynqmp: Fix W=1 dtc 1.4 warnings ARM64: zynqmp: Fix i2c node's compatible string ARM: s3c2410_defconfig: Fix invalid values for NF_CT_PROTO_* ACPI / scan: Prefer devices without _HID/_CID for _ADR matching usb: gadget: Fix copy/pasted error message Btrfs: adjust outstanding_extents counter properly when dio write is split tools lib traceevent: Fix prev/next_prio for deadline tasks xfrm: Don't use sk_family for socket policy lookups perf tools: Install tools/lib/traceevent plugins with install-bin perf symbols: Robustify reading of build-id from sysfs video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap vfio-pci: Handle error from pci_iomap arm64: mm: fix show_pte KERN_CONT fallout nvmem: imx-ocotp: Fix wrong register size sh_eth: enable RX descriptor word 0 shift on SH7734 ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion HID: ignore Petzl USB headlamp scsi: fnic: Avoid sending reset to firmware when another reset is in progress scsi: snic: Return error code on memory allocation failure ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused Linux 4.4.80 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-08-06video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremapArvind Yadav
[ Upstream commit 4dcd19bfabaee8f9f4bcf203afba09b98ccbaf76 ] Here, If devm_ioremap will fail. It will return NULL. Kernel can run into a NULL-pointer dereference. This error check will avoid NULL pointer dereference. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Yoichi Yuasa <yuasa@linux-mips.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-21Merge 4.4.63 into android-4.4Greg Kroah-Hartman
Changes in 4.4.63: cgroup, kthread: close race window where new kthreads can be migrated to non-root cgroups thp: fix MADV_DONTNEED vs clear soft dirty race drm/nouveau/mpeg: mthd returns true on success now drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one CIFS: store results of cifs_reopen_file to avoid infinite wait Input: xpad - add support for Razer Wildcat gamepad perf/x86: Avoid exposing wrong/stale data in intel_pmu_lbr_read_32() x86/vdso: Ensure vdso32_enabled gets set to valid values only x86/vdso: Plug race between mapping and ELF header setup acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison) iscsi-target: Fix TMR reference leak during session shutdown iscsi-target: Drop work-around for legacy GlobalSAN initiator scsi: sr: Sanity check returned mode data scsi: sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable scsi: sd: Fix capacity calculation with 32-bit sector_t xen, fbfront: fix connecting to backend libnvdimm: fix reconfig_mutex, mmap_sem, and jbd2_handle lockdep splat irqchip/irq-imx-gpcv2: Fix spinlock initialization ftrace: Fix removing of second function probe char: Drop bogus dependency of DEVPORT on !M68K char: lack of bool string made CONFIG_DEVPORT always on Revert "MIPS: Lantiq: Fix cascaded IRQ setup" kvm: fix page struct leak in handle_vmon zram: do not use copy_page with non-page aligned address powerpc: Disable HFSCR[TM] if TM is not supported crypto: ahash - Fix EINPROGRESS notification callback ath9k: fix NULL pointer dereference dvb-usb-v2: avoid use-after-free ext4: fix inode checksum calculation problem if i_extra_size is small platform/x86: acer-wmi: setup accelerometer when machine has appropriate notify event rtc: tegra: Implement clock handling mm: Tighten x86 /dev/mem with zeroing reads dvb-usb: don't use stack for firmware load dvb-usb-firmware: don't do DMA on stack virtio-console: avoid DMA from stack pegasus: Use heap buffers for all register access rtl8150: Use heap buffers for all register access catc: Combine failure cleanup code in catc_probe() catc: Use heap buffer for memory size test ibmveth: calculate gso_segs for large packets SUNRPC: fix refcounting problems with auth_gss messages. tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done net: ipv6: check route protocol when deleting routes sctp: deny peeloff operation on asocs with threads sleeping on it MIPS: fix Select HAVE_IRQ_EXIT_ON_IRQ_STACK patch. Linux 4.4.63 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-04-21xen, fbfront: fix connecting to backendJuergen Gross
commit 9121b15b5628b38b4695282dc18c553440e0f79b upstream. Connecting to the backend isn't working reliably in xen-fbfront: in case XenbusStateInitWait of the backend has been missed the backend transition to XenbusStateConnected will trigger the connected state only without doing the actions required when the backend has connected. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-30Merge 4.4.48 into android-4.4Greg Kroah-Hartman
Changes in 4.4.48: net/openvswitch: Set the ipv6 source tunnel key address attribute correctly net: bcmgenet: Do not suspend PHY if Wake-on-LAN is enabled net: properly release sk_frag.page amd-xgbe: Fix jumbo MTU processing on newer hardware net: unix: properly re-increment inflight counter of GC discarded candidates net/mlx5: Increase number of max QPs in default profile net/mlx5e: Count LRO packets correctly net: bcmgenet: remove bcmgenet_internal_phy_setup() ipv4: provide stronger user input validation in nl_fib_input() socket, bpf: fix sk_filter use after free in sk_clone_lock tcp: initialize icsk_ack.lrcvtime at session start time Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000 Input: iforce - validate number of endpoints before using them Input: ims-pcu - validate number of endpoints before using them Input: hanwang - validate number of endpoints before using them Input: yealink - validate number of endpoints before using them Input: cm109 - validate number of endpoints before using them Input: kbtab - validate number of endpoints before using them Input: sur40 - validate number of endpoints before using them ALSA: seq: Fix racy cell insertions during snd_seq_pool_done() ALSA: ctxfi: Fix the incorrect check of dma_set_mask() call ALSA: hda - Adding a group of pin definition to fix headset problem USB: serial: option: add Quectel UC15, UC20, EC21, and EC25 modems USB: serial: qcserial: add Dell DW5811e ACM gadget: fix endianness in notifications usb: gadget: f_uvc: Fix SuperSpeed companion descriptor's wBytesPerInterval usb-core: Add LINEAR_FRAME_INTR_BINTERVAL USB quirk USB: uss720: fix NULL-deref at probe USB: lvtest: fix NULL-deref at probe USB: idmouse: fix NULL-deref at probe USB: wusbcore: fix NULL-deref at probe usb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer usb: hub: Fix crash after failure to read BOS descriptor uwb: i1480-dfu: fix NULL-deref at probe uwb: hwa-rc: fix NULL-deref at probe mmc: ushc: fix NULL-deref at probe iio: adc: ti_am335x_adc: fix fifo overrun recovery iio: hid-sensor-trigger: Change get poll value function order to avoid sensor properties losing after resume from S3 parport: fix attempt to write duplicate procfiles ext4: mark inode dirty after converting inline directory mmc: sdhci: Do not disable interrupts while waiting for clock xen/acpi: upload PM state from init-domain to Xen iommu/vt-d: Fix NULL pointer dereference in device_to_iommu ARM: at91: pm: cpu_idle: switch DDR to power-down mode ARM: dts: at91: sama5d2: add dma properties to UART nodes cpufreq: Restore policy min/max limits on CPU online raid10: increment write counter after bio is split libceph: don't set weight to IN when OSD is destroyed xfs: don't allow di_size with high bit set xfs: fix up xfs_swap_extent_forks inline extent handling nl80211: fix dumpit error path RTNL deadlocks USB: usbtmc: add missing endpoint sanity check xfs: clear _XBF_PAGES from buffers when readahead page xen: do not re-use pirq number cached in pci device msi msg data igb: Workaround for igb i210 firmware issue igb: add i211 to i210 PHY workaround x86/hyperv: Handle unknown NMIs on one CPU when unknown_nmi_panic PCI: Separate VF BAR updates from standard BAR updates PCI: Remove pci_resource_bar() and pci_iov_resource_bar() PCI: Add comments about ROM BAR updating PCI: Decouple IORESOURCE_ROM_ENABLE and PCI_ROM_ADDRESS_ENABLE PCI: Don't update VF BARs while VF memory space is enabled PCI: Update BARs using property bits appropriate for type PCI: Ignore BAR updates on virtual functions PCI: Do any VF BAR updates before enabling the BARs vfio/spapr: Postpone allocation of userspace version of TCE table block: allow WRITE_SAME commands with the SG_IO ioctl s390/zcrypt: Introduce CEX6 toleration uvcvideo: uvc_scan_fallback() for webcams with broken chain ACPI / blacklist: add _REV quirks for Dell Precision 5520 and 3520 ACPI / blacklist: Make Dell Latitude 3350 ethernet work serial: 8250_pci: Detach low-level driver during PCI error recovery fbcon: Fix vc attr at deinit crypto: algif_hash - avoid zero-sized array Linux 4.4.58 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-03-30fbcon: Fix vc attr at deinitTakashi Iwai
commit 8aac7f34369726d1a158788ae8aff3002d5eb528 upstream. fbcon can deal with vc_hi_font_mask (the upper 256 chars) and adjust the vc attrs dynamically when vc_hi_font_mask is changed at fbcon_init(). When the vc_hi_font_mask is set, it remaps the attrs in the existing console buffer with one bit shift up (for 9 bits), while it remaps with one bit shift down (for 8 bits) when the value is cleared. It works fine as long as the font gets updated after fbcon was initialized. However, we hit a bizarre problem when the console is switched to another fb driver (typically from vesafb or efifb to drmfb). At switching to the new fb driver, we temporarily rebind the console to the dummy console, then rebind to the new driver. During the switching, we leave the modified attrs as is. Thus, the new fbcon takes over the old buffer as if it were to contain 8 bits chars (although the attrs are still shifted for 9 bits), and effectively this results in the yellow color texts instead of the original white color, as found in the bugzilla entry below. An easy fix for this is to re-adjust the attrs before leaving the fbcon at con_deinit callback. Since the code to adjust the attrs is already present in the current fbcon code, in this patch, we simply factor out the relevant code, and call it from fbcon_deinit(). Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1000619 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>