From: Stefan Haberland <sth@linux.ibm.com>
To: Miroslav Franc <mfranc@suse.cz>, linux-s390@vger.kernel.org
Cc: Jan Hoeppner <hoeppner@linux.ibm.com>
Subject: Re: [PATCH] s390/dasd: fix redundant /proc/dasd* entries removal
Date: Fri, 6 Sep 2024 15:55:22 +0200 [thread overview]
Message-ID: <c0ff8199-59b2-4024-8a97-5481b0daf738@linux.ibm.com> (raw)
In-Reply-To: <87ttevuxz8.fsf@catherine.suse.cz>
Am 04.09.24 um 19:31 schrieb Miroslav Franc:
> 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>
> ---
Looks good to me and verified on my development system.
applied, thanks
prev parent reply other threads:[~2024-09-06 13:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 17:31 [PATCH] s390/dasd: fix redundant /proc/dasd* entries removal Miroslav Franc
2024-09-06 13:55 ` Stefan Haberland [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c0ff8199-59b2-4024-8a97-5481b0daf738@linux.ibm.com \
--to=sth@linux.ibm.com \
--cc=hoeppner@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=mfranc@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox