Commit b525a7e4 authored by Jan Kara's avatar Jan Kara Committed by Linus Torvalds
Browse files

[PATCH] dquot: add proper locking when using current->signal->tty

Dquot passes the tty to tty_write_message without locking
Signed-off-by: default avatarJan Kara <>
Cc: Alan Cox <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 254e948b
......@@ -834,6 +834,9 @@ static void print_warning(struct dquot *dquot, const char warntype)
if (!need_print_warning(dquot) || (flag && test_and_set_bit(flag, &dquot->dq_flags)))
if (!current->signal->tty)
goto out_lock;
tty_write_message(current->signal->tty, dquot->dq_sb->s_id);
if (warntype == ISOFTWARN || warntype == BSOFTWARN)
tty_write_message(current->signal->tty, ": warning, ");
......@@ -861,6 +864,8 @@ static void print_warning(struct dquot *dquot, const char warntype)
tty_write_message(current->signal->tty, msg);
static inline void flush_warnings(struct dquot **dquots, char *warntype)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment