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: <51E91DF3.50002@st.com>
Date:	Fri, 19 Jul 2013 12:07:31 +0100
From:	Srinivas KANDAGATLA <srinivas.kandagatla@...com>
To:	Sean Young <sean@...s.org>
Cc:	linux-media@...r.kernel.org, alipowski@...eria.pl,
	Mauro Carvalho Chehab <mchehab@...hat.com>,
	linux-kernel@...r.kernel.org, srinivas.kandagatla@...il.com
Subject: Re: [PATCH v1 1/2] media: rc: Add user count to rc dev.

On 19/07/13 12:01, Sean Young wrote:

>> +	int rval = 0;
>>  
>> -	return rdev->open(rdev);
>> +	if (!rdev->users++)
>> +		rval = rdev->open(rdev);
>> +
>> +	if (rval)
>> +		rdev->users--;
>> +
>> +	return rval;
> 
> This looks racey. Some locking is needed, I think rc_dev->lock should work
> fine for this. Here and in the lirc code path too.
thanks Sean,
It makes sense, will fix this in v2.


Srini

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