[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151209133533.29040318@lxorguk.ukuu.org.uk>
Date: Wed, 9 Dec 2015 13:35:33 +0000
From: One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
To: Nitin Gupta <nitin.gupta@...sung.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Shivnandan Kumar <shivnandan.k@...sung.com>,
Vidushi Koul <vidushi.koul@...sung.com>,
Gaurav Kohli <gaurav.k6@...sung.com>,
Rajat Suri <rajat.suri@...sung.com>,
Shailesh Pandey <p.shailesh@...sung.com>,
"shiv.jnumca08@...il.com" <shiv.jnumca08@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] char:misc minor is overflowing
On Wed, 09 Dec 2015 12:51:33 +0000 (GMT)
Nitin Gupta <nitin.gupta@...sung.com> wrote:
> Hi,
>
> Is there any modification / improvement needed in this patch ?
>
> ------- Original Message -------
> Sender : Shivnandan Kumar<shivnandan.k@...sung.com> Engineer/SRI-Noida-Advance Solutions - System 1 R&D Group/Samsung Electronics
> Date : Nov 20, 2015 15:35 (GMT+05:30)
> Title : [PATCH] char:misc minor is overflowing
>
> When a driver register as a misc driver and
> it tries to allocate minor number dynamically.
> Then there is a chance of minor number overflow.
> The problem is that 64(DYNAMIC_MINORS) is not enough
If you are allocating more than the odd minor number you shouldn't be
using misc devices in the first place but should be using
cdev_init/cdev_add/register_chrdev_region and friends.
So 64 really should never be "not enough". miscdevice is more historical
than useful and really goes back to the days long before all the region
allocators existed.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists