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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 09 Mar 2015 20:24:30 +0900
From:	jonghwa3.lee@...sung.com
To:	Oliver Neukum <oneukum@...e.de>, Jenny TC <jenny.tc@...el.com>
Cc:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Sebastian Reichel <sre@...nel.org>,
	Anton Vorontsov <anton.vorontsov@...aro.org>,
	David Woodhouse <dwmw2@...radead.org>, myungjoo.ham@...il.com,
	Pallala Ramakrishna <ramakrishna.pallala@...el.com>
Subject: Re: [RFC 2/4] power: core: Add generic interface to get battery
 specification.

Hi,
2015년 03월 06일 20:16에 Oliver Neukum 이(가) 쓴 글:
>> +
>> +	/* Check if same data is existed */
>> +	list_for_each_entry(battery, &psy_battery_info_list, entry)
>> +		if (!strcmp(battery->info->name, info->name))
>> +			return -EEXIST;
>> +
>> +	battery = kzalloc(sizeof(*battery), GFP_KERNEL);
> 
> That is a race condition. If you check for duplication, you'll
> need a lock.
> 

Yes, you`re right. I`ll apply it.

Thanks,
Jonghwa

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ