aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-06-08Merge branch 'work.lookup' of ↵Linus Torvalds1-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull proc_fill_cache regression fix from Al Viro: "Regression fix for proc_fill_cache() braino introduced when switching instantiate() callback to d_splice_alias()" * 'work.lookup' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix proc_fill_cache() in case of d_alloc_parallel() failure
2018-06-08Merge tag 'for-linus-4.18-rc1-tag' of ↵Linus Torvalds10-36/+332
git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: "This contains some minor code cleanups (fixing return types of functions), some fixes for Linux running as Xen PVH guest, and adding of a new guest resource mapping feature for Xen tools" * tag 'for-linus-4.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/PVH: Make GDT selectors PVH-specific xen/PVH: Set up GS segment for stack canary xen/store: do not store local values in xen_start_info xen-netfront: fix xennet_start_xmit()'s return type xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE xen: Change return type to vm_fault_t
2018-06-08vfio: platform: Fix using devices in PM DomainsGeert Uytterhoeven1-0/+10
If a device is part of a PM Domain (e.g. power and/or clock domain), its power state is managed using Runtime PM. Without Runtime PM, the device may not be powered up or clocked, causing subtle failures, crashes, or system lock-ups when the device is accessed by the guest. Fix this by adding Runtime PM support, powering the device when the VFIO device is opened by the guest. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Simon Horman <[email protected]> Acked-by: Eric Auger <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2018-06-08vfio: use match_string() helperYisheng Xie1-8/+3
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Alex Williamson <[email protected]> Cc: [email protected] Signed-off-by: Yisheng Xie <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2018-06-08vfio/mdev: Re-order sysfs attribute creationAlex Williamson1-7/+7
There exists a gap at the end of mdev_device_create() where the device is visible to userspace, but we're not yet ready to handle removal, as triggered through the 'remove' attribute. We handle this properly in mdev_device_remove() with an -EAGAIN return, but we can marginally reduce this gap by adding this attribute as a final step of our sysfs setup. Reviewed-by: Kirti Wankhede <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Acked-by: Halil Pasic <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2018-06-08vfio/mdev: Check globally for duplicate devicesAlex Williamson3-67/+42
When we create an mdev device, we check for duplicates against the parent device and return -EEXIST if found, but the mdev device namespace is global since we'll link all devices from the bus. We do catch this later in sysfs_do_create_link_sd() to return -EEXIST, but with it comes a kernel warning and stack trace for trying to create duplicate sysfs links, which makes it an undesirable response. Therefore we should really be looking for duplicates across all mdev parent devices, or as implemented here, against our mdev device list. Using mdev_list to prevent duplicates means that we can remove mdev_parent.lock, but in order not to serialize mdev device creation and removal globally, we add mdev_device.active which allows UUIDs to be reserved such that we can drop the mdev_list_lock before the mdev device is fully in place. Two behavioral notes; first, mdev_parent.lock had the side-effect of serializing mdev create and remove ops per parent device. This was an implementation detail, not an intentional guarantee provided to the mdev vendor drivers. Vendor drivers can trivially provide this serialization internally if necessary. Second, review comments note the new -EAGAIN behavior when the device, and in particular the remove attribute, becomes visible in sysfs. If a remove is triggered prior to completion of mdev_device_create() the user will see a -EAGAIN error. While the errno is different, receiving an error during this period is not, the previous implementation returned -ENODEV for the same condition. Furthermore, the consistency to the user is improved in the case where mdev_device_remove_ops() returns error. Previously concurrent calls to mdev_device_remove() could see the device disappear with -ENODEV and return in the case of error. Now a user would see -EAGAIN while the device is in this transitory state. Reviewed-by: Kirti Wankhede <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Acked-by: Halil Pasic <[email protected]> Acked-by: Zhenyu Wang <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2018-06-08vfio: platform: Make printed error messages more consistentGeert Uytterhoeven1-3/+2
- Capitalize the first word of error messages, - Unwrap statements that fit on a single line, - Use "VFIO" instead of "vfio" as the error message prefix. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Eric Auger <[email protected]> Acked-by: Eric Auger <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2018-06-08vfio: platform: Fix reset module leak in error pathGeert Uytterhoeven1-5/+10
If the IOMMU group setup fails, the reset module is not released. Fixes: b5add544d677d363 ("vfio, platform: make reset driver a requirement by default") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Eric Auger <[email protected]> Reviewed-by: Simon Horman <[email protected]> Acked-by: Eric Auger <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2018-06-08sample: vfio bochs vbe display (host device for bochs-drm)Gerd Hoffmann3-0/+1420
Display device, demo-ing the vfio dmabuf display interface (VFIO_GFX_PLANE_TYPE_DMABUF). Compatible enough to qemu stdvga that bochs-drm.ko can be used as guest driver. Signed-off-by: Gerd Hoffmann <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2018-06-08sample: vfio mdev display - guest driverGerd Hoffmann3-0/+242
Guest fbdev driver for CONFIG_SAMPLE_VFIO_MDEV_MDPY. Signed-off-by: Gerd Hoffmann <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2018-06-08sample: vfio mdev display - host deviceGerd Hoffmann4-0/+838
Simple framebuffer display, demo-ing the vfio region display interface (VFIO_GFX_PLANE_TYPE_REGION). Signed-off-by: Gerd Hoffmann <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2018-06-08vfio/type1: Fix task tracking for QEMU vCPU hotplugAlex Williamson1-26/+47
MAP_DMA ioctls might be called from various threads within a process, for example when using QEMU, the vCPU threads are often generating these calls and we therefore take a reference to that vCPU task. However, QEMU also supports vCPU hotplug on some machines and the task that called MAP_DMA may have exited by the time UNMAP_DMA is called, resulting in the mm_struct pointer being NULL and thus a failure to match against the existing mapping. To resolve this, we instead take a reference to the thread group_leader, which has the same mm_struct and resource limits, but is less likely exit, at least in the QEMU case. A difficulty here is guaranteeing that the capabilities of the group_leader match that of the calling thread, which we resolve by tracking CAP_IPC_LOCK at the time of calling rather than at an indeterminate time in the future. Potentially this also results in better efficiency as this is now recorded once per MAP_DMA ioctl. Reported-by: Xu Yandong <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2018-06-08dm: add writecache targetMikulas Patocka4-0/+2385
The writecache target caches writes on persistent memory or SSD. It is intended for databases or other programs that need extremely low commit latency. The writecache target doesn't cache reads because reads are supposed to be cached in page cache in normal RAM. If persistent memory isn't available this target can still be used in SSD mode. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Colin Ian King <[email protected]> # fix missing goto Signed-off-by: Ross Zwisler <[email protected]> # fix compilation issue with !DAX Signed-off-by: Dan Carpenter <[email protected]> # use msecs_to_jiffies Acked-by: Dan Williams <[email protected]> # reworks to unify ARM and x86 flushing Signed-off-by: Mike Snitzer <[email protected]>
2018-06-08dm: adjust structure members to improve alignmentMike Snitzer9-73/+79
Eliminate most holes in DM data structures that were modified by commit 6f1c819c21 ("dm: convert to bioset_init()/mempool_init()"). Also prevent structure members from unnecessarily spanning cache lines. Signed-off-by: Mike Snitzer <[email protected]>
2018-06-08Merge branch 'regulator-4.17' into regulator-4.18 merge windowMark Brown2-3/+20
2018-06-08net: stmmac: fix build failure due to missing COMMON_CLK dependencyCorentin Labbe1-5/+5
This patch fix the build failure on m68k; drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.o: In function `ipq806x_gmac_probe': dwmac-ipq806x.c:(.text+0xda): undefined reference to `clk_set_rate' drivers/net/ethernet/stmicro/stmmac/dwmac-rk.o: In function `rk_gmac_probe': dwmac-rk.c:(.text+0x1e58): undefined reference to `clk_set_rate' drivers/net/ethernet/stmicro/stmmac/dwmac-sti.o: In function `stid127_fix_retime_src': dwmac-sti.c:(.text+0xd8): undefined reference to `clk_set_rate' dwmac-sti.c:(.text+0x114): undefined reference to `clk_set_rate' drivers/net/ethernet/stmicro/stmmac/dwmac-sti.o:dwmac-sti.c:(.text+0x12c): more undefined references to `clk_set_rate' follow Lots of stmmac platform drivers need COMMON_CLK in their Kconfig depends. Signed-off-by: Corentin Labbe <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-06-08md: Unify mddev destruction pathsKent Overstreet1-35/+18
Previously, mddev_put() had a couple different paths for freeing a mddev, due to the fact that the kobject wasn't initialized when the mddev was first allocated. If we move the kobject_init() to when it's first allocated and just use kobject_add() later, we can clean all this up. This also removes a hack in mddev_put() to avoid freeing biosets under a spinlock, which involved copying biosets on the stack after the reset bioset_init() changes. Signed-off-by: Kent Overstreet <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2018-06-08dm: report which conflicting type caused error during table_load()Mike Snitzer1-1/+2
Eases troubleshooting to know the before vs after types. Signed-off-by: Mike Snitzer <[email protected]>
2018-06-08PCI/AER: Remove forward declarationsBjorn Helgaas1-16/+11
Reorder code to remove forward declarations. No functional change intended. Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Keith Busch <[email protected]>
2018-06-08dm: use bioset_init_from_src() to copy bio_setJens Axboe1-6/+16
We can't just copy and clear a bio_set, use the bio helper to setup a new bio_set with the settings from another one. Fixes: 6f1c819c219f ("dm: convert to bioset_init()/mempool_init()") Reported-by: Venkat R.B <[email protected]> Tested-by: Venkat R.B <[email protected]> Tested-by: Li Wang <[email protected]> Reviewed-by: Mike Snitzer <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2018-06-08block: add bioset_init_from_src() helperJens Axboe2-0/+19
Add a helper that allows a caller to initialize a new bio_set, using the settings from an existing bio_set. Reported-by: Venkat R.B <[email protected]> Tested-by: Venkat R.B <[email protected]> Tested-by: Li Wang <[email protected]> Reviewed-by: Mike Snitzer <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2018-06-08PCI: Collect all native drivers under drivers/pci/controller/Shawn Lin64-79/+75
Native PCI drivers for root complex devices were originally all in drivers/pci/host/. Some of these devices can also be operated in endpoint mode. Drivers for endpoint mode didn't seem to fit in the "host" directory, so we put both the root complex and endpoint drivers in per-device directories, e.g., drivers/pci/dwc/, drivers/pci/cadence/, etc. These per-device directories contain trivial Kconfig and Makefiles and clutter drivers/pci/. Make a new drivers/pci/controllers/ directory and collect all the device-specific drivers there. No functional change intended. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Shawn Lin <[email protected]> [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas <[email protected]>
2018-06-08arm64: Fix syscall restarting around signal suppressed by tracerDave Martin1-2/+3
Commit 17c2895 ("arm64: Abstract syscallno manipulation") abstracts out the pt_regs.syscallno value for a syscall cancelled by a tracer as NO_SYSCALL, and provides helpers to set and check for this condition. However, the way this was implemented has the unintended side-effect of disabling part of the syscall restart logic. This comes about because the second in_syscall() check in do_signal() re-evaluates the "in a syscall" condition based on the updated pt_regs instead of the original pt_regs. forget_syscall() is explicitly called prior to the second check in order to prevent restart logic in the ret_to_user path being spuriously triggered, which means that the second in_syscall() check always yields false. This triggers a failure in tools/testing/selftests/seccomp/seccomp_bpf.c, when using ptrace to suppress a signal that interrups a nanosleep() syscall. Misbehaviour of this type is only expected in the case where a tracer suppresses a signal and the target process is either being single-stepped or the interrupted syscall attempts to restart via -ERESTARTBLOCK. This patch restores the old behaviour by performing the in_syscall() check only once at the start of the function. Fixes: 17c289586009 ("arm64: Abstract syscallno manipulation") Signed-off-by: Dave Martin <[email protected]> Reported-by: Sumit Semwal <[email protected]> Cc: Will Deacon <[email protected]> Cc: <[email protected]> # 4.14.x- Signed-off-by: Catalin Marinas <[email protected]>
2018-06-08platform/x86: silead_dmi: Add entry for Chuwi Hi8 tablet touchscreenyuk71-0/+9
Add entry for Chuwi Hi8 S806_206 tablet touchscreen. Signed-off-by: Haruka Kawajiri <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2018-06-08gcov: remove CONFIG_GCOV_FORMAT_AUTODETECTMasahiro Yamada2-14/+5
CONFIG_GCOV_FORMAT_AUTODETECT compiles either gcc_3_4.c or gcc_4_7.c according to your GCC version. We can achieve the equivalent behavior by setting reasonable dependency with the knowledge of the compiler version. If GCC older than 4.7 is used, GCOV_FORMAT_3_4 is the default, but users are still allowed to select GCOV_FORMAT_4_7 in case the newer format is back-ported. On the other hand, If GCC 4.7 or newer is used, there is no reason to use GCOV_FORMAT_3_4, so it should be hidden. If you downgrade the compiler to GCC 4.7 or older, oldconfig/syncconfig will display a prompt for the choice because GCOV_FORMAT_3_4 becomes visible as a new symbol. Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Peter Oberparleiter <[email protected]> Reviewed-by: Kees Cook <[email protected]>
2018-06-08arm64: move GCC version check for ARCH_SUPPORTS_INT128 to KconfigMasahiro Yamada2-6/+1
This becomes much neater in Kconfig. Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Will Deacon <[email protected]> Reviewed-by: Kees Cook <[email protected]>
2018-06-08kconfig: add CC_IS_CLANG and CLANG_VERSIONMasahiro Yamada2-14/+11
This will be useful to describe the clang version dependency. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Kees Cook <[email protected]>
2018-06-08kconfig: add CC_IS_GCC and GCC_VERSIONMasahiro Yamada1-0/+8
This will be useful to specify the required compiler version, like this: config FOO bool "Use Foo" depends on GCC_VERSION >= 40800 help This feature requires GCC 4.8 or newer. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Kees Cook <[email protected]>
2018-06-08stack-protector: test compiler capability in Kconfig and drop AUTO modeMasahiro Yamada5-120/+28
Move the test for -fstack-protector(-strong) option to Kconfig. If the compiler does not support the option, the corresponding menu is automatically hidden. If STRONG is not supported, it will fall back to REGULAR. If REGULAR is not supported, it will be disabled. This means, AUTO is implicitly handled by the dependency solver of Kconfig, hence removed. I also turned the 'choice' into only two boolean symbols. The use of 'choice' is not a good idea here, because all of all{yes,mod,no}config would choose the first visible value, while we want allnoconfig to disable as many features as possible. X86 has additional shell scripts in case the compiler supports those options, but generates broken code. I added CC_HAS_SANE_STACKPROTECTOR to test this. I had to add -m32 to gcc-x86_32-has-stack-protector.sh to make it work correctly. Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Kees Cook <[email protected]>
2018-06-08kbuild: fix endless syncconfig in case arch Makefile sets CROSS_COMPILEMasahiro Yamada1-24/+30
Commit 21c54b774744 ("kconfig: show compiler version text in the top comment") was intended to detect the compiler upgrade, but Geert reported a breakage on the m68k build. The compiler upgrade is detected by the change of the environment variable, CC_VERSION_TEXT, which contains the first line of the output from $(CC) --version. Currently, this works well when CROSS_COMPILE is given via the environment variable or the Make command line. However, some architectures such as m68k can specify CROSS_COMPILE from arch/$(SRCARCH)/Makefile as well. In this case, "make ARCH=m68k" ends up with endless syncconfig loop. $ make ARCH=m68k defconfig *** Default configuration is based on 'multi_defconfig' # # configuration written to .config # $ make ARCH=m68k scripts/kconfig/conf --syncconfig Kconfig scripts/kconfig/conf --syncconfig Kconfig scripts/kconfig/conf --syncconfig Kconfig scripts/kconfig/conf --syncconfig Kconfig Things are happening like this: Because arch/$(SRCARCH)/Makefile is included after CC_VERSION_TEXT is set, it contains the host compiler version in the defconfig phase. To create or update auto.conf, the following line is triggered: include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig This recurses the top Makefile after arch/$(SRCARCH)/Makefile is included. CROSS_COMPILE is set to a m68k toolchain prefix and exported to the recursed Make. Then, syncconfig is invoked with the target compiler version in CC_VERSION_TEXT. The Make will restart because auto.conf and auto.conf.cmd have been updated. At this point, CROSS_COMPILE is reset, so CC_VERSION_TEXT is set to the host compiler version again. Then, syncconfig is triggered due to the change of CC_VERSION_TEXT. This loop continues eternally. To fix this problem, $(CC_VERSION_TEXT) must be evaluated only after arch/$(SRCARCH)/Makefile. Setting it earlier is OK as long as it is defined by using the '=' operator instead of ':='. For the defconfig phase, $(CC_VERSION_TEXT) is evaluated when Kbuild descends into scripts/kconfig/, so it contains the target compiler version correctly. include/config/auto.conf.cmd references $(CC_VERSION_TEXT) as well, so it must be included after arch/$(SRCARCH)/Makefile. Fixes: 21c54b774744 ("kconfig: show compiler version text in the top comment") Reported-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]>
2018-06-08cpufreq: governors: Fix long idle detection logic in load calculationChen Yu1-7/+5
According to current code implementation, detecting the long idle period is done by checking if the interval between two adjacent utilization update handlers is long enough. Although this mechanism can detect if the idle period is long enough (no utilization hooks invoked during idle period), it might not cover a corner case: if the task has occupied the CPU for too long which causes no context switches during that period, then no utilization handler will be launched until this high prio task is scheduled out. As a result, the idle_periods field might be calculated incorrectly because it regards the 100% load as 0% and makes the conservative governor who uses this field confusing. Change the detection to compare the idle_time with sampling_rate directly. Reported-by: Artem S. Tashkinov <[email protected]> Signed-off-by: Chen Yu <[email protected]> Acked-by: Viresh Kumar <[email protected]> Cc: All applicable <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-06-08cpufreq: intel_pstate: enable boost for Skylake XeonSrinivas Pandruvada1-0/+10
Enable HWP boost on Skylake server and workstations. Reported-by: Mel Gorman <[email protected]> Tested-by: Giovanni Gherdovich <[email protected]> Signed-off-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-06-08Merge branch 'for-4.18/wacom' into for-linusJiri Kosina1-35/+39
Support for "In Range" flag for Wacom Intuos/Bamboo devices from Jason Gerecke
2018-06-08Merge branch 'for-4.18/upstream' into for-linusJiri Kosina1-1/+0
2018-06-08Merge branch 'for-4.18/rmi' into for-linusJiri Kosina1-0/+20
RMI4 correct split report handling from Benjamin Tissoires
2018-06-08Merge branch 'for-4.18/plantronics' into for-linusJiri Kosina1-1/+5
2018-06-08Merge branch 'for-4.18/multitouch' into for-linusJiri Kosina7-134/+281
- improvement of duplicate usage handling in hid-input from Benjamin Tissoires - Win 8.1 precisioun touchpad spec implementation from Benjamin Tissoires
2018-06-08Merge branch 'for-4.18/i2c-hid' into for-linusJiri Kosina1-8/+25
Assorted smaller fixes to i2c-hid driver
2018-06-08Merge branch 'for-4.18/hid-steam' into for-linusJiri Kosina961-5217/+10338
Valve Steam Controller support from Rodrigo Rivas Costa
2018-06-08Merge branch 'for-4.18/hid-redragon' into for-linusJiri Kosina4-0/+95
Redragon Asura support from Robert Munteanu
2018-06-08Merge branch 'for-4.18/alps' into for-linusJiri Kosina4603-104485/+178005
hid-alps driver cleanups wrt. t4_read_write_register() handling from Christophe Jaillet
2018-06-08Merge tag 'drm-misc-next-fixes-2018-05-31' of ↵Dave Airlie2-0/+2
git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next-fixes for v4.18: Driver changes: - Plug small memory leak in vc4. (anholt) - Depend on MMU in v3d. (arnd) Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-06-08Merge tag 'drm-msm-next-2018-06-04' of ↵Dave Airlie13-352/+177
git://people.freedesktop.org/~robclark/linux into drm-next A bunch of msm fixes and some atomic work. Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvXe157nd70=GPjre=HjiAH91tGM50+XtM59b2MEChvXQ@mail.gmail.com
2018-06-08fix proc_fill_cache() in case of d_alloc_parallel() failureAl Viro1-3/+3
If d_alloc_parallel() returns ERR_PTR(...), we don't want to dput() that. Small reorganization allows to have all error-in-lookup cases rejoin the main codepath after dput(child), avoiding the entire problem. Spotted-by: Tetsuo Handa <[email protected]> Fixes: 0168b9e38c42 "procfs: switch instantiate_t to d_splice_alias()" Signed-off-by: Al Viro <[email protected]>
2018-06-07cifs: fix a buffer leak in smb2_query_symlinkRonnie Sahlberg6-29/+39
This leak was introduced in 91cb74f5142c14dd921ab2d064b7b128054f9fae and caused us to leak one small buffer for every symlink query. Signed-off-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]>
2018-06-07scsi: qla2xxx: Mask off Scope bits in retry delayAnil Gurumurthy1-2/+6
Some newer target uses "Status Qualifier" response in a returned "Busy Status". This new response code of 0x4001, which is "Scope" bits, translates to "Affects all units accessible by target". Due to this new value returned in the Scope bits, driver was using that value as timeout value which resulted into driver waiting for 27min timeout. This patch masks off this Scope bits so that driver does not use this value as retry delay time. Cc: <[email protected]> Signed-off-by: Anil Gurumurthy <[email protected]> Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Reviewed-by: Martin Wilck <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-06-07scsi: qla2xxx: Fix crash on qla2x00_mailbox_commandRodrigo R. Galvao1-0/+8
This patch fixes a crash on qla2x00_mailbox_command caused when the driver is on UNLOADING state and tries to call qla2x00_poll, which triggers a NULL pointer dereference. Signed-off-by: Rodrigo R. Galvao <[email protected]> Signed-off-by: Mauro S. M. Rodrigues <[email protected]> Acked-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-06-07scsi: aic7xxx: aic79xx: fix potential null pointer dereference on ahdColin Ian King1-4/+4
If AHD_DEBUG is enabled and ahd_platform_alloc fails then ahd is set to null and the debug printk dereferences ahd when passing it to ahd_name. Fix this by moving the debug printk to before the call to ahd_platform_alloc where ahd is not null at that point. Detected by CoverityScan, CID#100296 ("Explicit null dereference") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-06-07Merge branch 'akpm' (patches from Andrew)Linus Torvalds147-2066/+2945
Merge updates from Andrew Morton: - a few misc things - ocfs2 updates - v9fs updates - MM - procfs updates - lib/ updates - autofs updates * emailed patches from Andrew Morton <[email protected]>: (118 commits) autofs: small cleanup in autofs_getpath() autofs: clean up includes autofs: comment on selinux changes needed for module autoload autofs: update MAINTAINERS entry for autofs autofs: use autofs instead of autofs4 in documentation autofs: rename autofs documentation files autofs: create autofs Kconfig and Makefile autofs: delete fs/autofs4 source files autofs: update fs/autofs4/Makefile autofs: update fs/autofs4/Kconfig autofs: copy autofs4 to autofs autofs4: use autofs instead of autofs4 everywhere autofs4: merge auto_fs.h and auto_fs4.h fs/binfmt_misc.c: do not allow offset overflow checkpatch: improve patch recognition lib/ucs2_string.c: add MODULE_LICENSE() lib/mpi: headers cleanup lib/percpu_ida.c: use _irqsave() instead of local_irq_save() + spin_lock lib/idr.c: remove simple_ida_lock lib/bitmap.c: micro-optimization for __bitmap_complement() ...
2018-06-07autofs: small cleanup in autofs_getpath()Dan Carpenter1-3/+3
We don't set "*name" so it's slightly nicer to just pass "name" instead of "&name". Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Dan Carpenter <[email protected]> Acked-by: "Eric W. Biederman" <[email protected]> Acked-by: Ian Kent <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>