]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jun 2012 07:15:40 +0000 (15:15 +0800)
commitea15dd3cd4a8f3b097cccf7739edde04b69e0a03
treee2a87cbcdb0ffa67010bf5bd3b409a449dfe21aa
parent6801b1bfcd1eceac564df643cad179a15c7d9a10
vfs: make AIO use the proper rw_verify_area() area helpers

commit a70b52ec1aaeaf60f4739edb1b422827cb6f3893 upstream.

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/aio.c