Commit 850d6fbe authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

[PATCH] sigio: cleanup, don't take tasklist twice

The only user of send_sigio_to_task() already holds tasklist_lock, so it is
better not to send the signal via send_group_sig_info() (which takes
tasklist recursively) but use group_send_sig_info().

The same change in send_sigurg()->send_sigurg_to_task().
Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 86174cdc
...@@ -457,11 +457,11 @@ static void send_sigio_to_task(struct task_struct *p, ...@@ -457,11 +457,11 @@ static void send_sigio_to_task(struct task_struct *p,
else else
si.si_band = band_table[reason - POLL_IN]; si.si_band = band_table[reason - POLL_IN];
si.si_fd = fd; si.si_fd = fd;
if (!send_group_sig_info(fown->signum, &si, p)) if (!group_send_sig_info(fown->signum, &si, p))
break; break;
/* fall-through: fall back on the old plain SIGIO signal */ /* fall-through: fall back on the old plain SIGIO signal */
case 0: case 0:
send_group_sig_info(SIGIO, SEND_SIG_PRIV, p); group_send_sig_info(SIGIO, SEND_SIG_PRIV, p);
} }
} }
...@@ -495,7 +495,7 @@ static void send_sigurg_to_task(struct task_struct *p, ...@@ -495,7 +495,7 @@ static void send_sigurg_to_task(struct task_struct *p,
struct fown_struct *fown) struct fown_struct *fown)
{ {
if (sigio_perm(p, fown, SIGURG)) if (sigio_perm(p, fown, SIGURG))
send_group_sig_info(SIGURG, SEND_SIG_PRIV, p); group_send_sig_info(SIGURG, SEND_SIG_PRIV, p);
} }
int send_sigurg(struct fown_struct *fown) int send_sigurg(struct fown_struct *fown)
......
Markdown is supported
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