X-Git-Url: http://git.madism.org/?p=~madcoder%2Fpwqr.git;a=blobdiff_plain;f=kernel%2Fpwqr.c;fp=kernel%2Fpwqr.c;h=a6ff8e5e32b33fcfc5648fffd1e33d19d7bf9450;hp=8592a006701bb9847e9a3f4fa9995a9a516c1222;hb=3560071ae86bc78a0b4eafff5911a553e7651f64;hpb=c7cabb18799090c303666bab78827bc64ca2594e diff --git a/kernel/pwqr.c b/kernel/pwqr.c index 8592a00..a6ff8e5 100644 --- a/kernel/pwqr.c +++ b/kernel/pwqr.c @@ -60,7 +60,6 @@ struct pwqr_sb { struct rcu_head rcu; struct timer_list timer; wait_queue_head_t wqh; - pid_t tgid; unsigned concurrency; unsigned registered; @@ -149,8 +148,7 @@ static struct pwqr_sb *pwqr_sb_create(void) 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; @@ -374,7 +372,7 @@ static int pwqr_release(struct inode *inode, struct file *filp) 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; @@ -563,9 +561,6 @@ static long pwqr_ioctl(struct file *filp, unsigned command, unsigned long arg) struct pwqr_task *pwqt; int rc = 0; - if (sb->tgid != current->tgid) - return -EBADFD; - switch (command) { case PWQR_GET_CONC: return sb->concurrency;