* [PATCH 0/2] s390/dasd: two small fixes
@ 2024-11-08 13:39 Stefan Haberland
2024-11-08 13:39 ` [PATCH 1/2] s390/dasd: fix redundant /proc/dasd* entries removal Stefan Haberland
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stefan Haberland @ 2024-11-08 13:39 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-block, Jan Hoeppner, linux-s390, Heiko Carstens,
Vasily Gorbik, Christian Borntraeger, Miroslav Franc,
Yu Jiaoliang
Hi Jens,
please apply the following two small fixes for the upcoming merge window.
Thanks.
Miroslav Franc (1):
s390/dasd: fix redundant /proc/dasd* entries removal
Yu Jiaoliang (1):
s390/dasd: Fix typo in comment
drivers/s390/block/dasd.c | 2 +-
drivers/s390/block/dasd_devmap.c | 2 +-
drivers/s390/block/dasd_eckd.c | 2 +-
drivers/s390/block/dasd_proc.c | 5 +++++
4 files changed, 8 insertions(+), 3 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] s390/dasd: fix redundant /proc/dasd* entries removal
2024-11-08 13:39 [PATCH 0/2] s390/dasd: two small fixes Stefan Haberland
@ 2024-11-08 13:39 ` Stefan Haberland
2024-11-08 13:39 ` [PATCH 2/2] s390/dasd: Fix typo in comment Stefan Haberland
2024-11-10 3:07 ` [PATCH 0/2] s390/dasd: two small fixes Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Haberland @ 2024-11-08 13:39 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-block, Jan Hoeppner, linux-s390, Heiko Carstens,
Vasily Gorbik, Christian Borntraeger, Miroslav Franc,
Yu Jiaoliang
From: Miroslav Franc <mfranc@suse.cz>
In case of an early failure in dasd_init, dasd_proc_init is never
called and /proc/dasd* files are never created. That can happen, for
example, if an incompatible or incorrect argument is provided to the
dasd_mod.dasd= kernel parameter.
However, the attempted removal of /proc/dasd* files causes 8 warnings
and backtraces in this case. 4 on the error path within dasd_init and
4 when the dasd module is unloaded. Notice the "removing permanent
/proc entry 'devices'" message that is caused by the dasd_proc_exit
function trying to remove /proc/devices instead of /proc/dasd/devices
since dasd_proc_root_entry is NULL and /proc/devices is indeed
permanent. Example:
------------[ cut here ]------------
removing permanent /proc entry 'devices'
WARNING: CPU: 6 PID: 557 at fs/proc/generic.c:701 remove_proc_entry+0x22e/0x240
CPU: 6 PID: 557 Comm: modprobe Not tainted 6.10.5-1-default #1
openSUSE Tumbleweed f6917bfd6e5a5c7a7e900e0e3b517786fb5c6301
Hardware name: QEMU 8561 QEMU (KVM/Linux)
Krnl PSW : 0704c00180000000 000003fffed0e9f2 (remove_proc_entry+0x232/0x240)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3
Krnl GPRS: 000003ff00000027 000003ff00000023 0000000000000028 000002f200000000
000002f3f05bec20 0000037ffecfb7d0 000003ffffdabab0 000003ff7ee4ec72
000003ff7ee4ec72 0000000000000007 000002f280e22600 000002f280e22688
000003ffa252cfa0 0000000000010000 000003fffed0e9ee 0000037ffecfba38
Krnl Code: 000003fffed0e9e2: c020004e7017 larl %r2,000003ffff6dca10
000003fffed0e9e8: c0e5ffdfad24 brasl %r14,000003fffe904430
#000003fffed0e9ee: af000000 mc 0,0
>000003fffed0e9f2: a7f4ff4c brc 15,000003fffed0e88a
000003fffed0e9f6: 0707 bcr 0,%r7
000003fffed0e9f8: 0707 bcr 0,%r7
000003fffed0e9fa: 0707 bcr 0,%r7
000003fffed0e9fc: 0707 bcr 0,%r7
Call Trace:
[<000003fffed0e9f2>] remove_proc_entry+0x232/0x240
([<000003fffed0e9ee>] remove_proc_entry+0x22e/0x240)
[<000003ff7ef5a084>] dasd_proc_exit+0x34/0x60 [dasd_mod]
[<000003ff7ef560c2>] dasd_exit+0x22/0xc0 [dasd_mod]
[<000003ff7ee5a26e>] dasd_init+0x26e/0x280 [dasd_mod]
[<000003fffe8ac9d0>] do_one_initcall+0x40/0x220
[<000003fffe9bc758>] do_init_module+0x78/0x260
[<000003fffe9bf3a6>] __do_sys_init_module+0x216/0x250
[<000003ffff37ac9e>] __do_syscall+0x24e/0x2d0
[<000003ffff38cca8>] system_call+0x70/0x98
Last Breaking-Event-Address:
[<000003fffef7ea20>] __s390_indirect_jump_r14+0x0/0x10
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
While the cause is a user failure, the dasd module should handle the
situation more gracefully. One of the simplest solutions is to make
removal of the /proc/dasd* entries idempotent.
Signed-off-by: Miroslav Franc <mfranc@suse.cz>
[ sth: shortened if clause ]
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
---
drivers/s390/block/dasd_proc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c
index 0faaa437d9be..48e12e81df00 100644
--- a/drivers/s390/block/dasd_proc.c
+++ b/drivers/s390/block/dasd_proc.c
@@ -350,6 +350,7 @@ dasd_proc_init(void)
remove_proc_entry("devices", dasd_proc_root_entry);
out_nodevices:
remove_proc_entry("dasd", NULL);
+ dasd_proc_root_entry = NULL;
out_nodasd:
return -ENOENT;
}
@@ -357,7 +358,11 @@ dasd_proc_init(void)
void
dasd_proc_exit(void)
{
+ if (!dasd_proc_root_entry)
+ return;
+
remove_proc_entry("devices", dasd_proc_root_entry);
remove_proc_entry("statistics", dasd_proc_root_entry);
remove_proc_entry("dasd", NULL);
+ dasd_proc_root_entry = NULL;
}
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] s390/dasd: Fix typo in comment
2024-11-08 13:39 [PATCH 0/2] s390/dasd: two small fixes Stefan Haberland
2024-11-08 13:39 ` [PATCH 1/2] s390/dasd: fix redundant /proc/dasd* entries removal Stefan Haberland
@ 2024-11-08 13:39 ` Stefan Haberland
2024-11-10 3:07 ` [PATCH 0/2] s390/dasd: two small fixes Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Haberland @ 2024-11-08 13:39 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-block, Jan Hoeppner, linux-s390, Heiko Carstens,
Vasily Gorbik, Christian Borntraeger, Miroslav Franc,
Yu Jiaoliang
From: Yu Jiaoliang <yujiaoliang@vivo.com>
Fix typo in comment:
requeust->request,
Removve->Remove,
notthing->nothing.
Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
---
drivers/s390/block/dasd.c | 2 +-
drivers/s390/block/dasd_devmap.c | 2 +-
drivers/s390/block/dasd_eckd.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 42a4a996defb..3ed642f4f00d 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -2117,7 +2117,7 @@ int dasd_flush_device_queue(struct dasd_device *device)
case DASD_CQR_IN_IO:
rc = device->discipline->term_IO(cqr);
if (rc) {
- /* unable to terminate requeust */
+ /* unable to terminate request */
dev_err(&device->cdev->dev,
"Flushing the DASD request queue failed\n");
/* stop flush processing */
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index 6adaeb985dde..71d8fb86139d 100644
--- a/drivers/s390/block/dasd_devmap.c
+++ b/drivers/s390/block/dasd_devmap.c
@@ -855,7 +855,7 @@ dasd_delete_device(struct dasd_device *device)
dev_set_drvdata(&device->cdev->dev, NULL);
spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags);
- /* Removve copy relation */
+ /* Remove copy relation */
dasd_devmap_delete_copy_relation_device(device);
/*
* Drop ref_count by 3, one for the devmap reference, one for
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 90b106408992..1ebe589b5185 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -2405,7 +2405,7 @@ static int dasd_eckd_end_analysis(struct dasd_block *block)
}
if (count_area != NULL && count_area->kl == 0) {
- /* we found notthing violating our disk layout */
+ /* we found nothing violating our disk layout */
if (dasd_check_blocksize(count_area->dl) == 0)
block->bp_block = count_area->dl;
}
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] s390/dasd: two small fixes
2024-11-08 13:39 [PATCH 0/2] s390/dasd: two small fixes Stefan Haberland
2024-11-08 13:39 ` [PATCH 1/2] s390/dasd: fix redundant /proc/dasd* entries removal Stefan Haberland
2024-11-08 13:39 ` [PATCH 2/2] s390/dasd: Fix typo in comment Stefan Haberland
@ 2024-11-10 3:07 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2024-11-10 3:07 UTC (permalink / raw)
To: Stefan Haberland
Cc: linux-block, Jan Hoeppner, linux-s390, Heiko Carstens,
Vasily Gorbik, Miroslav Franc, Yu Jiaoliang,
Christian Borntraeger
On Fri, 08 Nov 2024 14:39:11 +0100, Stefan Haberland wrote:
> please apply the following two small fixes for the upcoming merge window.
> Thanks.
>
> Miroslav Franc (1):
> s390/dasd: fix redundant /proc/dasd* entries removal
>
> Yu Jiaoliang (1):
> s390/dasd: Fix typo in comment
>
> [...]
Applied, thanks!
[1/2] s390/dasd: fix redundant /proc/dasd* entries removal
commit: 7f5435b2a5ce6de8f53b65900a0e57a158e2e027
[2/2] s390/dasd: Fix typo in comment
commit: b2113edaa9afa1c405609b3dca18a9434d28b6c5
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-10 3:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-08 13:39 [PATCH 0/2] s390/dasd: two small fixes Stefan Haberland
2024-11-08 13:39 ` [PATCH 1/2] s390/dasd: fix redundant /proc/dasd* entries removal Stefan Haberland
2024-11-08 13:39 ` [PATCH 2/2] s390/dasd: Fix typo in comment Stefan Haberland
2024-11-10 3:07 ` [PATCH 0/2] s390/dasd: two small fixes Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox