security: add LSM file pre-free hook to be compatible with 4.19

security_file_free moved to after the deallocation of the file's dentry
which is needed by our LSM. Add a new hook always called before dentry
is freed.

BUG=b:148390640
TEST=Ran all internal testing.
SOURCE=KTD

Signed-off-by: John Davis <kyuzo@google.com>
Change-Id: I6a7b316564d3e2231501f8925ba129257f460f23
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/lakitu-kernel/+/2062509
Commit-Queue: Thomas Garnier <thgarnie@chromium.org>
Commit-Queue: Vaibhav Rustagi <vaibhavrustagi@google.com>
Reviewed-by: Thomas Garnier <thgarnie@chromium.org>
Reviewed-by: Peter Martincic <martincic@google.com>
Reviewed-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
Tested-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
4 files changed