From: Greg KH <gregkh@linuxfoundation.org>
To: Vimal Agrawal <avimalin@gmail.com>
Cc: vimal.agrawal@sophos.com, stable@vger.kernel.org
Subject: Re: [PATCH v3 1/2] misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors
Date: Thu, 17 Oct 2024 13:31:20 +0200 [thread overview]
Message-ID: <2024101702-moody-suspect-702e@gregkh> (raw)
In-Reply-To: <20241017105325.18266-2-vimal.agrawal@sophos.com>
On Thu, Oct 17, 2024 at 10:53:25AM +0000, Vimal Agrawal wrote:
> misc_minor_alloc was allocating id using ida for minor only in case of
> MISC_DYNAMIC_MINOR but misc_minor_free was always freeing ids
> using ida_free causing a mismatch and following warn:
> > > WARNING: CPU: 0 PID: 159 at lib/idr.c:525 ida_free+0x3e0/0x41f
> > > ida_free called for id=127 which is not allocated.
> > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> ...
> > > [<60941eb4>] ida_free+0x3e0/0x41f
> > > [<605ac993>] misc_minor_free+0x3e/0xbc
> > > [<605acb82>] misc_deregister+0x171/0x1b3
>
> misc_minor_alloc is changed to allocate id from ida for all minors
> falling in the range of dynamic/ misc dynamic minors
>
> Fixes: ab760791c0cf ("char: misc: Increase the maximum number of dynamic misc devices to 1048448")
> Signed-off-by: Vimal Agrawal <vimal.agrawal@sophos.com>
> Cc: stable@vger.kernel.org
> ---
> v2: Added Fixes:
> added missed case for static minor in misc_minor_alloc
> v3: removed kunit changes as that will be added as second patch in this two patch series
>
> drivers/char/misc.c | 35 ++++++++++++++++++++++++++++-------
> 1 file changed, 28 insertions(+), 7 deletions(-)
Did you mean to send this only to stable and yourself and not the
maintainers involved here?
confused,
greg k-h
next prev parent reply other threads:[~2024-10-17 11:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241017105325.18266-1-vimal.agrawal@sophos.com>
2024-10-17 10:53 ` [PATCH v3 1/2] misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors Vimal Agrawal
2024-10-17 11:31 ` Greg KH [this message]
[not found] <CALkUMdS3wEuSi5SGqsRKt3nSb4mHue1bJTJm8=QL3OLYU2GWig@mail.gmail.com>
[not found] ` <20241017114329.22351-1-vimal.agrawal@sophos.com>
2024-10-17 11:43 ` Vimal Agrawal
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=2024101702-moody-suspect-702e@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=avimalin@gmail.com \
--cc=stable@vger.kernel.org \
--cc=vimal.agrawal@sophos.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