All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Vimal Agrawal <avimalin@gmail.com>
Cc: linux-kernel@vger.kernel.org, arnd@arndb.de, vimal.agrawal@sophos.com
Subject: Re: [PATCH v2] misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors
Date: Tue, 15 Oct 2024 09:53:32 +0200	[thread overview]
Message-ID: <2024101548-effects-sulphuric-f3a3@gregkh> (raw)
In-Reply-To: <20241015070226.15790-1-vimal.agrawal@sophos.com>

On Tue, Oct 15, 2024 at 07:02:26AM +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: 0ad35fed618c ("char: misc: Increase the maximum number of dynamic misc devices to 1048448")
> Signed-off-by: Vimal Agrawal <vimal.agrawal@sophos.com>
> ---
>  drivers/char/misc.c   | 35 +++++++++++++++++-----
>  lib/Kconfig.debug     | 11 +++++++
>  lib/Makefile          |  1 +
>  lib/test_misc_minor.c | 67 +++++++++++++++++++++++++++++++++++++++++++

Cool, thanks for the test, but shouldn't that be a separate patch?  That
doesn't need to be backported anywhere :)

Can you split this up into a 2 patch series?

Also, you need to fix your "From:" line, it does not match up with your
signed-off-by: line :(

thanks,

greg k-h

  parent reply	other threads:[~2024-10-15  7:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 13:14 [PATCH] misc: misc_minor_alloc to allocate ids for all dynamic/misc dynamic minors Vimal Agrawal
2024-10-14 13:19 ` Greg KH
2024-10-15  7:02   ` [PATCH v2] misc: misc_minor_alloc to use ida " Vimal Agrawal
2024-10-15  7:52     ` Greg KH
2024-10-15  7:53     ` Greg KH [this message]
2024-10-15  7:57     ` Vimal Agrawal
2024-10-15 22:18     ` Jeff Johnson
2024-10-17 11:12       ` Vimal Agrawal
2024-10-17 11:43         ` [PATCH v1 2/2] misc:minor basic kunit tests Vimal Agrawal
2024-10-17 11:43           ` [PATCH v3 1/2] misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors Vimal Agrawal
2024-10-17 11:55           ` [PATCH v1 2/2] misc:minor basic kunit tests Greg KH
2024-10-17 11:56           ` Greg KH
2024-10-17 13:35             ` [PATCH v4 1/2] misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors Vimal Agrawal
2024-10-17 13:39               ` Greg KH
2024-10-17 14:06                 ` Greg KH
2024-10-17 14:13             ` [PATCH v4 2/2] misc:minor basic kunit tests Vimal Agrawal
2024-10-21 13:38               ` [PATCH v5 1/2] misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors avimalin
2024-10-21 13:39               ` [PATCH v5 2/2] misc:minor basic kunit tests avimalin
2024-10-16 14:22 ` [PATCH] misc: misc_minor_alloc to allocate ids for all dynamic/misc dynamic minors Dan Carpenter
2024-10-17 11:08   ` 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=2024101548-effects-sulphuric-f3a3@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=avimalin@gmail.com \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.