diff options
Diffstat (limited to 'ipc/mqueue.c')
-rw-r--r-- | ipc/mqueue.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 20f1fed8fa48..c0b26dc4617b 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <linux/audit.h> | 29 | #include <linux/audit.h> |
30 | #include <linux/signal.h> | 30 | #include <linux/signal.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/nsproxy.h> | ||
33 | #include <linux/pid.h> | ||
32 | 34 | ||
33 | #include <net/sock.h> | 35 | #include <net/sock.h> |
34 | #include "util.h" | 36 | #include "util.h" |
@@ -330,7 +332,8 @@ static ssize_t mqueue_read_file(struct file *filp, char __user *u_data, | |||
330 | (info->notify_owner && | 332 | (info->notify_owner && |
331 | info->notify.sigev_notify == SIGEV_SIGNAL) ? | 333 | info->notify.sigev_notify == SIGEV_SIGNAL) ? |
332 | info->notify.sigev_signo : 0, | 334 | info->notify.sigev_signo : 0, |
333 | pid_nr(info->notify_owner)); | 335 | pid_nr_ns(info->notify_owner, |
336 | current->nsproxy->pid_ns)); | ||
334 | spin_unlock(&info->lock); | 337 | spin_unlock(&info->lock); |
335 | buffer[sizeof(buffer)-1] = '\0'; | 338 | buffer[sizeof(buffer)-1] = '\0'; |
336 | slen = strlen(buffer)+1; | 339 | slen = strlen(buffer)+1; |
@@ -507,7 +510,7 @@ static void __do_notify(struct mqueue_inode_info *info) | |||
507 | sig_i.si_errno = 0; | 510 | sig_i.si_errno = 0; |
508 | sig_i.si_code = SI_MESGQ; | 511 | sig_i.si_code = SI_MESGQ; |
509 | sig_i.si_value = info->notify.sigev_value; | 512 | sig_i.si_value = info->notify.sigev_value; |
510 | sig_i.si_pid = current->tgid; | 513 | sig_i.si_pid = task_pid_vnr(current); |
511 | sig_i.si_uid = current->uid; | 514 | sig_i.si_uid = current->uid; |
512 | 515 | ||
513 | kill_pid_info(info->notify.sigev_signo, | 516 | kill_pid_info(info->notify.sigev_signo, |