Linux Trace Kernel
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Peter Wang (王信友)" <peter.wang@mediatek.com>
Cc: "linux-trace-kernel@vger.kernel.org"
	<linux-trace-kernel@vger.kernel.org>,
	"CC Chou (周志杰)" <cc.chou@mediatek.com>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"Chaotian Jing (井朝天)" <Chaotian.Jing@mediatek.com>,
	"Eddie Huang ( 黃智傑)" <eddie.huang@mediatek.com>,
	"Qilin Tan ( 谭麒麟)" <Qilin.Tan@mediatek.com>,
	"Lin Gui ( 桂林)" <Lin.Gui@mediatek.com>,
	"Yi-fan Peng ( 彭羿凡)" <Yi-fan.Peng@mediatek.com>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"Jiajie Hao ( 郝加节)" <jiajie.hao@mediatek.com>,
	"Naomi Chu ( 朱詠田)" <Naomi.Chu@mediatek.com>,
	"Alice Chao ( 趙珮均)" <Alice.Chao@mediatek.com>,
	"Ed Tsai ( 蔡宗軒)" <Ed.Tsai@mediatek.com>,
	wsd_upstream <wsd_upstream@mediatek.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"Chun-Hung Wu ( 巫駿宏)" <Chun-hung.Wu@mediatek.com>,
	"Tun-yu Yu ( 游敦聿)" <Tun-yu.Yu@mediatek.com>
Subject: Re: [PATCH v3] ufs: core: add hba parameter to trace events
Date: Wed, 1 Jul 2026 08:57:40 -0400	[thread overview]
Message-ID: <20260701085740.218cf4d9@gandalf.local.home> (raw)
In-Reply-To: <e4c090a5b8402fe3db137d986f9a6639de73cc67.camel@mediatek.com>

On Wed, 1 Jul 2026 06:11:37 +0000
Peter Wang (王信友) <peter.wang@mediatek.com> wrote:
 
> However, I am curious: if the HBA is removed, implying that the 
> storage would become unusable, might the system encounter an 
> I/O hang or shutdown, potentially preventing its detection? 
> Perhaps it's a theoretical issue that would not manifest 
> in a real-world situation?

Note, it doesn't necessarily mean that the device itself was removed. The
issue is that a pointer to an allocated descriptor is saved in the ring buffer.

Maybe once the device is created it will never go way. But what happens if
for some reason the descriptor is freed and reallocated? Now the old
descriptor pointer is still in the ring buffer.

What in the logic guarantees that the pointer will never be freed?

And lets say there is an issue and the hba is freed and you debug this by
dumping the trace buffer via ftrace_dump_on_oops. Now the dump itself may
crash and you don't have a way to debug what happened.

One other point that causes issues here. It makes user space tracing
useless. Try tracing this with "trace-cmd record". These events will not be
able to be parsed.

-- Steve


  reply	other threads:[~2026-07-01 12:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250214083026.1177880-1-peter.wang@mediatek.com>
     [not found] ` <20260630165612.3e21b510@gandalf.local.home>
2026-06-30 21:49   ` [PATCH v3] ufs: core: add hba parameter to trace events Steven Rostedt
2026-07-01  6:11     ` Peter Wang (王信友)
2026-07-01 12:57       ` Steven Rostedt [this message]
2026-07-02  8:46         ` Peter Wang (王信友)

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=20260701085740.218cf4d9@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=Alice.Chao@mediatek.com \
    --cc=Chaotian.Jing@mediatek.com \
    --cc=Chun-hung.Wu@mediatek.com \
    --cc=Ed.Tsai@mediatek.com \
    --cc=Lin.Gui@mediatek.com \
    --cc=Naomi.Chu@mediatek.com \
    --cc=Qilin.Tan@mediatek.com \
    --cc=Tun-yu.Yu@mediatek.com \
    --cc=Yi-fan.Peng@mediatek.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=cc.chou@mediatek.com \
    --cc=eddie.huang@mediatek.com \
    --cc=jejb@linux.ibm.com \
    --cc=jiajie.hao@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=peter.wang@mediatek.com \
    --cc=wsd_upstream@mediatek.com \
    /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