]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: make AIO use the proper rw_verify_area() area helpers
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 21 May 2012 23:06:20 +0000 (16:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 21 May 2012 23:06:20 +0000 (16:06 -0700)
commitba20caa268f6086f6144df278af20f0496145875
treeb85acd421b97f018400bc55cb8eb14b4468c3b73
parentc37c2eeb0d4c574b8a47a3062ef2b0472959cbad
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.

Reported-by: Manish Honap <manish_honap_vit@yahoo.co.in>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/aio.c