@@ -1071,8 +1071,8 @@ static inline bool legacy_queue(struct sigpending *signals, int sig)
1071
1071
return (sig < SIGRTMIN ) && sigismember (& signals -> signal , sig );
1072
1072
}
1073
1073
1074
- static int __send_signal (int sig , struct kernel_siginfo * info , struct task_struct * t ,
1075
- enum pid_type type , bool force )
1074
+ static int __send_signal_locked (int sig , struct kernel_siginfo * info ,
1075
+ struct task_struct * t , enum pid_type type , bool force )
1076
1076
{
1077
1077
struct sigpending * pending ;
1078
1078
struct sigqueue * q ;
@@ -1212,8 +1212,8 @@ static inline bool has_si_pid_and_uid(struct kernel_siginfo *info)
1212
1212
return ret ;
1213
1213
}
1214
1214
1215
- static int send_signal (int sig , struct kernel_siginfo * info , struct task_struct * t ,
1216
- enum pid_type type )
1215
+ int send_signal_locked (int sig , struct kernel_siginfo * info ,
1216
+ struct task_struct * t , enum pid_type type )
1217
1217
{
1218
1218
/* Should SIGKILL or SIGSTOP be received by a pid namespace init? */
1219
1219
bool force = false;
@@ -1245,7 +1245,7 @@ static int send_signal(int sig, struct kernel_siginfo *info, struct task_struct
1245
1245
force = true;
1246
1246
}
1247
1247
}
1248
- return __send_signal (sig , info , t , type , force );
1248
+ return __send_signal_locked (sig , info , t , type , force );
1249
1249
}
1250
1250
1251
1251
static void print_fatal_signal (int signr )
@@ -1284,7 +1284,7 @@ __setup("print-fatal-signals=", setup_print_fatal_signals);
1284
1284
int
1285
1285
__group_send_sig_info (int sig , struct kernel_siginfo * info , struct task_struct * p )
1286
1286
{
1287
- return send_signal (sig , info , p , PIDTYPE_TGID );
1287
+ return send_signal_locked (sig , info , p , PIDTYPE_TGID );
1288
1288
}
1289
1289
1290
1290
int do_send_sig_info (int sig , struct kernel_siginfo * info , struct task_struct * p ,
@@ -1294,7 +1294,7 @@ int do_send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p
1294
1294
int ret = - ESRCH ;
1295
1295
1296
1296
if (lock_task_sighand (p , & flags )) {
1297
- ret = send_signal (sig , info , p , type );
1297
+ ret = send_signal_locked (sig , info , p , type );
1298
1298
unlock_task_sighand (p , & flags );
1299
1299
}
1300
1300
@@ -1347,7 +1347,7 @@ force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t,
1347
1347
if (action -> sa .sa_handler == SIG_DFL &&
1348
1348
(!t -> ptrace || (handler == HANDLER_EXIT )))
1349
1349
t -> signal -> flags &= ~SIGNAL_UNKILLABLE ;
1350
- ret = send_signal (sig , info , t , PIDTYPE_PID );
1350
+ ret = send_signal_locked (sig , info , t , PIDTYPE_PID );
1351
1351
spin_unlock_irqrestore (& t -> sighand -> siglock , flags );
1352
1352
1353
1353
return ret ;
@@ -1567,7 +1567,7 @@ int kill_pid_usb_asyncio(int sig, int errno, sigval_t addr,
1567
1567
1568
1568
if (sig ) {
1569
1569
if (lock_task_sighand (p , & flags )) {
1570
- ret = __send_signal (sig , & info , p , PIDTYPE_TGID , false);
1570
+ ret = __send_signal_locked (sig , & info , p , PIDTYPE_TGID , false);
1571
1571
unlock_task_sighand (p , & flags );
1572
1572
} else
1573
1573
ret = - ESRCH ;
@@ -2103,7 +2103,7 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
2103
2103
* parent's namespaces.
2104
2104
*/
2105
2105
if (valid_signal (sig ) && sig )
2106
- __send_signal (sig , & info , tsk -> parent , PIDTYPE_TGID , false);
2106
+ __send_signal_locked (sig , & info , tsk -> parent , PIDTYPE_TGID , false);
2107
2107
__wake_up_parent (tsk , tsk -> parent );
2108
2108
spin_unlock_irqrestore (& psig -> siglock , flags );
2109
2109
@@ -2601,7 +2601,7 @@ static int ptrace_signal(int signr, kernel_siginfo_t *info, enum pid_type type)
2601
2601
/* If the (new) signal is now blocked, requeue it. */
2602
2602
if (sigismember (& current -> blocked , signr ) ||
2603
2603
fatal_signal_pending (current )) {
2604
- send_signal (signr , info , current , type );
2604
+ send_signal_locked (signr , info , current , type );
2605
2605
signr = 0 ;
2606
2606
}
2607
2607
@@ -4793,7 +4793,7 @@ void kdb_send_sig(struct task_struct *t, int sig)
4793
4793
"the deadlock.\n" );
4794
4794
return ;
4795
4795
}
4796
- ret = send_signal (sig , SEND_SIG_PRIV , t , PIDTYPE_PID );
4796
+ ret = send_signal_locked (sig , SEND_SIG_PRIV , t , PIDTYPE_PID );
4797
4797
spin_unlock (& t -> sighand -> siglock );
4798
4798
if (ret )
4799
4799
kdb_printf ("Fail to deliver Signal %d to process %d.\n" ,
0 commit comments