From 040b6362d58fe9a344e053546c12bf821f6fce99 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Fri, 1 Jun 2007 00:46:53 -0700 Subject: [PATCH] tty: fix leakage of -ERESTARTSYS to userland Spotted by Satoru Takeuchi. kill_pgrp(task_pgrp(current)) sends the signal to the current's thread group, but can choose any sub-thread as a target for signal_wake_up(). This means that job_control() and tty_check_change() may return -ERESTARTSYS without signal_pending(). Signed-off-by: Oleg Nesterov Cc: Satoru Takeuchi Cc: Roland McGrath Cc: Alan Cox Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed