Commit f2248e8d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] hrtimers: fix timer_create(2) && SIGEV_NONE

From: george anzinger <george@mvista.com>

- Fix the sig_notify filtering code for the timer_create system call to
  properly check for the signal number being small enought, but only if
  SIG_NONE is not specified.

- Eliminate useless test of sig_notify.
parent a7780700
...@@ -357,13 +357,10 @@ static inline struct task_struct * good_sigevent(sigevent_t * event) ...@@ -357,13 +357,10 @@ static inline struct task_struct * good_sigevent(sigevent_t * event)
rtn->tgid != current->tgid)) rtn->tgid != current->tgid))
return NULL; return NULL;
if ((event->sigev_notify & SIGEV_SIGNAL & MIPS_SIGEV) && if ((event->sigev_notify & ~SIGEV_NONE & MIPS_SIGEV) &&
((unsigned) (event->sigev_signo > SIGRTMAX))) ((unsigned) (event->sigev_signo > SIGRTMAX)))
return NULL; return NULL;
if (event->sigev_notify & ~(SIGEV_SIGNAL | SIGEV_THREAD_ID))
return NULL;
return rtn; return rtn;
} }
......
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