diff options
author | Imre Palik <imrep@amazon.de> | 2015-02-23 15:37:59 -0500 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2015-02-23 15:37:59 -0500 |
commit | f1aaf26224bee779012aab136e5373ce3487982c (patch) | |
tree | d0c309cc10f29c2643e3214783fd65d835ba13bd /fs/utimes.c | |
parent | 2fded7f44b8fcf79e274c3f0cfbd0298f95308f3 (diff) | |
download | op-kernel-dev-f1aaf26224bee779012aab136e5373ce3487982c.zip op-kernel-dev-f1aaf26224bee779012aab136e5373ce3487982c.tar.gz |
audit: move the tree pruning to a dedicated thread
When file auditing is enabled, during a low memory situation, a memory
allocation with __GFP_FS can lead to pruning the inode cache. Which can,
in turn lead to audit_tree_freeing_mark() being called. This can call
audit_schedule_prune(), that tries to fork a pruning thread, and
waits until the thread is created. But forking needs memory, and the
memory allocations there are done with __GFP_FS.
So we are waiting merrily for some __GFP_FS memory allocations to complete,
while holding some filesystem locks. This can take a while ...
This patch creates a single thread for pruning the tree from
audit_add_tree_rule(), and thus avoids the deadlock that the on-demand
thread creation can cause.
Reported-by: Matt Wilson <msw@amazon.com>
Cc: Matt Wilson <msw@amazon.com>
Signed-off-by: Imre Palik <imrep@amazon.de>
Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'fs/utimes.c')
0 files changed, 0 insertions, 0 deletions