From: Sasha Levin <sashal@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Chengguang Xu <cgxu519@gmx.com>, Wu Hao <hao.wu@intel.com>,
Alan Tull <atull@kernel.org>,
linux-fpga@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 5.1 17/59] fpga: dfl: expand minor range when registering chrdev region
Date: Sun, 23 Jun 2019 15:26:52 -0400 [thread overview]
Message-ID: <20190623192652.GM2226@sasha-vm> (raw)
In-Reply-To: <20190615054806.GB23883@kroah.com>
On Sat, Jun 15, 2019 at 07:48:06AM +0200, Greg Kroah-Hartman wrote:
>On Fri, Jun 14, 2019 at 04:28:01PM -0400, Sasha Levin wrote:
>> From: Chengguang Xu <cgxu519@gmx.com>
>>
>> [ Upstream commit de9a7f6f5f1967d275311cca9163b4a3ffe9b0ae ]
>>
>> Actually, total amount of available minor number
>> for a single major is MINORMASK + 1. So expand
>> minor range when registering chrdev region.
>>
>> Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
>> Acked-by: Wu Hao <hao.wu@intel.com>
>> Acked-by: Alan Tull <atull@kernel.org>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>> ---
>> drivers/fpga/dfl.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/fpga/dfl.c b/drivers/fpga/dfl.c
>> index c25217cde5ca..4b66aaa32b5a 100644
>> --- a/drivers/fpga/dfl.c
>> +++ b/drivers/fpga/dfl.c
>> @@ -322,7 +322,7 @@ static void dfl_chardev_uinit(void)
>> for (i = 0; i < DFL_FPGA_DEVT_MAX; i++)
>> if (MAJOR(dfl_chrdevs[i].devt)) {
>> unregister_chrdev_region(dfl_chrdevs[i].devt,
>> - MINORMASK);
>> + MINORMASK + 1);
>> dfl_chrdevs[i].devt = MKDEV(0, 0);
>> }
>> }
>> @@ -332,8 +332,8 @@ static int dfl_chardev_init(void)
>> int i, ret;
>>
>> for (i = 0; i < DFL_FPGA_DEVT_MAX; i++) {
>> - ret = alloc_chrdev_region(&dfl_chrdevs[i].devt, 0, MINORMASK,
>> - dfl_chrdevs[i].name);
>> + ret = alloc_chrdev_region(&dfl_chrdevs[i].devt, 0,
>> + MINORMASK + 1, dfl_chrdevs[i].name);
>> if (ret)
>> goto exit;
>> }
>
>Not a bugfix, so not needed for stable kernels, thanks.
Dropped, thanks!
--
Thanks,
Sasha
prev parent reply other threads:[~2019-06-23 19:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190614202843.26941-1-sashal@kernel.org>
2019-06-14 20:27 ` [PATCH AUTOSEL 5.1 14/59] fpga: stratix10-soc: fix use-after-free on s10_init() Sasha Levin
2019-06-14 20:27 ` [PATCH AUTOSEL 5.1 15/59] fpga: dfl: afu: Pass the correct device to dma_mapping_error() Sasha Levin
2019-06-14 20:28 ` [PATCH AUTOSEL 5.1 16/59] fpga: dfl: Add lockdep classes for pdata->lock Sasha Levin
2019-06-15 5:47 ` Greg Kroah-Hartman
2019-06-15 22:41 ` Sasha Levin
2019-06-16 7:09 ` Greg Kroah-Hartman
2019-06-14 20:28 ` [PATCH AUTOSEL 5.1 17/59] fpga: dfl: expand minor range when registering chrdev region Sasha Levin
2019-06-15 5:48 ` Greg Kroah-Hartman
2019-06-23 19:26 ` Sasha Levin [this message]
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=20190623192652.GM2226@sasha-vm \
--to=sashal@kernel.org \
--cc=atull@kernel.org \
--cc=cgxu519@gmx.com \
--cc=gregkh@linuxfoundation.org \
--cc=hao.wu@intel.com \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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).