From: Guixin Liu <kanie@linux.alibaba.com>
To: jejb@linux.ibm.com, martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] scsi: sd: fix sd ida memory leak
Date: Mon, 29 Jan 2024 17:02:34 +0800 [thread overview]
Message-ID: <20240129090234.7762-1-kanie@linux.alibaba.com> (raw)
The sd_index_ida should be destroy when the sd module exit.
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
drivers/scsi/sd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 0833b3e6aa6e..8b88cba88da2 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -4079,6 +4079,8 @@ static void __exit exit_sd(void)
for (i = 0; i < SD_MAJORS; i++)
unregister_blkdev(sd_major(i), "sd");
+
+ ida_destroy(&sd_index_ida);
}
module_init(init_sd);
--
2.43.0
next reply other threads:[~2024-01-29 9:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 9:02 Guixin Liu [this message]
2024-02-07 10:54 ` [PATCH] scsi: sd: fix sd ida memory leak Benjamin Block
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=20240129090234.7762-1-kanie@linux.alibaba.com \
--to=kanie@linux.alibaba.com \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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