lkml.org 
[lkml]   [2018]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ashmem: Fix lockdep issue during llseek
On Fri, Jan 26, 2018 at 11:23:47AM -0800, Joel Fernandes wrote:

> I was just trying to be careful with the least intrusive solution
> since I'm not the original author of the driver.

Sure, but that needs a proof that it *is* a solution...

> But one usecase for the mutex is with concurrent lseeks, you can end
> up with a file->f_pos that is different from the latest update to
> asma->file->f_pos. A barrier could fix this it too though. Any
> thoughts?

lseek(2) is serialized against lseek(2) and read(2) on the same struct
file - see fdget_pos() for details.

ashmem_mutex really does look like an overkill - something much lighter
should serve just fine...

\
 
 \ /
  Last update: 2018-01-26 20:40    [W:0.086 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site