OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
6 years agoMerge android-4.4.105 (8a53962) into msm-4.4
Srinivasarao P [Tue, 2 Jan 2018 10:42:14 +0000 (16:12 +0530)]
Merge android-4.4.105 (8a53962) into msm-4.4

* refs/heads/tmp-8a53962
  Linux 4.4.105
  xen-netfront: avoid crashing on resume after a failure in talk_to_netback()
  usb: host: fix incorrect updating of offset
  USB: usbfs: Filter flags passed in from user space
  USB: devio: Prevent integer overflow in proc_do_submiturb()
  USB: Increase usbfs transfer limit
  USB: core: Add type-specific length check of BOS descriptors
  usb: ch9: Add size macro for SSP dev cap descriptor
  usb: Add USB 3.1 Precision time measurement capability descriptor support
  usb: xhci: fix panic in xhci_free_virt_devices_depth_first
  usb: hub: Cycle HUB power when initialization fails
  Revert "ocfs2: should wait dio before inode lock in ocfs2_setattr()"
  net: fec: fix multicast filtering hardware setup
  xen-netfront: Improve error handling during initialization
  mm: avoid returning VM_FAULT_RETRY from ->page_mkwrite handlers
  tcp: correct memory barrier usage in tcp_check_space()
  dmaengine: pl330: fix double lock
  tipc: fix cleanup at module unload
  net: sctp: fix array overrun read on sctp_timer_tbl
  drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement
  NFSv4: Fix client recovery when server reboots multiple times
  KVM: arm/arm64: Fix occasional warning from the timer work function
  nfs: Don't take a reference on fl->fl_file for LOCK operation
  ravb: Remove Rx overflow log messages
  net/appletalk: Fix kernel memory disclosure
  vti6: fix device register to report IFLA_INFO_KIND
  ARM: OMAP1: DMA: Correct the number of logical channels
  net: systemport: Pad packet before inserting TSB
  net: systemport: Utilize skb_put_padto()
  kprobes/x86: Disable preemption in ftrace-based jprobes
  perf test attr: Fix ignored test case result
  sysrq : fix Show Regs call trace on ARM
  EDAC, sb_edac: Fix missing break in switch
  x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt()
  serial: 8250: Preserve DLD[7:4] for PORT_XR17V35X
  usb: phy: tahvo: fix error handling in tahvo_usb_probe()
  spi: sh-msiof: Fix DMA transfer size check
  serial: 8250_fintek: Fix rs485 disablement on invalid ioctl()
  selftests/x86/ldt_get: Add a few additional tests for limits
  s390/pci: do not require AIS facility
  ima: fix hash algorithm initialization
  USB: serial: option: add Quectel BG96 id
  s390/runtime instrumentation: simplify task exit handling
  serial: 8250_pci: Add Amazon PCI serial device ID
  usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub
  uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices
  bcache: recover data from backing when data is clean
  bcache: only permit to recovery read error when cache device is clean
  ANDROID: initramfs: call free_initrd() when skipping init

Conflicts:
drivers/usb/core/config.c
include/linux/usb.h
include/uapi/linux/usb/ch9.h

Change-Id: Ibada5100be12f3a1389461f7738ee2ecb0d427af
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.104 (8bc4213) into msm-4.4
Srinivasarao P [Tue, 2 Jan 2018 09:55:20 +0000 (15:25 +0530)]
Merge android-4.4.104 (8bc4213) into msm-4.4

* refs/heads/tmp-8bc4213
  Linux 4.4.104
  nfsd: Fix another OPEN stateid race
  nfsd: Fix stateid races between OPEN and CLOSE
  nfsd: Make init_open_stateid() a bit more whole
  drm/i915: Prevent zero length "index" write
  drm/i915: Don't try indexed reads to alternate slave addresses
  NFS: revalidate "." etc correctly on "open".
  mtd: nand: Fix writing mtdoops to nand flash.
  drm/panel: simple: Add missing panel_simple_unprepare() calls
  drm/radeon: fix atombios on big endian
  Revert "drm/radeon: dont switch vt on suspend"
  bcache: Fix building error on MIPS
  eeprom: at24: check at24_read/write arguments
  mmc: core: Do not leave the block driver in a suspended state
  KVM: x86: inject exceptions produced by x86_decode_insn
  KVM: x86: Exit to user-mode on #UD intercept when emulator requires
  KVM: x86: pvclock: Handle first-time write to pvclock-page contains random junk
  btrfs: clear space cache inode generation always
  mm/madvise.c: fix madvise() infinite loop under special circumstances
  mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d()
  x86/efi-bgrt: Replace early_memremap() with memremap()
  x86/efi-bgrt: Fix kernel panic when mapping BGRT data
  ARM: dts: omap3: logicpd-torpedo-37xx-devkit: Fix MMC1 cd-gpio
  x86/efi: Build our own page table structures
  x86/efi: Hoist page table switching code into efi_call_virt()
  x86/mm/pat: Ensure cpa->pfn only contains page frame numbers
  ipsec: Fix aborted xfrm policy dump crash
  netlink: add a start callback for starting a netlink dump
  Documentation: tee subsystem and op-tee driver
  tee: add OP-TEE driver
  tee: generic TEE subsystem
  dt/bindings: add bindings for optee
  kernel.h: add u64_to_user_ptr()
  ARM: 8481/2: drivers: psci: replace psci firmware calls
  ARM: 8480/2: arm64: add implementation for arm-smccc
  ARM: 8479/2: add implementation for arm-smccc
  ARM: 8478/2: arm/arm64: add arm-smccc
  UPSTREAM: net: xfrm: allow clearing socket xfrm policies.

Conflicts:
arch/arm64/kernel/arm64ksyms.c
arch/arm64/kernel/asm-offsets.c
arch/arm64/kvm/hyp/fpsimd.S
drivers/Kconfig
drivers/Makefile
drivers/firmware/psci.c
drivers/gpu/drm/msm/msm_gem_submit.c
drivers/mmc/core/bus.c
include/linux/arm-smccc.h

Change-Id: Ib22051f60c49ecf3bb7e18f9940ba9a4ac5143af
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.103 (9fbf3d7) into msm-4.4
Srinivasarao P [Tue, 2 Jan 2018 08:43:40 +0000 (14:13 +0530)]
Merge android-4.4.103 (9fbf3d7) into msm-4.4

* refs/heads/tmp-9fbf3d7
  Linux 4.4.103
  Revert "sctp: do not peel off an assoc from one netns to another one"
  xen: xenbus driver must not accept invalid transaction ids
  s390/kbuild: enable modversions for symbols exported from asm
  ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data
  btrfs: return the actual error value from from btrfs_uuid_tree_iterate
  ASoC: rsnd: don't double free kctrl
  netfilter: nf_tables: fix oob access
  netfilter: nft_queue: use raw_smp_processor_id()
  spi: SPI_FSL_DSPI should depend on HAS_DMA
  staging: iio: cdc: fix improper return value
  iio: light: fix improper return value
  mac80211: Suppress NEW_PEER_CANDIDATE event if no room
  mac80211: Remove invalid flag operations in mesh TSF synchronization
  drm: Apply range restriction after color adjustment when allocation
  ALSA: hda - Apply ALC269_FIXUP_NO_SHUTUP on HDA_FIXUP_ACT_PROBE
  ath10k: set CTS protection VDEV param only if VDEV is up
  ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats()
  ath10k: ignore configuring the incorrect board_id
  ath10k: fix incorrect txpower set by P2P_DEVICE interface
  drm/armada: Fix compile fail
  net: 3com: typhoon: typhoon_init_one: fix incorrect return values
  net: 3com: typhoon: typhoon_init_one: make return values more specific
  net: Allow IP_MULTICAST_IF to set index to L3 slave
  dmaengine: zx: set DMA_CYCLIC cap_mask bit
  PCI: Apply _HPX settings only to relevant devices
  RDS: RDMA: return appropriate error on rdma map failures
  e1000e: Separate signaling for link check/link up
  e1000e: Fix return value test
  e1000e: Fix error path in link detection
  PM / OPP: Add missing of_node_put(np)
  net/9p: Switch to wait_event_killable()
  fscrypt: lock mutex before checking for bounce page pool
  sched/rt: Simplify the IPI based RT balancing logic
  media: v4l2-ctrl: Fix flags field on Control events
  cx231xx-cards: fix NULL-deref on missing association descriptor
  media: rc: check for integer overflow
  media: Don't do DMA on stack for firmware upload in the AS102 driver
  powerpc/signal: Properly handle return value from uprobe_deny_signal()
  parisc: Fix validity check of pointer size argument in new CAS implementation
  ixgbe: Fix skb list corruption on Power systems
  fm10k: Use smp_rmb rather than read_barrier_depends
  i40evf: Use smp_rmb rather than read_barrier_depends
  ixgbevf: Use smp_rmb rather than read_barrier_depends
  igbvf: Use smp_rmb rather than read_barrier_depends
  igb: Use smp_rmb rather than read_barrier_depends
  i40e: Use smp_rmb rather than read_barrier_depends
  NFC: fix device-allocation error return
  IB/srp: Avoid that a cable pull can trigger a kernel crash
  IB/srpt: Do not accept invalid initiator port names
  libnvdimm, namespace: make 'resource' attribute only readable by root
  libnvdimm, namespace: fix label initialization to use valid seq numbers
  clk: ti: dra7-atl-clock: fix child-node lookups
  clk: ti: dra7-atl-clock: Fix of_node reference counting
  SUNRPC: Fix tracepoint storage issues with svc_recv and svc_rqst_status
  KVM: SVM: obey guest PAT
  KVM: nVMX: set IDTR and GDTR limits when loading L1 host state
  target: Fix QUEUE_FULL + SCSI task attribute handling
  iscsi-target: Fix non-immediate TMR reference leak
  fs/9p: Compare qid.path in v9fs_test_inode
  fix a page leak in vhost_scsi_iov_to_sgl() error recovery
  ALSA: hda/realtek - Fix ALC700 family no sound issue
  ALSA: timer: Remove kernel warning at compat ioctl error paths
  ALSA: usb-audio: Add sanity checks in v2 clock parsers
  ALSA: usb-audio: Fix potential out-of-bound access at parsing SU
  ALSA: usb-audio: Add sanity checks to FE parser
  ALSA: pcm: update tstamp only if audio_tstamp changed
  ext4: fix interaction between i_size, fallocate, and delalloc after a crash
  ata: fixes kernel crash while tracing ata_eh_link_autopsy event
  rtlwifi: fix uninitialized rtlhal->last_suspend_sec time
  rtlwifi: rtl8192ee: Fix memory leak when loading firmware
  nfsd: deal with revoked delegations appropriately
  nfs: Fix ugly referral attributes
  NFS: Fix typo in nomigration mount option
  isofs: fix timestamps beyond 2027
  bcache: check ca->alloc_thread initialized before wake up it
  eCryptfs: use after free in ecryptfs_release_messaging()
  nilfs2: fix race condition that causes file system corruption
  autofs: don't fail mount for transient error
  MIPS: BCM47XX: Fix LED inversion for WRT54GSv1
  MIPS: Fix an n32 core file generation regset support regression
  dm: fix race between dm_get_from_kobject() and __dm_destroy()
  dm bufio: fix integer overflow when limiting maximum cache size
  ALSA: hda: Add Raven PCI ID
  MIPS: ralink: Fix typo in mt7628 pinmux function
  MIPS: ralink: Fix MT7628 pinmux
  ARM: 8721/1: mm: dump: check hardware RO bit for LPAE
  ARM: 8722/1: mm: make STRICT_KERNEL_RWX effective for LPAE
  x86/decoder: Add new TEST instruction pattern
  lib/mpi: call cond_resched() from mpi_powm() loop
  sched: Make resched_cpu() unconditional
  vsock: use new wait API for vsock_stream_sendmsg()
  AF_VSOCK: Shrink the area influenced by prepare_to_wait
  ipv6: only call ip6_route_dev_notify() once for NETDEV_UNREGISTER
  s390/disassembler: increase show_code buffer size
  s390/disassembler: add missing end marker for e7 table
  s390/runtime instrumention: fix possible memory corruption
  s390: fix transactional execution control register handling
  BACKPORT: time: Clean up CLOCK_MONOTONIC_RAW time handling
  BACKPORT: time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting
  UPSTREAM: arm64: vdso: fix clock_getres for 4GiB-aligned res
  f2fs: updates on 4.15-rc1
  UPSTREAM: android: binder: fix type mismatch warning
  Linux 4.4.102
  mm, hwpoison: fixup "mm: check the return value of lookup_page_ext for all call sites"

Conflicts:
fs/ext4/crypto_key.c
mm/debug-pagealloc.c

Change-Id: Ibe35d78bd0397f3ff2049e0a1dda20fcb06f2f75
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.101 (f0b9d2d) into msm-4.4
Srinivasarao P [Tue, 26 Dec 2017 13:42:47 +0000 (19:12 +0530)]
Merge android-4.4.101 (f0b9d2d) into msm-4.4

* refs/heads/tmp-f0b9d2d
  Linux 4.4.101
  mm/pagewalk.c: report holes in hugetlb ranges
  mm/page_ext.c: check if page_ext is not prepared
  mm: check the return value of lookup_page_ext for all call sites
  coda: fix 'kernel memory exposure attempt' in fsync
  mm/page_alloc.c: broken deferred calculation
  ipmi: fix unsigned long underflow
  ocfs2: should wait dio before inode lock in ocfs2_setattr()
  nvme: Fix memory order on async queue deletion
  arm64: fix dump_instr when PAN and UAO are in use
  serial: omap: Fix EFR write on RTS deassertion
  ima: do not update security.ima if appraisal status is not INTEGRITY_PASS
  net/sctp: Always set scope_id in sctp_inet6_skb_msgname
  fealnx: Fix building error on MIPS
  sctp: do not peel off an assoc from one netns to another one
  af_netlink: ensure that NLMSG_DONE never fails in dumps
  vlan: fix a use-after-free in vlan_device_event()
  bonding: discard lowest hash bit for 802.3ad layer3+4
  netfilter/ipvs: clear ipvs_property flag when SKB net namespace changed
  tcp: do not mangle skb->cb[] in tcp_make_synack()

Conflicts:
mm/debug-pagealloc.c
mm/page_ext.c
mm/page_owner.c

Change-Id: I551aff1b4c8a0d72f64a234abb8ac88990fbc9e5
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.100 (482cc74) into msm-4.4
Srinivasarao P [Tue, 26 Dec 2017 12:57:12 +0000 (18:27 +0530)]
Merge android-4.4.100 (482cc74) into msm-4.4

* refs/heads/tmp-482cc74
  Linux 4.4.100
  USB: serial: garmin_gps: fix memory leak on probe errors
  USB: serial: garmin_gps: fix I/O after failed probe and remove
  USB: serial: qcserial: add pid/vid for Sierra Wireless EM7355 fw update
  USB: Add delay-init quirk for Corsair K70 LUX keyboards
  USB: usbfs: compute urb->actual_length for isochronous
  uapi: fix linux/rds.h userspace compilation errors
  uapi: fix linux/rds.h userspace compilation error
  Revert "uapi: fix linux/rds.h userspace compilation errors"
  Revert "crypto: xts - Add ECB dependency"
  MIPS: Netlogic: Exclude netlogic,xlp-pic code from XLR builds
  MIPS: init: Ensure reserved memory regions are not added to bootmem
  MIPS: init: Ensure bootmem does not corrupt reserved memory
  mm: add PHYS_PFN, use it in __phys_to_pfn()
  MIPS: End asm function prologue macros with .insn
  staging: rtl8712: fixed little endian problem
  ixgbe: do not disable FEC from the driver
  ixgbe: add mask for 64 RSS queues
  ixgbe: Reduce I2C retry count on X550 devices
  ixgbe: handle close/suspend race with netif_device_detach/present
  ixgbe: fix AER error handling
  arm64: dts: NS2: reserve memory for Nitro firmware
  ALSA: hda/realtek - Add new codec ID ALC299
  gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
  backlight: adp5520: Fix error handling in adp5520_bl_probe()
  backlight: lcd: Fix race condition during register
  ALSA: vx: Fix possible transfer overflow
  ALSA: vx: Don't try to update capture stream before running
  scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload
  scsi: lpfc: Correct issue leading to oops during link reset
  scsi: lpfc: Correct host name in symbolic_name field
  scsi: lpfc: FCoE VPort enable-disable does not bring up the VPort
  scsi: lpfc: Add missing memory barrier
  staging: rtl8188eu: fix incorrect ERROR tags from logs
  scsi: ufs: add capability to keep auto bkops always enabled
  scsi: ufs-qcom: Fix module autoload
  igb: Fix hw_dbg logging in igb_update_flash_i210
  igb: close/suspend race in netif_device_detach
  igb: reset the PHY before reading the PHY ID
  drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache
  ata: SATA_MV should depend on HAS_DMA
  ata: SATA_HIGHBANK should depend on HAS_DMA
  ata: ATA_BMDMA should depend on HAS_DMA
  ARM: dts: Fix omap3 off mode pull defines
  ARM: OMAP2+: Fix init for multiple quirks for the same SoC
  ARM: dts: Fix am335x and dm814x scm syscon to probe children
  ARM: dts: Fix compatible for ti81xx uarts for 8250
  fm10k: request reset when mbx->state changes
  extcon: palmas: Check the parent instance to prevent the NULL
  dmaengine: dmatest: warn user when dma test times out
  Bluetooth: btusb: fix QCA Rome suspend/resume
  arm: crypto: reduce priority of bit-sliced AES cipher
  net: qmi_wwan: fix divide by 0 on bad descriptors
  net: cdc_ether: fix divide by 0 on bad descriptors
  sctp: do not peel off an assoc from one netns to another one
  xen-blkback: don't leak stack data via response ring
  bpf: don't let ldimm64 leak map addresses on unprivileged
  KVM: x86: fix singlestepping over syscall
  ext4: fix data exposure after a crash
  media: dib0700: fix invalid dvb_detach argument
  media: imon: Fix null-ptr-deref in imon_probe
  BACKPORT: arm64: Use __pa_symbol for empty_zero_page
  BACKPORT: arm64: Use __pa_symbol for kernel symbols
  UPSTREAM: mm: Introduce lm_alias

Conflicts:
arch/arm64/kernel/insn.c
arch/arm64/kernel/setup.c
arch/arm64/mm/mmu.c
drivers/scsi/ufs/ufshcd.h

Change-Id: I4ffc41779ec115eecab09d72dd8042151514be39
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.99 (7eab308) into msm-4.4
Srinivasarao P [Tue, 26 Dec 2017 12:05:16 +0000 (17:35 +0530)]
Merge android-4.4.99 (7eab308) into msm-4.4

* refs/heads/tmp-7eab308
  Linux 4.4.99
  misc: panel: properly restore atomic counter on error path
  target: Fix node_acl demo-mode + uncached dynamic shutdown regression
  target/iscsi: Fix iSCSI task reassignment handling
  brcmfmac: remove setting IBSS mode when stopping AP
  tipc: fix link attribute propagation bug
  security/keys: add CONFIG_KEYS_COMPAT to Kconfig
  tcp/dccp: fix other lockdep splats accessing ireq_opt
  tcp/dccp: fix lockdep splat in inet_csk_route_req()
  tcp/dccp: fix ireq->opt races
  ipip: only increase err_count for some certain type icmp in ipip_err
  ppp: fix race in ppp device destruction
  sctp: reset owner sk for data chunks on out queues when migrating a sock
  tun: allow positive return values on dev_get_valid_name() call
  ip6_gre: only increase err_count for some certain type icmpv6 in ip6gre_err
  net/unix: don't show information about sockets from other namespaces
  ipv6: flowlabel: do not leave opt->tot_len with garbage
  packet: avoid panic in packet_getsockopt()
  sctp: add the missing sock_owned_by_user check in sctp_icmp_redirect
  tun: call dev_get_valid_name() before register_netdevice()
  l2tp: check ps->sock before running pppol2tp_session_ioctl()
  tcp: fix tcp_mtu_probe() vs highest_sack
  tun/tap: sanitize TUNSETSNDBUF input
  ALSA: seq: Cancel pending autoload work at unbinding device
  Input: ims-psu - check if CDC union descriptor is sane
  usb: usbtest: fix NULL pointer dereference
  mac80211: don't compare TKIP TX MIC key in reinstall prevention
  mac80211: use constant time comparison with keys
  mac80211: accept key reinstall without changing anything
  FROMLIST: binder: fix proc->files use-after-free

Change-Id: I9aaf4f803a5da1fc983879a214b2fddda7879f41
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.98 (3d4af8) into msm-4.4
Srinivasarao P [Tue, 26 Dec 2017 11:53:34 +0000 (17:23 +0530)]
Merge android-4.4.98 (3d4af8) into msm-4.4

* refs/heads/tmp-03d4af8
  Linux 4.4.98
  PKCS#7: fix unitialized boolean 'want'
  x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context
  can: c_can: don't indicate triple sampling support for D_CAN
  can: sun4i: handle overrun in RX FIFO
  rbd: use GFP_NOIO for parent stat and data requests
  drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue
  Input: elan_i2c - add ELAN060C to the ACPI table
  MIPS: AR7: Ensure that serial ports are properly set up
  MIPS: AR7: Defer registration of GPIO
  tools: firmware: check for distro fallback udev cancel rule
  selftests: firmware: send expected errors to /dev/null
  selftests: firmware: add empty string and async tests
  test: firmware_class: report errors properly on failure
  MIPS: SMP: Fix deadlock & online race
  MIPS: Fix race on setting and getting cpu_online_mask
  MIPS: SMP: Use a completion event to signal CPU up
  MIPS: Fix CM region target definitions
  MIPS: microMIPS: Fix incorrect mask in insn_table_MM
  ALSA: seq: Avoid invalid lockdep class warning
  ALSA: seq: Fix OSS sysex delivery in OSS emulation
  ARM: 8720/1: ensure dump_instr() checks addr_limit
  KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2]
  crypto: x86/sha1-mb - fix panic due to unaligned access
  workqueue: Fix NULL pointer dereference
  x86/uaccess, sched/preempt: Verify access_ok() context
  platform/x86: hp-wmi: Do not shadow error values
  platform/x86: hp-wmi: Fix error value for hp_wmi_tablet_state
  KEYS: trusted: fix writing past end of buffer in trusted_read()
  KEYS: trusted: sanitize all key material
  cdc_ncm: Set NTB format again after altsetting switch for Huawei devices
  platform/x86: hp-wmi: Fix detection for dock and tablet mode
  net: dsa: select NET_SWITCHDEV
  s390/qeth: issue STARTLAN as first IPA command
  IB/ipoib: Change list_del to list_del_init in the tx object
  Input: mpr121 - set missing event capability
  Input: mpr121 - handle multiple bits change of status register
  IPsec: do not ignore crypto err in ah4 input
  netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family
  usb: hcd: initialize hcd->flags to 0 when rm hcd
  serial: sh-sci: Fix register offsets for the IRDA serial port
  phy: increase size of MII_BUS_ID_SIZE and bus_id
  iio: trigger: free trigger resource correctly
  crypto: vmx - disable preemption to enable vsx in aes_ctr.c
  ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6
  powerpc/corenet: explicitly disable the SDHC controller on kmcoge4
  iommu/arm-smmu-v3: Clear prior settings when updating STEs
  KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter
  drm: drm_minor_register(): Clean up debugfs on failure
  xen/netback: set default upper limit of tx/rx queues to 8
  PCI: mvebu: Handle changes to the bridge windows while enabled
  video: fbdev: pmag-ba-fb: Remove bad `__init' annotation
  adv7604: Initialize drive strength to default when using DT
  ANDROID: binder: clarify deferred thread work.
  FROMLIST: arm64: Avoid aligning normal memory pointers in __memcpy_{to,from}io

Conflicts:
arch/arm64/kernel/io.c

Change-Id: I992fcf368dbc672ad7d6ae31e87f289f4d7df2bf
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.97 (46d256d) into msm-4.4
Srinivasarao P [Mon, 18 Dec 2017 08:44:52 +0000 (14:14 +0530)]
Merge android-4.4.97 (46d256d) into msm-4.4

* refs/heads/tmp-46d256d
  Linux 4.4.97
  staging: r8712u: Fix Sparse warning in rtl871x_xmit.c
  xen: don't print error message in case of missing Xenstore entry
  bt8xx: fix memory leak
  s390/dasd: check for device error pointer within state change interrupts
  mei: return error on notification request to a disconnected client
  exynos4-is: fimc-is: Unmap region obtained by of_iomap()
  staging: lustre: ptlrpc: skip lock if export failed
  staging: lustre: hsm: stack overrun in hai_dump_data_field
  staging: lustre: llite: don't invoke direct_IO for the EOF case
  platform/x86: intel_mid_thermal: Fix module autoload
  scsi: aacraid: Process Error for response I/O
  xen/manage: correct return value check on xenbus_scanf()
  cx231xx: Fix I2C on Internal Master 3 Bus
  perf tools: Only increase index if perf_evsel__new_idx() succeeds
  drm/amdgpu: when dpm disabled, also need to stop/start vce.
  i2c: riic: correctly finish transfers
  ext4: do not use stripe_width if it is not set
  ext4: fix stripe-unaligned allocations
  staging: rtl8712u: Fix endian settings for structs describing network packets
  mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped
  mfd: ab8500-sysctrl: Handle probe deferral
  ARM: pxa: Don't rely on public mmc header to include leds.h
  mmc: s3cmci: include linux/interrupt.h for tasklet_struct
  PM / wakeirq: report a wakeup_event on dedicated wekup irq
  Fix tracing sample code warning.
  tracing/samples: Fix creation and deletion of simple_thread_fn creation
  drm/msm: fix an integer overflow test
  drm/msm: Fix potential buffer overflow issue
  perf tools: Fix build failure on perl script context
  ocfs2: fstrim: Fix start offset of first cluster group during fstrim
  ARM: 8715/1: add a private asm/unaligned.h
  ARM: dts: mvebu: pl310-cache disable double-linefill
  arm64: ensure __dump_instr() checks addr_limit
  ASoC: adau17x1: Workaround for noise bug in ADC
  KEYS: fix out-of-bounds read during ASN.1 parsing
  KEYS: return full count in keyring_read() if buffer is too small
  cifs: check MaxPathNameComponentLength != 0 before using it
  ALSA: seq: Fix nested rwsem annotation for lockdep splat
  ALSA: timer: Add missing mutex lock for compat ioctls
  BACKPORT: xfrm: Clear sk_dst_cache when applying per-socket policy.
  Revert "ANDROID: sched/rt: schedtune: Add boost retention to RT"
  cpufreq: Drop schedfreq governor
  ANDROID: sched/rt: schedtune: Add boost retention to RT
  ANDROID: sched/rt: add schedtune accounting
  ANDROID: Revert "arm64: move ELF_ET_DYN_BASE to 4GB / 4MB"
  ANDROID: Revert "arm: move ELF_ET_DYN_BASE to 4MB"
  sched: EAS: Fix the calculation of group util in group_idle_state()
  sched: EAS: update trg_cpu to backup_cpu if no energy saving for target_cpu
  sched: EAS: Fix the condition to distinguish energy before/after

Conflicts:
drivers/cpufreq/Kconfig
drivers/gpu/drm/msm/msm_gem_submit.c
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/rt.c
kernel/sched/sched.h

Change-Id: I0d8c5287cb67fd47c8944a002c0ca71adcdef537
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge "qseecom: support listener request from smcinvoke without reentrancy"
Linux Build Service Account [Sat, 16 Dec 2017 08:56:46 +0000 (00:56 -0800)]
Merge "qseecom: support listener request from smcinvoke without reentrancy"

6 years agoMerge "qseecom: fix an issue when requested listener svc id does not exist"
Linux Build Service Account [Sat, 16 Dec 2017 08:56:45 +0000 (00:56 -0800)]
Merge "qseecom: fix an issue when requested listener svc id does not exist"

6 years agoqseecom: support listener request from smcinvoke without reentrancy
Zhen Kong [Thu, 19 Oct 2017 19:32:07 +0000 (12:32 -0700)]
qseecom: support listener request from smcinvoke without reentrancy

Add support to process listener request from smcinvoke when
reentrancy is disabled.

Change-Id: I2ce030cf6d5104ca2dec1402634a05d425e6d474
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
6 years agoMerge "adv7481: Remove conditional compilation for PM functions"
Linux Build Service Account [Fri, 15 Dec 2017 22:14:38 +0000 (14:14 -0800)]
Merge "adv7481: Remove conditional compilation for PM functions"

6 years agoMerge "drm/msm: Correctly retrieve gpu's active power level"
Linux Build Service Account [Fri, 15 Dec 2017 22:14:37 +0000 (14:14 -0800)]
Merge "drm/msm: Correctly retrieve gpu's active power level"

6 years agoMerge "ARM: dts: msm: blsp and sdhci switch to virtual clock on msm8996 vplatform"
Linux Build Service Account [Fri, 15 Dec 2017 22:14:36 +0000 (14:14 -0800)]
Merge "ARM: dts: msm: blsp and sdhci switch to virtual clock on msm8996 vplatform"

6 years agoMerge "clk: msm: virtual clock adds support for usb, lpass and modem"
Linux Build Service Account [Fri, 15 Dec 2017 22:14:35 +0000 (14:14 -0800)]
Merge "clk: msm: virtual clock adds support for usb, lpass and modem"

6 years agoMerge "msm: ipa: Fix to validate routing table index for filter exception"
Linux Build Service Account [Fri, 15 Dec 2017 22:14:34 +0000 (14:14 -0800)]
Merge "msm: ipa: Fix to validate routing table index for filter exception"

6 years agoMerge "msm: mdss: Trigger idle fallback when no update due to touch"
Linux Build Service Account [Fri, 15 Dec 2017 22:14:33 +0000 (14:14 -0800)]
Merge "msm: mdss: Trigger idle fallback when no update due to touch"

6 years agoMerge "drivers: net: can: Add suspend/resume routine for CAN driver"
Linux Build Service Account [Fri, 15 Dec 2017 22:14:32 +0000 (14:14 -0800)]
Merge "drivers: net: can: Add suspend/resume routine for CAN driver"

6 years agoMerge "spi: spi_qsd: Poll for valid state after software Reset"
Linux Build Service Account [Fri, 15 Dec 2017 22:14:31 +0000 (14:14 -0800)]
Merge "spi: spi_qsd: Poll for valid state after software Reset"

6 years agoqseecom: fix an issue when requested listener svc id does not exist
Zhen Kong [Sat, 9 Dec 2017 20:51:36 +0000 (12:51 -0800)]
qseecom: fix an issue when requested listener svc id does not exist

When listener svc id does not exist, the listener svc entry pointer
is actualy invalid, and should be set to NULL to avoid invalid pointer
deference on cache operation when sending listener resp to TZ.

Change-Id: I6af0c7405c9dc5dfe481396979023968a8324dd0
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
6 years agoadv7481: Remove conditional compilation for PM functions
Rahul Sharma [Wed, 6 Dec 2017 19:37:10 +0000 (01:07 +0530)]
adv7481: Remove conditional compilation for PM functions

Remove conditional compilation for power management functions,
so that suspend and resume are called always.

Change-Id: I6309df0d12db16c90a10127293bb2715cde15a29
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
6 years agomsm: ipa: Fix to validate routing table index for filter exception
Mohammed Javid [Thu, 5 Oct 2017 18:09:39 +0000 (23:39 +0530)]
msm: ipa: Fix to validate routing table index for filter exception

Fix to validate routing table index for filter action
IPA_PASS_TO_EXCEPTION case to avoid ipa assert
during commit filter rule.

Change-Id: I957f7ffc415ea1a042f6b3a948e94410d41b2262
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
6 years agomsm: mdss: Trigger idle fallback when no update due to touch
Krishna Manikandan [Fri, 15 Dec 2017 09:02:07 +0000 (14:32 +0530)]
msm: mdss: Trigger idle fallback when no update due to touch

Trigger an idle fallback with a reasonable timeout value when
there is no update despite of a touch event and idle_time is 0.
This will reset the refresh rate to minimum fps.

CRs-Fixed: 2003247
Change-Id: I4a2964038f23984bf1ea39c63bf679d80ad12cba
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
6 years agoMerge "Merge android-4.4.96 (aed4c54) into msm-4.4"
Linux Build Service Account [Fri, 15 Dec 2017 07:58:54 +0000 (23:58 -0800)]
Merge "Merge android-4.4.96 (aed4c54) into msm-4.4"

6 years agoMerge "ARM: dts: msm: Override vendor node entires in fstab for MSM8996ProAU"
Linux Build Service Account [Thu, 14 Dec 2017 21:44:24 +0000 (13:44 -0800)]
Merge "ARM: dts: msm: Override vendor node entires in fstab for MSM8996ProAU"

6 years agodrivers: net: can: Add suspend/resume routine for CAN driver
Abinaya P [Tue, 7 Nov 2017 11:09:22 +0000 (16:39 +0530)]
drivers: net: can: Add suspend/resume routine for CAN driver

Make the CAN interrupt as a wakeup capable interrupt and also add
suspend/resume routine to handle the suspend/resume states of
the device

Change-Id: I0e972f3c4b005b52fb8d2e03f83995ecd3c47538
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
6 years agospi: spi_qsd: Poll for valid state after software Reset
Dilip Kota [Mon, 4 Dec 2017 07:20:45 +0000 (12:50 +0530)]
spi: spi_qsd: Poll for valid state after software Reset

For SPI slave, software reset performs long pulse
reset. Software should wait for QUP to be in valid
state before doing operations on QUP.

Change-Id: Ifbed295df87a6c5c383cedb431b368b3dffca676
Signed-off-by: Dilip Kota <dkota@codeaurora.org>
6 years agoMerge "drivers: power: reset: Do cold reset when doing oem reboot"
Linux Build Service Account [Thu, 14 Dec 2017 08:14:44 +0000 (00:14 -0800)]
Merge "drivers: power: reset: Do cold reset when doing oem reboot"

6 years agoMerge "ARM: dts: msm: enable drm msm-hyp driver for msm8996"
Linux Build Service Account [Thu, 14 Dec 2017 08:14:42 +0000 (00:14 -0800)]
Merge "ARM: dts: msm: enable drm msm-hyp driver for msm8996"

6 years agoMerge "scsi: ufs: Trigger runtime-idle in a separate work"
Linux Build Service Account [Thu, 14 Dec 2017 08:14:41 +0000 (00:14 -0800)]
Merge "scsi: ufs: Trigger runtime-idle in a separate work"

6 years agoMerge "dwc3-msm: Notify proper current values in case of floating charger"
Linux Build Service Account [Thu, 14 Dec 2017 08:14:40 +0000 (00:14 -0800)]
Merge "dwc3-msm: Notify proper current values in case of floating charger"

6 years agoMerge "net: cnss2: restore pci config space before enable device"
Linux Build Service Account [Thu, 14 Dec 2017 08:14:39 +0000 (00:14 -0800)]
Merge "net: cnss2: restore pci config space before enable device"

6 years agoMerge "power: smb-lib: fix OTG enable error handling"
Linux Build Service Account [Thu, 14 Dec 2017 08:14:37 +0000 (00:14 -0800)]
Merge "power: smb-lib: fix OTG enable error handling"

6 years agoMerge "ion: ensure CMO target is valid"
Linux Build Service Account [Thu, 14 Dec 2017 08:14:36 +0000 (00:14 -0800)]
Merge "ion: ensure CMO target is valid"

6 years agoARM: dts: msm: enable drm msm-hyp driver for msm8996
Camus Wong [Sat, 9 Dec 2017 19:28:54 +0000 (14:28 -0500)]
ARM: dts: msm: enable drm msm-hyp driver for msm8996

Enable virtual kernel drm driver for hypervisor environment for msm8996.

Change-Id: I6305e088e4b844d3f7dfe1620bd6d68cdaf6432f
Signed-off-by: Camus Wong <camusw@codeaurora.org>
6 years agodrm/msm-hyp: new virtual msm driver
Camus Wong [Mon, 14 Aug 2017 20:51:07 +0000 (16:51 -0400)]
drm/msm-hyp: new virtual msm driver

This driver is enabled on hypervisor builds for the purpose of
creating a DRM device that DRM Master can open and listen on for
VBlank and Page Flip events.

Change-Id: Ib9b2df5ae0e2c33145663b3f515595e8f433a850
Signed-off-by: Camus Wong <camusw@codeaurora.org>
6 years agoscsi: ufs: Trigger runtime-idle in a separate work
Asutosh Das [Tue, 14 Nov 2017 11:31:40 +0000 (17:01 +0530)]
scsi: ufs: Trigger runtime-idle in a separate work

In case of an exception, there could be a deadlock:

-000|__switch_to()
-001|context_switch(inline)
-001|__schedule()
-002|schedule()
-003|schedule_timeout()
-004|do_wait_for_common(inline)
-004|__wait_for_common(inline)
-004|wait_for_common()
-005|wait_for_completion()
-006|destroy_work_on_stack(inline)
-006|flush_work()
-007|ufshcd_suspend()
-008|ufshcd_runtime_suspend()
-009|ufshcd_pltfrm_runtime_suspend()
-010|pm_generic_runtime_suspend()
-011|__rpm_callback(inline)
-011|rpm_callback()
-012|rpm_suspend()
-013|rpm_idle()
-014|__pm_runtime_idle()
-015|ufshcd_exception_event_handler()
-016|__read_once_size(inline)
-016|static_key_count(inline)
-016|static_key_false(inline)
-016|trace_workqueue_execute_end(inline)
-016|process_one_work()
-017|__read_once_size(inline)
-017|list_empty(inline)
-017|worker_thread()
-018|kthread()
-019|ret_from_fork(asm)

This is caused because in exception handler
pm_runtime_put_sync is invoked which calls ufshcd_suspend.
And ufshcd_suspend flushes the exception handler work
& deadlocks.
Hence, schedule the suspend work in a different context.

Change-Id: I02524cee5ab2b64e0ad5de873d5318aef7b6ac95
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
6 years agoARM: dts: msm: Override vendor node entires in fstab for MSM8996ProAU
Binoy Jayan [Thu, 9 Nov 2017 10:16:26 +0000 (15:46 +0530)]
ARM: dts: msm: Override vendor node entires in fstab for MSM8996ProAU

Override the property fsmgr_flags by adding the options verify and
slotselect for the vendor node in the fstab so that A/B is enabled and the
partition is verified by the device mapper target dm-verity. Also delete
the system node from the fstab as it is already mounted by the kernel.

Change-Id: Ib65f1d261c95b995f3999ba24517a69488346ca9
Signed-off-by: Binoy Jayan <bjayan@codeaurora.org>
6 years agoclk: msm: virtual clock adds support for usb, lpass and modem
Zhiqiang Tu [Mon, 11 Dec 2017 08:54:05 +0000 (16:54 +0800)]
clk: msm: virtual clock adds support for usb, lpass and modem

Support usb, lpass and modem clocks in msm8996 virtual clock
frontend driver.

Change-Id: I5ee4f2d951f133a8403442707e633563efdc5c65
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
6 years agoARM: dts: msm: blsp and sdhci switch to virtual clock on msm8996 vplatform
Zhiqiang Tu [Wed, 13 Dec 2017 09:08:26 +0000 (17:08 +0800)]
ARM: dts: msm: blsp and sdhci switch to virtual clock on msm8996 vplatform

Enable virtual clock for uart, spi, i2c and sdhci.

Change-Id: Id0dd32c520eeb956390fb1e0e1a4f762c6ae47f9
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
6 years agodwc3-msm: Notify proper current values in case of floating charger
Sai Krishna Juturi [Fri, 8 Dec 2017 09:30:43 +0000 (15:00 +0530)]
dwc3-msm: Notify proper current values in case of floating charger

Currently our driver is notifying ETIMEDOUT to PMIC
incase of floating charger. Consider if we are inserting
an SDP charger slowly that time also we will detect
it as floating charger then also we are notifying
ETIMEDOUT irrespective of current that is notified from
gadget driver. Hence notify charging current properly
if enumeration happens even in case of
floating charger so that PMIC can update real charger
type to SDP

Signed-off-by: Sai Krishna Juturi <jsaikrishna@codeaurora.org>
Change-Id: Ibeeeafac0834c9df7099a3f0bad274ddb393de47

6 years agoMerge "smb1351: add MODEL_NAME property in parallel power_supply"
Linux Build Service Account [Wed, 13 Dec 2017 03:00:52 +0000 (19:00 -0800)]
Merge "smb1351: add MODEL_NAME property in parallel power_supply"

6 years agoMerge "ARM: dts: msm: Change rh850 interrupt to gpio_122 on auto cdp boards"
Linux Build Service Account [Wed, 13 Dec 2017 03:00:51 +0000 (19:00 -0800)]
Merge "ARM: dts: msm: Change rh850 interrupt to gpio_122 on auto cdp boards"

6 years agoMerge "soc: qcom: pil: NULL check before pil_memset_io"
Linux Build Service Account [Wed, 13 Dec 2017 03:00:50 +0000 (19:00 -0800)]
Merge "soc: qcom: pil: NULL check before pil_memset_io"

6 years agoMerge "drivers: lmh_dcvsh: Defer cluster cooling register until core comes online"
Linux Build Service Account [Wed, 13 Dec 2017 03:00:48 +0000 (19:00 -0800)]
Merge "drivers: lmh_dcvsh: Defer cluster cooling register until core comes online"

6 years agoMerge "usb: pd: qpnp-pdphy: move RX handling to hard IRQ"
Linux Build Service Account [Wed, 13 Dec 2017 03:00:46 +0000 (19:00 -0800)]
Merge "usb: pd: qpnp-pdphy: move RX handling to hard IRQ"

6 years agoMerge "usb: pd: qpnp-pdphy: Remove rx_busy flag"
Linux Build Service Account [Wed, 13 Dec 2017 03:00:45 +0000 (19:00 -0800)]
Merge "usb: pd: qpnp-pdphy: Remove rx_busy flag"

6 years agoMerge "defconfig: msm: Enable CONFIG_INET_LRO"
Linux Build Service Account [Wed, 13 Dec 2017 03:00:44 +0000 (19:00 -0800)]
Merge "defconfig: msm: Enable CONFIG_INET_LRO"

6 years agoMerge android-4.4.96 (aed4c54) into msm-4.4
Blagovest Kolenichev [Tue, 12 Dec 2017 11:32:55 +0000 (03:32 -0800)]
Merge android-4.4.96 (aed4c54) into msm-4.4

* refs/heads/tmp-aed4c54
  Linux 4.4.96
  Revert "drm: bridge: add DT bindings for TI ths8135"
  ecryptfs: fix dereference of NULL user_key_payload
  x86/microcode/intel: Disable late loading on model 79
  regulator: fan53555: fix I2C device ids
  can: kvaser_usb: Ignore CMD_FLUSH_QUEUE_REPLY messages
  can: kvaser_usb: Correct return value in printout
  can: sun4i: fix loopback mode
  scsi: sg: Re-fix off by one in sg_fill_request_table()
  scsi: zfcp: fix erp_action use-before-initialize in REC action trace
  assoc_array: Fix a buggy node-splitting case
  Input: gtco - fix potential out-of-bound access
  Input: elan_i2c - add ELAN0611 to the ACPI table
  xen/gntdev: avoid out of bounds access in case of partial gntdev_mmap()
  fuse: fix READDIRPLUS skipping an entry
  spi: uapi: spidev: add missing ioctl header
  usb: xhci: Handle error condition in xhci_stop_device()
  ceph: unlock dangling spinlock in try_flush_caps()
  ALSA: hda - fix headset mic problem for Dell machines with alc236
  ALSA: hda/realtek - Add support for ALC236/ALC3204
  workqueue: replace pool->manager_arb mutex with a flag
  sched: EAS: upmigrate misfit current task
  sched: avoid pushing tasks to an offline CPU
  sched: Extend active balance to accept 'push_task' argument
  Revert "sched/core: Warn if ENERGY_AWARE is enabled but data is missing"
  Revert "sched/core: fix have_sched_energy_data build warning"
  FROMLIST: kbuild: clang: fix build failures with sparse check
  Revert "Revert "UPSTREAM: efi/libstub/arm64: Set -fpie when building the EFI stub""
  BACKPORT: efi/libstub: Unify command line param parsing

Conflicts:
drivers/usb/host/xhci-hub.c
kernel/sched/core.c
kernel/sched/fair.c

Change-Id: Ie36ce5de516f02b2d553043009d9afee64e7ff24
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
6 years agoMerge "ARM: dts: msm: Set values for MDM shutdown and reset on msm8996 CV2X"
Linux Build Service Account [Tue, 12 Dec 2017 06:33:57 +0000 (22:33 -0800)]
Merge "ARM: dts: msm: Set values for MDM shutdown and reset on msm8996 CV2X"

6 years agoMerge "defconfig: arm64: fsm: Modify configs for FSM"
Linux Build Service Account [Tue, 12 Dec 2017 06:33:56 +0000 (22:33 -0800)]
Merge "defconfig: arm64: fsm: Modify configs for FSM"

6 years agoMerge "pwm: pwm-qpnp: Enable glitch removal after PWM enabled"
Linux Build Service Account [Tue, 12 Dec 2017 06:33:55 +0000 (22:33 -0800)]
Merge "pwm: pwm-qpnp: Enable glitch removal after PWM enabled"

6 years agoMerge "clk: msm: Add virtual clock frontend driver"
Linux Build Service Account [Tue, 12 Dec 2017 06:33:54 +0000 (22:33 -0800)]
Merge "clk: msm: Add virtual clock frontend driver"

6 years agoMerge "usb: pd: Send pending VDM message upon entering SNK/SRC_Ready"
Linux Build Service Account [Tue, 12 Dec 2017 06:33:52 +0000 (22:33 -0800)]
Merge "usb: pd: Send pending VDM message upon entering SNK/SRC_Ready"

6 years agodrivers: power: reset: Do cold reset when doing oem reboot
Lijuan Gao [Wed, 6 Dec 2017 08:20:35 +0000 (16:20 +0800)]
drivers: power: reset: Do cold reset when doing oem reboot

As the IMEM approach to store reset reason is deprecated, so use
the spare register in PMIC power-on peripheral to store the oem
restart reason.

Bit-2 to bit-7 of SOFT_RB_SPARE for hard reset reason, so divide
existing range into regions, value 0 to 31 for common defined features
and 32 to 63 values are for OEMs/ODMs specific features.

Change-Id: Ib8e64d6dd5a335325d0469280e41e9d10ec9b893
Signed-off-by: Lijuan Gao <lijuang@codeaurora.org>
6 years agopower: smb-lib: fix OTG enable error handling
Ashay Jaiswal [Wed, 15 Nov 2017 12:39:19 +0000 (18:09 +0530)]
power: smb-lib: fix OTG enable error handling

Fix OTG enable error path and drop stale votes
on USB_ICL votable.

Change-Id: Ia0fce0ef75bb83ece72cc6a5a8f294b2500a0166
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
6 years agosoc: qcom: pil: NULL check before pil_memset_io
Swetha Chikkaboraiah [Wed, 20 Sep 2017 07:12:45 +0000 (12:42 +0530)]
soc: qcom: pil: NULL check before pil_memset_io

In existing implementation if vmap fails device panics for
NULL pointer access while doing pil_memset_io.
Instead check for the NULL pointer.

Change-Id: I1b9fd084a8c168b70f6e01134e4122445e4873b4
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
6 years agoMerge 4.4.105 into android-4.4
Greg Kroah-Hartman [Sun, 10 Dec 2017 13:42:29 +0000 (14:42 +0100)]
Merge 4.4.105 into android-4.4

Changes in 4.4.105
bcache: only permit to recovery read error when cache device is clean
bcache: recover data from backing when data is clean
uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices
usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub
serial: 8250_pci: Add Amazon PCI serial device ID
s390/runtime instrumentation: simplify task exit handling
USB: serial: option: add Quectel BG96 id
ima: fix hash algorithm initialization
s390/pci: do not require AIS facility
selftests/x86/ldt_get: Add a few additional tests for limits
serial: 8250_fintek: Fix rs485 disablement on invalid ioctl()
spi: sh-msiof: Fix DMA transfer size check
usb: phy: tahvo: fix error handling in tahvo_usb_probe()
serial: 8250: Preserve DLD[7:4] for PORT_XR17V35X
x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt()
EDAC, sb_edac: Fix missing break in switch
sysrq : fix Show Regs call trace on ARM
perf test attr: Fix ignored test case result
kprobes/x86: Disable preemption in ftrace-based jprobes
net: systemport: Utilize skb_put_padto()
net: systemport: Pad packet before inserting TSB
ARM: OMAP1: DMA: Correct the number of logical channels
vti6: fix device register to report IFLA_INFO_KIND
net/appletalk: Fix kernel memory disclosure
ravb: Remove Rx overflow log messages
nfs: Don't take a reference on fl->fl_file for LOCK operation
KVM: arm/arm64: Fix occasional warning from the timer work function
NFSv4: Fix client recovery when server reboots multiple times
drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement
net: sctp: fix array overrun read on sctp_timer_tbl
tipc: fix cleanup at module unload
dmaengine: pl330: fix double lock
tcp: correct memory barrier usage in tcp_check_space()
mm: avoid returning VM_FAULT_RETRY from ->page_mkwrite handlers
xen-netfront: Improve error handling during initialization
net: fec: fix multicast filtering hardware setup
Revert "ocfs2: should wait dio before inode lock in ocfs2_setattr()"
usb: hub: Cycle HUB power when initialization fails
usb: xhci: fix panic in xhci_free_virt_devices_depth_first
usb: Add USB 3.1 Precision time measurement capability descriptor support
usb: ch9: Add size macro for SSP dev cap descriptor
USB: core: Add type-specific length check of BOS descriptors
USB: Increase usbfs transfer limit
USB: devio: Prevent integer overflow in proc_do_submiturb()
USB: usbfs: Filter flags passed in from user space
usb: host: fix incorrect updating of offset
xen-netfront: avoid crashing on resume after a failure in talk_to_netback()
Linux 4.4.105

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
6 years agoLinux 4.4.105
Greg Kroah-Hartman [Sat, 9 Dec 2017 17:42:44 +0000 (18:42 +0100)]
Linux 4.4.105

6 years agoxen-netfront: avoid crashing on resume after a failure in talk_to_netback()
Vitaly Kuznetsov [Thu, 11 May 2017 11:58:06 +0000 (13:58 +0200)]
xen-netfront: avoid crashing on resume after a failure in talk_to_netback()

commit d86b5672b1adb98b4cdd6fbf0224bbfb03db6e2e upstream.

Unavoidable crashes in netfront_resume() and netback_changed() after a
previous fail in talk_to_netback() (e.g. when we fail to read MAC from
xenstore) were discovered. The failure path in talk_to_netback() does
unregister/free for netdev but we don't reset drvdata and we try accessing
it after resume.

Fix the bug by removing the whole xen device completely with
device_unregister(), this guarantees we won't have any calls into netfront
after a failure.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agousb: host: fix incorrect updating of offset
Colin Ian King [Tue, 7 Nov 2017 16:45:04 +0000 (16:45 +0000)]
usb: host: fix incorrect updating of offset

commit 1d5a31582ef046d3b233f0da1a68ae26519b2f0a upstream.

The variable temp is incorrectly being updated, instead it should
be offset otherwise the loop just reads the same capability value
and loops forever.  Thanks to Alan Stern for pointing out the
correct fix to my original fix.  Fix also cleans up clang warning:

drivers/usb/host/ehci-dbg.c:840:4: warning: Value stored to 'temp'
is never read

Fixes: d49d43174400 ("USB: misc ehci updates")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoUSB: usbfs: Filter flags passed in from user space
Oliver Neukum [Thu, 23 Nov 2017 15:39:52 +0000 (16:39 +0100)]
USB: usbfs: Filter flags passed in from user space

commit 446f666da9f019ce2ffd03800995487e79a91462 upstream.

USBDEVFS_URB_ISO_ASAP must be accepted only for ISO endpoints.
Improve sanity checking.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoUSB: devio: Prevent integer overflow in proc_do_submiturb()
Dan Carpenter [Fri, 22 Sep 2017 20:43:25 +0000 (23:43 +0300)]
USB: devio: Prevent integer overflow in proc_do_submiturb()

commit 57999d1107c1e60c2ca7088f2ac0f819e2f554b3 upstream.

There used to be an integer overflow check in proc_do_submiturb() but
we removed it.  It turns out that it's still required.  The
uurb->buffer_length variable is a signed integer and it's controlled by
the user.  It can lead to an integer overflow when we do:

num_sgs = DIV_ROUND_UP(uurb->buffer_length, USB_SG_SIZE);

If we strip away the macro then that line looks like this:

num_sgs = (uurb->buffer_length + USB_SG_SIZE - 1) / USB_SG_SIZE;
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It's the first addition which can overflow.

Fixes: 1129d270cbfb ("USB: Increase usbfs transfer limit")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoUSB: Increase usbfs transfer limit
Mateusz Berezecki [Wed, 21 Dec 2016 17:19:14 +0000 (09:19 -0800)]
USB: Increase usbfs transfer limit

commit 1129d270cbfbb7e2b1ec3dede4a13930bdd10e41 upstream.

Promote a variable keeping track of USB transfer memory usage to a
wider data type and allow for higher bandwidth transfers from a large
number of USB devices connected to a single host.

Signed-off-by: Mateusz Berezecki <mateuszb@fastmail.fm>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoUSB: core: Add type-specific length check of BOS descriptors
Masakazu Mokuno [Thu, 9 Nov 2017 16:25:50 +0000 (01:25 +0900)]
USB: core: Add type-specific length check of BOS descriptors

commit 81cf4a45360f70528f1f64ba018d61cb5767249a upstream.

As most of BOS descriptors are longer in length than their header
'struct usb_dev_cap_header', comparing solely with it is not sufficient
to avoid out-of-bounds access to BOS descriptors.

This patch adds descriptor type specific length check in
usb_get_bos_descriptor() to fix the issue.

Signed-off-by: Masakazu Mokuno <masakazu.mokuno@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agousb: ch9: Add size macro for SSP dev cap descriptor
John Youn [Sat, 6 Feb 2016 01:05:12 +0000 (17:05 -0800)]
usb: ch9: Add size macro for SSP dev cap descriptor

commit 446fa3a95df1e8b78f25e1babc41e46edd200821 upstream.

The SuperspeedPlus Device Capability Descriptor has a variable size
depending on the number of sublink speed attributes.

This patch adds a macro to calculate that size. The macro takes one
argument, the Sublink Speed Attribute Count (SSAC) as reported by the
descriptor in bmAttributes[4:0].

See USB 3.1 9.6.2.5, Table 9-19.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agousb: Add USB 3.1 Precision time measurement capability descriptor support
Mathias Nyman [Fri, 12 Feb 2016 14:40:14 +0000 (16:40 +0200)]
usb: Add USB 3.1 Precision time measurement capability descriptor support

commit faee822c5a7ab99de25cd34fcde3f8d37b6b9923 upstream.

USB 3.1 devices that support precision time measurement have an
additional PTM cabaility descriptor as part of the full BOS descriptor

Look for this descriptor while parsing the BOS descriptor, and store it in
struct usb_hub_bos if it exists.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agousb: xhci: fix panic in xhci_free_virt_devices_depth_first
Yu Chen [Fri, 1 Dec 2017 11:41:20 +0000 (13:41 +0200)]
usb: xhci: fix panic in xhci_free_virt_devices_depth_first

commit 80e457699a8dbdd70f2d26911e46f538645c55fc upstream.

Check vdev->real_port 0 to avoid panic
[    9.261347] [<ffffff800884a390>] xhci_free_virt_devices_depth_first+0x58/0x108
[    9.261352] [<ffffff800884a814>] xhci_mem_cleanup+0x1bc/0x570
[    9.261355] [<ffffff8008842de8>] xhci_stop+0x140/0x1c8
[    9.261365] [<ffffff80087ed304>] usb_remove_hcd+0xfc/0x1d0
[    9.261369] [<ffffff80088551c4>] xhci_plat_remove+0x6c/0xa8
[    9.261377] [<ffffff80086e928c>] platform_drv_remove+0x2c/0x70
[    9.261384] [<ffffff80086e6ea0>] __device_release_driver+0x80/0x108
[    9.261387] [<ffffff80086e7a1c>] device_release_driver+0x2c/0x40
[    9.261392] [<ffffff80086e5f28>] bus_remove_device+0xe0/0x120
[    9.261396] [<ffffff80086e2e34>] device_del+0x114/0x210
[    9.261399] [<ffffff80086e9e00>] platform_device_del+0x30/0xa0
[    9.261403] [<ffffff8008810bdc>] dwc3_otg_work+0x204/0x488
[    9.261407] [<ffffff80088133fc>] event_work+0x304/0x5b8
[    9.261414] [<ffffff80080e31b0>] process_one_work+0x148/0x490
[    9.261417] [<ffffff80080e3548>] worker_thread+0x50/0x4a0
[    9.261421] [<ffffff80080e9ea0>] kthread+0xe8/0x100
[    9.261427] [<ffffff8008083680>] ret_from_fork+0x10/0x50

The problem can occur if xhci_plat_remove() is called shortly after
xhci_plat_probe(). While xhci_free_virt_devices_depth_first been
called before the device has been setup and get real_port initialized.
The problem occurred on Hikey960 and was reproduced by Guenter Roeck
on Kevin with chromeos-4.4.

Fixes: ee8665e28e8d ("xhci: free xhci virtual devices with leaf nodes first")
Cc: Guenter Roeck <groeck@google.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Fan Ning <fanning4@hisilicon.com>
Signed-off-by: Li Rui <lirui39@hisilicon.com>
Signed-off-by: yangdi <yangdi10@hisilicon.com>
Signed-off-by: Yu Chen <chenyu56@huawei.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agousb: hub: Cycle HUB power when initialization fails
Mike Looijmans [Thu, 9 Nov 2017 12:16:46 +0000 (13:16 +0100)]
usb: hub: Cycle HUB power when initialization fails

commit 973593a960ddac0f14f0d8877d2d0abe0afda795 upstream.

Sometimes the USB device gets confused about the state of the initialization and
the connection fails. In particular, the device thinks that it's already set up
and running while the host thinks the device still needs to be configured. To
work around this issue, power-cycle the hub's output to issue a sort of "reset"
to the device. This makes the device restart its state machine and then the
initialization succeeds.

This fixes problems where the kernel reports a list of errors like this:

usb 1-1.3: device not accepting address 19, error -71

The end result is a non-functioning device. After this patch, the sequence
becomes like this:

usb 1-1.3: new high-speed USB device number 18 using ci_hdrc
usb 1-1.3: device not accepting address 18, error -71
usb 1-1.3: new high-speed USB device number 19 using ci_hdrc
usb 1-1.3: device not accepting address 19, error -71
usb 1-1-port3: attempt power cycle
usb 1-1.3: new high-speed USB device number 21 using ci_hdrc
usb-storage 1-1.3:1.2: USB Mass Storage device detected

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoRevert "ocfs2: should wait dio before inode lock in ocfs2_setattr()"
Greg Kroah-Hartman [Wed, 6 Dec 2017 16:33:18 +0000 (17:33 +0100)]
Revert "ocfs2: should wait dio before inode lock in ocfs2_setattr()"

This reverts commit c4baa4a5870cb02f713def1620052bfca7a82bbb which is
commit 28f5a8a7c033cbf3e32277f4cc9c6afd74f05300 upstream.

It shouldn't be applied to the 4.4-stable tree.

Ben and Alex write:

> Now that ocfs2_setattr() calls this outside of the inode locked region,
> what prevents another task adding a new dio request immediately
> afterward?
>

In the kernel 4.6, firstly, we use the inode_lock() in do_truncate() to
prevent another bio to be issued from this node.
Furthermore, we use the ocfs2_rw_lock() and ocfs2_inode_lock() in ocfs2_setattr()
to guarantee no more bio will be issued from the other nodes in this cluster.

> Also, ocfs2_dio_end_io_write() was introduced in 4.6 and it looks like
> the dio completion path didn't previously take the inode lock.  So it
> doesn't look this fix is needed in 3.18 or 4.4.

Yes, ocfs2_dio_end_io_write() was introduced in 4.6 and the problem this patch
fixes is only exist in the kernel 4.6 and above 4.6.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Alex Chen <alex.chen@huawei.com>
Cc: Jun Piao <piaojun@huawei.com>
Cc: Joseph Qi <jiangqi903@gmail.com>
Cc: Changwei Ge <ge.changwei@h3c.com>
Cc: Mark Fasheh <mfasheh@versity.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agonet: fec: fix multicast filtering hardware setup
Rui Sousa [Mon, 13 Feb 2017 02:01:25 +0000 (10:01 +0800)]
net: fec: fix multicast filtering hardware setup

[ Upstream commit 01f8902bcf3ff124d0aeb88a774180ebcec20ace ]

Fix hardware setup of multicast address hash:
- Never clear the hardware hash (to avoid packet loss)
- Construct the hash register values in software and then write once
to hardware

Signed-off-by: Rui Sousa <rui.sousa@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoxen-netfront: Improve error handling during initialization
Ross Lagerwall [Wed, 8 Feb 2017 10:57:37 +0000 (10:57 +0000)]
xen-netfront: Improve error handling during initialization

[ Upstream commit e2e004acc7cbe3c531e752a270a74e95cde3ea48 ]

This fixes a crash when running out of grant refs when creating many
queues across many netdevs.

* If creating queues fails (i.e. there are no grant refs available),
call xenbus_dev_fatal() to ensure that the xenbus device is set to the
closed state.
* If no queues are created, don't call xennet_disconnect_backend as
netdev->real_num_tx_queues will not have been set correctly.
* If setup_netfront() fails, ensure that all the queues created are
cleaned up, not just those that have been set up.
* If any queues were set up and an error occurs, call
xennet_destroy_queues() to clean up the napi context.
* If any fatal error occurs, unregister and destroy the netdev to avoid
leaving around a half setup network device.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agomm: avoid returning VM_FAULT_RETRY from ->page_mkwrite handlers
Jan Kara [Wed, 8 Feb 2017 22:30:53 +0000 (14:30 -0800)]
mm: avoid returning VM_FAULT_RETRY from ->page_mkwrite handlers

[ Upstream commit 0911d0041c22922228ca52a977d7b0b0159fee4b ]

Some ->page_mkwrite handlers may return VM_FAULT_RETRY as its return
code (GFS2 or Lustre can definitely do this).  However VM_FAULT_RETRY
from ->page_mkwrite is completely unhandled by the mm code and results
in locking and writeably mapping the page which definitely is not what
the caller wanted.

Fix Lustre and block_page_mkwrite_ret() used by other filesystems
(notably GFS2) to return VM_FAULT_NOPAGE instead which results in
bailing out from the fault code, the CPU then retries the access, and we
fault again effectively doing what the handler wanted.

Link: http://lkml.kernel.org/r/20170203150729.15863-1-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agotcp: correct memory barrier usage in tcp_check_space()
Jason Baron [Wed, 25 Jan 2017 02:49:41 +0000 (21:49 -0500)]
tcp: correct memory barrier usage in tcp_check_space()

[ Upstream commit 56d806222ace4c3aeae516cd7a855340fb2839d8 ]

sock_reset_flag() maps to __clear_bit() not the atomic version clear_bit().
Thus, we need smp_mb(), smp_mb__after_atomic() is not sufficient.

Fixes: 3c7151275c0c ("tcp: add memory barriers to write space paths")
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Jason Baron <jbaron@akamai.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Reported-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agodmaengine: pl330: fix double lock
Iago Abal [Wed, 11 Jan 2017 13:00:21 +0000 (14:00 +0100)]
dmaengine: pl330: fix double lock

[ Upstream commit 91539eb1fda2d530d3b268eef542c5414e54bf1a ]

The static bug finder EBA (http://www.iagoabal.eu/eba/) reported the
following double-lock bug:

    Double lock:
    1. spin_lock_irqsave(pch->lock, flags) at pl330_free_chan_resources:2236;
    2. call to function `pl330_release_channel' immediately after;
    3. call to function `dma_pl330_rqcb' in line 1753;
    4. spin_lock_irqsave(pch->lock, flags) at dma_pl330_rqcb:1505.

I have fixed it as suggested by Marek Szyprowski.

First, I have replaced `pch->lock' with `pl330->lock' in functions
`pl330_alloc_chan_resources' and `pl330_free_chan_resources'. This avoids
the double-lock by acquiring a different lock than `dma_pl330_rqcb'.

NOTE that, as a result, `pl330_free_chan_resources' executes
`list_splice_tail_init' on `pch->work_list' under lock `pl330->lock',
whereas in the rest of the code `pch->work_list' is protected by
`pch->lock'. I don't know if this may cause race conditions. Similarly
`pch->cyclic' is written by `pl330_alloc_chan_resources' under
`pl330->lock' but read by `pl330_tx_submit' under `pch->lock'.

Second, I have removed locking from `pl330_request_channel' and
`pl330_release_channel' functions. Function `pl330_request_channel' is
only called from `pl330_alloc_chan_resources', so the lock is already
held. Function `pl330_release_channel' is called from
`pl330_free_chan_resources', which already holds the lock, and from
`pl330_del'. Function `pl330_del' is called in an error path of
`pl330_probe' and at the end of `pl330_remove', but I assume that there
cannot be concurrent accesses to the protected data at those points.

Signed-off-by: Iago Abal <mail@iagoabal.eu>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agotipc: fix cleanup at module unload
Parthasarathy Bhuvaragan [Tue, 24 Jan 2017 12:00:48 +0000 (13:00 +0100)]
tipc: fix cleanup at module unload

[ Upstream commit 35e22e49a5d6a741ebe7f2dd280b2052c3003ef7 ]

In tipc_server_stop(), we iterate over the connections with limiting
factor as server's idr_in_use. We ignore the fact that this variable
is decremented in tipc_close_conn(), leading to premature exit.

In this commit, we iterate until the we have no connections left.

Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Tested-by: John Thompson <thompa.atl@gmail.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agonet: sctp: fix array overrun read on sctp_timer_tbl
Colin Ian King [Fri, 20 Jan 2017 13:01:57 +0000 (13:01 +0000)]
net: sctp: fix array overrun read on sctp_timer_tbl

[ Upstream commit 0e73fc9a56f22f2eec4d2b2910c649f7af67b74d ]

The comparison on the timeout can lead to an array overrun
read on sctp_timer_tbl because of an off-by-one error. Fix
this by using < instead of <= and also compare to the array
size rather than SCTP_EVENT_TIMEOUT_MAX.

Fixes CoverityScan CID#1397639 ("Out-of-bounds read")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agodrm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement
Andrzej Hajda [Tue, 17 Jan 2017 14:15:20 +0000 (15:15 +0100)]
drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement

[ Upstream commit 11d8bcef7a0399e1d2519f207fd575fc404306b4 ]

DECON_TV requires STANDALONE_UPDATE after output enabling, otherwise it does
not start. This change is neutral for DECON.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoNFSv4: Fix client recovery when server reboots multiple times
Trond Myklebust [Fri, 13 Jan 2017 18:31:32 +0000 (13:31 -0500)]
NFSv4: Fix client recovery when server reboots multiple times

[ Upstream commit c6180a6237174f481dc856ed6e890d8196b6f0fb ]

If the server reboots multiple times, the client should rely on the
server to tell it that it cannot reclaim state as per section 9.6.3.4
in RFC7530 and section 8.4.2.1 in RFC5661.
Currently, the client is being to conservative, and is assuming that
if the server reboots while state recovery is in progress, then it must
ignore state that was not recovered before the reboot.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoKVM: arm/arm64: Fix occasional warning from the timer work function
Christoffer Dall [Mon, 9 Jan 2017 11:18:56 +0000 (12:18 +0100)]
KVM: arm/arm64: Fix occasional warning from the timer work function

[ Upstream commit 63e41226afc3f7a044b70325566fa86ac3142538 ]

When a VCPU blocks (WFI) and has programmed the vtimer, we program a
soft timer to expire in the future to wake up the vcpu thread when
appropriate.  Because such as wake up involves a vcpu kick, and the
timer expire function can get called from interrupt context, and the
kick may sleep, we have to schedule the kick in the work function.

The work function currently has a warning that gets raised if it turns
out that the timer shouldn't fire when it's run, which was added because
the idea was that in that case the work should never have been cancelled.

However, it turns out that this whole thing is racy and we can get
spurious warnings.  The problem is that we clear the armed flag in the
work function, which may run in parallel with the
kvm_timer_unschedule->timer_disarm() call.  This results in a possible
situation where the timer_disarm() call does not call
cancel_work_sync(), which effectively synchronizes the completion of the
work function with running the VCPU.  As a result, the VCPU thread
proceeds before the work function completees, causing changes to the
timer state such that kvm_timer_should_fire(vcpu) returns false in the
work function.

All we do in the work function is to kick the VCPU, and an occasional
rare extra kick never harmed anyone.  Since the race above is extremely
rare, we don't bother checking if the race happens but simply remove the
check and the clearing of the armed flag from the work function.

Reported-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agonfs: Don't take a reference on fl->fl_file for LOCK operation
Benjamin Coddington [Thu, 5 Jan 2017 15:20:16 +0000 (10:20 -0500)]
nfs: Don't take a reference on fl->fl_file for LOCK operation

[ Upstream commit 4b09ec4b14a168bf2c687e1f598140c3c11e9222 ]

I have reports of a crash that look like __fput() was called twice for
a NFSv4.0 file.  It seems possible that the state manager could try to
reclaim a lock and take a reference on the fl->fl_file at the same time the
file is being released if, during the close(), a signal interrupts the wait
for outstanding IO while removing locks which then skips the removal
of that lock.

Since 83bfff23e9ed ("nfs4: have do_vfs_lock take an inode pointer") has
removed the need to traverse fl->fl_file->f_inode in nfs4_lock_done(),
taking that reference is no longer necessary.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoravb: Remove Rx overflow log messages
Kazuya Mizuguchi [Thu, 12 Jan 2017 12:21:06 +0000 (13:21 +0100)]
ravb: Remove Rx overflow log messages

[ Upstream commit 18a3ed59d09cf81a6447aadf6931bf0c9ffec5e0 ]

Remove Rx overflow log messages as in an environment where logging results
in network traffic logging may cause further overflows.

Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
[simon: reworked changelog]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agonet/appletalk: Fix kernel memory disclosure
Vlad Tsyrklevich [Mon, 9 Jan 2017 13:57:48 +0000 (20:57 +0700)]
net/appletalk: Fix kernel memory disclosure

[ Upstream commit ce7e40c432ba84da104438f6799d460a4cad41bc ]

ipddp_route structs contain alignment padding so kernel heap memory
is leaked when they are copied to user space in
ipddp_ioctl(SIOCFINDIPDDPRT). Change kmalloc() to kzalloc() to clear
that memory.

Signed-off-by: Vlad Tsyrklevich <vlad@tsyrklevich.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agovti6: fix device register to report IFLA_INFO_KIND
David Forster [Fri, 6 Jan 2017 10:27:59 +0000 (10:27 +0000)]
vti6: fix device register to report IFLA_INFO_KIND

[ Upstream commit 93e246f783e6bd1bc64fdfbfe68b18161f69b28e ]

vti6 interface is registered before the rtnl_link_ops block
is attached. As a result the resulting RTM_NEWLINK is missing
IFLA_INFO_KIND. Re-order attachment of rtnl_link_ops block to fix.

Signed-off-by: Dave Forster <dforster@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoARM: OMAP1: DMA: Correct the number of logical channels
Peter Ujfalusi [Tue, 3 Jan 2017 11:22:34 +0000 (13:22 +0200)]
ARM: OMAP1: DMA: Correct the number of logical channels

[ Upstream commit 657279778af54f35e54b07b6687918f254a2992c ]

OMAP1510, OMAP5910 and OMAP310 have only 9 logical channels.
OMAP1610, OMAP5912, OMAP1710, OMAP730, and OMAP850 have 16 logical channels
available.

The wired 17 for the lch_count must have been used to cover the 16 + 1
dedicated LCD channel, in reality we can only use 9 or 16 channels.

The d->chan_count is not used by the omap-dma stack, so we can skip the
setup. chan_count was configured to the number of logical channels and not
the actual number of physical channels anyways.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agonet: systemport: Pad packet before inserting TSB
Florian Fainelli [Wed, 4 Jan 2017 00:34:49 +0000 (16:34 -0800)]
net: systemport: Pad packet before inserting TSB

[ Upstream commit 38e5a85562a6cd911fc26d951d576551a688574c ]

Inserting the TSB means adding an extra 8 bytes in front the of packet
that is going to be used as metadata information by the TDMA engine, but
stripped off, so it does not really help with the packet padding.

For some odd packet sizes that fall below the 60 bytes payload (e.g: ARP)
we can end-up padding them after the TSB insertion, thus making them 64
bytes, but with the TDMA stripping off the first 8 bytes, they could
still be smaller than 64 bytes which is required to ingress the switch.

Fix this by swapping the padding and TSB insertion, guaranteeing that
the packets have the right sizes.

Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agonet: systemport: Utilize skb_put_padto()
Florian Fainelli [Wed, 4 Jan 2017 00:34:48 +0000 (16:34 -0800)]
net: systemport: Utilize skb_put_padto()

[ Upstream commit bb7da333d0a9f3bddc08f84187b7579a3f68fd24 ]

Since we need to pad our packets, utilize skb_put_padto() which
increases skb->len by how much we need to pad, allowing us to eliminate
the test on skb->len right below.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agokprobes/x86: Disable preemption in ftrace-based jprobes
Masami Hiramatsu [Tue, 19 Sep 2017 10:01:40 +0000 (19:01 +0900)]
kprobes/x86: Disable preemption in ftrace-based jprobes

[ Upstream commit 5bb4fc2d8641219732eb2bb654206775a4219aca ]

Disable preemption in ftrace-based jprobe handlers as
described in Documentation/kprobes.txt:

  "Probe handlers are run with preemption disabled."

This will fix jprobes behavior when CONFIG_PREEMPT=y.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E . McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/150581530024.32348.9863783558598926771.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoperf test attr: Fix ignored test case result
Thomas Richter [Wed, 13 Sep 2017 08:12:09 +0000 (10:12 +0200)]
perf test attr: Fix ignored test case result

[ Upstream commit 22905582f6dd4bbd0c370fe5732c607452010c04 ]

Command perf test -v 16 (Setup struct perf_event_attr test) always
reports success even if the test case fails.  It works correctly if you
also specify -F (for don't fork).

   root@s35lp76 perf]# ./perf test -v 16
   15: Setup struct perf_event_attr               :
   --- start ---
   running './tests/attr/test-record-no-delay'
   [ perf record: Woken up 1 times to write data ]
   [ perf record: Captured and wrote 0.002 MB /tmp/tmp4E1h7R/perf.data
     (1 samples) ]
   expected task=0, got 1
   expected precise_ip=0, got 3
   expected wakeup_events=1, got 0
   FAILED './tests/attr/test-record-no-delay' - match failure
   test child finished with 0
   ---- end ----
   Setup struct perf_event_attr: Ok

The reason for the wrong error reporting is the return value of the
system() library call. It is called in run_dir() file tests/attr.c and
returns the exit status, in above case 0xff00.

This value is given as parameter to the exit() function which can only
handle values 0-0xff.

The child process terminates with exit value of 0 and the parent does
not detect any error.

This patch corrects the error reporting and prints the correct test
result.

Signed-off-by: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
LPU-Reference: 20170913081209.39570-2-tmricht@linux.vnet.ibm.com
Link: http://lkml.kernel.org/n/tip-rdube6rfcjsr1nzue72c7lqn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agosysrq : fix Show Regs call trace on ARM
Jibin Xu [Mon, 11 Sep 2017 03:11:42 +0000 (20:11 -0700)]
sysrq : fix Show Regs call trace on ARM

[ Upstream commit b00bebbc301c8e1f74f230dc82282e56b7e7a6db ]

When kernel configuration SMP,PREEMPT and DEBUG_PREEMPT are enabled,
echo 1 >/proc/sys/kernel/sysrq
echo p >/proc/sysrq-trigger
kernel will print call trace as below:

sysrq: SysRq : Show Regs
BUG: using __this_cpu_read() in preemptible [00000000] code: sh/435
caller is __this_cpu_preempt_check+0x18/0x20
Call trace:
[<ffffff8008088e80>] dump_backtrace+0x0/0x1d0
[<ffffff8008089074>] show_stack+0x24/0x30
[<ffffff8008447970>] dump_stack+0x90/0xb0
[<ffffff8008463950>] check_preemption_disabled+0x100/0x108
[<ffffff8008463998>] __this_cpu_preempt_check+0x18/0x20
[<ffffff80084c9194>] sysrq_handle_showregs+0x1c/0x40
[<ffffff80084c9c7c>] __handle_sysrq+0x12c/0x1a0
[<ffffff80084ca140>] write_sysrq_trigger+0x60/0x70
[<ffffff8008251e00>] proc_reg_write+0x90/0xd0
[<ffffff80081f1788>] __vfs_write+0x48/0x90
[<ffffff80081f241c>] vfs_write+0xa4/0x190
[<ffffff80081f3354>] SyS_write+0x54/0xb0
[<ffffff80080833f0>] el0_svc_naked+0x24/0x28

This can be seen on a common board like an r-pi3.
This happens because when echo p >/proc/sysrq-trigger,
get_irq_regs() is called outside of IRQ context,
if preemption is enabled in this situation,kernel will
print the call trace. Since many prior discussions on
the mailing lists have made it clear that get_irq_regs
either just returns NULL or stale data when used outside
of IRQ context,we simply avoid calling it outside of
IRQ context.

Signed-off-by: Jibin Xu <jibin.xu@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoEDAC, sb_edac: Fix missing break in switch
Gustavo A. R. Silva [Mon, 16 Oct 2017 17:40:29 +0000 (12:40 -0500)]
EDAC, sb_edac: Fix missing break in switch

[ Upstream commit a8e9b186f153a44690ad0363a56716e7077ad28c ]

Add missing break statement in order to prevent the code from falling
through.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Cc: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20171016174029.GA19757@embeddedor.com
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt()
Dave Hansen [Wed, 18 Oct 2017 17:21:07 +0000 (10:21 -0700)]
x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt()

[ Upstream commit da20ab35180780e4a6eadc804544f1fa967f3567 ]

We do not have tracepoints for sys_modify_ldt() because we define
it directly instead of using the normal SYSCALL_DEFINEx() macros.

However, there is a reason sys_modify_ldt() does not use the macros:
it has an 'int' return type instead of 'unsigned long'.  This is
a bug, but it's a bug cemented in the ABI.

What does this mean?  If we return -EINVAL from a function that
returns 'int', we have 0x00000000ffffffea in %rax.  But, if we
return -EINVAL from a function returning 'unsigned long', we end
up with 0xffffffffffffffea in %rax, which is wrong.

To work around this and maintain the 'int' behavior while using
the SYSCALL_DEFINEx() macros, so we add a cast to 'unsigned int'
in both implementations of sys_modify_ldt().

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Brian Gerst <brgerst@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20171018172107.1A79C532@viggo.jf.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoserial: 8250: Preserve DLD[7:4] for PORT_XR17V35X
Aaron Sierra [Wed, 4 Oct 2017 15:01:28 +0000 (10:01 -0500)]
serial: 8250: Preserve DLD[7:4] for PORT_XR17V35X

[ Upstream commit 0ab84da2e076948c49d36197ee7d254125c53eab ]

The upper four bits of the XR17V35x fractional divisor register (DLD)
control general chip function (RS-485 direction pin polarity, multidrop
mode, XON/XOFF parity check, and fast IR mode). Don't allow these bits
to be clobbered when setting the baudrate.

Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agousb: phy: tahvo: fix error handling in tahvo_usb_probe()
Alexey Khoroshilov [Fri, 20 Oct 2017 22:02:07 +0000 (01:02 +0300)]
usb: phy: tahvo: fix error handling in tahvo_usb_probe()

[ Upstream commit ce035409bfa892a2fabb89720b542e1b335c3426 ]

If devm_extcon_dev_allocate() fails, we should disable clk before return.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Fixes: 860d2686fda7 ("usb: phy: tahvo: Use devm_extcon_dev_[allocate|register]() and replace deprecated API")
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agospi: sh-msiof: Fix DMA transfer size check
Hiromitsu Yamasaki [Thu, 2 Nov 2017 09:32:36 +0000 (10:32 +0100)]
spi: sh-msiof: Fix DMA transfer size check

[ Upstream commit 36735783fdb599c94b9c86824583df367c65900b ]

DMA supports 32-bit words only,
even if BITLEN1 of SITMDR2 register is 16bit.

Fixes: b0d0ce8b6b91 ("spi: sh-msiof: Add DMA support")
Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoserial: 8250_fintek: Fix rs485 disablement on invalid ioctl()
Lukas Wunner [Sat, 28 Oct 2017 09:35:49 +0000 (11:35 +0200)]
serial: 8250_fintek: Fix rs485 disablement on invalid ioctl()

[ Upstream commit 3236a965486ba0c6043cf2c7b51943d8b382ae29 ]

This driver's ->rs485_config callback checks if SER_RS485_RTS_ON_SEND
and SER_RS485_RTS_AFTER_SEND have the same value.  If they do, it means
the user has passed in invalid data with the TIOCSRS485 ioctl()
since RTS must have a different polarity when sending and when not
sending.  In this case, rs485 mode is not enabled (the RS485_URA bit
is not set in the RS485 Enable Register) and this is supposed to be
signaled back to the user by clearing the SER_RS485_ENABLED bit in
struct serial_rs485 ... except a missing tilde character is preventing
that from happening.

Fixes: 28e3fb6c4dce ("serial: Add support for Fintek F81216A LPC to 4 UART")
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: "Ji-Ze Hong (Peter Hong)" <hpeter@gmail.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoselftests/x86/ldt_get: Add a few additional tests for limits
Andy Lutomirski [Sat, 4 Nov 2017 11:19:52 +0000 (04:19 -0700)]
selftests/x86/ldt_get: Add a few additional tests for limits

[ Upstream commit fec8f5ae1715a01c72ad52cb2ecd8aacaf142302 ]

We weren't testing the .limit and .limit_in_pages fields very well.
Add more tests.

This addition seems to trigger the "bits 16:19 are undefined" issue
that was fixed in an earlier patch.  I think that, at least on my
CPU, the high nibble of the limit ends in LAR bits 16:19.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bpetkov@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/5601c15ea9b3113d288953fd2838b18bedf6bc67.1509794321.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agos390/pci: do not require AIS facility
Christian Borntraeger [Mon, 30 Oct 2017 13:38:58 +0000 (14:38 +0100)]
s390/pci: do not require AIS facility

[ Upstream commit 48070c73058be6de9c0d754d441ed7092dfc8f12 ]

As of today QEMU does not provide the AIS facility to its guest.  This
prevents Linux guests from using PCI devices as the ais facility is
checked during init. As this is just a performance optimization, we can
move the ais check into the code where we need it (calling the SIC
instruction). This is used at initialization and on interrupt. Both
places do not require any serialization, so we can simply skip the
instruction.

Since we will now get all interrupts, we can also avoid the 2nd scan.
As we can have multiple interrupts in parallel we might trigger spurious
irqs more often for the non-AIS case but the core code can handle that.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Acked-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoima: fix hash algorithm initialization
Boshi Wang [Fri, 20 Oct 2017 08:01:03 +0000 (16:01 +0800)]
ima: fix hash algorithm initialization

[ Upstream commit ebe7c0a7be92bbd34c6ff5b55810546a0ee05bee ]

The hash_setup function always sets the hash_setup_done flag, even
when the hash algorithm is invalid.  This prevents the default hash
algorithm defined as CONFIG_IMA_DEFAULT_HASH from being used.

This patch sets hash_setup_done flag only for valid hash algorithms.

Fixes: e7a2ad7eb6f4 "ima: enable support for larger default filedata hash algorithms"
Signed-off-by: Boshi Wang <wangboshi@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoUSB: serial: option: add Quectel BG96 id
Sebastian Sjoholm [Mon, 20 Nov 2017 18:29:32 +0000 (19:29 +0100)]
USB: serial: option: add Quectel BG96 id

commit c654b21ede93845863597de9ad774fd30db5f2ab upstream.

Quectel BG96 is an Qualcomm MDM9206 based IoT modem, supporting both
CAT-M and NB-IoT. Tested hardware is BG96 mounted on Quectel
development board (EVB). The USB id is added to option.c to allow
DIAG,GPS,AT and modem communication with the BG96.

Signed-off-by: Sebastian Sjoholm <ssjoholm@mac.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>