Skip to content
Snippets Groups Projects
Commit dc18eac8 authored by Linus Torvalds's avatar Linus Torvalds Committed by Thierry Strudel
Browse files

UPSTREAM: vfs: make AIO use the proper rw_verify_area() area helpers


We had for some reason overlooked the AIO interface, and it didn't use
the proper rw_verify_area() helper function that checks (for example)
mandatory locking on the file, and that the size of the access doesn't
cause us to overflow the provided offset limits etc.

Instead, AIO did just the security_file_permission() thing (that
rw_verify_area() also does) directly.

This fixes it to do all the proper helper functions, which not only
means that now mandatory file locking works with AIO too, we can
actually remove lines of code.

Bug: 28939037
Reported-by: default avatarManish Honap <manish_honap_vit@yahoo.co.in>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit a70b52ec)

Change-Id: I2e182e973b44ba97c45c80d52d8a0b7c32a72750
parent a63a290f
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment