lkml.org 
[lkml]   [2016]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] aio: fix a use after free (and fix freeze protection of aio writes)
On Mon, Oct 17, 2016 at 02:19:47PM -0400, Jeff Moyer wrote:
> This ends up being a call to __sb_end_write:
>
> void __sb_end_write(struct super_block *sb, int level)
> {
> percpu_up_read(sb->s_writers.rw_sem + level-1);
> }
>
> Nothing guarantees that submission and completion happen on the same
> CPU. Is this safe?

Good point. From my reading of the percpu_rwsem implementation it
is not safe to release it from a different CPU. Which makes me
wonder how we can protect aio writes properly here..

\
 
 \ /
  Last update: 2016-10-17 20:57    [W:0.091 / U:6.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site