git: d9beef938ae7 - main - mpt: print req->index rather than the pointer itself in mpt.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 05 Feb 2025 00:47:24 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=d9beef938ae7c3189e85e377468f83804de94712
commit d9beef938ae7c3189e85e377468f83804de94712
Author: Fuqian Huang <huangfq.daxian@gmail.com>
AuthorDate: 2019-06-17 10:29:56 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-02-05 00:47:21 +0000
mpt: print req->index rather than the pointer itself in mpt.c
Print req->index instead of printing the pointer itself to avoid kernel
pointer leakage.
PR: 238661
Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
Reviewed-by: imp
---
sys/dev/mpt/mpt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/dev/mpt/mpt.c b/sys/dev/mpt/mpt.c
index 80b26a0d6280..63ddb13a9f03 100644
--- a/sys/dev/mpt/mpt.c
+++ b/sys/dev/mpt/mpt.c
@@ -486,8 +486,8 @@ mpt_default_reply_handler(struct mpt_softc *mpt, request_t *req,
{
mpt_prt(mpt,
- "Default Handler Called: req=%p:%u reply_descriptor=%x frame=%p\n",
- req, req->serno, reply_desc, reply_frame);
+ "Default Handler Called: req=%u:%u reply_descriptor=%x frame=%p\n",
+ req->index, req->serno, reply_desc, reply_frame);
if (reply_frame != NULL)
mpt_dump_reply_frame(mpt, reply_frame);