lkml.org 
[lkml]   [2019]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4.19 001/106] tpm: use tpm_try_get_ops() in tpm-sysfs.c.
On Tue, Oct 08, 2019 at 02:51:20PM +0200, Pavel Machek wrote:
> For example this did not have any locking, and is now protected by
>
> get_device(&chip->dev);
>
> down_read(&chip->ops_sem);
>
> . Is that intended? Is this known to fix any bugs?

It is, sysfs code can otherwise race when ops is set NULL in
class shutdown.

/Jarkko

\
 
 \ /
  Last update: 2019-10-09 01:45    [W:0.384 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site