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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <569F6B1B.6080902@huawei.com>
Date:	Wed, 20 Jan 2016 19:10:19 +0800
From:	"Yankejian (Hackim Yim)" <yankejian@...wei.com>
To:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Yisen Zhuang <Yisen.zhuang@...wei.com>, <davem@...emloft.net>,
	<robh+dt@...nel.org>, <pawel.moll@....com>, <mark.rutland@....com>,
	<ijc+devicetree@...lion.org.uk>, <galak@...eaurora.org>,
	<catalin.marinas@....com>, <will.deacon@....com>,
	<huangdaode@...ilicon.com>, <liguozhu@...wei.com>, <arnd@...db.de>,
	<fengguang.wu@...el.com>, <salil.mehta@...wei.com>,
	<lisheng011@...wei.com>
CC:	<devicetree@...r.kernel.org>, <netdev@...r.kernel.org>,
	<linuxarm@...wei.com>, <linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 next-next] net: hns: enet specifies a reference to dsaf



On 2016/1/20 17:36, Andy Shevchenko wrote:
> On Wed, 2016-01-20 at 14:49 +0800, Yankejian (Hackim Yim) wrote:
>>>> +
>>>>>>> +	snprintf(ae_dev->name, AE_NAME_SIZE, "%s%d",
>>>>>>> DSAF_DEVICE_NAME,
>>>>>>> +		 (int)atomic_inc_return(&id));
>>> If you bind/unbind device enough times you may get an overflow and
>>> end
>>> up with name of existing device (if you have 1+ of them in the
>>> system).
>>>
>>> To avoid such situation better to use IDA/IDR framework.
>>>
>> Hi, Andy
>> Thanks again for your suggestion.
>> It seems that using IDA/IDR framework is better, but all of the
>> functions must be serialized by lock.
> AFAIR it's designed in a way you don't need to do any additional
> locking or synchronization.

really? if so, that is great.
could you sent me an example.
thanks very much. Andy.

Best Regards,
Kejian Yan



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ