[PATCH AUTOSEL for 4.4 029/162] PCI: Add domain number check to find_smbios_instance_string()

2018-04-08 Thread Sasha Levin
From: Sujith Pandel [ Upstream commit 6c51c82c60991bdbfb937f3bf0cdbe68d042073d ] The function find_smbios_instance_string() does not consider the PCI domain number. As a result, SMBIOS type 41 device type instance would be exported to sysfs for all the PCI domains which have a PCI device with s

[PATCH AUTOSEL for 4.4 023/162] scsi: csiostor: Avoid content leaks and casts

2018-04-08 Thread Sasha Levin
From: Kees Cook [ Upstream commit 42c335f7e67029d2e01711f2f2bc6252277c8993 ] When copying attributes, the len argument was padded out and the resulting memcpy() would copy beyond the end of the source buffer. Avoid this, and use size_t for val_len to avoid all the casts. Similarly, avoid source

[PATCH AUTOSEL for 4.4 030/162] mtd: handle partitioning on devices with 0 erasesize

2018-04-08 Thread Sasha Levin
From: Chris Packham [ Upstream commit 1eeef2d7483a7e3f8d2dd2a5b9939b3b814dc549 ] erasesize is meaningful for flash devices but for SRAM there is no concept of an erase block so erasesize is set to 0. When partitioning these devices instead of ensuring partitions fall on erasesize boundaries we e

[PATCH AUTOSEL for 4.4 047/162] Btrfs: tolerate errors if we have retried successfully

2018-04-08 Thread Sasha Levin
From: Liu Bo [ Upstream commit e3d37faba2eb19a1d459917bbf54ac1c65711510 ] With raid1 profile, dio read isn't tolerating IO errors if read length is less than the stripe length (64K). Our bio didn't get split in btrfs_submit_direct_hook() if (dip->flags & BTRFS_DIO_ORIG_BIO_SUBMITTED) is true an

[PATCH AUTOSEL for 4.4 052/162] mmc: sdhci-esdhc: Add SDHCI_QUIRK_32BIT_DMA_ADDR

2018-04-08 Thread Sasha Levin
From: Benoît Thébaudeau [ Upstream commit cbb4509374963bea440c15ff26e2501d15e7927a ] The eSDHC can only DMA from 32-bit-aligned addresses. This fixes the following test cases of mmc_test: 11: Badly aligned write 12: Badly aligned read 13: Badly aligned multi-block write 14: Badl

[PATCH AUTOSEL for 4.4 058/162] sfc: remove duplicate up_write on VF filter_sem

2018-04-08 Thread Sasha Levin
From: Edward Cree [ Upstream commit 57f0c9cf58ff7fe479137ab847a886d0eed3ad1d ] Somehow two copies of the line 'up_write(&vf->efx->filter_sem);' got into efx_ef10_sriov_set_vf_vlan(). This would put the mutex in a bad state and cause all subsequent down attempts to hang. Fixes: 671b53eec2ed (

[PATCH AUTOSEL for 4.4 070/162] af_iucv: Move sockaddr length checks to before accessing sa_family in bind and connect handlers

2018-04-08 Thread Sasha Levin
From: Mateusz Jurczyk [ Upstream commit e3c42b61ff813921ba58cfc0019e3fd63f651190 ] Verify that the caller-provided sockaddr structure is large enough to contain the sa_family field, before accessing it in bind() and connect() handlers of the AF_IUCV socket. Since neither syscall enforces a minim

[PATCH AUTOSEL for 4.4 056/162] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2018-04-08 Thread Sasha Levin
From: Kai Heng Feng [ Upstream commit 1b1ffc57a1b2edf58e803e463980b326765a237f ] Dell Latitude 3160 does not have keyboard backlight, but there is a sysfs interface for it, which does nothing at all. KBD_LED_ON_TOKEN is the only token can be found. Since it doesn't have KBD_LED_OFF_TOKEN or KBD

[PATCH AUTOSEL for 4.4 084/162] PCI: Enable ECRC only if device supports it

2018-04-08 Thread Sasha Levin
From: Bjorn Helgaas [ Upstream commit 675734baa361cf044033bb60594dea33d8d8da36 ] John reported that an Intel QuickAssist crypto accelerator didn't work in a Dell PowerEdge R730. The problem seems to be that we enabled ECRC when the device doesn't support it: 85:00.0 Co-processor [0b40]: Inte

[PATCH AUTOSEL for 4.4 089/162] MIPS: VDSO: Add implementation of gettimeofday() fallback

2018-04-08 Thread Sasha Levin
From: Goran Ferenc [ Upstream commit 0b523a85e134d41f57ddd8c5193bd9f0a5e20b0d ] This patch adds gettimeofday_fallback() function that wraps assembly invocation of gettimeofday() syscall using __NR_gettimeofday. This function is used if pure VDSO implementation gettimeofday() does not succeed fo

[PATCH AUTOSEL for 4.4 117/162] nfs: Do not convert nfs_idmap_cache_timeout to jiffies

2018-04-08 Thread Sasha Levin
From: Jan Chochol [ Upstream commit cbebc6ef4fc830f4040d4140bf53484812d5d5d9 ] Since commit 57e62324e469 ("NFS: Store the legacy idmapper result in the keyring") nfs_idmap_cache_timeout changed units from jiffies to seconds. Unfortunately sysctl interface was not updated accordingly. As a effec

[PATCH AUTOSEL for 4.4 134/162] RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure

2018-04-08 Thread Sasha Levin
From: Leon Romanovsky [ Upstream commit b081808a66345ba725b77ecd8d759bee874cd937 ] Failure in XRCD FW deallocation command leaves memory leaked and returns error to the user which he can't do anything about it. This patch changes behavior to always free memory and always return success to the u

[PATCH AUTOSEL for 4.4 120/162] kconfig: Don't leak main menus during parsing

2018-04-08 Thread Sasha Levin
From: Ulf Magnusson [ Upstream commit 0724a7c32a54e3e50d28e19e30c59014f61d4e2c ] If a 'mainmenu' entry appeared in the Kconfig files, two things would leak: - The 'struct property' allocated for the default "Linux Kernel Configuration" prompt. - The string for the T_W

[PATCH AUTOSEL for 4.4 135/162] ntb_transport: Fix bug with max_mw_size parameter

2018-04-08 Thread Sasha Levin
From: Logan Gunthorpe [ Upstream commit cbd27448faff4843ac4b66cc71445a10623ff48d ] When using the max_mw_size parameter of ntb_transport to limit the size of the Memory windows, communication cannot be established and the queues freeze. This is because the mw_size that's reported to the peer is

[PATCH AUTOSEL for 4.4 149/162] xen-netfront: Fix race between device setup and open

2018-04-08 Thread Sasha Levin
From: Ross Lagerwall [ Upstream commit f599c64fdf7d9c108e8717fb04bc41c680120da4 ] When a netfront device is set up it registers a netdev fairly early on, before it has set up the queues and is actually usable. A userspace tool like NetworkManager will immediately try to open it and access its st

[PATCH AUTOSEL for 4.4 152/162] arm64: spinlock: Fix theoretical trylock() A-B-A with LSE atomics

2018-04-08 Thread Sasha Levin
From: Will Deacon [ Upstream commit 202fb4ef81e3ec765c23bd1e6746a5c25b797d0e ] If the spinlock "next" ticket wraps around between the initial LDR and the cmpxchg in the LSE version of spin_trylock, then we can erroneously think that we have successfuly acquired the lock because we only check whe

[PATCH AUTOSEL for 3.18 001/101] ALSA: timer: Wrap with spinlock for queue access

2018-04-08 Thread Sasha Levin
From: Takashi Iwai [ Upstream commit d7f910bfedd863d13ea320030fe98e42d0938ed5 ] For accessing the snd_timer_user queue indices, we take tu->qlock. But it's forgotten in a couple of places. The one in snd_timer_user_params() should be safe without the spinlock as the timer is already stopped. B

[PATCH AUTOSEL for 4.4 161/162] locking/qspinlock: Ensure node->count is updated before initialising node

2018-04-08 Thread Sasha Levin
From: Will Deacon [ Upstream commit 11dc13224c975efcec96647a4768a6f1bb7a19a8 ] When queuing on the qspinlock, the count field for the current CPU's head node is incremented. This needn't be atomic because locking in e.g. IRQ context is balanced and so an IRQ will return with node->count as it fo

[PATCH AUTOSEL for 3.18 024/101] PCI: Correct PCI_STD_RESOURCE_END usage

2018-04-08 Thread Sasha Levin
From: Bjorn Helgaas [ Upstream commit 2f686f1d9beee135de6d08caea707ec7bfc916d4 ] PCI_STD_RESOURCE_END is (confusingly) the index of the last valid BAR, not the *number* of BARs. To iterate through all possible BARs, we need to include PCI_STD_RESOURCE_END. Fixes: 9fe373f9997b ("PCI: Increase I

[PATCH AUTOSEL for 3.18 026/101] mtd: handle partitioning on devices with 0 erasesize

2018-04-08 Thread Sasha Levin
From: Chris Packham [ Upstream commit 1eeef2d7483a7e3f8d2dd2a5b9939b3b814dc549 ] erasesize is meaningful for flash devices but for SRAM there is no concept of an erase block so erasesize is set to 0. When partitioning these devices instead of ensuring partitions fall on erasesize boundaries we e

[PATCH AUTOSEL for 3.18 031/101] PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()

2018-04-08 Thread Sasha Levin
From: Christoph Hellwig [ Upstream commit b014e96d1abbd67404bbe2018937b46466299e9e ] Every method in struct device_driver or structures derived from it like struct pci_driver MUST provide exclusion vs the driver's ->remove() method, usually by using device_lock(). Protect use of pci_error_handl

[PATCH AUTOSEL for 3.18 043/101] arm64: ptrace: Fix VFP register dumping in compat coredumps

2018-04-08 Thread Sasha Levin
From: Dave Martin [ Upstream commit af66b2d88a76574d55e81d712292abd34beb6178 ] Currently, VFP registers are omitted from coredumps for compat processes, due to a bug in the REGSET_COMPAT_VFP regset implementation. compat_vfp_get() needs to transfer non-contiguous data from thread_struct.fpsimd_

[PATCH AUTOSEL for 3.18 038/101] mmc: sdhci-esdhc: Add SDHCI_QUIRK_32BIT_DMA_ADDR

2018-04-08 Thread Sasha Levin
From: Benoît Thébaudeau [ Upstream commit cbb4509374963bea440c15ff26e2501d15e7927a ] The eSDHC can only DMA from 32-bit-aligned addresses. This fixes the following test cases of mmc_test: 11: Badly aligned write 12: Badly aligned read 13: Badly aligned multi-block write 14: Badl

[PATCH AUTOSEL for 3.18 050/101] ACPI: EC: Fix EC command visibility for dynamic debug

2018-04-08 Thread Sasha Levin
From: Lv Zheng [ Upstream commit 4625d752e600c116e6327f9d7fc16e8f5be107e9 ] acpi_ec_cmd_string() currently is only enabled for "DEBUG" macro, but users trend to use CONFIG_DYNAMIC_DEBUG and enable ec.c pr_debug() print-outs by "dyndbg='file ec.c +p'". In this use case, all command names are turn

[PATCH AUTOSEL for 3.18 048/101] scsi: bnx2i: missing error code in bnx2i_ep_connect()

2018-04-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 1d32a62c74b3bcb69822b0f4745af5410cfec3a7 ] If bnx2i_map_ep_dbell_regs() then we accidentally return NULL instead of an error pointer. It results in a NULL dereference in iscsi_if_ep_connect(). Fixes: cf4e6363859d ("[SCSI] bnx2i: Add bnx2i iSCSI driver.") S

[PATCH AUTOSEL for 3.18 075/101] kconfig: Fix expr_free() E_NOT leak

2018-04-08 Thread Sasha Levin
From: Ulf Magnusson [ Upstream commit 5b1374b3b3c2fc4f63a398adfa446fb8eff791a4 ] Only the E_NOT operand and not the E_NOT node itself was freed, due to accidentally returning too early in expr_free(). Outline of leak: switch (e->type) { ... case E_NOT: ex

[PATCH AUTOSEL for 3.18 079/101] HID: roccat: prevent an out of bounds read in kovaplus_profile_activated()

2018-04-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 7ad81482cad67cbe1ec808490d1ddfc420c42008 ] We get the "new_profile_index" value from the mouse device when we're handling raw events. Smatch taints it as untrusted data and complains that we need a bounds check. This seems like a reasonable warning otherwi

[PATCH AUTOSEL for 3.18 077/101] scsi: devinfo: fix format of the device list

2018-04-08 Thread Sasha Levin
From: Xose Vazquez Perez [ Upstream commit 3f884a0a8bdf28cfd1e9987d54d83350096cdd46 ] Replace "" with NULL for product revision level, and merge TEXEL duplicate entries. Cc: Hannes Reinecke Cc: Martin K. Petersen Cc: James E.J. Bottomley Cc: SCSI ML Signed-off-by: Xose Vazquez Perez Signed

[PATCH AUTOSEL for 3.18 086/101] asm-generic: provide generic_pmdp_establish()

2018-04-08 Thread Sasha Levin
From: "Kirill A. Shutemov" [ Upstream commit c58f0bb77ed8bf93dfdde762b01cb67eebbdfc29 ] Patch series "Do not lose dirty bit on THP pages", v4. Vlastimil noted that pmdp_invalidate() is not atomic and we can lose dirty and access bits if CPU sets them after pmdp dereference, but before set_pmd_a

[PATCH AUTOSEL for 3.18 099/101] bcache: return attach error when no cache set exist

2018-04-08 Thread Sasha Levin
From: Tang Junhui [ Upstream commit 7f4fc93d4713394ee8f1cd44c238e046e11b4f15 ] I attach a back-end device to a cache set, and the cache set is not registered yet, this back-end device did not attach successfully, and no error returned: [root]# echo 87859280-fec6-4bcc-20df7ca8f86b > /sys/block/sd

[PATCH AUTOSEL for 3.18 089/101] x86/power: Fix swsusp_arch_resume prototype

2018-04-08 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 328008a72d38b5bde6491e463405c34a81a65d3e ] The declaration for swsusp_arch_resume marks it as 'asmlinkage', but the definition in x86-32 does not, and it fails to include the header with the declaration. This leads to a warning when building with link-time-o

[PATCH AUTOSEL for 3.18 084/101] mm/mempolicy: fix the check of nodemask from user

2018-04-08 Thread Sasha Levin
From: Yisheng Xie [ Upstream commit 56521e7a02b7b84a5e72691a1fb15570e6055545 ] As Xiaojun reported the ltp of migrate_pages01 will fail on arm64 system which has 4 nodes[0...3], all have memory and CONFIG_NODES_SHIFT=2: migrate_pages010 TINFO : test_invalid_nodes migrate_pages01 14

[PATCH AUTOSEL for 3.18 091/101] ACPI: processor_perflib: Do not send _PPC change notification if not ready

2018-04-08 Thread Sasha Levin
From: Chen Yu [ Upstream commit ba1edb9a5125a617d612f98eead14b9b84e75c3a ] The following warning was triggered after resumed from S3 - if all the nonboot CPUs were put offline before suspend: [ 1840.329515] unchecked MSR access error: RDMSR from 0x771 at rIP: 0x86061e3a (native_read_ms

[PATCH AUTOSEL for 3.18 097/101] bcache: fix for allocator and register thread race

2018-04-08 Thread Sasha Levin
From: Tang Junhui [ Upstream commit 682811b3ce1a5a4e20d700939a9042f01dbc66c4 ] After long time running of random small IO writing, I reboot the machine, and after the machine power on, I found bcache got stuck, the stack is: [root@ceph153 ~]# cat /proc/2510/task/*/stack [] closure_sync+0x25/0x90

[PATCH AUTOSEL for 3.18 098/101] bcache: fix for data collapse after re-attaching an attached device

2018-04-08 Thread Sasha Levin
From: Tang Junhui [ Upstream commit 73ac105be390c1de42a2f21643c9778a5e002930 ] back-end device sdm has already attached a cache_set with ID f67ebe1f-f8bc-4d73-bfe5-9dc88607f119, then try to attach with another cache set, and it returns with an error: [root]# cd /sys/block/sdm/bcache [root]# echo

[PATCH AUTOSEL for 3.18 095/101] cifs: silence compiler warnings showing up with gcc-8.0.0

2018-04-08 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit ade7db991b47ab3016a414468164f4966bd08202 ] This bug was fixed before, but came up again with the latest compiler in another function: fs/cifs/cifssmb.c: In function 'CIFSSMBSetEA': fs/cifs/cifssmb.c:6362:3: error: 'strncpy' offset 8 is out of the bounds [0,

[PATCH AUTOSEL for 3.18 101/101] irqchip/gic-v3: Change pr_debug message to pr_devel

2018-04-08 Thread Sasha Levin
From: Mark Salter [ Upstream commit b6dd4d83dc2f78cebc9a7e6e7e4bc2be4d29b94d ] The pr_debug() in gic-v3 gic_send_sgi() can trigger a circular locking warning: GICv3: CPU10: ICC_SGI1R_EL1 5000400 == WARNING: possible circular locking depende

[PATCH AUTOSEL for 3.18 094/101] proc: fix /proc/*/map_files lookup

2018-04-08 Thread Sasha Levin
From: Alexey Dobriyan [ Upstream commit ac7f1061c2c11bb8936b1b6a94cdb48de732f7a4 ] Current code does: if (sscanf(dentry->d_name.name, "%lx-%lx", start, end) != 2) However sscanf() is broken garbage. It silently accepts whitespace between format specifiers (did you know that?). It sil

[PATCH AUTOSEL for 3.18 092/101] MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS

2018-04-08 Thread Sasha Levin
From: Matt Redfearn [ Upstream commit 0cde5b44a30f1daaef1c34e08191239dc63271c4 ] When commit b27311e1cace ("MIPS: TXx9: Add RBTX4939 board support") added board support for the RBTX4939, it added a call to led_classdev_register even if the LED class is built as a module. Built-in arch code canno

[PATCH AUTOSEL for 3.18 093/101] xen/grant-table: Use put_page instead of free_page

2018-04-08 Thread Sasha Levin
From: Ross Lagerwall [ Upstream commit 3ac7292a25db1c607a50752055a18aba32ac2176 ] The page given to gnttab_end_foreign_access() to free could be a compound page so use put_page() instead of free_page() since it can handle both compound and single pages correctly. This bug was discovered when mi

[PATCH AUTOSEL for 3.18 096/101] bcache: properly set task state in bch_writeback_thread()

2018-04-08 Thread Sasha Levin
From: Coly Li [ Upstream commit 99361bbf26337186f02561109c17a4c4b1a7536a ] Kernel thread routine bch_writeback_thread() has the following code block, 447 down_write(&dc->writeback_lock); 448~450 if (check conditions) { 451 up_write(&dc->writeback_lock); 452

[PATCH AUTOSEL for 3.18 100/101] nfsd: return RESOURCE not GARBAGE_ARGS on too many ops

2018-04-08 Thread Sasha Levin
From: "J. Bruce Fields" [ Upstream commit 0078117c6d9160031b866cfa1853514d4f6865d2 ] A client that sends more than a hundred ops in a single compound currently gets an rpc-level GARBAGE_ARGS error. It would be more helpful to return NFS4ERR_RESOURCE, since that gives the client a better idea ho

[PATCH AUTOSEL for 3.18 090/101] firmware: dmi_scan: Fix handling of empty DMI strings

2018-04-08 Thread Sasha Levin
From: Jean Delvare [ Upstream commit a7770ae194569e96a93c48aceb304edded9cc648 ] The handling of empty DMI strings looks quite broken to me: * Strings from 1 to 7 spaces are not considered empty. * True empty DMI strings (string index set to 0) are not considered empty, and result in allocating

[PATCH AUTOSEL for 3.18 088/101] IB/ipoib: Fix for potential no-carrier state

2018-04-08 Thread Sasha Levin
From: Alex Estrin [ Upstream commit 1029361084d18cc270f64dfd39529fafa10cfe01 ] On reboot SM can program port pkey table before ipoib registered its event handler, which could result in missing pkey event and leave root interface with initial pkey value from index 0. Since OPA port starts with i

[PATCH AUTOSEL for 3.18 087/101] mm: pin address_space before dereferencing it while isolating an LRU page

2018-04-08 Thread Sasha Levin
From: Mel Gorman [ Upstream commit 69d763fc6d3aee787a3e8c8c35092b4f4960fa5d ] Minchan Kim asked the following question -- what locks protects address_space destroying when race happens between inode trauncation and __isolate_lru_page? Jan Kara clarified by describing the race as follows CPU1

[PATCH AUTOSEL for 3.18 080/101] jffs2: Fix use-after-free bug in jffs2_iget()'s error handling path

2018-04-08 Thread Sasha Levin
From: Jake Daryll Obina [ Upstream commit 5bdd0c6f89fba430e18d636493398389dadc3b17 ] If jffs2_iget() fails for a newly-allocated inode, jffs2_do_clear_inode() can get called twice in the error handling path, the first call in jffs2_iget() itself and the second through iget_failed(). This can res

[PATCH AUTOSEL for 3.18 083/101] ocfs2/acl: use 'ip_xattr_sem' to protect getting extended attribute

2018-04-08 Thread Sasha Levin
From: piaojun [ Upstream commit 16c8d569f5704a84164f30ff01b29879f3438065 ] The race between *set_acl and *get_acl will cause getting incomplete xattr data as below: processAprocessB ocfs2_set_acl ocfs2_xattr_set __ocfs2_xattr_set_handle

[PATCH AUTOSEL for 3.18 081/101] RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure

2018-04-08 Thread Sasha Levin
From: Leon Romanovsky [ Upstream commit b081808a66345ba725b77ecd8d759bee874cd937 ] Failure in XRCD FW deallocation command leaves memory leaked and returns error to the user which he can't do anything about it. This patch changes behavior to always free memory and always return success to the u

[PATCH AUTOSEL for 3.18 085/101] mm/mempolicy: add nodes_empty check in SYSC_migrate_pages

2018-04-08 Thread Sasha Levin
From: Yisheng Xie [ Upstream commit 0486a38bcc4749808edbc848f1bcf232042770fc ] As in manpage of migrate_pages, the errno should be set to EINVAL when none of the node IDs specified by new_nodes are on-line and allowed by the process's current cpuset context, or none of the specified nodes contai

[PATCH AUTOSEL for 3.18 082/101] ocfs2: return -EROFS to mount.ocfs2 if inode block is invalid

2018-04-08 Thread Sasha Levin
From: piaojun [ Upstream commit 025bcbde3634b2c9b316f227fed13ad6ad6817fb ] If metadata is corrupted such as 'invalid inode block', we will get failed by calling 'mount()' and then set filesystem readonly as below: ocfs2_mount ocfs2_initialize_super ocfs2_init_global_system_inodes

[PATCH AUTOSEL for 3.18 078/101] scsi: fas216: fix sense buffer initialization

2018-04-08 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 96d5eaa9bb74d299508d811d865c2c41b38b0301 ] While testing with the ARM specific memset() macro removed, I ran into a compiler warning that shows an old bug: drivers/scsi/arm/fas216.c: In function 'fas216_rq_sns_done': drivers/scsi/arm/fas216.c:2014:40: error

[PATCH AUTOSEL for 3.18 071/101] nfs: Do not convert nfs_idmap_cache_timeout to jiffies

2018-04-08 Thread Sasha Levin
From: Jan Chochol [ Upstream commit cbebc6ef4fc830f4040d4140bf53484812d5d5d9 ] Since commit 57e62324e469 ("NFS: Store the legacy idmapper result in the keyring") nfs_idmap_cache_timeout changed units from jiffies to seconds. Unfortunately sysctl interface was not updated accordingly. As a effec

[PATCH AUTOSEL for 3.18 074/101] kconfig: Fix automatic menu creation mem leak

2018-04-08 Thread Sasha Levin
From: Ulf Magnusson [ Upstream commit ae7440ef0c8013d68c00dad6900e7cce5311bb1c ] expr_trans_compare() always allocates and returns a new expression, giving the following leak outline: ... *Allocate* basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no); ..

[PATCH AUTOSEL for 3.18 073/101] kconfig: Don't leak main menus during parsing

2018-04-08 Thread Sasha Levin
From: Ulf Magnusson [ Upstream commit 0724a7c32a54e3e50d28e19e30c59014f61d4e2c ] If a 'mainmenu' entry appeared in the Kconfig files, two things would leak: - The 'struct property' allocated for the default "Linux Kernel Configuration" prompt. - The string for the T_W

[PATCH AUTOSEL for 3.18 066/101] kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl

2018-04-08 Thread Sasha Levin
From: Paolo Bonzini [ Upstream commit 51776043afa415435c7e4636204fbe4f7edc4501 ] This ioctl is obsolete (it was used by Xenner as far as I know) but still let's not break it gratuitously... Its handler is copying directly into struct kvm. Go through a bounce buffer instead, with the added bene

[PATCH AUTOSEL for 3.18 076/101] btrfs: Fix out of bounds access in btrfs_search_slot

2018-04-08 Thread Sasha Levin
From: Nikolay Borisov [ Upstream commit 9ea2c7c9da13c9073e371c046cbbc45481ecb459 ] When modifying a tree where the root is at BTRFS_MAX_LEVEL - 1 then the level variable is going to be 7 (this is the max height of the tree). On the other hand btrfs_cow_block is always called with "level + 1" as

[PATCH AUTOSEL for 3.18 070/101] dm thin: fix documentation relative to low water mark threshold

2018-04-08 Thread Sasha Levin
From: mulhern [ Upstream commit 9b28a1102efc75d81298198166ead87d643a29ce ] Fixes: 1. The use of "exceeds" when the opposite of exceeds, falls below, was meant. 2. Properly speaking, a table can not exceed a threshold. It emphasizes the important point, which is that it is the userspace daemon's

[PATCH AUTOSEL for 3.18 072/101] watchdog: sp5100_tco: Fix watchdog disable bit

2018-04-08 Thread Sasha Levin
From: Guenter Roeck [ Upstream commit f541c09ebfc61697b586b38c9ebaf4b70defb278 ] According to all published information, the watchdog disable bit for SB800 compatible controllers is bit 1 of PM register 0x48, not bit 2. For the most part that doesn't matter in practice, since the bit has to be c

[PATCH AUTOSEL for 3.18 061/101] ext4: change fast symlink test to not rely on i_blocks

2018-04-08 Thread Sasha Levin
From: Tahsin Erdogan [ Upstream commit 407cd7fb83c0ebabb490190e673d8c71ee7df97e ] ext4_inode_info->i_data is the storage area for 4 types of data: a) Extents data b) Inline data c) Block map d) Fast symlink data (symlink length < 60) Extents data case is positively identified by EXT4_I

[PATCH AUTOSEL for 3.18 067/101] tracing/hrtimer: Fix tracing bugs by taking all clock bases and modes into account

2018-04-08 Thread Sasha Levin
From: Anna-Maria Gleixner [ Upstream commit 91633eed73a3ac37aaece5c8c1f93a18bae616a9 ] So far only CLOCK_MONOTONIC and CLOCK_REALTIME were taken into account as well as HRTIMER_MODE_ABS/REL in the hrtimer_init tracepoint. The query for detecting the ABS or REL timer modes is not valid anymore, i

[PATCH AUTOSEL for 3.18 069/101] tools lib traceevent: Fix get_field_str() for dynamic strings

2018-04-08 Thread Sasha Levin
From: "Steven Rostedt (VMware)" [ Upstream commit d777f8de99b05d399c0e4e51cdce016f26bd971b ] If a field is a dynamic string, get_field_str() returned just the offset/size value and not the string. Have it parse the offset/size correctly to return the actual string. Otherwise filtering fails when

[PATCH AUTOSEL for 3.18 065/101] ASoC: au1x: Fix timeout tests in au1xac97c_ac97_read()

2018-04-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 123af9043e93cb6f235207d260d50f832cdb5439 ] The loop timeout doesn't work because it's a post op and ends with "tmo" set to -1. I changed it from a post-op to a pre-op and I changed the initial the starting value from 5 to 6 so we still iterate 5 times. I l

[PATCH AUTOSEL for 3.18 068/101] PCI: Add function 1 DMA alias quirk for Marvell 9128

2018-04-08 Thread Sasha Levin
From: Alex Williamson [ Upstream commit aa008206634363ef800fbd5f0262016c9ff81dea ] The Marvell 9128 is the original device generating bug 42679, from which many other Marvell DMA alias quirks have been sourced, but we didn't have positive confirmation of the fix on 9128 until now. Link: https:/

[PATCH AUTOSEL for 3.18 059/101] x86/um: thin archives build fix

2018-04-08 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 827880ec260ba048f95fe646b96a205c394fa0f0 ] The linker does not like vdso-syms.lds in input archive files. Make it an extra-y instead. Cc: Jeff Dike Cc: Richard Weinberger Cc: user-mode-linux-de...@lists.sourceforge.net Signed-off-by: Nicholas Piggin Si

[PATCH AUTOSEL for 3.18 060/101] fs: warn in case userspace lied about modprobe return

2018-04-08 Thread Sasha Levin
From: "Luis R. Rodriguez" [ Upstream commit 41124db869b7e00e12052555f8987867ac01d70c ] kmod <= v19 was broken -- it could return 0 to modprobe calls, incorrectly assuming that a kernel module was built-in, whereas in reality the module was just forming in the kernel. The reason for this is an in

[PATCH AUTOSEL for 3.18 063/101] vmlfb: Fix error handling in cr_pll_init()

2018-04-08 Thread Sasha Levin
From: Alexey Khoroshilov [ Upstream commit 6af574e826740bf17663b48ba3f8fadb81d2113f ] There is an error path, where iomemory is left mapped. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Cc: Alan Hourihane Signed-off-by: Bartlomiej Zolnierki

[PATCH AUTOSEL for 3.18 064/101] firewire-ohci: work around oversized DMA reads on JMicron controllers

2018-04-08 Thread Sasha Levin
From: Hector Martin [ Upstream commit 188775181bc05f29372b305ef96485840e351fde ] At least some JMicron controllers issue buggy oversized DMA reads when fetching context descriptors, always fetching 0x20 bytes at once for descriptors which are only 0x10 bytes long. This is often harmless, but can

[PATCH AUTOSEL for 3.18 062/101] irqchip/gic-v3: Honor forced affinity setting

2018-04-08 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit 65a30f8b300107266f316d550f060ccc186201a3 ] Honor the 'force' flag for set_affinity, by selecting a CPU from the given mask (which may not be reported "online" by the cpu_online_mask). Some drivers, like ARM PMU, rely on it. Cc: Marc Zyngier Reported-by:

[PATCH AUTOSEL for 3.18 058/101] arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set()

2018-04-08 Thread Sasha Levin
From: Dave Martin [ Upstream commit 5fbd5fc49fc39ac8433da62d16682a1d0217ea4f ] Now that compat_vfp_get() uses the regset API to copy the FPSCR value out to userspace, compat_vfp_set() looks inconsistent. In particular, compat_vfp_set() will fail if called with kbuf != NULL && ubuf == NULL (whic

[PATCH AUTOSEL for 3.18 052/101] powerpc/fadump: avoid duplicates in crash memory ranges

2018-04-08 Thread Sasha Levin
From: Hari Bathini [ Upstream commit a77af552ccc9d4d54459a39f9e5f7ad307aeb4f9 ] fadump sets up crash memory ranges to be used for creating PT_LOAD program headers in elfcore header. Memory chunk RMA_START through boot memory area size is added as the first memory range because firmware, at the t

[PATCH AUTOSEL for 3.18 054/101] PCI: Enable ECRC only if device supports it

2018-04-08 Thread Sasha Levin
From: Bjorn Helgaas [ Upstream commit 675734baa361cf044033bb60594dea33d8d8da36 ] John reported that an Intel QuickAssist crypto accelerator didn't work in a Dell PowerEdge R730. The problem seems to be that we enabled ECRC when the device doesn't support it: 85:00.0 Co-processor [0b40]: Inte

[PATCH AUTOSEL for 3.18 055/101] MIPS: CPS: Prevent multi-core with dcache aliasing

2018-04-08 Thread Sasha Levin
From: Paul Burton [ Upstream commit 5570ba2ee920de4e7760a2802b842771845b2c32 ] Systems using the MIPS Coherence Manager (CM) cannot support multi-core SMP with dcache aliasing. This is because CPU caches are VIPT, but interventions in CM-based systems provide only the physical address to remote

[PATCH AUTOSEL for 3.18 056/101] MIPS: Handle tlbex-tlbp race condition

2018-04-08 Thread Sasha Levin
From: Paul Burton [ Upstream commit f39878cc5b09c75d35eaf52131e920b872e3feb4 ] In systems where there are multiple actors updating the TLB, the potential exists for a race condition wherein a CPU hits a TLB exception but by the time it reaches a TLBP instruction the affected TLB entry may have b

[PATCH AUTOSEL for 3.18 057/101] arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails

2018-04-08 Thread Sasha Levin
From: Dave Martin [ Upstream commit 53b1a742ed251780267a57415bc955bd50f40c3d ] If get_user() fails when reading the new FPSCR value from userspace in compat_vfp_get(), then garbage* will be written to the task's FPSR and FPCR registers. This patch prevents this by checking the return from get_u

[PATCH AUTOSEL for 3.18 053/101] libertas: Fix lbs_prb_rsp_limit_set()

2018-04-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 69551f5f370cc20342fab17ca54716b6ec7e332d ] The kstrtoul() test was reversed so this always returned -ENOTSUPP. Fixes: 27d7f47756f4 ("net: wireless: replace strict_strtoul() with kstrtoul()") Signed-off-by: Dan Carpenter Reviewed-by: James Cameron Signed-o

[PATCH AUTOSEL for 3.18 051/101] scsi: sun_esp: fix device reference leaks

2018-04-08 Thread Sasha Levin
From: Johan Hovold [ Upstream commit f62f9ffdb5ef683ef8cffb43932fa72cc3713e94 ] Make sure to drop the reference to the dma device taken by of_find_device_by_node() on probe errors and on driver unbind. Fixes: 334ae614772b ("sparc: Kill SBUS DVMA layer.") Signed-off-by: Johan Hovold Signed-off-

[PATCH AUTOSEL for 3.18 052/101] powerpc/fadump: avoid duplicates in crash memory ranges

2018-04-08 Thread Sasha Levin
From: Hari Bathini [ Upstream commit a77af552ccc9d4d54459a39f9e5f7ad307aeb4f9 ] fadump sets up crash memory ranges to be used for creating PT_LOAD program headers in elfcore header. Memory chunk RMA_START through boot memory area size is added as the first memory range because firmware, at the t

[PATCH AUTOSEL for 3.18 049/101] powerpc: Fix /proc/cpuinfo revision for POWER9 DD2

2018-04-08 Thread Sasha Levin
From: Michael Neuling [ Upstream commit 64ebb9a208c6e66316329a6d9101815d1ee06fa9 ] The P9 PVR bits 12-15 don't indicate a revision but instead different chip configurations. From BookIV we have: Bits Configuration 0 :Scale out 12 cores 1 :Scale out 24 cores 2 :Sc

[PATCH AUTOSEL for 3.18 036/101] Btrfs: skip commit transaction if we don't have enough pinned bytes

2018-04-08 Thread Sasha Levin
From: Liu Bo [ Upstream commit 28785f70ef882e4798cd5706066a55dbf7adf80e ] We commit transaction in order to reclaim space from pinned bytes because it could process delayed refs, and in may_commit_transaction(), we check first if pinned bytes are enough for the required space, we then check if t

[PATCH AUTOSEL for 3.18 051/101] scsi: sun_esp: fix device reference leaks

2018-04-08 Thread Sasha Levin
From: Johan Hovold [ Upstream commit f62f9ffdb5ef683ef8cffb43932fa72cc3713e94 ] Make sure to drop the reference to the dma device taken by of_find_device_by_node() on probe errors and on driver unbind. Fixes: 334ae614772b ("sparc: Kill SBUS DVMA layer.") Signed-off-by: Johan Hovold Signed-off-

[PATCH AUTOSEL for 3.18 047/101] arm64: pass endianness info to sparse

2018-04-08 Thread Sasha Levin
From: Luc Van Oostenryck [ Upstream commit bcde519e8c325f3cc1fcf443eb6466e6bb3a3aca ] ARM64 depends on the macro __AARCH64EB__ being defined or not to correctly select or define endian-specific macros, structures or pieces of code. This macro is predefined by the compiler but sparse knows nothi

[PATCH AUTOSEL for 3.18 034/101] drm/mgag200: Fix to always set HiPri for G200e4 V2

2018-04-08 Thread Sasha Levin
From: Mathieu Larouche [ Upstream commit 0cbb738108927916a659b5b0b96e386fcd7cc6e1 ] - Changed the HiPri value for G200e4 to always be 0. - Added Bandwith limitation to block resolution above 1920x1200x60Hz Signed-off-by: Mathieu Larouche Acked-by: Dave Airlie [seanpaul removed some traili

[PATCH AUTOSEL for 3.18 045/101] macvlan: Do not return error when setting the same mac address

2018-04-08 Thread Sasha Levin
From: Vlad Yasevich [ Upstream commit e26f43faa0d79dd06e9e94829696b68b9940c2ee ] The user currently gets an EBUSY error when attempting to set the mac address on a macvlan device to the same value. This should really be a no-op as nothing changes. Catch the condition and return early. Signed-

[PATCH AUTOSEL for 3.18 046/101] sctp: adjust ssthresh when transport is idle

2018-04-08 Thread Sasha Levin
From: Marcelo Ricardo Leitner [ Upstream commit a02d036c027e9070ca27c156f59eb445d5405480 ] RFC 4960 Errata 3.27 identifies that ssthresh should be adjusted to cwnd because otherwise it could cause the transport to lock into congestion avoidance phase specially if ssthresh was previously reduced

Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN

2018-04-08 Thread Zhaoyang Huang
On Sun, Apr 8, 2018 at 8:47 PM, Steven Rostedt wrote: > [ Removing kernel-patch-test, because of annoying "moderator" messages ] > > On Sun, 8 Apr 2018 13:54:59 +0800 > Zhaoyang Huang wrote: > >> On Sun, Apr 8, 2018 at 11:48 AM, Steven Rostedt wrote: >> > On Sun, 8 Apr 2018 10:16:23 +0800 >> >

[PATCH AUTOSEL for 3.18 044/101] veth: Be more robust on network device creation when no attributes

2018-04-08 Thread Sasha Levin
From: Serhey Popovych [ Upstream commit 191cdb3822e5df6b3c8b9f8cb8c4bf93f6cc90c7 ] There are number of problems with configuration peer network device in absence of IFLA_VETH_PEER attributes where attributes for main network device shared with peer. First it is not feasible to configure both ne

[PATCH AUTOSEL for 3.18 041/101] fib_rules: Resolve goto rules target on delete

2018-04-08 Thread Sasha Levin
From: Serhey Popovych [ Upstream commit bdaf32c3ced3d111b692f0af585f880f82d686c5 ] We should avoid marking goto rules unresolved when their target is actually reachable after rule deletion. Consolder following sample scenario: # ip -4 ru sh 0: from all lookup local 32000: from all

[PATCH AUTOSEL for 3.18 042/101] dccp: call inet_add_protocol after register_pernet_subsys in dccp_v4_init

2018-04-08 Thread Sasha Levin
From: Xin Long [ Upstream commit d5494acb88aa9dd1325079c9b8855008a52c19b3 ] Now dccp_ipv4 works as a kernel module. During loading this module, if one dccp packet is being recieved after inet_add_protocol but before register_pernet_subsys in which v4_ctl_sk is initialized, a null pointer derefer

[PATCH AUTOSEL for 3.18 040/101] arm64: pass machine size to sparse

2018-04-08 Thread Sasha Levin
From: Luc Van Oostenryck [ Upstream commit f5d284900c0f960e318a063f4c40826b6e3aa6a8 ] When using sparse on the arm64 tree we get many thousands of warnings like 'constant ... is so big it is unsigned long long' or 'shift too big (32) for type unsigned long'. This happens because by default spars

[PATCH AUTOSEL for 3.18 035/101] r8152: add byte_enable for ocp_read_word function

2018-04-08 Thread Sasha Levin
From: hayeswang [ Upstream commit d8fbd27469fc02049c674de296a3263bef089131 ] Add byte_enable for ocp_read_word() to replace reading 4 bytes data with reading the desired 2 bytes data. This is used to avoid the issue which is described in commit b4d99def0938 ("r8152: remove sram_read"). The orig

[PATCH AUTOSEL for 3.18 037/101] scsi: lpfc: Fix crash after firmware flash when IO is running.

2018-04-08 Thread Sasha Levin
From: James Smart [ Upstream commit 569dbe84a3e769009aa4a5d1030d000168889580 ] OS crashes after the completion of firmware download. Failure in posting SCSI SGL buffers because number of SGL buffers is less than total count. Some of the pending IOs are not completed by driver. SGL buffers for t

[PATCH AUTOSEL for 3.18 039/101] x86/nmi: Fix timeout test in test_nmi_ipi()

2018-04-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit c133c7615751008f6c32ccae7cdfc5ff6e989c35 ] We're supposed to exit the loop with "timeout" set to zero. Signed-off-by: Dan Carpenter Acked-by: Don Zickus Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janit...@vger.kernel.org Fixes

[PATCH AUTOSEL for 3.18 032/101] firmware: dmi_scan: Check DMI structure length

2018-04-08 Thread Sasha Levin
From: Jean Delvare [ Upstream commit a814c3597a6b6040e2ef9459748081a6d5b7312d ] Before accessing DMI data to record it for later, we should ensure that the DMI structures are large enough to contain the data in question. Signed-off-by: Jean Delvare Reviewed-by: Mika Westerberg Cc: Dmitry Toro

[PATCH AUTOSEL for 3.18 029/101] ixgbe: avoid permanent lock of *_PTP_TX_IN_PROGRESS

2018-04-08 Thread Sasha Levin
From: Jacob Keller [ Upstream commit 5fef124d9c75942dc5c2445a3faa8ad37cbf4c82 ] The ixgbe driver uses a state bit lock to avoid handling more than one Tx timestamp request at once. This is required because hardware is limited to a single set of registers for Tx timestamps. The state bit lock is

[PATCH AUTOSEL for 3.18 033/101] i2c: ismt: fix wrong device address when unmap the data buffer

2018-04-08 Thread Sasha Levin
From: Liwei Song [ Upstream commit 17e83549e199d89aace7788a9f11c108671eecf5 ] Fix the following kernel bug: kernel BUG at drivers/iommu/intel-iommu.c:3260! invalid opcode: [#5] PREEMPT SMP Hardware name: Intel Corp. Harcuvar/Server, BIOS HAVLCRB0.X64.0013.D39.1608311820 08/31/2016 task: f

[PATCH AUTOSEL for 3.18 025/101] PCI: Add domain number check to find_smbios_instance_string()

2018-04-08 Thread Sasha Levin
From: Sujith Pandel [ Upstream commit 6c51c82c60991bdbfb937f3bf0cdbe68d042073d ] The function find_smbios_instance_string() does not consider the PCI domain number. As a result, SMBIOS type 41 device type instance would be exported to sysfs for all the PCI domains which have a PCI device with s

[PATCH AUTOSEL for 3.18 030/101] net_sched: move tcf_lock down after gen_replace_estimator()

2018-04-08 Thread Sasha Levin
From: WANG Cong [ Upstream commit 74030603dfd9f76c0f279f19f1dd1ee3028fee7a ] Laura reported a sleep-in-atomic kernel warning inside tcf_act_police_init() which calls gen_replace_estimator() with spinlock protection. It is not necessary in this case, we already have RTNL lock here so it is enoug

[PATCH AUTOSEL for 3.18 028/101] caif: Add sockaddr length check before accessing sa_family in connect handler

2018-04-08 Thread Sasha Levin
From: Mateusz Jurczyk [ Upstream commit 20a3d5bf5e5b13c02450ab6178ec374abd830686 ] Verify that the caller-provided sockaddr structure is large enough to contain the sa_family field, before accessing it in the connect() handler of the AF_CAIF socket. Since the syscall doesn't enforce a minimum si

[PATCH AUTOSEL for 3.18 012/101] sparc64: ldc abort during vds iso boot

2018-04-08 Thread Sasha Levin
From: Jag Raman [ Upstream commit 6c95483b768c62f8ee933ae08a1bdbcb78b5410f ] Orabug: 20902628 When an ldc control-only packet is received during data exchange in read_nonraw(), a new rx head is calculated but the rx queue head is not actually advanced (rx_set_head() is not called) and a branch

[PATCH AUTOSEL for 3.18 002/101] e1000e: Undo e1000e_pm_freeze if __e1000_shutdown fails

2018-04-08 Thread Sasha Levin
From: Chris Wilson [ Upstream commit 833521ebc65b1c3092e5c0d8a97092f98eec595d ] An error during suspend (e100e_pm_suspend), [ 429.994338] ACPI : EC: event blocked [ 429.994633] e1000e: EEE TX LPI TIMER: 0011 [ 430.955451] pci_pm_suspend(): e1000e_pm_suspend+0x0/0x30 [e1000e] returns -2 [

<    1   2   3   4   5   6   7   8   9   10   >