• akpm@osdl.org's avatar
    [PATCH] generic_file_buffered_write fixes · f021e921
    akpm@osdl.org authored
    Anton Altaparmakov <aia21@cam.ac.uk> points out:
    
    - It calls fault_in_pages_readable() which is completely bogus if @nr_segs >
      1.  It needs to be replaced by a to be written
      "fault_in_pages_readable_iovec()".
    
    - It increments @buf even in the iovec case thus @buf can point to random
      memory really quickly (in the iovec case) and then it calls
      fault_in_pages_readable() on this random memory.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    f021e921
filemap.c 56.9 KB