From: Steve French <smfrench@austin.rr.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: duplicate entry check in kmem_cache_create
Date: Wed, 18 Jun 2003 18:08:05 -0500 [thread overview]
Message-ID: <3EF0F0D5.5030504@austin.rr.com> (raw)
Is there a recommended way to check to see if a slab cache with
a specific name exists before calling kmem_cache_create?
I was able to force it into the BUG() at about line 1160 of slab.c by
removing my
module (rmmod -f) while some of my slab cache objects (e.g. private inode
info) were still in use, and then reloading my module which called
kmem_cache_create with a name that already existed. I would
like to exit module init code with a more graceful error if I
could easily detect that my slab cache objects were not deleted
(since if I proceed farther in my module init code it will hit the
BUG statement on 1160 of slab.c)
Any easy way to check?
next reply other threads:[~2003-06-18 22:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-18 23:08 Steve French [this message]
2003-06-18 23:46 ` duplicate entry check in kmem_cache_create Andrew Morton
2003-06-19 0:08 ` Steve French
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=3EF0F0D5.5030504@austin.rr.com \
--to=smfrench@austin.rr.com \
--cc=linux-kernel@vger.kernel.org \
/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