All of lore.kernel.org
 help / color / mirror / Atom feed
* [tglx-devel:timers/posix 104/107] kernel/signal.c:2002:39: error: 'POSIX_TIMER_REQUEUE_PENDING' undeclared
@ 2024-11-02 23:33 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-11-02 23:33 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git timers/posix
head:   7dff83f0eba841872222db257facf9efac85dd2e
commit: a4329b49227494eab8b0dc4220b65c9c341ef3f9 [104/107] signal: Queue ignored posixtimers on ignore list
config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20241103/202411030744.COM9Qydr-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241103/202411030744.COM9Qydr-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411030744.COM9Qydr-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/signal.c: In function 'posixtimer_send_sigqueue':
>> kernel/signal.c:2002:39: error: 'POSIX_TIMER_REQUEUE_PENDING' undeclared (first use in this function)
    2002 |                 if (tmr->it_status == POSIX_TIMER_REQUEUE_PENDING) {
         |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/signal.c:2002:39: note: each undeclared identifier is reported only once for each function it appears in
>> kernel/signal.c:2014:58: error: passing argument 2 of 'posixtimer_sig_ignore' from incompatible pointer type [-Werror=incompatible-pointer-types]
    2014 |                                 posixtimer_sig_ignore(t, tmr);
         |                                                          ^~~
         |                                                          |
         |                                                          struct k_itimer *
   kernel/signal.c:734:84: note: expected 'struct sigqueue *' but argument is of type 'struct k_itimer *'
     734 | static inline void posixtimer_sig_ignore(struct task_struct *tsk, struct sigqueue *q);
         |                                                                   ~~~~~~~~~~~~~~~~~^
   kernel/signal.c: In function 'posixtimer_sig_ignore':
   kernel/signal.c:2059:31: error: 'POSIX_TIMER_REQUEUE_PENDING' undeclared (first use in this function)
    2059 |         if (tmr->it_status == POSIX_TIMER_REQUEUE_PENDING)
         |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/POSIX_TIMER_REQUEUE_PENDING +2002 kernel/signal.c

  1970	
  1971	int posixtimer_send_sigqueue(struct k_itimer *tmr)
  1972	{
  1973		struct sigqueue *q = &tmr->sigq;
  1974		int sig = q->info.si_signo;
  1975		struct task_struct *t;
  1976		unsigned long flags;
  1977		int result;
  1978	
  1979		guard(rcu)();
  1980	
  1981		t = posixtimer_get_target(tmr);
  1982		if (!t)
  1983			return -1;
  1984	
  1985		if (!likely(lock_task_sighand(t, &flags)))
  1986			return -1;
  1987	
  1988		/*
  1989		 * Update @tmr::sigqueue_seq for posix timer signals with sighand
  1990		 * locked to prevent a race against dequeue_signal().
  1991		 */
  1992		tmr->it_sigqueue_seq = tmr->it_signal_seq;
  1993	
  1994		if (!prepare_signal(sig, t, false)) {
  1995			result = TRACE_SIGNAL_IGNORED;
  1996	
  1997			/* Paranoia check. Try to survive. */
  1998			if (WARN_ON_ONCE(!list_empty(&q->list)))
  1999				goto out;
  2000	
  2001			/* Periodic timers with SIG_IGN are queued on the ignored list */
> 2002			if (tmr->it_status == POSIX_TIMER_REQUEUE_PENDING) {
  2003				/*
  2004				 * Already queued means the timer was rearmed after
  2005				 * the previous expiry got it on the ignore list.
  2006				 * Nothing to do for that case.
  2007				 */
  2008				if (hlist_unhashed(&tmr->ignored_list)) {
  2009					/*
  2010					 * Take a signal reference and queue it on
  2011					 * the ignored list.
  2012					 */
  2013					posixtimer_sigqueue_getref(q);
> 2014					posixtimer_sig_ignore(t, tmr);
  2015				}
  2016			} else if (!hlist_unhashed(&tmr->ignored_list)) {
  2017				/*
  2018				 * Covers the case where a timer was periodic and
  2019				 * then signal was ignored. Then it was rearmed as
  2020				 * oneshot timer. The previous signal is invalid
  2021				 * now, and the oneshot signal has to be dropped.
  2022				 * Remove it from the ignored list and drop the
  2023				 * reference count as the signal is not longer
  2024				 * queued.
  2025				 */
  2026				hlist_del_init(&tmr->ignored_list);
  2027				posixtimer_putref(tmr);
  2028			}
  2029			goto out;
  2030		}
  2031	
  2032		/* This should never happen and leaks a reference count */
  2033		if (WARN_ON_ONCE(!hlist_unhashed(&tmr->ignored_list)))
  2034			hlist_del_init(&tmr->ignored_list);
  2035	
  2036		if (unlikely(!list_empty(&q->list))) {
  2037			/* This holds a reference count already */
  2038			result = TRACE_SIGNAL_ALREADY_PENDING;
  2039			goto out;
  2040		}
  2041	
  2042		posixtimer_sigqueue_getref(q);
  2043		posixtimer_queue_sigqueue(q, t, tmr->it_pid_type);
  2044		result = TRACE_SIGNAL_DELIVERED;
  2045	out:
  2046		trace_signal_generate(sig, &q->info, t, tmr->it_pid_type != PIDTYPE_PID, result);
  2047		unlock_task_sighand(t, &flags);
  2048		return 0;
  2049	}
  2050	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-02 23:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-02 23:33 [tglx-devel:timers/posix 104/107] kernel/signal.c:2002:39: error: 'POSIX_TIMER_REQUEUE_PENDING' undeclared kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.