[PATCH 4.4 210/241] tty: max310x: Fix external crystal register setup

2019-06-09 Thread Greg Kroah-Hartman
From: Joe Burmeister commit 5d24f455c182d5116dd5db8e1dc501115ecc9c2c upstream. The datasheet states: Bit 4: ClockEnSet the ClockEn bit high to enable an external clocking (crystal or clock generator at XIN). Set the ClockEn bit to 0 to disable clocking Bit 1: CrystalEnSet the CrystalEn bit

[PATCH 4.4 225/241] Revert "x86/build: Move _etext to actual end of .text"

2019-06-09 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman This reverts commit 392bef709659abea614abfe53cf228e7a59876a4. It seems to cause lots of problems when using the gold linker, and no one really needs this at the moment, so just revert it from the stable trees. Cc: Sami Tolvanen Reported-by: Kees Cook Cc: Borislav

[PATCH 5.1 43/70] nvme-rdma: fix queue mapping when queue count is limited

2019-06-09 Thread Greg Kroah-Hartman
From: Sagi Grimberg commit 5651cd3c43368873d0787b52acb2e0e08f3c5da4 upstream. When the controller supports less queues than requested, we should make sure that queue mapping does the right thing and not assume that all queues are available. This fixes a crash when the controller supports less

[PATCH 4.4 222/241] brcmfmac: add length checks in scheduled scan result handler

2019-06-09 Thread Greg Kroah-Hartman
From: Arend Van Spriel commit 4835f37e3bafc138f8bfa3cbed2920dd56fed283 upstream. Assure the event data buffer is long enough to hold the array of netinfo items and that SSID length does not exceed the maximum of 32 characters as per 802.11 spec. Reviewed-by: Hante Meuleman Reviewed-by:

[PATCH 4.4 121/241] media: ov2659: make S_FMT succeed even if requested format doesnt match

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit bccb89cf9cd07a0690d519696a00c00a973b3fe4 ] This driver returns an error if unsupported media bus pixel code is requested by VIDIOC_SUBDEV_S_FMT. But according to Documentation/media/uapi/v4l/vidioc-subdev-g-fmt.rst, Drivers must not return an error solely because the requested

[PATCH 4.4 194/241] xhci: Convert xhci_handshake() to use readl_poll_timeout_atomic()

2019-06-09 Thread Greg Kroah-Hartman
From: Andrey Smirnov commit f7fac17ca925faa03fc5eb854c081a24075f8bad upstream. Xhci_handshake() implements the algorithm already captured by readl_poll_timeout_atomic(). Convert the former to use the latter to avoid repetition. Turned out this patch also fixes a bug on the AMD Stoneyridge

[PATCH 4.4 187/241] net: mvpp2: fix bad MVPP2_TXQ_SCHED_TOKEN_CNTR_REG queue value

2019-06-09 Thread Greg Kroah-Hartman
From: Antoine Tenart [ Upstream commit 21808437214637952b61beaba6034d97880fbeb3 ] MVPP2_TXQ_SCHED_TOKEN_CNTR_REG() expects the logical queue id but the current code is passing the global tx queue offset, so it ends up writing to unknown registers (between 0x8280 and 0x82fc, which seemed to be

[PATCH 4.4 200/241] USB: rio500: fix memory leak in close after disconnect

2019-06-09 Thread Greg Kroah-Hartman
From: Oliver Neukum commit e0feb73428b69322dd5caae90b0207de369b5575 upstream. If a disconnected device is closed, rio_close() must free the buffers. Signed-off-by: Oliver Neukum Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/rio500.c | 17 +++-- 1 file

[PATCH 4.4 206/241] Btrfs: fix race updating log root item during fsync

2019-06-09 Thread Greg Kroah-Hartman
From: Filipe Manana commit 06989c799f04810f6876900d4760c0edda369cf7 upstream. When syncing the log, the final phase of a fsync operation, we need to either create a log root's item or update the existing item in the log tree of log roots, and that depends on the current value of the log root's

[PATCH 4.4 203/241] media: smsusb: better handle optional alignment

2019-06-09 Thread Greg Kroah-Hartman
From: Mauro Carvalho Chehab commit a47686636d84eaec5c9c6e84bd5f96bed34d526d upstream. Most Siano devices require an alignment for the response. Changeset f3be52b0056a ("media: usb: siano: Fix general protection fault in smsusb") changed the logic with gets such aligment, but it now produces a

[PATCH 4.4 193/241] include/linux/bitops.h: sanitize rotate primitives

2019-06-09 Thread Greg Kroah-Hartman
From: Rasmus Villemoes commit ef4d6f6b275c498f8e5626c99dbeefdc5027f843 upstream. The ror32 implementation (word >> shift) | (word << (32 - shift) has undefined behaviour if shift is outside the [1, 31] range. Similarly for the 64 bit variants. Most callers pass a compile-time constant

[PATCH 4.4 212/241] kernel/signal.c: trace_signal_deliver when signal_group_exit

2019-06-09 Thread Greg Kroah-Hartman
From: Zhenliang Wei commit 98af37d624ed8c83f1953b1b6b2f6866011fc064 upstream. In the fixes commit, removing SIGKILL from each thread signal mask and executing "goto fatal" directly will skip the call to "trace_signal_deliver". At this point, the delivery tracking of the SIGKILL signal will be

[PATCH 4.4 216/241] net: create skb_gso_validate_mac_len()

2019-06-09 Thread Greg Kroah-Hartman
From: Daniel Axtens commit 2b16f048729bf35e6c28a40cbfad07239f9dcd90 upstream. If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other

[PATCH 4.9 61/83] media: uvcvideo: Fix uvc_alloc_entity() allocation alignment

2019-06-09 Thread Greg Kroah-Hartman
From: Nadav Amit commit 89dd34caf73e28018c58cd193751e41b1f8bdc56 upstream. The use of ALIGN() in uvc_alloc_entity() is incorrect, since the size of (entity->pads) is not a power of two. As a stop-gap, until a better solution is adapted, use roundup() instead. Found by a static assertion.

[PATCH 4.4 227/241] usb: gadget: fix request length error for isoc transfer

2019-06-09 Thread Greg Kroah-Hartman
From: Peter Chen commit 982555fc26f9d8bcdbd5f9db0378fe0682eb4188 upstream. For isoc endpoint descriptor, the wMaxPacketSize is not real max packet size (see Table 9-13. Standard Endpoint Descriptor, USB 2.0 specifcation), it may contain the number of packet, so the real max packet should be

[PATCH 4.4 235/241] parisc: Use implicit space register selection for loading the coherence index of I/O pdirs

2019-06-09 Thread Greg Kroah-Hartman
From: John David Anglin commit 63923d2c3800919774f5c651d503d1dd2adaddd5 upstream. We only support I/O to kernel space. Using %sr1 to load the coherence index may be racy unless interrupts are disabled. This patch changes the code used to load the coherence index to use implicit space register

[PATCH 4.4 229/241] ethtool: fix potential userspace buffer overflow

2019-06-09 Thread Greg Kroah-Hartman
From: Vivien Didelot [ Upstream commit 0ee4e76937d69128a6a66861ba393ebdc2ffc8a2 ] ethtool_get_regs() allocates a buffer of size ops->get_regs_len(), and pass it to the kernel driver via ops->get_regs() for filling. There is no restriction about what the kernel drivers can or cannot do with the

[PATCH 4.4 211/241] memcg: make it work on sparse non-0-node systems

2019-06-09 Thread Greg Kroah-Hartman
From: Jiri Slaby commit 3e8589963773a5c23e2f1fe4bcad0e9a90b7f471 upstream. We have a single node system with node 0 disabled: Scanning NUMA topology in Northbridge 24 Number of physical nodes 2 Skipping disabled node 0 Node 1 MemBase Limit fbff

[PATCH 4.4 184/241] usbnet: fix kernel crash after disconnect

2019-06-09 Thread Greg Kroah-Hartman
From: Kloetzke Jan [ Upstream commit ad70411a978d1e6e97b1e341a7bde9a79af0c93d ] When disconnecting cdc_ncm the kernel sporadically crashes shortly after the disconnect: [ 57.868812] Unable to handle kernel NULL pointer dereference at virtual address ... [ 58.006653] PC is

[PATCH 4.4 228/241] media: uvcvideo: Fix uvc_alloc_entity() allocation alignment

2019-06-09 Thread Greg Kroah-Hartman
From: Nadav Amit commit 89dd34caf73e28018c58cd193751e41b1f8bdc56 upstream. The use of ALIGN() in uvc_alloc_entity() is incorrect, since the size of (entity->pads) is not a power of two. As a stop-gap, until a better solution is adapted, use roundup() instead. Found by a static assertion.

[PATCH 4.4 231/241] net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query

2019-06-09 Thread Greg Kroah-Hartman
From: Erez Alfasi [ Upstream commit 135dd9594f127c8a82d141c3c8430e9e2143216a ] Querying EEPROM high pages data for SFP module is currently not supported by our driver but is still tried, resulting in invalid FW queries. Set the EEPROM ethtool data length to 256 for SFP module to limit the

[PATCH 4.4 237/241] MIPS: pistachio: Build uImage.gz by default

2019-06-09 Thread Greg Kroah-Hartman
From: Paul Burton commit e4f2d1af7163becb181419af9dece9206001e0a6 upstream. The pistachio platform uses the U-Boot bootloader & generally boots a kernel in the uImage format. As such it's useful to build one when building the kernel, but to do so currently requires the user to manually specify

[PATCH 4.4 238/241] genwqe: Prevent an integer overflow in the ioctl

2019-06-09 Thread Greg Kroah-Hartman
From: Dan Carpenter commit 110080cea0d0e4dfdb0b536e7f8a5633ead6a781 upstream. There are a couple potential integer overflows here. round_up(m->size + (m->addr & ~PAGE_MASK), PAGE_SIZE); The first thing is that the "m->size + (...)" addition could overflow, and the second is that

[PATCH 4.4 234/241] rcu: locking and unlocking need to always be at least barriers

2019-06-09 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 66be4e66a7f422128748e3c3ef6ee72b20a6197b upstream. Herbert Xu pointed out that commit bb73c52bad36 ("rcu: Don't disable preemption for Tiny and Tree RCU readers") was incorrect in making the preempt_disable/enable() be conditional on CONFIG_PREEMPT_COUNT. If

[PATCH 4.4 232/241] net: rds: fix memory leak in rds_ib_flush_mr_pool

2019-06-09 Thread Greg Kroah-Hartman
From: Zhu Yanjun [ Upstream commit 85cb928787eab6a2f4ca9d2a798b6f3bed53ced1 ] When the following tests last for several hours, the problem will occur. Server: rds-stress -r 1.1.1.16 -D 1M Client: rds-stress -r 1.1.1.14 -s 1.1.1.16 -D 1M -T 30 The following will occur. " Starting

[PATCH 4.4 233/241] pktgen: do not sleep with the thread lock held.

2019-06-09 Thread Greg Kroah-Hartman
From: Paolo Abeni [ Upstream commit 720f1de4021f09898b8c8443f3b3e995991b6e3a ] Currently, the process issuing a "start" command on the pktgen procfs interface, acquires the pktgen thread lock and never release it, until all pktgen threads are completed. The above can blocks indefinitely any

[PATCH 4.4 236/241] fuse: fallocate: fix return with locked inode

2019-06-09 Thread Greg Kroah-Hartman
From: Miklos Szeredi commit 35d6fcbb7c3e296a52136347346a698a35af3fda upstream. Do the proper cleanup in case the size check fails. Tested with xfstests:generic/228 Reported-by: kbuild test robot Reported-by: Dan Carpenter Fixes: 0cbade024ba5 ("fuse: honor RLIMIT_FSIZE in

[PATCH 4.4 240/241] fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock

2019-06-09 Thread Greg Kroah-Hartman
From: Kirill Smelkov commit 10dce8af34226d90fa56746a934f8da5dcdba3df upstream. Commit 9c225f2655e3 ("vfs: atomic f_pos accesses as per POSIX") added locking for file.f_pos access and in particular made concurrent read and write not possible - now both those functions take f_pos lock for the

[PATCH 4.4 230/241] neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit

2019-06-09 Thread Greg Kroah-Hartman
From: David Ahern [ Upstream commit 4b2a2bfeb3f056461a90bd621e8bd7d03fa47f60 ] Commit cd9ff4de0107 changed the key for IFF_POINTOPOINT devices to INADDR_ANY but neigh_xmit which is used for MPLS encapsulations was not updated to use the altered key. The result is that every packet Tx does a

[PATCH 4.4 239/241] drm/gma500/cdv: Check vbt config bits when detecting lvds panels

2019-06-09 Thread Greg Kroah-Hartman
From: Patrik Jakobsson commit 7c420636860a719049fae9403e2c87804f53bdde upstream. Some machines have an lvds child device in vbt even though a panel is not attached. To make detection more reliable we now also check the lvds config bits available in the vbt. Bugzilla:

[PATCH 4.4 241/241] fuse: Add FOPEN_STREAM to use stream_open()

2019-06-09 Thread Greg Kroah-Hartman
From: Kirill Smelkov commit bbd84f33652f852ce5992d65db4d020aba21f882 upstream. Starting from commit 9c225f2655e3 ("vfs: atomic f_pos accesses as per POSIX") files opened even via nonseekable_open gate read and write via lock and do not allow them to be run simultaneously. This can create read

[PATCH 4.4 223/241] brcmfmac: add subtype check for event handling in data path

2019-06-09 Thread Greg Kroah-Hartman
From: Arend van Spriel commit a4176ec356c73a46c07c181c6d04039fafa34a9f upstream. For USB there is no separate channel being used to pass events from firmware to the host driver and as such are passed over the data path. In order to detect mock event messages an additional check is needed on

[PATCH 4.4 218/241] brcmfmac: Add length checks on firmware events

2019-06-09 Thread Greg Kroah-Hartman
From: Hante Meuleman commit 0aedbcaf6f182690790d98d90d5fe1e64c846c34 upstream. Add additional length checks on firmware events to create more robust code. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Lei Zhang

[PATCH 4.4 192/241] sparc64: Fix regression in non-hypervisor TLB flush xcall

2019-06-09 Thread Greg Kroah-Hartman
From: James Clarke commit d3c976c14ad8af421134c428b0a89ff8dd3bd8f8 upstream. Previously, %g2 would end up with the value PAGE_SIZE, but after the commit mentioned below it ends up with the value 1 due to being reused for a different purpose. We need it to be PAGE_SIZE as we use it to step

[PATCH 4.4 191/241] tipc: fix modprobe tipc failed after switch order of device registration -v2

2019-06-09 Thread Greg Kroah-Hartman
From: Junwei Hu commit 526f5b851a96566803ee4bee60d0a34df56c77f8 upstream. Error message printed: modprobe: ERROR: could not insert 'tipc': Address family not supported by protocol. when modprobe tipc after the following patch: switch order of device registration, commit 7e27e8d6130c ("tipc:

[PATCH 4.4 188/241] crypto: vmx - ghash: do nosimd fallback manually

2019-06-09 Thread Greg Kroah-Hartman
From: Daniel Axtens commit 357d065a44cdd77ed5ff35155a989f2a763e96ef upstream. VMX ghash was using a fallback that did not support interleaving simd and nosimd operations, leading to failures in the extended test suite. If I understood correctly, Eric's suggestion was to use the same data

[PATCH 4.4 224/241] userfaultfd: dont pin the user memory in userfaultfd_file_create()

2019-06-09 Thread Greg Kroah-Hartman
From: Oleg Nesterov commit d2005e3f41d4f9299e2df6a967c8beb5086967a9 upstream. userfaultfd_file_create() increments mm->mm_users; this means that the memory won't be unmapped/freed if mm owner exits/execs, and UFFDIO_COPY after that can populate the orphaned mm more. Change

[PATCH 4.4 219/241] brcmfmac: screening firmware event packet

2019-06-09 Thread Greg Kroah-Hartman
From: Franky Lin commit c56caa9db8abbbfb9e31325e0897705aa897db37 upstream. Firmware uses asynchronized events as a communication method to the host. The event packets are marked as ETH_P_LINK_CTL protocol type. For SDIO and PCIe bus, this kind of packets are delivered through virtual event

[PATCH 4.4 220/241] brcmfmac: revise handling events in receive path

2019-06-09 Thread Greg Kroah-Hartman
From: Arend van Spriel commit 9c349892ccc90c6de2baaa69cc78449f58082273 upstream. Move event handling out of brcmf_netif_rx() avoiding the need to pass a flag. This flag is only ever true for USB hosts as other interface use separate brcmf_rx_event() function. Reviewed-by: Hante Meuleman

[PATCH 4.4 215/241] binder: replace "%p" with "%pK"

2019-06-09 Thread Greg Kroah-Hartman
From: Todd Kjos commit 8ca86f1639ec5890d400fff9211aca22d0a392eb upstream. The format specifier "%p" can leak kernel addresses. Use "%pK" instead. There were 4 remaining cases in binder.c. Signed-off-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman [bwh: Backported to 4.4: adjust context]

[PATCH 4.4 190/241] Revert "tipc: fix modprobe tipc failed after switch order of device registration"

2019-06-09 Thread Greg Kroah-Hartman
From: David S. Miller commit 5593530e56943182ebb6d81eca8a3be6db6dbba4 upstream. This reverts commit 532b0f7ece4cb2ffd24dc723ddf55242d1188e5e. More revisions coming up. Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/tipc/core.c | 14 +++--- 1 file

[PATCH 4.4 189/241] xen/pciback: Dont disable PCI_COMMAND on PCI device reset.

2019-06-09 Thread Greg Kroah-Hartman
From: Konrad Rzeszutek Wilk commit 7681f31ec9cdacab4fd10570be924f2cef6669ba upstream. There is no need for this at all. Worst it means that if the guest tries to write to BARs it could lead (on certain platforms) to PCI SERR errors. Please note that with

[PATCH 4.4 226/241] net: cdc_ncm: GetNtbFormat endian fix

2019-06-09 Thread Greg Kroah-Hartman
From: Bjørn Mork commit 6314dab4b8fb8493d810e175cb340376052c69b6 upstream. The GetNtbFormat and SetNtbFormat requests operate on 16 bit little endian values. We get away with ignoring this most of the time, because we only care about USB_CDC_NCM_NTB16_FORMAT which is 0x. This fails for

[PATCH 4.4 221/241] brcmfmac: fix incorrect event channel deduction

2019-06-09 Thread Greg Kroah-Hartman
From: Gavin Li commit 8e290cecdd0178f3d4cf7d463c51dc7e462843b4 upstream. brcmf_sdio_fromevntchan() was being called on the the data frame rather than the software header, causing some frames to be mischaracterized as on the event channel rather than the data channel. This fixes a major

[PATCH 4.4 217/241] bnx2x: disable GSO where gso_size is too big for hardware

2019-06-09 Thread Greg Kroah-Hartman
From: Daniel Axtens commit 8914a595110a6eca69a5e275b323f5d09e18f4f9 upstream. If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x:

[PATCH 4.4 209/241] tty: serial: msm_serial: Fix XON/XOFF

2019-06-09 Thread Greg Kroah-Hartman
From: Jorge Ramirez-Ortiz commit 61c0e37950b88bad590056286c1d766b1f167f4e upstream. When the tty layer requests the uart to throttle, the current code executing in msm_serial will trigger "Bad mode in Error Handler" and generate an invalid stack frame in pstore before rebooting (that is if

[PATCH 4.4 213/241] CIFS: cifs_read_allocate_pages: dont iterate through whole page array on ENOMEM

2019-06-09 Thread Greg Kroah-Hartman
From: Roberto Bergantinos Corpas commit 31fad7d41e73731f05b8053d17078638cf850fa6 upstream. In cifs_read_allocate_pages, in case of ENOMEM, we go through whole rdata->pages array but we have failed the allocation before nr_pages, therefore we may end up calling put_page with NULL pointer,

[PATCH 4.4 214/241] binder: Replace "%p" with "%pK" for stable

2019-06-09 Thread Greg Kroah-Hartman
From: Ben Hutchings This was done as part of upstream commits fdfb4a99b6ab "8inder: separate binder allocator structure from binder proc", 19c987241ca1 "binder: separate out binder_alloc functions", and 7a4408c6bd3e "binder: make sure accesses to proc/thread are safe". However, those commits

[PATCH 4.4 185/241] tipc: Avoid copying bytes beyond the supplied data

2019-06-09 Thread Greg Kroah-Hartman
From: Chris Packham TLV_SET is called with a data pointer and a len parameter that tells us how many bytes are pointed to by data. When invoking memcpy() we need to careful to only copy len bytes. Previously we would copy TLV_LENGTH(len) bytes which would copy an extra 4 bytes past the end of

[PATCH 4.4 201/241] media: usb: siano: Fix general protection fault in smsusb

2019-06-09 Thread Greg Kroah-Hartman
From: Alan Stern commit 31e0456de5be379b10fea0fa94a681057114a96e upstream. The syzkaller USB fuzzer found a general-protection-fault bug in the smsusb part of the Siano DVB driver. The fault occurs during probe because the driver assumes without checking that the device has both IN and OUT

[PATCH 4.4 186/241] bnxt_en: Fix aggregation buffer leak under OOM condition.

2019-06-09 Thread Greg Kroah-Hartman
From: Michael Chan [ Upstream commit 296d5b54163964b7ae536b8b57dfbd21d4e868e1 ] For every RX packet, the driver replenishes all buffers used for that packet and puts them back into the RX ring and RX aggregation ring. In one code path where the RX packet has one RX buffer and one or more

[PATCH 4.4 208/241] drm/nouveau/i2c: Disable i2c bus access after ->fini()

2019-06-09 Thread Greg Kroah-Hartman
From: Lyude Paul commit 342406e4fbba9a174125fbfe6aeac3d64ef90f76 upstream. For a while, we've had the problem of i2c bus access not grabbing a runtime PM ref when it's being used in userspace by i2c-dev, resulting in nouveau spamming the kernel log with errors if anything attempts to access the

[PATCH 4.4 204/241] scsi: zfcp: fix missing zfcp_port reference put on -EBUSY from port_remove

2019-06-09 Thread Greg Kroah-Hartman
From: Steffen Maier commit d27e5e07f9c49bf2a6a4ef254ce531c1b4fb5a38 upstream. With this early return due to zfcp_unit child(ren), we don't use the zfcp_port reference from the earlier zfcp_get_port_by_wwpn() anymore and need to put it. Signed-off-by: Steffen Maier Fixes: d99b601b6338 ("[SCSI]

[PATCH 4.4 205/241] scsi: zfcp: fix to prevent port_remove with pure auto scan LUNs (only sdevs)

2019-06-09 Thread Greg Kroah-Hartman
From: Steffen Maier commit ef4021fe5fd77ced0323cede27979d80a56211ca upstream. When the user tries to remove a zfcp port via sysfs, we only rejected it if there are zfcp unit children under the port. With purely automatically scanned LUNs there are no zfcp units but only SCSI devices. In such

[PATCH 4.4 195/241] usb: xhci: avoid null pointer deref when bos field is NULL

2019-06-09 Thread Greg Kroah-Hartman
From: Carsten Schmid commit 7aa1bb2ffd84d6b9b5f546b079bb15cd0ab6e76e upstream. With defective USB sticks we see the following error happen: usb 1-3: new high-speed USB device number 6 using xhci_hcd usb 1-3: device descriptor read/64, error -71 usb 1-3: device descriptor read/64, error -71 usb

[PATCH 4.4 196/241] USB: Fix slab-out-of-bounds write in usb_get_bos_descriptor

2019-06-09 Thread Greg Kroah-Hartman
From: Alan Stern commit a03ff54460817c76105f81f3aa8ef655759ccc9a upstream. The syzkaller USB fuzzer found a slab-out-of-bounds write bug in the USB core, caused by a failure to check the actual size of a BOS descriptor. This patch adds a check to make sure the descriptor is at least as large

[PATCH 4.4 198/241] USB: Add LPM quirk for Surface Dock GigE adapter

2019-06-09 Thread Greg Kroah-Hartman
From: Maximilian Luz commit ea261113385ac0a71c2838185f39e8452d54b152 upstream. Without USB_QUIRK_NO_LPM ethernet will not work and rtl8152 will complain with r8152 : Stop submitting intr, status -71 Adding the quirk resolves this. As the dock is externally powered, this should not have

[PATCH 4.4 197/241] USB: sisusbvga: fix oops in error path of sisusb_probe

2019-06-09 Thread Greg Kroah-Hartman
From: Oliver Neukum commit 9a5729f68d3a82786aea110b1bfe610be318f80a upstream. The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum Reported-by:

[PATCH 4.4 207/241] ALSA: hda/realtek - Set default power save node to 0

2019-06-09 Thread Greg Kroah-Hartman
From: Kailang Yang commit 317d9313925cd8388304286c0d3c8dda7f060a2d upstream. I measured power consumption between power_save_node=1 and power_save_node=0. It's almost the same. Codec will enter to runtime suspend and suspend. That pin also will enter to D3. Don't need to enter to D3 by single

[PATCH 4.4 199/241] USB: rio500: refuse more than one device at a time

2019-06-09 Thread Greg Kroah-Hartman
From: Oliver Neukum commit 3864d33943b4a76c6e64616280e98d2410b1190f upstream. This driver is using a global variable. It cannot handle more than one device at a time. The issue has been existing since the dawn of the driver. Signed-off-by: Oliver Neukum Reported-by:

[PATCH 4.4 202/241] media: usb: siano: Fix false-positive "uninitialized variable" warning

2019-06-09 Thread Greg Kroah-Hartman
From: Alan Stern commit 45457c01171fd1488a7000d1751c06ed8560ee38 upstream. GCC complains about an apparently uninitialized variable recently added to smsusb_init_device(). It's a false positive, but to silence the warning this patch adds a trivial initialization. Signed-off-by: Alan Stern

[PATCH 4.4 145/241] cpufreq/pasemi: fix possible object reference leak

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit a9acc26b75f652f697e02a9febe2ab0da648a571 ] The call to of_get_cpu_node returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/cpufreq/pasemi-cpufreq.c:212:1-7:

[PATCH 4.4 183/241] net: stmmac: fix reset gpio free missing

2019-06-09 Thread Greg Kroah-Hartman
From: Jisheng Zhang [ Upstream commit 49ce881c0d4c4a7a35358d9dccd5f26d0e56fc61 ] Commit 984203ceff27 ("net: stmmac: mdio: remove reset gpio free") removed the reset gpio free, when the driver is unbinded or rmmod, we miss the gpio free. This patch uses managed API to request the reset gpio, so

[PATCH 4.4 143/241] s390: cio: fix cio_irb declaration

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit e91012ee855ad9f5ef2ab106a3de51db93fe4d0c ] clang points out that the declaration of cio_irb does not match the definition exactly, it is missing the alignment attribute: ../drivers/s390/cio/cio.c:50:1: warning: section does not match previous declaration [-Wsection]

[PATCH 4.4 141/241] PM / core: Propagate dev->power.wakeup_path when no callbacks

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit dc351d4c5f4fe4d0f274d6d660227be0c3a03317 ] The dev->power.direct_complete flag may become set in device_prepare() in case the device don't have any PM callbacks (dev->power.no_pm_callbacks is set). This leads to a broken behaviour, when there is child having wakeup enabled and

[PATCH 4.4 136/241] hwmon: (f71805f) Use request_muxed_region for Super-IO accesses

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 73e6ff71a7ea924fb7121d576a2d41e3be3fc6b5 ] Super-IO accesses may fail on a system with no or unmapped LPC bus. Unable to handle kernel paging request at virtual address ffbffee0002e pgd = ffc1d68d4000 [ffbffee0002e] *pgd=, *pud=

[PATCH 4.4 182/241] net-gro: fix use-after-free read in napi_gro_frags()

2019-06-09 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit a4270d6795b0580287453ea55974d948393e66ef ] If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might

[PATCH 4.4 180/241] ipv6: Consider sk_bound_dev_if when binding a raw socket to an address

2019-06-09 Thread Greg Kroah-Hartman
From: Mike Manning [ Upstream commit 72f7cfab6f93a8ea825fab8ccfb016d064269f7f ] IPv6 does not consider if the socket is bound to a device when binding to an address. The result is that a socket can be bound to eth0 and then bound to the address of eth1. If the device is a VRF, the result is

[PATCH 4.4 140/241] mmc: sdhci-of-esdhc: add erratum eSDHC-A001 and A-008358 support

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 05cb6b2a66fa7837211a060878e91be5eb10cb07 ] eSDHC-A001: The data timeout counter (SYSCTL[DTOCV]) is not reliable for DTOCV values 0x4(2^17 SD clock), 0x8(2^21 SD clock), and 0xC(2^25 SD clock). The data timeout counter can count from 2^13–2^27, but for values 2^17, 2^21, and

[PATCH 4.4 178/241] spi: Fix zero length xfer bug

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 5442dcaa0d90fc376bdfc179a018931a8f43dea4 ] This fixes a bug for messages containing both zero length and unidirectional xfers. The function spi_map_msg will allocate dummy tx and/or rx buffers for use with unidirectional transfers when the hardware can only do a bidirectional

[PATCH 4.4 174/241] media: saa7146: avoid high stack usage with clang

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 03aa4f191a36f33fce015387f84efa0eee94408e ] Two saa7146/hexium files contain a construct that causes a warning when built with clang: drivers/media/pci/saa7146/hexium_orion.c:210:12: error: stack frame size of 2272 bytes in function 'hexium_probe'

[PATCH 4.4 173/241] media: go7007: avoid clang frame overflow warning with KASAN

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit ed713a4a1367aca5c0f2f329579465db00c17995 ] clang-8 warns about one function here when KASAN is enabled, even without the 'asan-stack' option: drivers/media/usb/go7007/go7007-fw.c:1551:5: warning: stack frame size of 2656 bytes in function I have reported this issue in the

[PATCH 4.4 166/241] media: wl128x: prevent two potential buffer overflows

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 9c2ccc324b3a6cbc865ab8b3e1a09e93d3c8ade9 ] Smatch marks skb->data as untrusted so it warns that "evt_hdr->dlen" can copy up to 255 bytes and we only have room for two bytes. Even if this comes from the firmware and we trust it, the new policy generally is just to fix it as

[PATCH 4.4 172/241] media: m88ds3103: serialize reset messages in m88ds3103_set_frontend

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 981fbe3da20a6f35f17977453bce7dfc1664d74f ] Ref: https://bugzilla.kernel.org/show_bug.cgi?id=199323 Users are experiencing problems with the DVBSky S960/S960C USB devices since the following commit: 9d659ae: ("locking/mutex: Add lock handoff to avoid starvation") The device

[PATCH 4.4 139/241] mmc: sdhci-of-esdhc: add erratum eSDHC5 support

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit a46e42712596b51874f04c73f1cdf1017f88df52 ] Software writing to the Transfer Type configuration register (system clock domain) can cause a setup/hold violation in the CRC flops (card clock domain), which can cause write accesses to be sent with corrupt CRC values. This issue

[PATCH 4.4 170/241] usb: core: Add PM runtime calls to usb_hcd_platform_shutdown

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 8ead7e817224d7832fe51a19783cb8fcadc79467 ] If ohci-platform is runtime suspended, we can currently get an "imprecise external abort" on reboot with ohci-platform loaded when PM runtime is implemented for the SoC. Let's fix this by adding PM runtime support to

[PATCH 4.4 160/241] chardev: add additional check for minor range overlap

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit de36e16d1557a0b6eb328bc3516359a12ba5c25c ] Current overlap checking cannot correctly handle a case which is baseminor < existing baseminor && baseminor + minorct > existing baseminor + minorct. Signed-off-by: Chengguang Xu Signed-off-by: Greg Kroah-Hartman Signed-off-by:

[PATCH 4.4 163/241] ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit c705247136a523488eac806bd357c3e5d79a7acd ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./sound/soc/fsl/fsl_utils.c:74:2-8: ERROR:

[PATCH 4.4 164/241] cxgb3/l2t: Fix undefined behaviour

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 76497732932f15e7323dc805e8ea8dc11bb587cf ] The use of zero-sized array causes undefined behaviour when it is not the last member in a structure. As it happens to be in this case. Also, the current code makes use of a language extension to the C90 standard, but the preferred

[PATCH 4.4 169/241] rcutorture: Fix cleanup path for invalid torture_type strings

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit b813afae7ab6a5e91b4e16cc567331d9c2ae1f04 ] If the specified rcutorture.torture_type is not in the rcu_torture_init() function's torture_ops[] array, rcutorture prints some console messages and then invokes rcu_torture_cleanup() to set state so that a future torture test can run.

[PATCH 4.4 161/241] HID: core: move Usage Page concatenation to Main item

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 58e75155009cc85629955d3482f36a1e0eec ] As seen on some USB wireless keyboards manufactured by Primax, the HID parser was using some assumptions that are not always true. In this case it's s the fact that, inside the scope of a main item, an Usage Page will always precede an

[PATCH 4.4 167/241] virtio_console: initialize vtermno value for ports

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 4b0a2c5ff7215206ea6135a405f17c5f6fca7d00 ] For regular serial ports we do not initialize value of vtermno variable. A garbage value is assigned for non console ports. The value can be observed as a random integer with [1]. [1] vim /sys/kernel/debug/virtio-ports/vport*p* This

[PATCH 4.4 154/241] brcmfmac: convert dev_init_lock mutex to completion

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit a9fd0953fa4a62887306be28641b4b0809f3b2fd ] Leaving dev_init_lock mutex locked in probe causes BUG and a WARNING when kernel is compiled with CONFIG_PROVE_LOCKING. Convert mutex to completion which silences those warnings and improves code readability. Fix below errors when

[PATCH 4.4 152/241] brcmfmac: fix missing checks for kmemdup

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 46953f97224d56a12ccbe9c6acaa84ca0dab2780 ] In case kmemdup fails, the fix sets conn_info->req_ie_len and conn_info->resp_ie_len to zero to avoid buffer overflows. Signed-off-by: Kangjie Lu Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin ---

[PATCH 4.4 153/241] b43: shut up clang -Wuninitialized variable warning

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit d825db346270dbceef83b7b750dbc29f1d7dcc0e ] Clang warns about what is clearly a case of passing an uninitalized variable into a static function: drivers/net/wireless/broadcom/b43/phy_lp.c:1852:23: error: variable 'gains' is uninitialized when used here

[PATCH 4.4 156/241] scsi: ufs: Fix regulator load and icc-level configuration

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 0487fff76632ec023d394a05b82e87a971db8c03 ] Currently if a regulator has "-fixed-regulator" property in device tree, it will skip current limit initialization. This lead to a zero "max_uA" value in struct ufs_vreg. However, "regulator_set_load" operation shall be required on

[PATCH 4.4 158/241] arm64: cpu_ops: fix a leaked reference by adding missing of_node_put

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 92606ec9285fb84cd9b5943df23f07d741384bfc ] The call to of_get_next_child returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./arch/arm64/kernel/cpu_ops.c:102:1-7:

[PATCH 4.4 157/241] scsi: ufs: Avoid configuring regulator with undefined voltage range

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 3b141e8cfd54ba3e5c610717295b2a02aab26a05 ] For regulators used by UFS, vcc, vccq and vccq2 will have voltage range initialized by ufshcd_populate_vreg(), however other regulators may have undefined voltage range if dt-bindings have no such definition. In above undefined case,

[PATCH 4.4 138/241] mmc_spi: add a status check for spi_sync_locked

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 611025983b7976df0183390a63a2166411d177f1 ] In case spi_sync_locked fails, the fix reports the error and returns the error code upstream. Signed-off-by: Kangjie Lu Reviewed-by: Laurent Pinchart Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin ---

[PATCH 4.4 090/241] at76c50x-usb: Dont register led_trigger if usb_register_driver failed

2019-06-09 Thread Greg Kroah-Hartman
From: YueHaibing commit 09ac2694b0475f96be895848687ebcbba97eeecf upstream. Syzkaller report this: [ 1213.468581] BUG: unable to handle kernel paging request at fbfff83bf338 [ 1213.469530] #PF error: [normal kernel read fault] [ 1213.469530] PGD 237fe4067 P4D 237fe4067 PUD 237e60067 PMD

[PATCH 4.4 146/241] cpufreq: pmac32: fix possible object reference leak

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 8d10dc28a9ea6e8c02e825dab28699f3c72b02d9 ] The call to of_find_node_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings:

[PATCH 4.4 148/241] iio: ad_sigma_delta: Properly handle SPI bus locking vs CS assertion

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit df1d80aee963480c5c2938c64ec0ac3e4a0df2e0 ] For devices from the SigmaDelta family we need to keep CS low when doing a conversion, since the device will use the MISO line as a interrupt to indicate that the conversion is complete. This is why the driver locks the SPI bus and

[PATCH 4.4 151/241] rtlwifi: fix a potential NULL pointer dereference

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 765976285a8c8db3f0eb7f033829a899d0c2786e ] In case alloc_workqueue fails, the fix reports the error and returns to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/realtek/rtlwifi/base.c

[PATCH 4.4 149/241] iio: hmc5843: fix potential NULL pointer dereferences

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 536cc27deade8f1ec3c1beefa60d5fbe0f6fcb28 ] devm_regmap_init_i2c may fail and return NULL. The fix returns the error when it fails. Signed-off-by: Kangjie Lu Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/staging/iio/magnetometer/hmc5843_i2c.c | 7

[PATCH 4.4 137/241] scsi: libsas: Do discovery on empty PHY to update PHY info

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit d8649fc1c5e40e691d589ed825998c36a947491c ] When we discover the PHY is empty in sas_rediscover_dev(), the PHY information (like negotiated linkrate) is not updated. As such, for a user examining sysfs for that PHY, they would see incorrect values: root@(none)$ cd

[PATCH 4.4 132/241] hwmon: (vt1211) Use request_muxed_region for Super-IO accesses

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 14b97ba5c20056102b3dd22696bf17b057e60976 ] Super-IO accesses may fail on a system with no or unmapped LPC bus. Also, other drivers may attempt to access the LPC bus at the same time, resulting in undefined behavior. Use request_muxed_region() to ensure that IO access on the

[PATCH 4.4 094/241] cxgb4: Fix error path in cxgb4_init_module

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit a3147770bea76c8dbad73eca3a24c2118da5e719 ] BUG: unable to handle kernel paging request at a016a270 PGD 3270067 P4D 3270067 PUD 3271063 PMD 230bbd067 PTE 0 Oops: [#1 CPU: 0 PID: 6134 Comm: modprobe Not tainted 5.1.0+ #33 Hardware name: QEMU Standard PC (i440FX +

[PATCH 4.4 131/241] RDMA/cxgb4: Fix null pointer dereference on alloc_skb failure

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit a6d2a5a92e67d151c98886babdc86d530d27111c ] Currently if alloc_skb fails to allocate the skb a null skb is passed to t4_set_arp_err_handler and this ends up dereferencing the null skb. Avoid the NULL pointer dereference by checking for a NULL skb and returning early.

[PATCH 4.4 096/241] powerpc/boot: Fix missing check of lseek() return value

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit 5d085ec04a000fefb5182d3b03ee46ca96d8389b ] This is detected by Coverity scan: CID: 1440481 Signed-off-by: Bo YU Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/boot/addnote.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[PATCH 4.4 133/241] hwmon: (smsc47m1) Use request_muxed_region for Super-IO accesses

2019-06-09 Thread Greg Kroah-Hartman
[ Upstream commit d6410408ad2a798c4cc685252c1baa713be0ad69 ] Super-IO accesses may fail on a system with no or unmapped LPC bus. Also, other drivers may attempt to access the LPC bus at the same time, resulting in undefined behavior. Use request_muxed_region() to ensure that IO access on the

<    1   2   3   4   5   6   7   8   >