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]
Date:	Thu, 21 Jul 2016 15:40:45 +0200
From:	Enric Balletbo Serra <eballetbo@...il.com>
To:	Guenter Roeck <linux@...ck-us.net>
Cc:	Enric Balletbo i Serra <enric.balletbo@...labora.com>,
	linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
	Wim Van Sebroeck <wim@...ana.be>,
	Martyn Welch <martyn.welch@...labora.com>
Subject: Re: [PATCH v2] watchdog: ziirave_wdt: Add support to upload the firmware.

2016-07-21 15:24 GMT+02:00 Guenter Roeck <linux@...ck-us.net>:
> On 07/21/2016 01:59 AM, Enric Balletbo Serra wrote:
>
> [ ... ]
>
>>>>
>>>> +static ssize_t ziirave_wdt_sysfs_store_firm(struct device *dev,
>>>> +                                           struct device_attribute
>>>> *attr,
>>>> +                                           const char *buf, size_t
>>>> count)
>>>> +{
>>>> +       struct i2c_client *client = to_i2c_client(dev->parent);
>>>> +       struct ziirave_wdt_data *w_priv = i2c_get_clientdata(client);
>>>> +       const struct firmware *fw;
>>>> +       int err;
>>>> +
>>>
>>>
>>>
>>> What happens if this file is opened twice and written in parallel ?
>>> What if any
>>> other attribute is accessed while the firmware download is ongoing ?
>>>
>>
>> Good point. So you think I need to protect all with mutexes or there
>
>
> Yes, you have to protect any possible damaging parallel access with mutexes.
>
>> is another way? From a quick look on other drivers i didn't see this
>> kind of protection (something to look at in the future)
>>
>
> Really ? Can you point me to some examples ? This would be a bug.
>
> You'll have to fix the to get your patch accepted. Pointing to other
> examples with the same or a similar bug is not an argument.
>

Yeah I know, I didn't want to justify me, I didn't express well if
this was your impression, I just wanted to point that there are some
drivers in other subsystems that I think that have this problem, I
only did a quick look though (is some upstreaming work that I can add
to my TODO list)

Already fixed in next v3 :)


> Thanks,
> Guenter
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ