Actually it could even make sense, to have stuff running in the background
and wanting to be accounted in the overall load of this process group (for
example some kind of snapshot procedure that would be forke()d in the
background).
Plus this restriction was kind of un-kernelish.
Signed-off-by: Pierre Habouzit <pierre.habouzit@intersec.com>
struct rcu_head rcu;
struct timer_list timer;
wait_queue_head_t wqh;
struct rcu_head rcu;
struct timer_list timer;
wait_queue_head_t wqh;
unsigned concurrency;
unsigned registered;
unsigned concurrency;
unsigned registered;
kref_init(&sb->kref);
init_waitqueue_head(&sb->wqh);
kref_init(&sb->kref);
init_waitqueue_head(&sb->wqh);
- sb->tgid = current->tgid;
- sb->concurrency = num_online_cpus();
+ sb->concurrency = num_online_cpus();
init_timer(&sb->timer);
sb->timer.function = pwqr_sb_timer_cb;
sb->timer.data = (unsigned long)sb;
init_timer(&sb->timer);
sb->timer.function = pwqr_sb_timer_cb;
sb->timer.data = (unsigned long)sb;
static long
do_pwqr_wait(struct pwqr_sb *sb, struct pwqr_task *pwqt,
static long
do_pwqr_wait(struct pwqr_sb *sb, struct pwqr_task *pwqt,
- int is_wait, struct pwqr_ioc_wait __user *arg)
+ int is_wait, struct pwqr_ioc_wait __user *arg)
{
unsigned long flags;
struct pwqr_ioc_wait wait;
{
unsigned long flags;
struct pwqr_ioc_wait wait;
struct pwqr_task *pwqt;
int rc = 0;
struct pwqr_task *pwqt;
int rc = 0;
- if (sb->tgid != current->tgid)
- return -EBADFD;
-
switch (command) {
case PWQR_GET_CONC:
return sb->concurrency;
switch (command) {
case PWQR_GET_CONC:
return sb->concurrency;