aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-07-06mfd: Add Cherry Trail Whiskey Cove PMIC driverHans de Goede3-0/+247
Add mfd driver for Intel CHT Whiskey Cove PMIC, based on various non upstreamed CHT Whiskey Cove PMIC patches. This is a somewhat minimal version which adds irqchip support and cells for: ACPI PMIC opregion support, the i2c-controller driving the external charger irc and the pwrsrc/extcon block. Further cells can be added in the future if/when drivers are upstreamed for them. [The above patch caused a build error on some archetectures] From: Arnd Bergmann <[email protected]> I ran into a build error on ARM with a platform that has a non-standard clk implementation: drivers/clk/clk.o: In function `clk_disable': clk.c:(.text.clk_disable+0x0): multiple definition of `clk_disable' arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_disable+0x0): first defined here drivers/clk/clk.o: In function `clk_enable': clk.c:(.text.clk_enable+0x0): multiple definition of `clk_enable' arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_enable+0x0): first defined here The problem is a device driver that uses 'select COMMON_CLK', which is generally a bad idea: selecting a subsystem should only be done from a platform, otherwise we run into circular dependencies. The same driver also selects 'GPIOLIB' and 'I2C', which has a similar effect. This turns all three into 'depends on', as it should be. Finally, we can limit the build to x86, unless we are compile testing. First patch: Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Lee Jones <[email protected]> Fix for first patch (squashed): Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: tc6393xb: Handle return value of clk_prepare_enableArvind Yadav1-1/+3
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: intel_quark_i2c_gpio: Add support for SIMATIC IOT2000 platformJan Kiszka1-0/+16
The SIMATIC IOT2020 and IOT2040 are derived from the Galileo Gen2 board and share its I2C frequency. Signed-off-by: Sascha Weisenberger <[email protected]> Signed-off-by: Jan Kiszka <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: intel_quark_i2c_gpio: Use dmi_system_id table for retrieving frequencyJan Kiszka1-20/+13
Avoids reimplementation of DMI matching in intel_quark_i2c_setup. Signed-off-by: Jan Kiszka <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: motorola-cpcap: Use devm_of_platform_populate()Benjamin Gaignard1-12/+1
Usage of devm_of_platform_populate() simplify driver code by allowing to delete cpcap_remove(). Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: smsc-ece: Use devm_of_platform_populate()Benjamin Gaignard1-2/+1
Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: qcom-spmi-pmic: Use devm_of_platform_populate()Benjamin Gaignard1-8/+1
Usage of devm_of_platform_populate() simplify driver code by allowing to delete pmic_spmi_remove(). Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: palmas: Use devm_of_platform_populate()Benjamin Gaignard1-1/+1
Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: exynos: Use devm_of_platform_populate()Benjamin Gaignard1-1/+1
Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: fsl-imx25: Use devm_of_platform_populate()Benjamin Gaignard1-4/+1
Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: cros_ec: Use devm_of_platform_populate()Benjamin Gaignard1-1/+1
Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: atmel: Use devm_of_platform_populate()Benjamin Gaignard1-1/+1
Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: stm32-timers: Use devm_of_platform_populate()Benjamin Gaignard1-9/+1
Use devm_of_platform_populate() instead of of_platform_populate() and suppress stm32_timers_remove() which become useless. Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: intel_soc_pmic: Select designware i2c-bus driverHans de Goede1-2/+7
The Crystal Cove PMIC provides an ACPI OPRegion handler, which must be available before other drivers using it are loaded, which is why INTEL_SOC_PMIC is a bool. Just having the driver is not enough, the driver for the i2c-bus must also be built in, to ensure this, this patch adds a select for it. This fixes errors like these during boot: mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA ACPI Error: No handler for Region [REGS] (ffff93543b0cc3a8) [UserDefinedRegion] (20170119/evregion-166) ACPI Error: Region UserDefinedRegion (ID=143) has no handler (20170119/exfldio-299) ACPI Error: Method parse/execution failed [\_SB.PCI0.I2C7.PMI5.GET] (Node ffff93543b0cde10), AE_NOT_EXIST (20170119/psparse-543) ACPI Error: Method parse/execution failed [\_SB.PCI0.SHC1._PS0] (Node ffff93543b0b5cd0), AE_NOT_EXIST (20170119/psparse-543) acpi 80860F14:02: Failed to change power state to D0 While at it this patch also changes the human readable name of the Kconfig option to make clear the INTEL_SOC_PMIC option selects support for the Intel Crystal Cove PMIC and documents why this is a bool. [The above patch caused a build error on some archetectures] From: Arnd Bergmann <[email protected]> I ran into a build error on ARM with a platform that has a non-standard clk implementation: drivers/clk/clk.o: In function `clk_disable': clk.c:(.text.clk_disable+0x0): multiple definition of `clk_disable' arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_disable+0x0): first defined here drivers/clk/clk.o: In function `clk_enable': clk.c:(.text.clk_enable+0x0): multiple definition of `clk_enable' arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_enable+0x0): first defined here The problem is a device driver that uses 'select COMMON_CLK', which is generally a bad idea: selecting a subsystem should only be done from a platform, otherwise we run into circular dependencies. The same driver also selects 'GPIOLIB' and 'I2C', which has a similar effect. This turns all three into 'depends on', as it should be. Finally, we can limit the build to x86, unless we are compile testing. First patch: Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Lee Jones <[email protected]> Fix for first patch (squashed): Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06MAINTAINERS: da9062/61 updates to the Dialog Semiconductor search termsSteve Twiss1-0/+4
Additions to search terms for files supported by Dialog Semiconductor. This update will allow Dialog support to follow files for device tree bindings (onkey, thermal and watchdog) and source code for chip thermal monitoring drivers. Signed-off-by: Steve Twiss <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: fsl-imx25-tsadc: Constify irq_domain_opsTobias Klauser1-1/+1
struct irq_domain_ops is not modified, so it can be made const. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: twl4030-irq: Log an error in twl4030_sih_setup if the module cannot be ↵Uwe Kleine-König1-1/+3
found As silently failing isn't that nice, emit an error message at a place that was silent on failure up to now. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: arizona: Update GPIO binding for newly supported specifiersCharles Keepax1-1/+2
Link to the generic GPIO specifier bindings now that the second cell of the binding has some support in the driver. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: wm831x-spi: Add NULL check before pointer dereferenceGustavo A. R. Silva1-0/+4
Add NULL check before dereferencing pointer of_id in order to avoid a potential NULL pointer dereference. Addresses-Coverity-ID: 1408830 Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: wm831x-i2c: Add NULL check before pointer dereferenceGustavo A. R. Silva1-0/+4
Add NULL check before dereferencing pointer of_id in order to avoid a potential NULL pointer dereference. Addresses-Coverity-ID: 1408829 Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: rtsx: Do retry when DMA transfer errorSteven Feng2-2/+20
The request should be resent when DMA transfer error occurred. For rts5227, the clock rate needs to be reduced when error occurred. Signed-off-by: Steven Feng <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: axp20x: Add axp20x-regulator cell for AXP803Icenowy Zheng1-1/+2
As axp20x-regulator now supports AXP803, add a cell for it. Signed-off-by: Icenowy Zheng <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: rn5t618: Unregister restart handler on removeStefan Agner1-0/+2
Remove the restart handler registered in probe on device remove. Fixes: a370f60a58ec ("mfd: rn5t618: Register restart handler") Signed-off-by: Stefan Agner <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: wm831x: Remove redundant !pdata checksCharles Keepax1-14/+12
Since a copy of the pdata was added into the core struct in commit f6dd8449cd50 ("mfd: wm831x: Add basic device tree binding") the pdata pointer in probe can no longer be NULL. As such remove the redundant checks for this case. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: ipaq-micro: Dump debugging hexdumpsLinus Walleij1-5/+0
These hexdumps get printed no matter if CONFIG_DEBUG is set or not. Just get rid of them. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06mfd: intel-lpss: Add Intel Cannonlake PCI IDsAndy Shevchenko1-0/+24
Intel Cannonlake PCH has the same LPSS than Intel Kabylake. Add the new IDs to the list of supported devices. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2017-07-06Fix trivial misannotationsAl Viro2-3/+3
Signed-off-by: Al Viro <[email protected]>
2017-07-05CIFS: fix circular locking dependencyRabin Vincent1-2/+2
When a CIFS filesystem is mounted with the forcemand option and the following command is run on it, lockdep warns about a circular locking dependency between CifsInodeInfo::lock_sem and the inode lock. while echo foo > hello; do :; done & while touch -c hello; do :; done cifs_writev() takes the locks in the wrong order, but note that we can't only flip the order around because it releases the inode lock before the call to generic_write_sync() while it holds the lock_sem across that call. But, AFAICS, there is no need to hold the CifsInodeInfo::lock_sem across the generic_write_sync() call either, so we can release both the locks before generic_write_sync(), and change the order. ====================================================== WARNING: possible circular locking dependency detected 4.12.0-rc7+ #9 Not tainted ------------------------------------------------------ touch/487 is trying to acquire lock: (&cifsi->lock_sem){++++..}, at: cifsFileInfo_put+0x88f/0x16a0 but task is already holding lock: (&sb->s_type->i_mutex_key#11){+.+.+.}, at: utimes_common+0x3ad/0x870 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sb->s_type->i_mutex_key#11){+.+.+.}: __lock_acquire+0x1f74/0x38f0 lock_acquire+0x1cc/0x600 down_write+0x74/0x110 cifs_strict_writev+0x3cb/0x8c0 __vfs_write+0x4c1/0x930 vfs_write+0x14c/0x2d0 SyS_write+0xf7/0x240 entry_SYSCALL_64_fastpath+0x1f/0xbe -> #0 (&cifsi->lock_sem){++++..}: check_prevs_add+0xfa0/0x1d10 __lock_acquire+0x1f74/0x38f0 lock_acquire+0x1cc/0x600 down_write+0x74/0x110 cifsFileInfo_put+0x88f/0x16a0 cifs_setattr+0x992/0x1680 notify_change+0x61a/0xa80 utimes_common+0x3d4/0x870 do_utimes+0x1c1/0x220 SyS_utimensat+0x84/0x1a0 entry_SYSCALL_64_fastpath+0x1f/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#11); lock(&cifsi->lock_sem); lock(&sb->s_type->i_mutex_key#11); lock(&cifsi->lock_sem); *** DEADLOCK *** 2 locks held by touch/487: #0: (sb_writers#10){.+.+.+}, at: mnt_want_write+0x41/0xb0 #1: (&sb->s_type->i_mutex_key#11){+.+.+.}, at: utimes_common+0x3ad/0x870 stack backtrace: CPU: 0 PID: 487 Comm: touch Not tainted 4.12.0-rc7+ #9 Call Trace: dump_stack+0xdb/0x185 print_circular_bug+0x45b/0x790 __lock_acquire+0x1f74/0x38f0 lock_acquire+0x1cc/0x600 down_write+0x74/0x110 cifsFileInfo_put+0x88f/0x16a0 cifs_setattr+0x992/0x1680 notify_change+0x61a/0xa80 utimes_common+0x3d4/0x870 do_utimes+0x1c1/0x220 SyS_utimensat+0x84/0x1a0 entry_SYSCALL_64_fastpath+0x1f/0xbe Fixes: 19dfc1f5f2ef03a52 ("cifs: fix the race in cifs_writev()") Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: Steve French <[email protected]> Acked-by: Pavel Shilovsky <[email protected]>
2017-07-05cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENTColin Ian King1-1/+1
Currently oparms.create_options is uninitialized and the code is logically or'ing in CREATE_OPEN_BACKUP_INTENT onto a garbage value of oparms.create_options from the stack. Fix this by just setting the value rather than or'ing in the setting. Detected by CoverityScan, CID#1447220 ("Unitialized scale value") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
2017-07-05cifs: Do not modify mid entry after submitting I/O in cifs_call_asyncLong Li1-2/+5
In cifs_call_async, server may respond as soon as I/O is submitted. Because mid entry is freed on the return path, it should not be modified after I/O is submitted. cifs_save_when_sent modifies the sent timestamp in mid entry, and should not be called after I/O. Call it before I/O. Signed-off-by: Long Li <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2017-07-05CIFS: add SFM mapping for 0x01-0x1FBjörn JACKE1-0/+8
Hi, attached patch adds more missing mappings for the 0x01-0x1f range. Please review, if you're fine with it, considere it also for stable. Björn >From a97720c26db2ee77d4e798e3d383fcb6a348bd29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <[email protected]> Date: Wed, 31 May 2017 22:48:41 +0200 Subject: [PATCH] cifs: add SFM mapping for 0x01-0x1F 0x1-0x1F has to be mapped to 0xF001-0xF01F Signed-off-by: Bjoern Jacke <[email protected]> Signed-off-by: Steve French <[email protected]>
2017-07-05cifs: hide unused functionsArnd Bergmann1-1/+2
Some functions are only referenced under an #ifdef, causing a harmless warning: fs/cifs/smb2ops.c:1374:1: error: 'get_smb2_acl' defined but not used [-Werror=unused-function] We could mark them __maybe_unused or add another #ifdef, I picked the second approach here. Fixes: b3fdda4d1e1b ("cifs: Use smb 2 - 3 and cifsacl mount options getacl functions") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Steve French <[email protected]>
2017-07-05cifs: Use smb 2 - 3 and cifsacl mount options getacl functionsShirish Pargaonkar1-0/+116
Fill in smb2/3 query acl functions in ops structures and use them. Signed-off-by: Shirish Pargaonkar <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2017-07-05cifs: prototype declaration and definition for smb 2 - 3 and cifsacl mount ↵Shirish Pargaonkar2-11/+44
options Add definition and declaration of function to get cifs acls when mounting with smb version 2 onwards to 3. Extend/Alter query info function to allocate and return security descriptors within the response. Not yet handling the error case when the size of security descriptors in response to query exceeds SMB2_MAX_BUFFER_SIZE. Signed-off-by: Shirish Pargaonkar <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
2017-07-05CIFS: add CONFIG_CIFS_DEBUG_KEYS to dump encryption keysAurélien Aptel2-3/+34
Add new config option that dumps AES keys to the console when they are generated. This is obviously for debugging purposes only, and should not be enabled otherwise. Signed-off-by: Aurelien Aptel <[email protected]> Signed-off-by: Steve French <[email protected]>
2017-07-05cifs: set mapping error when page writeback fails in writepage or launder_pagesJeff Layton1-5/+7
Signed-off-by: Jeff Layton <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Steve French <[email protected]>
2017-07-05Merge branch 'parisc-4.13-2' of ↵Linus Torvalds3-4/+18
git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull another parisc update from Helge Deller: "Christoph Hellwig provided one patch for the parisc architecture to drop the DMA_ERROR_CODE define from the parisc architecture" * 'parisc-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: ->mapping_error
2017-07-05Merge tag 'arm64-upstream' of ↵Linus Torvalds62-341/+2190
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: - RAS reporting via GHES/APEI (ACPI) - Indirect ftrace trampolines for modules - Improvements to kernel fault reporting - Page poisoning - Sigframe cleanups and preparation for SVE context - Core dump fixes - Sparse fixes (mainly relating to endianness) - xgene SoC PMU v3 driver - Misc cleanups and non-critical fixes * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (75 commits) arm64: fix endianness annotation for 'struct jit_ctx' and friends arm64: cpuinfo: constify attribute_group structures. arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set() arm64: ptrace: Remove redundant overrun check from compat_vfp_set() arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails arm64: fix endianness annotation for __apply_alternatives()/get_alt_insn() arm64: fix endianness annotation in get_kaslr_seed() arm64: add missing conversion to __wsum in ip_fast_csum() arm64: fix endianness annotation in acpi_parking_protocol.c arm64: use readq() instead of readl() to read 64bit entry_point arm64: fix endianness annotation for reloc_insn_movw() & reloc_insn_imm() arm64: fix endianness annotation for aarch64_insn_write() arm64: fix endianness annotation in aarch64_insn_read() arm64: fix endianness annotation in call_undef_hook() arm64: fix endianness annotation for debug-monitors.c ras: mark stub functions as 'inline' arm64: pass endianness info to sparse arm64: ftrace: fix !CONFIG_ARM64_MODULE_PLTS kernels arm64: signal: Allow expansion of the signal frame acpi: apei: check for pending errors when probing GHES entries ...
2017-07-05Merge branch 'for-linus' of ↵Linus Torvalds3-49/+165
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull mnt namespace updates from Eric Biederman: "A big break-through came during this development cycle as a way was found to maintain the existing umount -l semantics while allowing for optimizations that improve the performance. That is represented by the first change in this series moving the reparenting of mounts into their own pass. This has allowed addressing the horrific performance of umount -l on a carefully crafted tree of mounts with locks held (0.06s vs 60s in my testing). What allowed this was not changing where umounts propagate to while propgating umounts. The next change fixes the case where the order of the mount whose umount are being progated visits a tree where the mounts are stacked upon each other in another order. This is weird but not hard to implement. The final change takes advantage of the unchanging mount propgation tree to skip parts of the mount propgation tree that have already been visited. Yielding a very nice speed up in the worst case. There remains one outstanding question about the semantics of umount -l that I am still discussiong with Ram Pai. In practice that area of the semantics was changed by 1064f874abc0 ("mnt: Tuck mounts under others instead of creating shadow/side mounts.") and no regressions have been reported. Still I intend to finish talking that out with him to ensure there is not something a more intense use of mount propagation in the future will not cause to become significant" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: mnt: Make propagate_umount less slow for overlapping mount propagation trees mnt: In propgate_umount handle visiting mounts in any order mnt: In umount propagation reparent in a separate pass
2017-07-05Merge tag 'gfs2-4.13.fixes' of ↵Linus Torvalds14-102/+175
git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull GFS2 updates from Bob Peterson: "We've got eight GFS2 patches for this merge window: - Andreas Gruenbacher has four patches related to cleaning up the GFS2 inode evict process. This is about half of his patches designed to fix a long-standing GFS2 hang related to the inode shrinker: Shrinker calls gfs2 evict, evict calls DLM, DLM requires memory and blocks on the shrinker. These four patches have been well tested. His second set of patches are still being tested, so I plan to hold them until the next merge window, after we have more weeks of testing. The first patch eliminates the flush_delayed_work, which can block. - Andreas's second patch protects setting of gl_object for rgrps with a spin_lock to prevent proven races. - His third patch introduces a centralized mechanism for queueing glock work with better reference counting, to prevent more races. -His fourth patch retains a reference to inode glocks when an error occurs while creating an inode. This keeps the subsequent evict from needing to reacquire the glock, which might call into DLM and block in low memory conditions. - Arvind Yadav has a patch to add const to attribute_group structures. - I have a patch to detect directory entry inconsistencies and withdraw the file system if any are found. Better that than silent corruption. - I have a patch to remove a vestigial variable from glock structures, saving some slab space. - I have another patch to remove a vestigial variable from the GFS2 in-core superblock structure" * tag 'gfs2-4.13.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: GFS2: constify attribute_group structures. gfs2: gfs2_create_inode: Keep glock across iput gfs2: Clean up glock work enqueuing gfs2: Protect gl->gl_object by spin lock gfs2: Get rid of flush_delayed_work in gfs2_evict_inode GFS2: Eliminate vestigial sd_log_flush_wrapped GFS2: Remove gl_list from glock structure GFS2: Withdraw when directory entry inconsistencies are detected
2017-07-05Merge branch 'for-4.13-part1' of ↵Linus Torvalds47-1415/+1723
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "The core updates improve error handling (mostly related to bios), with the usual incremental work on the GFP_NOFS (mis)use removal, refactoring or cleanups. Except the two top patches, all have been in for-next for an extensive amount of time. User visible changes: - statx support - quota override tunable - improved compression thresholds - obsoleted mount option alloc_start Core updates: - bio-related updates: - faster bio cloning - no allocation failures - preallocated flush bios - more kvzalloc use, memalloc_nofs protections, GFP_NOFS updates - prep work for btree_inode removal - dir-item validation - qgoup fixes and updates - cleanups: - removed unused struct members, unused code, refactoring - argument refactoring (fs_info/root, caller -> callee sink) - SEARCH_TREE ioctl docs" * 'for-4.13-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (115 commits) btrfs: Remove false alert when fiemap range is smaller than on-disk extent btrfs: Don't clear SGID when inheriting ACLs btrfs: fix integer overflow in calc_reclaim_items_nr btrfs: scrub: fix target device intialization while setting up scrub context btrfs: qgroup: Fix qgroup reserved space underflow by only freeing reserved ranges btrfs: qgroup: Introduce extent changeset for qgroup reserve functions btrfs: qgroup: Fix qgroup reserved space underflow caused by buffered write and quotas being enabled btrfs: qgroup: Return actually freed bytes for qgroup release or free data btrfs: qgroup: Cleanup btrfs_qgroup_prepare_account_extents function btrfs: qgroup: Add quick exit for non-fs extents Btrfs: rework delayed ref total_bytes_pinned accounting Btrfs: return old and new total ref mods when adding delayed refs Btrfs: always account pinned bytes when dropping a tree block ref Btrfs: update total_bytes_pinned when pinning down extents Btrfs: make BUG_ON() in add_pinned_bytes() an ASSERT() Btrfs: make add_pinned_bytes() take an s64 num_bytes instead of u64 btrfs: fix validation of XATTR_ITEM dir items btrfs: Verify dir_item in iterate_object_props btrfs: Check name_len before in btrfs_del_root_ref btrfs: Check name_len before reading btrfs_get_name ...
2017-07-05Merge branch 'work.memdup_user' of ↵Linus Torvalds7-118/+52
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull memdup_user() conversions from Al Viro: "A fairly self-contained series - hunting down open-coded memdup_user() and memdup_user_nul() instances" * 'work.memdup_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: bpf: don't open-code memdup_user() kimage_file_prepare_segments(): don't open-code memdup_user() ethtool: don't open-code memdup_user() do_ip_setsockopt(): don't open-code memdup_user() do_ipv6_setsockopt(): don't open-code memdup_user() irda: don't open-code memdup_user() xfrm_user_policy(): don't open-code memdup_user() ima_write_policy(): don't open-code memdup_user_nul() sel_write_validatetrans(): don't open-code memdup_user_nul()
2017-07-05fs: remove call_fsync helper functionJeff Layton3-8/+2
Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Carlos Maiolino <[email protected]> Signed-off-by: Jeff Layton <[email protected]>
2017-07-05mm: clean up error handling in write_one_pageJeff Layton1-7/+6
Don't try to check PageError since that's potentially racy and not necessarily going to be set after writepage errors out. Instead, check the mapping for an error after writepage returns. That should also help us detect errors that occurred if the VM tried to clean the page earlier due to memory pressure. Signed-off-by: Jeff Layton <[email protected]> Reviewed-by: Jan Kara <[email protected]>
2017-07-05JFS: do not ignore return code from write_one_page()Dave Kleikamp2-2/+6
There are a couple places where jfs calls write_one_page() where clean recovery is not possible. In these cases, the file system should be marked dirty. To do this, it is now necessary to store the superblock in the metapage structure. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Dave Kleikamp <[email protected]> Cc: Jeff Layton <[email protected]> Cc: Ross Zwisler <[email protected]> Cc: Jan Kara <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Stephen Rothwell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jeff Layton <[email protected]>
2017-07-05mm: drop "wait" parameter from write_one_page()Jeff Layton8-15/+15
The callers all set it to 1. Also, make it clear that this function will not set any sort of AS_* error, and that the caller must do so if necessary. No existing caller uses this on normal files, so none of them need it. Also, add __must_check here since, in general, the callers need to handle an error here in some fashion. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Jeff Layton <[email protected]> Reviewed-by: Ross Zwisler <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Matthew Wilcox <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
2017-07-05Merge branch 'timers-compat' of ↵Linus Torvalds12-171/+287
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull timer-related user access updates from Al Viro: "Continuation of timers-related stuff (there had been more, but my parts of that series are already merged via timers/core). This is more of y2038 work by Deepa Dinamani, partially disrupted by the unification of native and compat timers-related syscalls" * 'timers-compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: posix_clocks: Use get_itimerspec64() and put_itimerspec64() timerfd: Use get_itimerspec64() and put_itimerspec64() nanosleep: Use get_timespec64() and put_timespec64() posix-timers: Use get_timespec64() and put_timespec64() posix-stubs: Conditionally include COMPAT_SYS_NI defines time: introduce {get,put}_itimerspec64 time: add get_timespec64 and put_timespec64
2017-07-05Merge branch 'work.read_write' of ↵Linus Torvalds7-161/+117
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull read/write updates from Al Viro: "Christoph's fs/read_write.c series - consolidation and cleanups" * 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: nfsd: remove nfsd_vfs_read nfsd: use vfs_iter_read/write fs: implement vfs_iter_write using do_iter_write fs: implement vfs_iter_read using do_iter_read fs: move more code into do_iter_read/do_iter_write fs: remove __do_readv_writev fs: remove do_compat_readv_writev fs: remove do_readv_writev
2017-07-05IB/core, opa_vnic, hfi1, mlx5: Properly free rdma_netdevNiranjana Vishwanathapura7-31/+39
IPOIB is calling free_rdma_netdev even though alloc_rdma_netdev has returned -EOPNOTSUPP. Move free_rdma_netdev from ib_device structure to rdma_netdev structure thus ensuring proper cleanup function is called for the rdma net device. Fix the following trace: ib0: Failed to modify QP to ERROR state BUG: unable to handle kernel paging request at 0000000000001d20 IP: hfi1_vnic_free_rn+0x26/0xb0 [hfi1] Call Trace: ipoib_remove_one+0xbe/0x160 [ib_ipoib] ib_unregister_device+0xd0/0x170 [ib_core] rvt_unregister_device+0x29/0x90 [rdmavt] hfi1_unregister_ib_device+0x1a/0x100 [hfi1] remove_one+0x4b/0x220 [hfi1] pci_device_remove+0x39/0xc0 device_release_driver_internal+0x141/0x200 driver_detach+0x3f/0x80 bus_remove_driver+0x55/0xd0 driver_unregister+0x2c/0x50 pci_unregister_driver+0x2a/0xa0 hfi1_mod_cleanup+0x10/0xf65 [hfi1] SyS_delete_module+0x171/0x250 do_syscall_64+0x67/0x150 entry_SYSCALL64_slow_path+0x25/0x25 Reviewed-by: Dennis Dalessandro <[email protected]> Signed-off-by: Niranjana Vishwanathapura <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2017-07-05Merge branch 'work.sys_wait' of ↵Linus Torvalds6-259/+187
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull wait syscall updates from Al Viro: "Consolidating sys_wait* and compat counterparts. Gets rid of set_fs()/double-copy mess, simplifies the whole thing (lifting the copyouts to the syscalls means less headache in the part that does actual work - fewer failure exits, to start with), gets rid of the overhead of field-by-field __put_user()" * 'work.sys_wait' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: osf_wait4: switch to kernel_wait4() waitid(): switch copyout of siginfo to unsafe_put_user() wait_task_zombie: consolidate info logics kill wait_noreap_copyout() lift getrusage() from wait_noreap_copyout() waitid(2): leave copyout of siginfo to syscall itself kernel_wait4()/kernel_waitid(): delay copying status to userland wait4(2)/waitid(2): separate copying rusage to userland move compat wait4 and waitid next to native variants