@@ -439,8 +439,8 @@ static void __sigqueue_init(struct sigqueue *q, struct ucounts *ucounts,
439439 * - this may be called without locks if and only if t == current, otherwise an
440440 * appropriate lock must be held to stop the target task from exiting
441441 */
442- static struct sigqueue * __sigqueue_alloc (int sig , struct task_struct * t , gfp_t gfp_flags ,
443- int override_rlimit , const unsigned int sigqueue_flags )
442+ static struct sigqueue * sigqueue_alloc (int sig , struct task_struct * t , gfp_t gfp_flags ,
443+ int override_rlimit )
444444{
445445 struct ucounts * ucounts = sig_get_ucounts (t , sig , override_rlimit );
446446 struct sigqueue * q ;
@@ -454,7 +454,7 @@ static struct sigqueue *__sigqueue_alloc(int sig, struct task_struct *t, gfp_t g
454454 return NULL ;
455455 }
456456
457- __sigqueue_init (q , ucounts , sigqueue_flags );
457+ __sigqueue_init (q , ucounts , 0 );
458458 return q ;
459459}
460460
@@ -1070,7 +1070,7 @@ static int __send_signal_locked(int sig, struct kernel_siginfo *info,
10701070 else
10711071 override_rlimit = 0 ;
10721072
1073- q = __sigqueue_alloc (sig , t , GFP_ATOMIC , override_rlimit , 0 );
1073+ q = sigqueue_alloc (sig , t , GFP_ATOMIC , override_rlimit );
10741074
10751075 if (q ) {
10761076 list_add_tail (& q -> list , & pending -> list );
@@ -1926,37 +1926,6 @@ bool posixtimer_init_sigqueue(struct sigqueue *q)
19261926 return true;
19271927}
19281928
1929- struct sigqueue * sigqueue_alloc (void )
1930- {
1931- return __sigqueue_alloc (-1 , current , GFP_KERNEL , 0 , SIGQUEUE_PREALLOC );
1932- }
1933-
1934- void sigqueue_free (struct sigqueue * q )
1935- {
1936- spinlock_t * lock = & current -> sighand -> siglock ;
1937- unsigned long flags ;
1938-
1939- if (WARN_ON_ONCE (!(q -> flags & SIGQUEUE_PREALLOC )))
1940- return ;
1941- /*
1942- * We must hold ->siglock while testing q->list
1943- * to serialize with collect_signal() or with
1944- * __exit_signal()->flush_sigqueue().
1945- */
1946- spin_lock_irqsave (lock , flags );
1947- q -> flags &= ~SIGQUEUE_PREALLOC ;
1948- /*
1949- * If it is queued it will be freed when dequeued,
1950- * like the "regular" sigqueue.
1951- */
1952- if (!list_empty (& q -> list ))
1953- q = NULL ;
1954- spin_unlock_irqrestore (lock , flags );
1955-
1956- if (q )
1957- __sigqueue_free (q );
1958- }
1959-
19601929static void posixtimer_queue_sigqueue (struct sigqueue * q , struct task_struct * t , enum pid_type type )
19611930{
19621931 struct sigpending * pending ;
0 commit comments