lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190623192652.GM2226@sasha-vm>
Date:   Sun, 23 Jun 2019 15:26:52 -0400
From:   Sasha Levin <sashal@...nel.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Chengguang Xu <cgxu519@....com>, Wu Hao <hao.wu@...el.com>,
        Alan Tull <atull@...nel.org>, linux-fpga@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 5.1 17/59] fpga: dfl: expand minor range when
 registering chrdev region

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@....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@....com>
>> Acked-by: Wu Hao <hao.wu@...el.com>
>> Acked-by: Alan Tull <atull@...nel.org>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>> Signed-off-by: Sasha Levin <sashal@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ