- 31 Jul, 2020 12 commits
-
-
Christoph Hellwig authored
Factor out a path_mount helper that takes a struct path * instead of the actual file name. This will allow to convert the init and devtmpfs code to properly mount based on a kernel pointer instead of relying on the implicit set_fs(KERNEL_DS) during early init. Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Christoph Hellwig authored
Don't bother saving away the pathname and just use the new struct path based utimes helper instead. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Rename utimes_common to vfs_utimes and make it available outside of utimes.c. This will be used by the initramfs unpacking code. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Consolidate the validation of the timespec from the two callers into utimes_common. That means it is done a little later (e.g. after the path lookup), but I can't find anything that requires a specific order of processing the errors. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Split out one helper each for path vs fd based operations. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Fold it into the only remaining caller. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Fold it into the only remaining caller. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Fold it into the only remaining caller. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Just open code it in the two callers. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Just open code it in the only caller. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Don't rely on the implicit set_fs(KERNEL_DS) for ksys_open to work, but instead open a struct file for /dev/console and then install it as FD 0/1/2 manually. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
There is no good reason to mess with file descriptors from in-kernel code, switch the initramfs unpacking to struct file based write instead. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 30 Jul, 2020 7 commits
-
-
Christoph Hellwig authored
There is no point in trying to clean up after unpacking the initramfs failed, as it should never get past the magic number check. In addition the current code only removes file that are direct children of the root entry, which wasn't complete anyway Fixes: df52092f ("fastboot: remove duplicate unpack_to_rootfs()") Reported-by:
Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Christoph Hellwig authored
If initrd support is not enable just print the warning directly instead of hiding the fact that we just failed behind two stub functions. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
The classic initial ramdisk has been replaced by the much more flexible and efficient initramfs a long time. Warn about it being removed soon. Includes a spelling fix from Colin Ian King <colin.king@canonical.com>. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
There is no good reason to mess with file descriptors from in-kernel code, switch the initrd loading to struct file based read and writes instead. Also Pass an explicit offset instead of ->f_pos, and to make that easier, use file scope file structs and offsets everywhere except for identify_ramdisk_image instead of the current strange mix. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
BLKFLSBUF used to be overloaded for the ramdisk driver to free the whole ramdisk, which was completely different behavior compared to all other drivers. But this magic overload got removed in commit ff269568 ("brd: remove support for BLKFLSBUF"), so this call is entirely pointless now. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Remove the special handling for multiple floppies in the initrd code. No one should be using floppies for booting these days. (famous last words..) Includes a spelling fix from Colin Ian King <colin.king@canonical.com>. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 16 Jul, 2020 10 commits
-
-
Christoph Hellwig authored
md_setup_drive knows it works with md devices, so it is rather pointless to open a file descriptor and issue ioctls. Just call directly into the relevant low-level md routines after getting a handle to the device using blkdev_get_by_dev instead. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
NeilBrown <neilb@suse.de> Acked-by:
Song Liu <song@kernel.org> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Move the loop over the possible arrays into the caller to remove a level of indentation for the whole function. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
NeilBrown <neilb@suse.de> Acked-by:
Song Liu <song@kernel.org> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
mdp_major can just move to drivers/md/md.h. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Song Liu <song@kernel.org> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
devfs is long gone, and autoscan works just fine without this these days. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
NeilBrown <neilb@suse.de> Acked-by:
Song Liu <song@kernel.org> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Instead of using a spcial RAID_AUTORUN ioctl that only exists for non-modular builds and is only called from the early init code, just call the actual function directly. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
NeilBrown <neilb@suse.de> Acked-by:
Song Liu <song@kernel.org> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Just like the NFS and CIFS root code this better lives with the driver it is tightly integrated with. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Song Liu <song@kernel.org> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
The only caller of the bstat function becomes cleaner and simpler when open coding the function. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
NeilBrown <neilb@suse.de> Acked-by:
Song Liu <song@kernel.org> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Add a helper for struct file based chmode operations. To be used by the initramfs code soon. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Christoph Hellwig authored
Add a helper for struct file based chown operations. To be used by the initramfs code soon. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Linus Torvalds authored
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux into master Pull clk fixes from Stephen Boyd: "A couple build fixes for issues exposed this merge window and a fix for the eMMC clk on AST2600 SoCs that fixes the rate that is calculated by the clk framework" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: Specify IOMEM dependency for HSDK pll driver clk: AST2600: Add mux for EMMC clock clk: mvebu: ARMADA_AP_CPU_CLK needs to select ARMADA_AP_CP_HELPER
-
- 15 Jul, 2020 7 commits
-
-
Linus Torvalds authored
Merge tag 'platform-drivers-x86-v5.8-2' of git://git.infradead.org/linux-platform-drivers-x86 into master Pull x86 platform driver fixes from Andriy Shevchenko: "Small fixes for this cycle: - Fix procfs handling in Thinkpad ACPI driver - Fix battery management on new ASUS laptops - New IDs (Sapphire Rapids) in ISST tool" * tag 'platform-drivers-x86-v5.8-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: asus-wmi: allow BAT1 battery name platform/x86: ISST: Add new PCI device ids platform/x86: thinkpad_acpi: Revert "Use strndup_user() in dispatch_proc_write()"
-
Linus Torvalds authored
Merge tag 'dmaengine-fix-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine into master Pull dmaengine fixes from Vinod Koul: - update dmaengine tree location to kernel.org - dmatest fix for completing threads - driver fixes for k3dma, fsl-dma, idxd, ,tegra, and few other drivers * tag 'dmaengine-fix-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (21 commits) dmaengine: ioat setting ioat timeout as module parameter dmaengine: fsl-edma: fix wrong tcd endianness for big-endian cpu dmaengine: dmatest: stop completed threads when running without set channel dmaengine: fsl-edma-common: correct DSIZE_32BYTE dmaengine: dw: Initialize channel before each transfer dmaengine: idxd: fix misc interrupt handler thread unmasking dmaengine: idxd: cleanup workqueue config after disabling dmaengine: tegra210-adma: Fix runtime PM imbalance on error dmaengine: mcf-edma: Fix NULL pointer exception in mcf_edma_tx_handler dmaengine: fsl-edma: Fix NULL pointer exception in fsl_edma_tx_handler dmaengine: fsl-edma: Add lockdep assert for exported function dmaengine: idxd: fix hw descriptor fields for delta record dmaengine: ti: k3-udma: add missing put_device() call in of_xudma_dev_get() dmaengine: sh: usb-dmac: set tx_result parameters dmaengine: ti: k3-udma: Fix delayed_work usage for tx drain workaround dmaengine: idxd: fix cdev locking for open and release dmaengine: imx-sdma: Fix: Remove 'always true' comparison MAINTAINERS: switch dmaengine tree to kernel.org dmaengine: ti: k3-udma: Fix the running channel handling in alloc_chan_resources dmaengine: ti: k3-udma: Fix cleanup code for alloc_chan_resources ...
-
Wei Yongjun authored
Fix to return negative error code -ENOMEM from kmalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: f1774cb8 ("X.509: parse public key parameters from x509 for akcipher") Signed-off-by:
Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by:
David Howells <dhowells@redhat.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
David Howells authored
The afs filesystem driver allows unstarted operations to be cancelled by signal, but most of these can easily be restarted (mkdir for example). The primary culprits for reproducing this are those applications that use SIGALRM to display a progress counter. File lock-extension operation is marked uninterruptible as we have a limited time in which to do it, and the release op is marked uninterruptible also as if we fail to unlock a file, we'll have to wait 20 mins before anyone can lock it again. The store operation logs a warning if it gets interruption, e.g.: kAFS: Unexpected error from FS.StoreData -4 because it's run from the background - but it can also be run from fdatasync()-type things. However, store options aren't marked interruptible at the moment. Fix this in the following ways: (1) Mark store operations as uninterruptible. It might make sense to relax this for certain situations, but I'm not sure how to make sure that background store ops aren't affected by signals to foreground processes that happen to trigger them. (2) In afs_get_io_locks(), where we're getting the serialisation lock for talking to the fileserver, return ERESTARTSYS rather than EINTR because a lot of the operations (e.g. mkdir) are restartable if we haven't yet started sending the op to the server. Fixes: e49c7b2f ("afs: Build an abstraction around an "operation" concept") Signed-off-by:
David Howells <dhowells@redhat.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Vasiliy Kupriakov authored
The battery on my laptop ASUS TUF Gaming FX706II is named BAT1. This patch allows battery extension to load. Signed-off-by:
Vasiliy Kupriakov <rublag-ns@yandex.ru> Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
Srinivas Pandruvada authored
Added new PCI device ids for supporting mailbox and MMIO interface for Sapphire Rapids. Signed-off-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
Andy Shevchenko authored
This reverts commit 35d13c7a. This broke procfs interface due to neglecting the fact that the strings are not coming NULL terminated. Revert the change till we will have a better clean up. Fixes: 35d13c7a ("platform/x86: thinkpad_acpi: Use strndup_user() in dispatch_proc_write()") Reported-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
- 14 Jul, 2020 1 commit
-
-
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds authored
Pull input fixes from Dmitry Torokhov: "A few quirks for the Elan touchpad driver, another Thinkpad is being switched over from PS/2 to native RMI4 interface, and we gave a brand new SW_MACHINE_COVER switch definition" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elan_i2c - add more hardware ID for Lenovo laptops Input: i8042 - add Lenovo XiaoXin Air 12 to i8042 nomux list Revert "Input: elants_i2c - report resolution information for touch major" Input: elan_i2c - only increment wakeup count on touch Input: synaptics - enable InterTouch for ThinkPad X1E 1st gen ARM: dts: n900: remove mmc1 card detect gpio Input: add `SW_MACHINE_COVER`
-
- 13 Jul, 2020 2 commits
-
-
git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommuLinus Torvalds authored
Pull iommu fixes from Joerg Roedel: - Fix a use-after-free of the device iommu-group. Found in the arm-smmu driver, but the fix is in generic code. - Fix for the new Allwinner IOMMU driver to use the atomic readl_timeout() variant in IO/TLB flushing code. - A couple of cleanups to fix various compile warnings. * tag 'iommu-fixes-v5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/arm-smmu: Mark qcom_smmu_client_of_match as possibly unused iommu: Fix use-after-free in iommu_release_device iommu/amd: Make amd_iommu_apply_ivrs_quirks() static inline iommu: SUN50I_IOMMU should depend on HAS_DMA iommu/sun50i: Remove unused variable iommu/sun50i: Change the readl timeout to the atomic variant
-
Linus Torvalds authored
Naresh Kamboju reported that the LTP tests can cause warnings on i386 going back all the way to v5.0, and bisected it to commit 2c91bd4a ("mm: speed up mremap by 20x on large regions"). The warning in move_normal_pmd() is actually mostly correct, but we have a very unusual special case at process creation time, when we may move the stack down with an overlapping mode (kind of like a "memmove()" except using the page tables). And when you have just the right condition of "move a large initial stack by the right alignment in the end, but with the early part of the move being only page-aligned", we'll be in a situation where we're trying to move a normal PMD entry on top of an already existing - but now empty - PMD entry. The warning is still worth having, in case it ever triggers other cases, and perhaps as a reminder that we could do the stack move case more efficiently (although it's clearly rare enough that it probably doesn't matter). But make it do WARN_ON_ONCE(), so that you can't flood the logs with it. And add a *big* comment above it to explain and remind us what's going on, because it took some figuring out to see how this could trigger. Kudos to Joel Fernandes for debugging this. Reported-by:
Naresh Kamboju <naresh.kamboju@linaro.org> Debugged-and-acked-by:
Joel Fernandes <joel@joelfernandes.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 12 Jul, 2020 1 commit
-
-
Linus Torvalds authored
-