From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jeremy Kerr <jk@codeconstruct.com.au>
Cc: netdev@vger.kernel.org, Matt Johnston <matt@codeconstruct.com.au>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jiri Slaby <jirislaby@kernel.org>
Subject: Re: [PATCH net-next] mctp: Add MCTP-over-serial transport binding
Date: Mon, 22 Nov 2021 08:31:05 +0100 [thread overview]
Message-ID: <YZtHOfdn4HQdF3LD@kroah.com> (raw)
In-Reply-To: <123a5491b8485f42c9279d397cdeb6358c610f6c.camel@codeconstruct.com.au>
On Mon, Nov 22, 2021 at 03:16:55PM +0800, Jeremy Kerr wrote:
> > > +static DEFINE_IDA(mctp_serial_ida);
> >
> > I think you forgot to clean this up when the module is removed.
>
> Would it be possible to have the module exit called while we still have
> ida bitmaps still allocated? It looks like a ldisc being open will
> require a reference on the module; so a module remove will mean we have
> no ldiscs in use, and therefore an empty ida, so the ida_destroy() will
> always be a no-op.
ida_destroy() will not be a no-op if you have allocated some things in
the past. It should always be called when your module is removed.
Or at least that is how it used to be, if this has changed in the past
year, then I am mistaken here.
thanks,
greg k-h
next prev parent reply other threads:[~2021-11-22 7:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 4:28 [PATCH net-next] mctp: Add MCTP-over-serial transport binding Jeremy Kerr
2021-11-22 6:16 ` Greg Kroah-Hartman
2021-11-22 7:16 ` Jeremy Kerr
2021-11-22 7:31 ` Greg Kroah-Hartman [this message]
2021-11-22 8:23 ` Jeremy Kerr
2021-11-22 13:11 ` Matthew Wilcox
2021-11-22 13:59 ` Greg Kroah-Hartman
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=YZtHOfdn4HQdF3LD@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=jirislaby@kernel.org \
--cc=jk@codeconstruct.com.au \
--cc=kuba@kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).