Skip to content

Commit

Permalink
quota: Make quota code not call tty layer with dqptr_sem held
Browse files Browse the repository at this point in the history
dqptr_sem can be called from slab reclaim. tty layer uses GFP_KERNEL mask for
allocation so it can end up calling slab reclaim. Given quota code can call
into tty layer to print warning this creates possibility for lock inversion
between tty->atomic_write_lock and dqptr_sem.

Using direct printing of warnings from quota layer is obsolete but since it's
easy enough to change quota code to not hold any locks when printing warnings,
let's just do it. It seems like a good thing to do even when we use netlink
layer to transmit warnings to userspace.

Reported-by: Markus <M4rkusXXL@web.de>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Jan Kara committed Feb 29, 2012
1 parent d5e2cf0 commit bf097aa
Showing 1 changed file with 113 additions and 76 deletions.
Loading

0 comments on commit bf097aa

Please sign in to comment.