Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1287502

Re: [PATCH] char:misc minor is overflowing

From One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Newsgroups linux.kernel
Subject Re: [PATCH] char:misc minor is overflowing
Date 2015-12-09 14:40 +0100
Message-ID <qDN8n-xe-37@gated-at.bofh.it> (permalink)
References <qDMvE-51-25@gated-at.bofh.it>
Organization Intel Corporation

Show all headers | View raw


On Wed, 09 Dec 2015 12:51:33 +0000 (GMT)
Nitin Gupta <nitin.gupta@samsung.com> wrote:

> Hi,
> 
> Is there any modification / improvement needed in this patch ?
> 
> ------- Original Message -------
> Sender : Shivnandan Kumar<shivnandan.k@samsung.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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Fwd: [PATCH] char:misc minor is overflowing Nitin Gupta <nitin.gupta@samsung.com> - 2015-12-09 14:00 +0100
  Re: [PATCH] char:misc minor is overflowing One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2015-12-09 14:40 +0100

csiph-web