f2fs: Fix f2fs_truncate_partial_nodes ftrace event
Subsystems (12)
Sasha Levin
maintainerPATCH 1/17 f2fs: Fix f2fs_truncate_partial_nodes ftrace event
From: Douglas Raillard <[email protected]>
[ Upstream commit 0b04d4c0542e8573a837b1d81b94209e48723b25 ]
Fix the nid_t field so that its size is correctly reported in the text format embedded in trace.dat files. As it stands, it is reported as being of size 4:
field:nid_t nid[3]; offset:24; size:4; signed:0;
Instead of 12:
field:nid_t nid[3]; offset:24; size:12; signed:0;
This also fixes the reported offset of subsequent fields so that they match with the actual struct layout.
--- include/trace/events/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/events/f2fs.h +1 -1
@@ -505,7 +505,7 @@ TRACE_EVENT(f2fs_truncate_partial_nodes,TP_STRUCT__entry (__field (dev_t ,dev )__field (ino_t, ino) - __field(nid_t, nid[3]) +__array (nid_t, nid,3 )__field (int, depth)__field (int, err) ),
Signature · 8 lines
2.39.2 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Sasha Levin
maintainerPATCH 4/17 selftests: sigaltstack: fix -Wuninitialized
From: Nick Desaulniers <[email protected]>
[ Upstream commit 05107edc910135d27fe557267dc45be9630bf3dd ]
Building sigaltstack with clang via:
$ ARCH=x86 make LLVM=1 -C tools/testing/selftests/sigaltstack/
produces the following warning:
warning: variable 'sp' is uninitialized when used here [-Wuninitialized] if (sp < (unsigned long)sstack ||
^~
Clang expects these to be declared at global scope; we've fixed this in the kernel proper by using the macro current_stack_pointer. This is defined in different headers for different target architectures, so just create a new header that defines the arch-specific register names for the stack pointer register, and define it for more targets (at least the ones that support current_stack_pointer/ARCH_HAS_CURRENT_STACK_POINTER).
--- .../sigaltstack/current_stack_pointer.h | 23 +++++++++++++++++++ tools/testing/selftests/sigaltstack/sas.c | 7 +----- 2 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 tools/testing/selftests/sigaltstack/current_stack_pointer.h
tools/testing/selftests/sigaltstack/current_stack_pointer.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#if __alpha__ +registerunsigned long sp asm("$30" ); +#elif __arm__ || __aarch64__ || __csky__ || __m68k__ || __mips__ || __riscv +registerunsigned long sp asm("sp" ); +#elif __i386__ +registerunsigned long sp asm("esp" ); +#elif __loongarch64 +registerunsigned long sp asm("$sp" ); +#elif __ppc__ +registerunsigned long sp asm("r1" ); +#elif __s390x__ +registerunsigned long sp asm("%15" ); +#elif __sh__ +registerunsigned long sp asm("r15" ); +#elif __x86_64__ +registerunsigned long sp asm("rsp" ); +#elif __XTENSA__ +registerunsigned long sp asm("a1" ); +#else +#error "implement current_stack_pointer equivalent" +#endif
tools/testing/selftests/sigaltstack/sas.c +1 -6
@@ -20,6 +20,7 @@#include <sys/auxv.h> #include "../kselftest.h" +#include "current_stack_pointer.h" #ifndef SS_AUTODISARM #define SS_AUTODISARM (1U << 31)
@@ -46,12 +47,6 @@ void my_usr1(int sig, siginfo_t *si, void *u)stack_t stk;struct stk_data *p; -#if __s390x__ - registerunsigned long sp asm("%15" ); -#else - registerunsigned long sp asm("sp" ); -#endif -if (sp < (unsigned long )sstack || sp >= (unsigned long )sstack + stack_size) {ksft_exit_fail_msg ("SP is not on sigaltstack\n" );
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 11/17 drm: buddy_allocator: Fix buddy allocator init on 32-bit systems
In reply to Sasha LevinFrom: David Gow <[email protected]>
[ Upstream commit 4453545b5b4c3eff941f69a5530f916d899db025 ]
The drm buddy allocator tests were broken on 32-bit systems, as rounddown_pow_of_two() takes a long, and the buddy allocator handles 64-bit sizes even on 32-bit systems.
This can be reproduced with the drm_buddy_allocator KUnit tests on i386:
./tools/testing/kunit/kunit.py run --arch i386 \ --kunitconfig ./drivers/gpu/drm/tests drm_buddy
(It results in kernel BUG_ON() when too many blocks are created, due to the block size being too small.)
This was independently uncovered (and fixed) by Luís Mendes, whose patch added a new u64 variant of rounddown_pow_of_two(). This version instead recalculates the size based on the order.
--- drivers/gpu/drm/drm_buddy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_buddy.c +2 -2
@@ -146,8 +146,8 @@ int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size)unsigned int order;u64 root_size; - root_size =rounddown_pow_of_two (size); - order =ilog2 (root_size) -ilog2 (chunk_size); + order =ilog2 (size) -ilog2 (chunk_size); + root_size = chunk_size << order; root =drm_block_alloc (mm,NULL , order, offset);if (!root)
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 10/17 nvme-pci: mark Lexar NM760 as IGNORE_DEV_SUBNQN
In reply to Sasha LevinFrom: Juraj Pecigos <[email protected]>
[ Upstream commit 1231363aec86704a6b0467a12e3ca7bdf890e01d ]
A system with more than one of these SSDs will only have one usable. The kernel fails to detect more than one nvme device due to duplicate cntlids.
before:
[ 9.395229] nvme 0000:01:00.0: platform quirk: setting simple suspend [ 9.395262] nvme nvme0: pci function 0000:01:00.0 [ 9.395282] nvme 0000:03:00.0: platform quirk: setting simple suspend [ 9.395305] nvme nvme1: pci function 0000:03:00.0 [ 9.409873] nvme nvme0: Duplicate cntlid 1 with nvme1, subsys nqn.2022-07.com.siliconmotion:nvm-subsystem-sn- , rejecting [ 9.409982] nvme nvme0: Removing after probe failure status: -22 [ 9.427487] nvme nvme1: allocated 64 MiB host memory buffer. [ 9.445088] nvme nvme1: 16/0/0 default/read/poll queues [ 9.449898] nvme nvme1: Ignoring bogus Namespace Identifiers
after:
[ 1.161890] nvme 0000:01:00.0: platform quirk: setting simple suspend [ 1.162660] nvme nvme0: pci function 0000:01:00.0 [ 1.162684] nvme 0000:03:00.0: platform quirk: setting simple suspend [ 1.162707] nvme nvme1: pci function 0000:03:00.0 [ 1.191354] nvme nvme0: allocated 64 MiB host memory buffer. [ 1.193378] nvme nvme1: allocated 64 MiB host memory buffer. [ 1.211044] nvme nvme1: 16/0/0 default/read/poll queues [ 1.211080] nvme nvme0: 16/0/0 default/read/poll queues [ 1.216145] nvme nvme0: Ignoring bogus Namespace Identifiers [ 1.216261] nvme nvme1: Ignoring bogus Namespace Identifiers
Adding the NVME_QUIRK_IGNORE_DEV_SUBNQN quirk to resolves the issue.
--- drivers/nvme/host/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/host/pci.c +2 -1
@@ -3550,7 +3550,8 @@ static const struct pci_device_id nvme_id_table[] = { { PCI_DEVICE(0x1d97, 0x1d97), /* Lexar NM620 */ .driver_data = NVME_QUIRK_BOGUS_NID, }, { PCI_DEVICE(0x1d97, 0x2269), /* Lexar NM760 */ - .driver_data = NVME_QUIRK_BOGUS_NID, }, + .driver_data = NVME_QUIRK_BOGUS_NID | + NVME_QUIRK_IGNORE_DEV_SUBNQN, }, { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061), .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, }, { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 12/17 drm: test: Fix 32-bit issue in drm_buddy_test
In reply to Sasha LevinFrom: David Gow <[email protected]>
[ Upstream commit 25bbe844ef5c4fb4d7d8dcaa0080f922b7cd3a16 ]
The drm_buddy_test KUnit tests verify that returned blocks have sizes which are powers of two using is_power_of_2(). However, is_power_of_2() operations on a 'long', but the block size is a u64. So on systems where long is 32-bit, this can sometimes fail even on correctly sized blocks.
This only reproduces randomly, as the parameters passed to the buddy allocator in this test are random. The seed 0xb2e06022 reproduced it fine here.
For now, just hardcode an is_power_of_2() implementation using x & (x - 1).
--- drivers/gpu/drm/tests/drm_buddy_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/tests/drm_buddy_test.c +2 -1
@@ -89,7 +89,8 @@ static int check_block(struct kunit *test, struct drm_buddy *mm, err = -EINVAL ; } -if (!is_power_of_2 (block_size)) { +/* We can't use is_power_of_2() for a u64 on 32-bit systems. */ +if (block_size & (block_size -1 )) {kunit_err (test,"block size not power of two\n" ); err = -EINVAL ; }
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 13/17 nvme-tcp: fix a possible UAF when failing to allocate an io queue
In reply to Sasha LevinFrom: Sagi Grimberg <[email protected]>
[ Upstream commit 88eaba80328b31ef81813a1207b4056efd7006a6 ]
When we allocate a nvme-tcp queue, we set the data_ready callback before we actually need to use it. This creates the potential that if a stray controller sends us data on the socket before we connect, we can trigger the io_work and start consuming the socket.
In this case reported: we failed to allocate one of the io queues, and as we start releasing the queues that we already allocated, we get a UAF [1] from the io_work which is running before it should really.
Fix this by setting the socket ops callbacks only before we start the queue, so that we can't accidentally schedule the io_work in the initialization phase before the queue started. While we are at it, rename nvme_tcp_restore_sock_calls to pair with nvme_tcp_setup_sock_ops.
[1]:
[16802.107284] nvme nvme4: starting error recovery [16802.109166] nvme nvme4: Reconnecting in 10 seconds... [16812.173535] nvme nvme4: failed to connect socket: -111 [16812.173745] nvme nvme4: Failed reconnect attempt 1 [16812.173747] nvme nvme4: Reconnecting in 10 seconds... [16822.413555] nvme nvme4: failed to connect socket: -111 [16822.413762] nvme nvme4: Failed reconnect attempt 2 [16822.413765] nvme nvme4: Reconnecting in 10 seconds... [16832.661274] nvme nvme4: creating 32 I/O queues. [16833.919887] BUG: kernel NULL pointer dereference, address: 0000000000000088 [16833.920068] nvme nvme4: Failed reconnect attempt 3 [16833.920094] #PF: supervisor write access in kernel mode [16833.920261] nvme nvme4: Reconnecting in 10 seconds... [16833.920368] #PF: error_code(0x0002) - not-present page [16833.921086] Workqueue: nvme_tcp_wq nvme_tcp_io_work [nvme_tcp] [16833.921191] RIP: 0010:_raw_spin_lock_bh+0x17/0x30 ... [16833.923138] Call Trace: [16833.923271] <TASK> [16833.923402] lock_sock_nested+0x1e/0x50 [16833.923545] nvme_tcp_try_recv+0x40/0xa0 [nvme_tcp] [16833.923685] nvme_tcp_io_work+0x68/0xa0 [nvme_tcp] [16833.923824] process_one_work+0x1e8/0x390 [16833.923969] worker_thread+0x53/0x3d0 [16833.924104] ? process_one_work+0x390/0x390 [16833.924240] kthread+0x124/0x150 [16833.924376] ? set_kthread_struct+0x50/0x50 [16833.924518] ret_from_fork+0x1f/0x30 [16833.924655] </TASK>
--- drivers/nvme/host/tcp.c | 46 +++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 20 deletions(-)
drivers/nvme/host/tcp.c +26 -20
@@ -1604,22 +1604,7 @@ static int nvme_tcp_alloc_queue(struct nvme_ctrl *nctrl, int qid)if (ret) goto err_init_connect; - queue->rd_enabled = true;set_bit (NVME_TCP_Q_ALLOCATED , &queue->flags); -nvme_tcp_init_recv_ctx (queue); - -write_lock_bh (&queue->sock->sk->sk_callback_lock); - queue->sock->sk->sk_user_data = queue; - queue->state_change = queue->sock->sk->sk_state_change; - queue->data_ready = queue->sock->sk->sk_data_ready; - queue->write_space = queue->sock->sk->sk_write_space; - queue->sock->sk->sk_data_ready = nvme_tcp_data_ready; - queue->sock->sk->sk_state_change = nvme_tcp_state_change; - queue->sock->sk->sk_write_space = nvme_tcp_write_space; -#ifdef CONFIG_NET_RX_BUSY_POLL - queue->sock->sk->sk_ll_usec =1 ; -#endif -write_unlock_bh (&queue->sock->sk->sk_callback_lock);return 0 ;
@@ -1639,7 +1624,7 @@ static int nvme_tcp_alloc_queue(struct nvme_ctrl *nctrl, int qid)return ret; } -static void nvme_tcp_restore_sock_calls (struct nvme_tcp_queue *queue) +static void nvme_tcp_restore_sock_ops (struct nvme_tcp_queue *queue) {struct socket *sock = queue->sock;
@@ -1654,7 +1639,7 @@ static void nvme_tcp_restore_sock_calls(struct nvme_tcp_queue *queue)static void __nvme_tcp_stop_queue (struct nvme_tcp_queue *queue) {kernel_sock_shutdown (queue->sock,SHUT_RDWR ); -nvme_tcp_restore_sock_calls (queue); +nvme_tcp_restore_sock_ops (queue);cancel_work_sync (&queue->io_work); }
@@ -1672,21 +1657,42 @@ static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)mutex_unlock (&queue->queue_lock); } +static void nvme_tcp_setup_sock_ops (struct nvme_tcp_queue *queue) +{ +write_lock_bh (&queue->sock->sk->sk_callback_lock); + queue->sock->sk->sk_user_data = queue; + queue->state_change = queue->sock->sk->sk_state_change; + queue->data_ready = queue->sock->sk->sk_data_ready; + queue->write_space = queue->sock->sk->sk_write_space; + queue->sock->sk->sk_data_ready = nvme_tcp_data_ready; + queue->sock->sk->sk_state_change = nvme_tcp_state_change; + queue->sock->sk->sk_write_space = nvme_tcp_write_space; +#ifdef CONFIG_NET_RX_BUSY_POLL + queue->sock->sk->sk_ll_usec =1 ; +#endif +write_unlock_bh (&queue->sock->sk->sk_callback_lock); +} +static int nvme_tcp_start_queue (struct nvme_ctrl *nctrl,int idx) {struct nvme_tcp_ctrl *ctrl =to_tcp_ctrl (nctrl); +struct nvme_tcp_queue *queue = &ctrl->queues[idx];int ret; + queue->rd_enabled = true; +nvme_tcp_init_recv_ctx (queue); +nvme_tcp_setup_sock_ops (queue); +if (idx) ret =nvmf_connect_io_queue (nctrl, idx);else ret =nvmf_connect_admin_queue (nctrl);if (!ret) { -set_bit (NVME_TCP_Q_LIVE , &ctrl->queues[idx].flags); +set_bit (NVME_TCP_Q_LIVE , &queue->flags); }else { -if (test_bit (NVME_TCP_Q_ALLOCATED , &ctrl->queues[idx].flags)) -__nvme_tcp_stop_queue (&ctrl->queues[idx]); +if (test_bit (NVME_TCP_Q_ALLOCATED , &queue->flags)) +__nvme_tcp_stop_queue (queue);dev_err (nctrl->device,"failed to connect queue: %d ret=%d\n" , idx, ret); }
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 14/17 xen/netback: use same error messages for same errors
In reply to Sasha LevinFrom: Juergen Gross <[email protected]>
[ Upstream commit 2eca98e5b24d01c02b46c67be05a5f98cc9789b1 ]
Issue the same error message in case an illegal page boundary crossing has been detected in both cases where this is tested.
--- drivers/net/xen-netback/netback.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/xen-netback/netback.c +2 -4
@@ -996,10 +996,8 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,/* No crossing a page as the payload mustn't fragment. */ if (unlikely ((txreq.offset + txreq.size) >XEN_PAGE_SIZE )) { -netdev_err (queue->vif->dev, -"txreq.offset: %u, size: %u, end: %lu\n" , - txreq.offset, txreq.size, - (unsigned long )(txreq.offset&~XEN_PAGE_MASK ) + txreq.size); +netdev_err (queue->vif->dev,"Cross page boundary, txreq.offset: %u, size: %u\n" , + txreq.offset, txreq.size);xenvif_fatal_tx_err (queue->vif);break ; }
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 2/17 platform/x86/intel: vsec: Fix a memory leak in intel_vsec_add_aux
In reply to Sasha LevinFrom: Dongliang Mu <[email protected]>
[ Upstream commit da0ba0ccce54059d6c6b788a75099bfce95126da ]
The first error handling code in intel_vsec_add_aux misses the deallocation of intel_vsec_dev->resource.
Fix this by adding kfree(intel_vsec_dev->resource) in the error handling code.
--- drivers/platform/x86/intel/vsec.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/intel/vsec.c +1 -0
@@ -141,6 +141,7 @@ static int intel_vsec_add_aux(struct pci_dev *pdev, struct intel_vsec_device *in ret =ida_alloc (intel_vsec_dev->ida,GFP_KERNEL );if (ret <0 ) { +kfree (intel_vsec_dev->resource);kfree (intel_vsec_dev);return ret; }
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 6/17 scsi: core: Improve scsi_vpd_inquiry() checks
In reply to Sasha LevinFrom: Damien Le Moal <[email protected]>
[ Upstream commit f0aa59a33d2ac2267d260fe21eaf92500df8e7b4 ]
Some USB-SATA adapters have broken behavior when an unsupported VPD page is
probed: Depending on the VPD page number, a 4-byte header with a valid VPD page number but with a 0 length is returned. Currently, scsi_vpd_inquiry() only checks that the page number is valid to determine if the page is valid, which results in receiving only the 4-byte header for the non-existent page. This error manifests itself very often with page 0xb9 for the Concurrent Positioning Ranges detection done by sd_read_cpr(), resulting in the following error message:
sd 0:0:0:0: [sda] Invalid Concurrent Positioning Ranges VPD page
Prevent such misleading error message by adding a check in scsi_vpd_inquiry() to verify that the page length is not 0.
--- drivers/scsi/scsi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/scsi/scsi.c +9 -2
@@ -314,11 +314,18 @@ static int scsi_vpd_inquiry(struct scsi_device *sdev, unsigned char *buffer,if (result)return -EIO ; -/* Sanity check that we got the page back that we asked for */ +/* +* Sanity check that we got the page back that we asked for and that +* the page size is not 0. +*/ if (buffer[1 ] != page)return -EIO ; -return get_unaligned_be16 (&buffer[2 ]) +4 ; + result =get_unaligned_be16 (&buffer[2 ]); +if (!result) +return -EIO ; + +return result +4 ; }static int scsi_get_vpd_size (struct scsi_device *sdev,u8 page)
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 7/17 net: dsa: b53: mmap: add phy ops
In reply to Sasha LevinFrom: Álvaro Fernández Rojas <[email protected]>
[ Upstream commit 45977e58ce65ed0459edc9a0466d9dfea09463f5 ]
Implement phy_read16() and phy_write16() ops for B53 MMAP to avoid accessing B53_PORT_MII_PAGE registers which hangs the device.
This access should be done through the MDIO Mux bus controller.
--- drivers/net/dsa/b53/b53_mmap.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/net/dsa/b53/b53_mmap.c +14 -0
@@ -216,6 +216,18 @@ static int b53_mmap_write64(struct b53_device *dev, u8 page, u8 reg,return 0 ; } +static int b53_mmap_phy_read16 (struct b53_device *dev,int addr,int reg, +u16 *value) +{ +return -EIO ; +} + +static int b53_mmap_phy_write16 (struct b53_device *dev,int addr,int reg, +u16 value) +{ +return -EIO ; +} +static const struct b53_io_ops b53_mmap_ops = { .read8 = b53_mmap_read8, .read16 = b53_mmap_read16,
@@ -227,6 +239,8 @@ static const struct b53_io_ops b53_mmap_ops = { .write32 = b53_mmap_write32, .write48 = b53_mmap_write48, .write64 = b53_mmap_write64, + .phy_read16 = b53_mmap_phy_read16, + .phy_write16 = b53_mmap_phy_write16, }; static int b53_mmap_probe_of(struct platform_device *pdev,
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 17/17 mtd: spi-nor: fix memory leak when using debugfs_lookup()
In reply to Sasha LevinFrom: Greg Kroah-Hartman <[email protected]>
[ Upstream commit ec738ca127d07ecac6afae36e2880341ec89150e ]
When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To solve this, remove the lookup and create the directory on the first device found, and then remove it when the module is unloaded.
--- drivers/mtd/spi-nor/core.c | 14 +++++++++++++- drivers/mtd/spi-nor/core.h | 2 ++ drivers/mtd/spi-nor/debugfs.c | 11 ++++++++--- 3 files changed, 23 insertions(+), 4 deletions(-)
drivers/mtd/spi-nor/core.c +13 -1
@@ -3272,7 +3272,19 @@ static struct spi_mem_driver spi_nor_driver = { .remove = spi_nor_remove, .shutdown = spi_nor_shutdown, }; -module_spi_mem_driver (spi_nor_driver); + +static int __init spi_nor_module_init (void ) +{ +return spi_mem_driver_register (&spi_nor_driver); +} +module_init (spi_nor_module_init); + +static void __exit spi_nor_module_exit(void) +{ +spi_mem_driver_unregister (&spi_nor_driver); +spi_nor_debugfs_shutdown (); +} +module_exit (spi_nor_module_exit);MODULE_LICENSE ("GPL v2" );MODULE_AUTHOR ("Huang Shijie <[email protected]>" );
drivers/mtd/spi-nor/core.h +2 -0
@@ -709,8 +709,10 @@ static inline struct spi_nor *mtd_to_spi_nor(struct mtd_info *mtd)#ifdef CONFIG_DEBUG_FS void spi_nor_debugfs_register (struct spi_nor *nor); +void spi_nor_debugfs_shutdown (void );#else static inline void spi_nor_debugfs_register (struct spi_nor *nor) {} +static inline void spi_nor_debugfs_shutdown (void ) {}#endif #endif /* __LINUX_MTD_SPI_NOR_INTERNAL_H */
drivers/mtd/spi-nor/debugfs.c +8 -3
@@ -226,13 +226,13 @@ static void spi_nor_debugfs_unregister(void *data) nor->debugfs_root =NULL ; } +static struct dentry *rootdir; +void spi_nor_debugfs_register (struct spi_nor *nor) { -struct dentry *rootdir, *d; +struct dentry *d;int ret; -/* Create rootdir once. Will never be deleted again. */ - rootdir =debugfs_lookup (SPI_NOR_DEBUGFS_ROOT ,NULL );if (!rootdir) rootdir =debugfs_create_dir (SPI_NOR_DEBUGFS_ROOT ,NULL );
@@ -247,3 +247,8 @@ void spi_nor_debugfs_register(struct spi_nor *nor)debugfs_create_file ("capabilities" ,0444 , d, nor, &spi_nor_capabilities_fops); } + +void spi_nor_debugfs_shutdown (void ) +{ +debugfs_remove (rootdir); +}
Signature · 6 lines
2.39.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Sasha Levin
maintainerPATCH 8/17 platform/x86: gigabyte-wmi: add support for B650 AORUS ELITE AX
In reply to Sasha LevinFrom: Thomas Weißschuh <[email protected]>
[ Upstream commit 441d901fbf669f6360566a4437b1e563b854de4a ]
This has been reported as working.
--- drivers/platform/x86/gigabyte-wmi.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/gigabyte-wmi.c +1 -0
@@ -151,6 +151,7 @@ static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B550I AORUS PRO AX" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B550M AORUS PRO-P" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B550M DS3H" ), +DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B650 AORUS ELITE AX" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B660 GAMING X DDR4" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B660I AORUS PRO DDR4" ), DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z390 I AORUS PRO WIFI-CF"),
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 9/17 s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling
In reply to Sasha LevinFrom: Heiko Carstens <[email protected]>
[ Upstream commit f9bbf25e7b2b74b52b2f269216a92657774f239c ]
Return -EFAULT if put_user() for the PTRACE_GET_LAST_BREAK request fails, instead of silently ignoring it.
--- arch/s390/kernel/ptrace.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
arch/s390/kernel/ptrace.c +2 -6
@@ -474,9 +474,7 @@ long arch_ptrace(struct task_struct *child, long request, }return 0 ;case PTRACE_GET_LAST_BREAK : -put_user (child->thread.last_break, - (unsigned long __user *) data); -return 0 ; +return put_user (child->thread.last_break, (unsigned long __user *)data);case PTRACE_ENABLE_TE :if (!MACHINE_HAS_TE )return -EIO ;
@@ -824,9 +822,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, }return 0 ;case PTRACE_GET_LAST_BREAK : -put_user (child->thread.last_break, - (unsigned int __user *) data); -return 0 ; +return put_user (child->thread.last_break, (unsigned int __user *)data); }return compat_ptrace_request (child, request, addr, data); }
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 3/17 platform/x86 (gigabyte-wmi): Add support for A320M-S2H V2
In reply to Sasha LevinFrom: Frank Crawford <[email protected]>
[ Upstream commit b7c994f8c35e916e27c60803bb21457bc1373500 ]
Add support for A320M-S2H V2. Tested using module force_load option.
--- drivers/platform/x86/gigabyte-wmi.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/gigabyte-wmi.c +1 -0
@@ -140,6 +140,7 @@ static u8 gigabyte_wmi_detect_sensor_usability(struct wmi_device *wdev) }}static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = { +DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("A320M-S2H V2-CF" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B450M DS3H-CF" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B450M DS3H WIFI-CF" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B450M S2H V2" ),
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 15/17 platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE
In reply to Sasha LevinFrom: Hans de Goede <[email protected]>
[ Upstream commit 52f91e51944808d83dfe2d5582601b5e84e472cc ]
Add "X570S AORUS ELITE" to known working boards
--- drivers/platform/x86/gigabyte-wmi.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/gigabyte-wmi.c +1 -0
@@ -161,6 +161,7 @@ static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("X570 GAMING X" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("X570 I AORUS PRO WIFI" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("X570 UD" ), +DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("X570S AORUS ELITE" ), DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z690M AORUS ELITE AX DDR4"), { } };
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 16/17 platform/x86: asus-nb-wmi: Add quirk_asus_tablet_mode to other ROG Flow X13 models
In reply to Sasha LevinFrom: weiliang1503 <[email protected]>
[ Upstream commit e352d685fde427a8fc9beb2ba30888f5d6f2e5e6 ]
Make quirk_asus_tablet_mode apply on other ROG Flow X13 devices, which only affects the GV301Q model before.
--- drivers/platform/x86/asus-nb-wmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/platform/x86/asus-nb-wmi.c +2 -1
@@ -464,7 +464,8 @@ static const struct dmi_system_id asus_quirks[] = { .ident = "ASUS ROG FLOW X13", .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), - DMI_MATCH(DMI_PRODUCT_NAME, "GV301Q"), +/* Match GV301** */ + DMI_MATCH(DMI_PRODUCT_NAME, "GV301"), }, .driver_data = &quirk_asus_tablet_mode, },
Signature · 1 line
2.39.2
Sasha Levin
maintainerPATCH 5/17 scsi: megaraid_sas: Fix fw_crash_buffer_show()
In reply to Sasha LevinFrom: Tomas Henzl <[email protected]>
[ Upstream commit 0808ed6ebbc292222ca069d339744870f6d801da ]
If crash_dump_buf is not allocated then crash dump can't be available. Replace logical 'and' with 'or'.
--- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/megaraid/megaraid_sas_base.c +1 -1
@@ -3299,7 +3299,7 @@ fw_crash_buffer_show(struct device *cdev,spin_lock_irqsave (&instance->crashdump_lock, flags); buff_offset = instance->fw_crash_buffer_offset; -if (!instance->crash_dump_buf && +if (!instance->crash_dump_buf || !((instance->fw_crash_state ==AVAILABLE ) || (instance->fw_crash_state ==COPYING ))) { dev_err(&instance->pdev->dev,
Signature · 1 line
2.39.2