From: "Serge E. Hallyn" <serue@us.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Hubertus Franke <frankeh@watson.ibm.com>,
Dave Hansen <haveblue@us.ibm.com>
Subject: [RFC] [PATCH 05/13] Change pid accesses: ipc
Date: Mon, 14 Nov 2005 15:23:46 -0600 [thread overview]
Message-ID: <20051114212527.130944000@sergelap> (raw)
In-Reply-To: <20051114212341.724084000@sergelap>
[-- Attachment #1: B4-change-pid-tgid-references-ipc --]
[-- Type: text/plain, Size: 4948 bytes --]
Replace-Subject: Change pid accesses: ipc
From: Serge Hallyn <serue@us.ibm.com>
Change pid accesses for ipc/.
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
---
ipc/mqueue.c | 8 ++++----
ipc/msg.c | 6 +++---
ipc/sem.c | 8 ++++----
ipc/shm.c | 6 +++---
4 files changed, 14 insertions(+), 14 deletions(-)
Index: linux-2.6.15-rc1/ipc/mqueue.c
===================================================================
--- linux-2.6.15-rc1.orig/ipc/mqueue.c
+++ linux-2.6.15-rc1/ipc/mqueue.c
@@ -359,7 +359,7 @@ static int mqueue_flush_file(struct file
struct mqueue_inode_info *info = MQUEUE_I(filp->f_dentry->d_inode);
spin_lock(&info->lock);
- if (current->tgid == info->notify_owner)
+ if (task_tgid(current) == info->notify_owner)
remove_notification(info);
spin_unlock(&info->lock);
@@ -511,7 +511,7 @@ static void __do_notify(struct mqueue_in
sig_i.si_errno = 0;
sig_i.si_code = SI_MESGQ;
sig_i.si_value = info->notify.sigev_value;
- sig_i.si_pid = current->tgid;
+ sig_i.si_pid = task_tgid(current);
sig_i.si_uid = current->uid;
kill_proc_info(info->notify.sigev_signo,
@@ -1034,7 +1034,7 @@ retry:
ret = 0;
spin_lock(&info->lock);
if (u_notification == NULL) {
- if (info->notify_owner == current->tgid) {
+ if (info->notify_owner == task_tgid(current)) {
remove_notification(info);
inode->i_atime = inode->i_ctime = CURRENT_TIME;
}
@@ -1058,7 +1058,7 @@ retry:
info->notify.sigev_notify = SIGEV_SIGNAL;
break;
}
- info->notify_owner = current->tgid;
+ info->notify_owner = task_tgid(current);
inode->i_atime = inode->i_ctime = CURRENT_TIME;
}
spin_unlock(&info->lock);
Index: linux-2.6.15-rc1/ipc/msg.c
===================================================================
--- linux-2.6.15-rc1.orig/ipc/msg.c
+++ linux-2.6.15-rc1/ipc/msg.c
@@ -539,7 +539,7 @@ static inline int pipelined_send(struct
msr->r_msg = ERR_PTR(-E2BIG);
} else {
msr->r_msg = NULL;
- msq->q_lrpid = msr->r_tsk->pid;
+ msq->q_lrpid = task_pid(msr->r_tsk);
msq->q_rtime = get_seconds();
wake_up_process(msr->r_tsk);
smp_mb();
@@ -621,7 +621,7 @@ asmlinkage long sys_msgsnd (int msqid, s
}
}
- msq->q_lspid = current->tgid;
+ msq->q_lspid = task_tgid(current);
msq->q_stime = get_seconds();
if(!pipelined_send(msq,msg)) {
@@ -717,7 +717,7 @@ asmlinkage long sys_msgrcv (int msqid, s
list_del(&msg->m_list);
msq->q_qnum--;
msq->q_rtime = get_seconds();
- msq->q_lrpid = current->tgid;
+ msq->q_lrpid = task_tgid(current);
msq->q_cbytes -= msg->m_ts;
atomic_sub(msg->m_ts,&msg_bytes);
atomic_dec(&msg_hdrs);
Index: linux-2.6.15-rc1/ipc/sem.c
===================================================================
--- linux-2.6.15-rc1.orig/ipc/sem.c
+++ linux-2.6.15-rc1/ipc/sem.c
@@ -740,7 +740,7 @@ static int semctl_main(int semid, int se
for (un = sma->undo; un; un = un->id_next)
un->semadj[semnum] = 0;
curr->semval = val;
- curr->sempid = current->tgid;
+ curr->sempid = task_tgid(current);
sma->sem_ctime = get_seconds();
/* maybe some queued-up processes were waiting for this */
update_queue(sma);
@@ -1132,7 +1132,7 @@ retry_undos:
if (error)
goto out_unlock_free;
- error = try_atomic_semop (sma, sops, nsops, un, current->tgid);
+ error = try_atomic_semop (sma, sops, nsops, un, task_tgid(current));
if (error <= 0) {
if (alter && error == 0)
update_queue (sma);
@@ -1147,7 +1147,7 @@ retry_undos:
queue.sops = sops;
queue.nsops = nsops;
queue.undo = un;
- queue.pid = current->tgid;
+ queue.pid = task_tgid(current);
queue.id = semid;
queue.alter = alter;
if (alter)
@@ -1317,7 +1317,7 @@ found:
sem->semval = 0;
if (sem->semval > SEMVMX)
sem->semval = SEMVMX;
- sem->sempid = current->tgid;
+ sem->sempid = task_tgid(current);
}
}
sma->sem_otime = get_seconds();
Index: linux-2.6.15-rc1/ipc/shm.c
===================================================================
--- linux-2.6.15-rc1.orig/ipc/shm.c
+++ linux-2.6.15-rc1/ipc/shm.c
@@ -94,7 +94,7 @@ static inline void shm_inc (int id) {
if(!(shp = shm_lock(id)))
BUG();
shp->shm_atim = get_seconds();
- shp->shm_lprid = current->tgid;
+ shp->shm_lprid = task_tgid(current);
shp->shm_nattch++;
shm_unlock(shp);
}
@@ -144,7 +144,7 @@ static void shm_close (struct vm_area_st
/* remove from the list of attaches of the shm segment */
if(!(shp = shm_lock(id)))
BUG();
- shp->shm_lprid = current->tgid;
+ shp->shm_lprid = task_tgid(current);
shp->shm_dtim = get_seconds();
shp->shm_nattch--;
if(shp->shm_nattch == 0 &&
@@ -232,7 +232,7 @@ static int newseg (key_t key, int shmflg
if(id == -1)
goto no_id;
- shp->shm_cprid = current->tgid;
+ shp->shm_cprid = task_tgid(current);
shp->shm_lprid = 0;
shp->shm_atim = shp->shm_dtim = 0;
shp->shm_ctim = get_seconds();
--
next prev parent reply other threads:[~2005-11-14 21:32 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-14 21:23 [RFC] [PATCH 00/13] Introduce task_pid api Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 01/13] Change pid accesses: drivers Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 02/13] Change pid accesses: most archs Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 03/13] Change pid accesses: filesystems Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 04/13] Change pid accesses: include/ Serge E. Hallyn
2005-11-14 21:23 ` Serge E. Hallyn [this message]
2005-11-14 21:23 ` [RFC] [PATCH 06/13] Change pid accesses: kernel/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 07/13] Change pid accesses: lib/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 08/13] Change pid accesses: mm/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 09/13] Change pid accesses: net/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 10/13] Change pid accesses: security/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 11/13] Change pid accesses: sound/ Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 12/13] Change pid accesses: ia64 and mips Serge E. Hallyn
2005-11-15 23:08 ` Keith Owens
2005-11-16 11:58 ` Serge E. Hallyn
2005-11-16 13:53 ` Serge E. Hallyn
2005-11-14 21:23 ` [RFC] [PATCH 13/13] Define new task_pid api Serge E. Hallyn
2005-11-14 23:36 ` [RFC] [PATCH 00/13] Introduce " Paul Jackson
2005-11-15 1:01 ` Serge E. Hallyn
2005-11-15 1:35 ` Paul Jackson
2005-11-15 1:51 ` Paul Jackson
2005-11-15 2:29 ` Serge E. Hallyn
2005-11-15 3:37 ` Paul Jackson
2005-11-15 5:15 ` Serge E. Hallyn
2005-11-15 6:35 ` Paul Jackson
2005-11-15 8:11 ` Serge E. Hallyn
2005-11-15 9:06 ` Paul Jackson
2005-11-15 10:07 ` Dave Hansen
2005-11-15 18:10 ` Paul Jackson
2005-11-15 11:59 ` Robin Holt
2005-11-15 13:32 ` Serge E. Hallyn
2005-11-15 14:37 ` Hubertus Franke
2005-11-15 18:39 ` Paul Jackson
2005-11-15 18:54 ` Hubertus Franke
2005-11-15 19:00 ` Serge E. Hallyn
2005-11-15 19:17 ` Hubertus Franke
2005-11-15 22:11 ` Paul Jackson
2005-11-15 23:15 ` Cedric Le Goater
2005-11-15 23:28 ` Paul Jackson
2005-11-15 16:47 ` Greg KH
2005-11-15 17:08 ` Serge E. Hallyn
2005-11-15 17:33 ` Dave Hansen
2005-11-15 5:51 ` Serge E. Hallyn
2005-11-13 15:22 ` Pavel Machek
2005-11-16 19:36 ` Kyle Moffett
2005-11-16 20:36 ` Pavel Machek
2005-11-16 20:48 ` Dave Hansen
2005-11-19 23:30 ` Pavel Machek
2005-11-20 22:38 ` Serge E. Hallyn
2005-12-07 14:53 ` Eric W. Biederman
2005-11-20 23:29 ` Nix
2005-11-16 21:07 ` Paul Jackson
2005-11-16 20:24 ` Dave Hansen
2005-11-15 13:34 ` Serge E. Hallyn
2005-11-15 11:17 ` Robin Holt
2005-11-15 12:01 ` Dave Hansen
2005-11-15 19:21 ` Ray Bryant
2005-11-15 19:41 ` Serge E. Hallyn
2005-11-15 20:30 ` Ray Bryant
2005-11-15 21:05 ` Serge E. Hallyn
2005-11-15 22:43 ` Paul Jackson
2005-11-15 22:55 ` Cedric Le Goater
2005-11-16 1:12 ` Paul Jackson
2005-12-07 14:46 ` Eric W. Biederman
2005-12-07 17:47 ` Dave Hansen
2005-12-07 17:55 ` Arjan van de Ven
2005-12-07 18:09 ` Dave Hansen
2005-12-07 19:00 ` Arjan van de Ven
2005-12-07 19:42 ` Eric W. Biederman
2005-12-07 22:13 ` Dave Hansen
2005-12-07 22:20 ` Arjan van de Ven
2005-12-12 10:55 ` Dave Airlie
2005-12-19 14:04 ` Eric W. Biederman
2005-12-07 19:19 ` Eric W. Biederman
2005-12-07 21:40 ` Dave Hansen
2005-12-07 22:17 ` Eric W. Biederman
2004-12-14 15:23 ` Pavel Machek
2005-12-14 13:40 ` Arjan van de Ven
2005-12-14 16:29 ` Serge E. Hallyn
2005-12-07 22:31 ` Dave Hansen
2005-12-07 22:51 ` Eric W. Biederman
2005-12-08 5:42 ` Jeff Dike
2005-12-08 10:09 ` Andi Kleen
2005-12-07 22:17 ` Cedric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051114212527.130944000@sergelap \
--to=serue@us.ibm.com \
--cc=frankeh@watson.ibm.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome