aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/ll_rw_blk.c2
-rw-r--r--drivers/block/nbd.c2
-rw-r--r--drivers/cdrom/cdrom.c2
-rw-r--r--drivers/char/drm/drm_bufs.c2
-rw-r--r--drivers/char/drm/drm_drv.c2
-rw-r--r--drivers/char/drm/drm_fops.c7
-rw-r--r--drivers/char/drm/drm_lock.c6
-rw-r--r--drivers/char/drm/drm_os_linux.h2
-rw-r--r--drivers/char/drm/i810_dma.c2
-rw-r--r--drivers/char/drm/i830_dma.c2
-rw-r--r--drivers/char/sx.c2
-rw-r--r--drivers/char/tty_io.c6
-rw-r--r--drivers/hid/hidraw.c4
-rw-r--r--drivers/md/md.c2
-rw-r--r--drivers/media/video/zoran_driver.c4
-rw-r--r--drivers/mtd/ubi/wl.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_ioctl.c2
-rw-r--r--drivers/scsi/libsas/sas_discover.c8
-rw-r--r--drivers/usb/core/devio.c2
-rw-r--r--drivers/usb/gadget/file_storage.c2
-rw-r--r--fs/cifs/connect.c2
-rw-r--r--fs/dlm/user.c2
-rw-r--r--fs/fs-writeback.c2
-rw-r--r--fs/jffs2/debug.h8
-rw-r--r--fs/nfsd/vfs.c6
-rw-r--r--fs/ocfs2/cluster/heartbeat.c2
-rw-r--r--fs/ocfs2/cluster/masklog.h2
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c10
-rw-r--r--include/linux/reiserfs_fs.h2
-rw-r--r--include/net/9p/9p.h4
-rw-r--r--kernel/cpu.c3
-rw-r--r--kernel/exit.c2
-rw-r--r--kernel/lockdep.c22
-rw-r--r--kernel/rtmutex-debug.c15
-rw-r--r--kernel/rtmutex.c2
-rw-r--r--kernel/sched.c7
-rw-r--r--kernel/signal.c2
-rw-r--r--kernel/softlockup.c2
-rw-r--r--kernel/workqueue.c2
-rw-r--r--lib/spinlock_debug.c8
-rw-r--r--mm/oom_kill.c5
-rw-r--r--net/core/pktgen.c2
-rw-r--r--net/core/sock.c2
-rw-r--r--net/ipv4/ipvs/ip_vs_sync.c4
-rw-r--r--net/ipv4/tcp.c2
-rw-r--r--net/llc/af_llc.c2
-rw-r--r--net/sunrpc/sched.c2
47 files changed, 97 insertions, 90 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 501edfa807a0..8025d646ab30 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -3367,7 +3367,7 @@ void submit_bio(int rw, struct bio *bio)
3367 if (unlikely(block_dump)) { 3367 if (unlikely(block_dump)) {
3368 char b[BDEVNAME_SIZE]; 3368 char b[BDEVNAME_SIZE];
3369 printk(KERN_DEBUG "%s(%d): %s block %Lu on %s\n", 3369 printk(KERN_DEBUG "%s(%d): %s block %Lu on %s\n",
3370 current->comm, current->pid, 3370 current->comm, task_pid_nr(current),
3371 (rw & WRITE) ? "WRITE" : "READ", 3371 (rw & WRITE) ? "WRITE" : "READ",
3372 (unsigned long long)bio->bi_sector, 3372 (unsigned long long)bio->bi_sector,
3373 bdevname(bio->bi_bdev,b)); 3373 bdevname(bio->bi_bdev,b));
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index cb136a919f2a..ac4a0cb217ab 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -188,7 +188,7 @@ static int sock_xmit(struct nbd_device *lo, int send, void *buf, int size,
188 if (signal_pending(current)) { 188 if (signal_pending(current)) {
189 siginfo_t info; 189 siginfo_t info;
190 printk(KERN_WARNING "nbd (pid %d: %s) got signal %d\n", 190 printk(KERN_WARNING "nbd (pid %d: %s) got signal %d\n",
191 current->pid, current->comm, 191 task_pid_nr(current), current->comm,
192 dequeue_signal_lock(current, &current->blocked, &info)); 192 dequeue_signal_lock(current, &current->blocked, &info));
193 result = -EINTR; 193 result = -EINTR;
194 sock_shutdown(lo, !send); 194 sock_shutdown(lo, !send);
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index d70745c84250..af0561053167 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -1107,7 +1107,7 @@ int open_for_data(struct cdrom_device_info * cdi)
1107 is the default case! */ 1107 is the default case! */
1108 cdinfo(CD_OPEN, "bummer. wrong media type.\n"); 1108 cdinfo(CD_OPEN, "bummer. wrong media type.\n");
1109 cdinfo(CD_WARNING, "pid %d must open device O_NONBLOCK!\n", 1109 cdinfo(CD_WARNING, "pid %d must open device O_NONBLOCK!\n",
1110 (unsigned int)current->pid); 1110 (unsigned int)task_pid_nr(current));
1111 ret=-EMEDIUMTYPE; 1111 ret=-EMEDIUMTYPE;
1112 goto clean_up_and_return; 1112 goto clean_up_and_return;
1113 } 1113 }
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c
index 856774fbe025..d24a6c2c2c24 100644
--- a/drivers/char/drm/drm_bufs.c
+++ b/drivers/char/drm/drm_bufs.c
@@ -1456,7 +1456,7 @@ int drm_freebufs(struct drm_device *dev, void *data,
1456 buf = dma->buflist[idx]; 1456 buf = dma->buflist[idx];
1457 if (buf->file_priv != file_priv) { 1457 if (buf->file_priv != file_priv) {
1458 DRM_ERROR("Process %d freeing buffer not owned\n", 1458 DRM_ERROR("Process %d freeing buffer not owned\n",
1459 current->pid); 1459 task_pid_nr(current));
1460 return -EINVAL; 1460 return -EINVAL;
1461 } 1461 }
1462 drm_free_buffer(dev, buf); 1462 drm_free_buffer(dev, buf);
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c
index 72668b15e5ce..44a46268b02b 100644
--- a/drivers/char/drm/drm_drv.c
+++ b/drivers/char/drm/drm_drv.c
@@ -463,7 +463,7 @@ int drm_ioctl(struct inode *inode, struct file *filp,
463 ++file_priv->ioctl_count; 463 ++file_priv->ioctl_count;
464 464
465 DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n", 465 DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
466 current->pid, cmd, nr, 466 task_pid_nr(current), cmd, nr,
467 (long)old_encode_dev(file_priv->head->device), 467 (long)old_encode_dev(file_priv->head->device),
468 file_priv->authenticated); 468 file_priv->authenticated);
469 469
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
index f383fc37190c..3992f73299cc 100644
--- a/drivers/char/drm/drm_fops.c
+++ b/drivers/char/drm/drm_fops.c
@@ -234,7 +234,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
234 if (!drm_cpu_valid()) 234 if (!drm_cpu_valid())
235 return -EINVAL; 235 return -EINVAL;
236 236
237 DRM_DEBUG("pid = %d, minor = %d\n", current->pid, minor); 237 DRM_DEBUG("pid = %d, minor = %d\n", task_pid_nr(current), minor);
238 238
239 priv = drm_alloc(sizeof(*priv), DRM_MEM_FILES); 239 priv = drm_alloc(sizeof(*priv), DRM_MEM_FILES);
240 if (!priv) 240 if (!priv)
@@ -244,7 +244,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
244 filp->private_data = priv; 244 filp->private_data = priv;
245 priv->filp = filp; 245 priv->filp = filp;
246 priv->uid = current->euid; 246 priv->uid = current->euid;
247 priv->pid = current->pid; 247 priv->pid = task_pid_nr(current);
248 priv->minor = minor; 248 priv->minor = minor;
249 priv->head = drm_heads[minor]; 249 priv->head = drm_heads[minor];
250 priv->ioctl_count = 0; 250 priv->ioctl_count = 0;
@@ -339,7 +339,8 @@ int drm_release(struct inode *inode, struct file *filp)
339 */ 339 */
340 340
341 DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n", 341 DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n",
342 current->pid, (long)old_encode_dev(file_priv->head->device), 342 task_pid_nr(current),
343 (long)old_encode_dev(file_priv->head->device),
343 dev->open_count); 344 dev->open_count);
344 345
345 if (dev->driver->reclaim_buffers_locked && dev->lock.hw_lock) { 346 if (dev->driver->reclaim_buffers_locked && dev->lock.hw_lock) {
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c
index c6b73e744d67..bea2a7d5b2b2 100644
--- a/drivers/char/drm/drm_lock.c
+++ b/drivers/char/drm/drm_lock.c
@@ -58,12 +58,12 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
58 58
59 if (lock->context == DRM_KERNEL_CONTEXT) { 59 if (lock->context == DRM_KERNEL_CONTEXT) {
60 DRM_ERROR("Process %d using kernel context %d\n", 60 DRM_ERROR("Process %d using kernel context %d\n",
61 current->pid, lock->context); 61 task_pid_nr(current), lock->context);
62 return -EINVAL; 62 return -EINVAL;
63 } 63 }
64 64
65 DRM_DEBUG("%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n", 65 DRM_DEBUG("%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n",
66 lock->context, current->pid, 66 lock->context, task_pid_nr(current),
67 dev->lock.hw_lock->lock, lock->flags); 67 dev->lock.hw_lock->lock, lock->flags);
68 68
69 if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE)) 69 if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE))
@@ -153,7 +153,7 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)
153 153
154 if (lock->context == DRM_KERNEL_CONTEXT) { 154 if (lock->context == DRM_KERNEL_CONTEXT) {
155 DRM_ERROR("Process %d using kernel context %d\n", 155 DRM_ERROR("Process %d using kernel context %d\n",
156 current->pid, lock->context); 156 task_pid_nr(current), lock->context);
157 return -EINVAL; 157 return -EINVAL;
158 } 158 }
159 159
diff --git a/drivers/char/drm/drm_os_linux.h b/drivers/char/drm/drm_os_linux.h
index 114e54e0f61b..76e44ac94fb5 100644
--- a/drivers/char/drm/drm_os_linux.h
+++ b/drivers/char/drm/drm_os_linux.h
@@ -7,7 +7,7 @@
7#include <linux/delay.h> 7#include <linux/delay.h>
8 8
9/** Current process ID */ 9/** Current process ID */
10#define DRM_CURRENTPID current->pid 10#define DRM_CURRENTPID task_pid_nr(current)
11#define DRM_SUSER(p) capable(CAP_SYS_ADMIN) 11#define DRM_SUSER(p) capable(CAP_SYS_ADMIN)
12#define DRM_UDELAY(d) udelay(d) 12#define DRM_UDELAY(d) udelay(d)
13/** Read a byte from a MMIO region */ 13/** Read a byte from a MMIO region */
diff --git a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c
index 8e841bdee6dc..eb381a7c5bee 100644
--- a/drivers/char/drm/i810_dma.c
+++ b/drivers/char/drm/i810_dma.c
@@ -1024,7 +1024,7 @@ static int i810_getbuf(struct drm_device *dev, void *data,
1024 retcode = i810_dma_get_buffer(dev, d, file_priv); 1024 retcode = i810_dma_get_buffer(dev, d, file_priv);
1025 1025
1026 DRM_DEBUG("i810_dma: %d returning %d, granted = %d\n", 1026 DRM_DEBUG("i810_dma: %d returning %d, granted = %d\n",
1027 current->pid, retcode, d->granted); 1027 task_pid_nr(current), retcode, d->granted);
1028 1028
1029 sarea_priv->last_dispatch = (int)hw_status[5]; 1029 sarea_priv->last_dispatch = (int)hw_status[5];
1030 1030
diff --git a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c
index 43a1f78712d6..69a363edb0d2 100644
--- a/drivers/char/drm/i830_dma.c
+++ b/drivers/char/drm/i830_dma.c
@@ -1409,7 +1409,7 @@ static int i830_getbuf(struct drm_device *dev, void *data,
1409 retcode = i830_dma_get_buffer(dev, d, file_priv); 1409 retcode = i830_dma_get_buffer(dev, d, file_priv);
1410 1410
1411 DRM_DEBUG("i830_dma: %d returning %d, granted = %d\n", 1411 DRM_DEBUG("i830_dma: %d returning %d, granted = %d\n",
1412 current->pid, retcode, d->granted); 1412 task_pid_nr(current), retcode, d->granted);
1413 1413
1414 sarea_priv->last_dispatch = (int)hw_status[5]; 1414 sarea_priv->last_dispatch = (int)hw_status[5];
1415 1415
diff --git a/drivers/char/sx.c b/drivers/char/sx.c
index 85a23283dff5..a6e1c9ba1217 100644
--- a/drivers/char/sx.c
+++ b/drivers/char/sx.c
@@ -1467,7 +1467,7 @@ static int sx_open(struct tty_struct *tty, struct file *filp)
1467 1467
1468 line = tty->index; 1468 line = tty->index;
1469 sx_dprintk(SX_DEBUG_OPEN, "%d: opening line %d. tty=%p ctty=%p, " 1469 sx_dprintk(SX_DEBUG_OPEN, "%d: opening line %d. tty=%p ctty=%p, "
1470 "np=%d)\n", current->pid, line, tty, 1470 "np=%d)\n", task_pid_nr(current), line, tty,
1471 current->signal->tty, sx_nports); 1471 current->signal->tty, sx_nports);
1472 1472
1473 if ((line < 0) || (line >= SX_NPORTS) || (line >= sx_nports)) 1473 if ((line < 0) || (line >= SX_NPORTS) || (line >= sx_nports))
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index e40544947135..13a53575a016 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3530,7 +3530,7 @@ void __do_SAK(struct tty_struct *tty)
3530 do_each_pid_task(session, PIDTYPE_SID, p) { 3530 do_each_pid_task(session, PIDTYPE_SID, p) {
3531 printk(KERN_NOTICE "SAK: killed process %d" 3531 printk(KERN_NOTICE "SAK: killed process %d"
3532 " (%s): task_session_nr(p)==tty->session\n", 3532 " (%s): task_session_nr(p)==tty->session\n",
3533 p->pid, p->comm); 3533 task_pid_nr(p), p->comm);
3534 send_sig(SIGKILL, p, 1); 3534 send_sig(SIGKILL, p, 1);
3535 } while_each_pid_task(session, PIDTYPE_SID, p); 3535 } while_each_pid_task(session, PIDTYPE_SID, p);
3536 /* Now kill any processes that happen to have the 3536 /* Now kill any processes that happen to have the
@@ -3540,7 +3540,7 @@ void __do_SAK(struct tty_struct *tty)
3540 if (p->signal->tty == tty) { 3540 if (p->signal->tty == tty) {
3541 printk(KERN_NOTICE "SAK: killed process %d" 3541 printk(KERN_NOTICE "SAK: killed process %d"
3542 " (%s): task_session_nr(p)==tty->session\n", 3542 " (%s): task_session_nr(p)==tty->session\n",
3543 p->pid, p->comm); 3543 task_pid_nr(p), p->comm);
3544 send_sig(SIGKILL, p, 1); 3544 send_sig(SIGKILL, p, 1);
3545 continue; 3545 continue;
3546 } 3546 }
@@ -3560,7 +3560,7 @@ void __do_SAK(struct tty_struct *tty)
3560 filp->private_data == tty) { 3560 filp->private_data == tty) {
3561 printk(KERN_NOTICE "SAK: killed process %d" 3561 printk(KERN_NOTICE "SAK: killed process %d"
3562 " (%s): fd#%d opened to the tty\n", 3562 " (%s): fd#%d opened to the tty\n",
3563 p->pid, p->comm, i); 3563 task_pid_nr(p), p->comm, i);
3564 force_sig(SIGKILL, p); 3564 force_sig(SIGKILL, p);
3565 break; 3565 break;
3566 } 3566 }
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index a702e2f6da7d..1ca6f4635eeb 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -113,13 +113,13 @@ static ssize_t hidraw_write(struct file *file, const char __user *buffer, size_t
113 113
114 if (count > HID_MIN_BUFFER_SIZE) { 114 if (count > HID_MIN_BUFFER_SIZE) {
115 printk(KERN_WARNING "hidraw: pid %d passed too large report\n", 115 printk(KERN_WARNING "hidraw: pid %d passed too large report\n",
116 current->pid); 116 task_pid_nr(current));
117 return -EINVAL; 117 return -EINVAL;
118 } 118 }
119 119
120 if (count < 2) { 120 if (count < 2) {
121 printk(KERN_WARNING "hidraw: pid %d passed too short report\n", 121 printk(KERN_WARNING "hidraw: pid %d passed too short report\n",
122 current->pid); 122 task_pid_nr(current));
123 return -EINVAL; 123 return -EINVAL;
124 } 124 }
125 125
diff --git a/drivers/md/md.c b/drivers/md/md.c
index c059ae6f37e5..808cd9549456 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4717,7 +4717,7 @@ mdk_thread_t *md_register_thread(void (*run) (mddev_t *), mddev_t *mddev,
4717 4717
4718void md_unregister_thread(mdk_thread_t *thread) 4718void md_unregister_thread(mdk_thread_t *thread)
4719{ 4719{
4720 dprintk("interrupting MD-thread pid %d\n", thread->tsk->pid); 4720 dprintk("interrupting MD-thread pid %d\n", task_pid_nr(thread->tsk));
4721 4721
4722 kthread_stop(thread->tsk); 4722 kthread_stop(thread->tsk);
4723 kfree(thread); 4723 kfree(thread);
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c
index 1c14fa2bd411..419e5af78533 100644
--- a/drivers/media/video/zoran_driver.c
+++ b/drivers/media/video/zoran_driver.c
@@ -1285,7 +1285,7 @@ zoran_open (struct inode *inode,
1285 } 1285 }
1286 1286
1287 dprintk(1, KERN_INFO "%s: zoran_open(%s, pid=[%d]), users(-)=%d\n", 1287 dprintk(1, KERN_INFO "%s: zoran_open(%s, pid=[%d]), users(-)=%d\n",
1288 ZR_DEVNAME(zr), current->comm, current->pid, zr->user); 1288 ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user);
1289 1289
1290 /* now, create the open()-specific file_ops struct */ 1290 /* now, create the open()-specific file_ops struct */
1291 fh = kzalloc(sizeof(struct zoran_fh), GFP_KERNEL); 1291 fh = kzalloc(sizeof(struct zoran_fh), GFP_KERNEL);
@@ -1358,7 +1358,7 @@ zoran_close (struct inode *inode,
1358 struct zoran *zr = fh->zr; 1358 struct zoran *zr = fh->zr;
1359 1359
1360 dprintk(1, KERN_INFO "%s: zoran_close(%s, pid=[%d]), users(+)=%d\n", 1360 dprintk(1, KERN_INFO "%s: zoran_close(%s, pid=[%d]), users(+)=%d\n",
1361 ZR_DEVNAME(zr), current->comm, current->pid, zr->user); 1361 ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user);
1362 1362
1363 /* kernel locks (fs/device.c), so don't do that ourselves 1363 /* kernel locks (fs/device.c), so don't do that ourselves
1364 * (prevents deadlocks) */ 1364 * (prevents deadlocks) */
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index a4f1bf33164a..6330c8cc72b5 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -1309,7 +1309,7 @@ static int ubi_thread(void *u)
1309 struct ubi_device *ubi = u; 1309 struct ubi_device *ubi = u;
1310 1310
1311 ubi_msg("background thread \"%s\" started, PID %d", 1311 ubi_msg("background thread \"%s\" started, PID %d",
1312 ubi->bgt_name, current->pid); 1312 ubi->bgt_name, task_pid_nr(current));
1313 1313
1314 set_freezable(); 1314 set_freezable();
1315 for (;;) { 1315 for (;;) {
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 40f516d42c5e..d8f5efcfcab9 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -2920,7 +2920,7 @@ static int prism2_ioctl_priv_monitor(struct net_device *dev, int *i)
2920 2920
2921 printk(KERN_DEBUG "%s: process %d (%s) used deprecated iwpriv monitor " 2921 printk(KERN_DEBUG "%s: process %d (%s) used deprecated iwpriv monitor "
2922 "- update software to use iwconfig mode monitor\n", 2922 "- update software to use iwconfig mode monitor\n",
2923 dev->name, current->pid, current->comm); 2923 dev->name, task_pid_nr(current), current->comm);
2924 2924
2925 /* Backward compatibility code - this can be removed at some point */ 2925 /* Backward compatibility code - this can be removed at some point */
2926 2926
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c
index 7ef0afc3cd68..5f3a0d7b18de 100644
--- a/drivers/scsi/libsas/sas_discover.c
+++ b/drivers/scsi/libsas/sas_discover.c
@@ -285,7 +285,7 @@ static void sas_discover_domain(struct work_struct *work)
285 dev = port->port_dev; 285 dev = port->port_dev;
286 286
287 SAS_DPRINTK("DOING DISCOVERY on port %d, pid:%d\n", port->id, 287 SAS_DPRINTK("DOING DISCOVERY on port %d, pid:%d\n", port->id,
288 current->pid); 288 task_pid_nr(current));
289 289
290 switch (dev->dev_type) { 290 switch (dev->dev_type) {
291 case SAS_END_DEV: 291 case SAS_END_DEV:
@@ -320,7 +320,7 @@ static void sas_discover_domain(struct work_struct *work)
320 } 320 }
321 321
322 SAS_DPRINTK("DONE DISCOVERY on port %d, pid:%d, result:%d\n", port->id, 322 SAS_DPRINTK("DONE DISCOVERY on port %d, pid:%d, result:%d\n", port->id,
323 current->pid, error); 323 task_pid_nr(current), error);
324} 324}
325 325
326static void sas_revalidate_domain(struct work_struct *work) 326static void sas_revalidate_domain(struct work_struct *work)
@@ -334,12 +334,12 @@ static void sas_revalidate_domain(struct work_struct *work)
334 &port->disc.pending); 334 &port->disc.pending);
335 335
336 SAS_DPRINTK("REVALIDATING DOMAIN on port %d, pid:%d\n", port->id, 336 SAS_DPRINTK("REVALIDATING DOMAIN on port %d, pid:%d\n", port->id,
337 current->pid); 337 task_pid_nr(current));
338 if (port->port_dev) 338 if (port->port_dev)
339 res = sas_ex_revalidate_domain(port->port_dev); 339 res = sas_ex_revalidate_domain(port->port_dev);
340 340
341 SAS_DPRINTK("done REVALIDATING DOMAIN on port %d, pid:%d, res 0x%x\n", 341 SAS_DPRINTK("done REVALIDATING DOMAIN on port %d, pid:%d, res 0x%x\n",
342 port->id, current->pid, res); 342 port->id, task_pid_nr(current), res);
343} 343}
344 344
345/* ---------- Events ---------- */ 345/* ---------- Events ---------- */
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index f013b4012c9a..1f4f6d02fe25 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -460,7 +460,7 @@ static int checkintf(struct dev_state *ps, unsigned int ifnum)
460 return 0; 460 return 0;
461 /* if not yet claimed, claim it for the driver */ 461 /* if not yet claimed, claim it for the driver */
462 dev_warn(&ps->dev->dev, "usbfs: process %d (%s) did not claim interface %u before use\n", 462 dev_warn(&ps->dev->dev, "usbfs: process %d (%s) did not claim interface %u before use\n",
463 current->pid, current->comm, ifnum); 463 task_pid_nr(current), current->comm, ifnum);
464 return claimintf(ps, ifnum); 464 return claimintf(ps, ifnum);
465} 465}
466 466
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index 73726c570a6e..1d174dcb3ac9 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -4006,7 +4006,7 @@ static int __init fsg_bind(struct usb_gadget *gadget)
4006 DBG(fsg, "removable=%d, stall=%d, buflen=%u\n", 4006 DBG(fsg, "removable=%d, stall=%d, buflen=%u\n",
4007 mod_data.removable, mod_data.can_stall, 4007 mod_data.removable, mod_data.can_stall,
4008 mod_data.buflen); 4008 mod_data.buflen);
4009 DBG(fsg, "I/O thread pid: %d\n", fsg->thread_task->pid); 4009 DBG(fsg, "I/O thread pid: %d\n", task_pid_nr(fsg->thread_task));
4010 4010
4011 set_bit(REGISTERED, &fsg->atomic_bitflags); 4011 set_bit(REGISTERED, &fsg->atomic_bitflags);
4012 4012
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 4af3588c1a96..370866cb3d48 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -352,7 +352,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
352 352
353 current->flags |= PF_MEMALLOC; 353 current->flags |= PF_MEMALLOC;
354 server->tsk = current; /* save process info to wake at shutdown */ 354 server->tsk = current; /* save process info to wake at shutdown */
355 cFYI(1, ("Demultiplex PID: %d", current->pid)); 355 cFYI(1, ("Demultiplex PID: %d", task_pid_nr(current)));
356 write_lock(&GlobalSMBSeslock); 356 write_lock(&GlobalSMBSeslock);
357 atomic_inc(&tcpSesAllocCount); 357 atomic_inc(&tcpSesAllocCount);
358 length = tcpSesAllocCount.counter; 358 length = tcpSesAllocCount.counter;
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 6438941ab1f8..4f741546f4bb 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -456,7 +456,7 @@ static int check_version(struct dlm_write_request *req)
456 printk(KERN_DEBUG "dlm: process %s (%d) version mismatch " 456 printk(KERN_DEBUG "dlm: process %s (%d) version mismatch "
457 "user (%d.%d.%d) kernel (%d.%d.%d)\n", 457 "user (%d.%d.%d) kernel (%d.%d.%d)\n",
458 current->comm, 458 current->comm,
459 current->pid, 459 task_pid_nr(current),
460 req->version[0], 460 req->version[0],
461 req->version[1], 461 req->version[1],
462 req->version[2], 462 req->version[2],
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 686734ff973d..0fca82021d76 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -89,7 +89,7 @@ void __mark_inode_dirty(struct inode *inode, int flags)
89 if (inode->i_ino || strcmp(inode->i_sb->s_id, "bdev")) 89 if (inode->i_ino || strcmp(inode->i_sb->s_id, "bdev"))
90 printk(KERN_DEBUG 90 printk(KERN_DEBUG
91 "%s(%d): dirtied inode %lu (%s) on %s\n", 91 "%s(%d): dirtied inode %lu (%s) on %s\n",
92 current->comm, current->pid, inode->i_ino, 92 current->comm, task_pid_nr(current), inode->i_ino,
93 name, inode->i_sb->s_id); 93 name, inode->i_sb->s_id);
94 } 94 }
95 95
diff --git a/fs/jffs2/debug.h b/fs/jffs2/debug.h
index 2a49f2c51a9f..4130adabd76e 100644
--- a/fs/jffs2/debug.h
+++ b/fs/jffs2/debug.h
@@ -80,28 +80,28 @@
80#define JFFS2_ERROR(fmt, ...) \ 80#define JFFS2_ERROR(fmt, ...) \
81 do { \ 81 do { \
82 printk(JFFS2_ERR_MSG_PREFIX \ 82 printk(JFFS2_ERR_MSG_PREFIX \
83 " (%d) %s: " fmt, current->pid, \ 83 " (%d) %s: " fmt, task_pid_nr(current), \
84 __FUNCTION__ , ##__VA_ARGS__); \ 84 __FUNCTION__ , ##__VA_ARGS__); \
85 } while(0) 85 } while(0)
86 86
87#define JFFS2_WARNING(fmt, ...) \ 87#define JFFS2_WARNING(fmt, ...) \
88 do { \ 88 do { \
89 printk(JFFS2_WARN_MSG_PREFIX \ 89 printk(JFFS2_WARN_MSG_PREFIX \
90 " (%d) %s: " fmt, current->pid, \ 90 " (%d) %s: " fmt, task_pid_nr(current), \
91 __FUNCTION__ , ##__VA_ARGS__); \ 91 __FUNCTION__ , ##__VA_ARGS__); \
92 } while(0) 92 } while(0)
93 93
94#define JFFS2_NOTICE(fmt, ...) \ 94#define JFFS2_NOTICE(fmt, ...) \
95 do { \ 95 do { \
96 printk(JFFS2_NOTICE_MSG_PREFIX \ 96 printk(JFFS2_NOTICE_MSG_PREFIX \
97 " (%d) %s: " fmt, current->pid, \ 97 " (%d) %s: " fmt, task_pid_nr(current), \
98 __FUNCTION__ , ##__VA_ARGS__); \ 98 __FUNCTION__ , ##__VA_ARGS__); \
99 } while(0) 99 } while(0)
100 100
101#define JFFS2_DEBUG(fmt, ...) \ 101#define JFFS2_DEBUG(fmt, ...) \
102 do { \ 102 do { \
103 printk(JFFS2_DBG_MSG_PREFIX \ 103 printk(JFFS2_DBG_MSG_PREFIX \
104 " (%d) %s: " fmt, current->pid, \ 104 " (%d) %s: " fmt, task_pid_nr(current), \
105 __FUNCTION__ , ##__VA_ARGS__); \ 105 __FUNCTION__ , ##__VA_ARGS__); \
106 } while(0) 106 } while(0)
107 107
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 46934c97f8f7..d0199189924c 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1029,13 +1029,13 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
1029 if (EX_WGATHER(exp)) { 1029 if (EX_WGATHER(exp)) {
1030 if (atomic_read(&inode->i_writecount) > 1 1030 if (atomic_read(&inode->i_writecount) > 1
1031 || (last_ino == inode->i_ino && last_dev == inode->i_sb->s_dev)) { 1031 || (last_ino == inode->i_ino && last_dev == inode->i_sb->s_dev)) {
1032 dprintk("nfsd: write defer %d\n", current->pid); 1032 dprintk("nfsd: write defer %d\n", task_pid_nr(current));
1033 msleep(10); 1033 msleep(10);
1034 dprintk("nfsd: write resume %d\n", current->pid); 1034 dprintk("nfsd: write resume %d\n", task_pid_nr(current));
1035 } 1035 }
1036 1036
1037 if (inode->i_state & I_DIRTY) { 1037 if (inode->i_state & I_DIRTY) {
1038 dprintk("nfsd: write sync %d\n", current->pid); 1038 dprintk("nfsd: write sync %d\n", task_pid_nr(current));
1039 host_err=nfsd_sync(file); 1039 host_err=nfsd_sync(file);
1040 } 1040 }
1041#if 0 1041#if 0
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index f14b541fab95..9cc7c0418b70 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1372,7 +1372,7 @@ static ssize_t o2hb_region_pid_read(struct o2hb_region *reg,
1372 1372
1373 spin_lock(&o2hb_live_lock); 1373 spin_lock(&o2hb_live_lock);
1374 if (reg->hr_task) 1374 if (reg->hr_task)
1375 pid = reg->hr_task->pid; 1375 pid = task_pid_nr(reg->hr_task);
1376 spin_unlock(&o2hb_live_lock); 1376 spin_unlock(&o2hb_live_lock);
1377 1377
1378 if (!pid) 1378 if (!pid)
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h
index 75cd877f6d42..cd046060114e 100644
--- a/fs/ocfs2/cluster/masklog.h
+++ b/fs/ocfs2/cluster/masklog.h
@@ -192,7 +192,7 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
192 * previous token if args expands to nothing. 192 * previous token if args expands to nothing.
193 */ 193 */
194#define __mlog_printk(level, fmt, args...) \ 194#define __mlog_printk(level, fmt, args...) \
195 printk(level "(%u,%lu):%s:%d " fmt, current->pid, \ 195 printk(level "(%u,%lu):%s:%d " fmt, task_pid_nr(current), \
196 __mlog_cpu_guess, __PRETTY_FUNCTION__, __LINE__ , \ 196 __mlog_cpu_guess, __PRETTY_FUNCTION__, __LINE__ , \
197 ##args) 197 ##args)
198 198
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index a2c33160bfd6..2fde7bf91434 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -259,7 +259,7 @@ static void dlm_print_reco_node_status(struct dlm_ctxt *dlm)
259 struct dlm_lock_resource *res; 259 struct dlm_lock_resource *res;
260 260
261 mlog(ML_NOTICE, "%s(%d): recovery info, state=%s, dead=%u, master=%u\n", 261 mlog(ML_NOTICE, "%s(%d): recovery info, state=%s, dead=%u, master=%u\n",
262 dlm->name, dlm->dlm_reco_thread_task->pid, 262 dlm->name, task_pid_nr(dlm->dlm_reco_thread_task),
263 dlm->reco.state & DLM_RECO_STATE_ACTIVE ? "ACTIVE" : "inactive", 263 dlm->reco.state & DLM_RECO_STATE_ACTIVE ? "ACTIVE" : "inactive",
264 dlm->reco.dead_node, dlm->reco.new_master); 264 dlm->reco.dead_node, dlm->reco.new_master);
265 265
@@ -420,7 +420,7 @@ void dlm_wait_for_recovery(struct dlm_ctxt *dlm)
420 if (dlm_in_recovery(dlm)) { 420 if (dlm_in_recovery(dlm)) {
421 mlog(0, "%s: reco thread %d in recovery: " 421 mlog(0, "%s: reco thread %d in recovery: "
422 "state=%d, master=%u, dead=%u\n", 422 "state=%d, master=%u, dead=%u\n",
423 dlm->name, dlm->dlm_reco_thread_task->pid, 423 dlm->name, task_pid_nr(dlm->dlm_reco_thread_task),
424 dlm->reco.state, dlm->reco.new_master, 424 dlm->reco.state, dlm->reco.new_master,
425 dlm->reco.dead_node); 425 dlm->reco.dead_node);
426 } 426 }
@@ -483,7 +483,7 @@ static int dlm_do_recovery(struct dlm_ctxt *dlm)
483 return 0; 483 return 0;
484 } 484 }
485 mlog(0, "%s(%d):recovery thread found node %u in the recovery map!\n", 485 mlog(0, "%s(%d):recovery thread found node %u in the recovery map!\n",
486 dlm->name, dlm->dlm_reco_thread_task->pid, 486 dlm->name, task_pid_nr(dlm->dlm_reco_thread_task),
487 dlm->reco.dead_node); 487 dlm->reco.dead_node);
488 spin_unlock(&dlm->spinlock); 488 spin_unlock(&dlm->spinlock);
489 489
@@ -507,7 +507,7 @@ static int dlm_do_recovery(struct dlm_ctxt *dlm)
507 mlog(0, "another node will master this recovery session.\n"); 507 mlog(0, "another node will master this recovery session.\n");
508 } 508 }
509 mlog(0, "dlm=%s (%d), new_master=%u, this node=%u, dead_node=%u\n", 509 mlog(0, "dlm=%s (%d), new_master=%u, this node=%u, dead_node=%u\n",
510 dlm->name, dlm->dlm_reco_thread_task->pid, dlm->reco.new_master, 510 dlm->name, task_pid_nr(dlm->dlm_reco_thread_task), dlm->reco.new_master,
511 dlm->node_num, dlm->reco.dead_node); 511 dlm->node_num, dlm->reco.dead_node);
512 512
513 /* it is safe to start everything back up here 513 /* it is safe to start everything back up here
@@ -520,7 +520,7 @@ static int dlm_do_recovery(struct dlm_ctxt *dlm)
520 520
521master_here: 521master_here:
522 mlog(0, "(%d) mastering recovery of %s:%u here(this=%u)!\n", 522 mlog(0, "(%d) mastering recovery of %s:%u here(this=%u)!\n",
523 dlm->dlm_reco_thread_task->pid, 523 task_pid_nr(dlm->dlm_reco_thread_task),
524 dlm->name, dlm->reco.dead_node, dlm->node_num); 524 dlm->name, dlm->reco.dead_node, dlm->node_num);
525 525
526 status = dlm_remaster_locks(dlm, dlm->reco.dead_node); 526 status = dlm_remaster_locks(dlm, dlm->reco.dead_node);
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index d8653bf232e3..72bfccd3da22 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -85,7 +85,7 @@ void reiserfs_warning(struct super_block *s, const char *fmt, ...);
85if( !( cond ) ) \ 85if( !( cond ) ) \
86 reiserfs_panic( NULL, "reiserfs[%i]: assertion " scond " failed at " \ 86 reiserfs_panic( NULL, "reiserfs[%i]: assertion " scond " failed at " \
87 __FILE__ ":%i:%s: " format "\n", \ 87 __FILE__ ":%i:%s: " format "\n", \
88 in_interrupt() ? -1 : current -> pid, __LINE__ , __FUNCTION__ , ##args ) 88 in_interrupt() ? -1 : task_pid_nr(current), __LINE__ , __FUNCTION__ , ##args )
89 89
90#define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args) 90#define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args)
91 91
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 686425a97b0f..625346c47ee2 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -44,7 +44,7 @@ extern unsigned int p9_debug_level;
44do { \ 44do { \
45 if ((p9_debug_level & level) == level) \ 45 if ((p9_debug_level & level) == level) \
46 printk(KERN_NOTICE "-- %s (%d): " \ 46 printk(KERN_NOTICE "-- %s (%d): " \
47 format , __FUNCTION__, current->pid , ## arg); \ 47 format , __FUNCTION__, task_pid_nr(current) , ## arg); \
48} while (0) 48} while (0)
49 49
50#define PRINT_FCALL_ERROR(s, fcall) P9_DPRINTK(P9_DEBUG_ERROR, \ 50#define PRINT_FCALL_ERROR(s, fcall) P9_DPRINTK(P9_DEBUG_ERROR, \
@@ -59,7 +59,7 @@ do { \
59#define P9_EPRINTK(level, format, arg...) \ 59#define P9_EPRINTK(level, format, arg...) \
60do { \ 60do { \
61 printk(level "9p: %s (%d): " \ 61 printk(level "9p: %s (%d): " \
62 format , __FUNCTION__, current->pid , ## arg); \ 62 format , __FUNCTION__, task_pid_nr(current), ## arg); \
63} while (0) 63} while (0)
64 64
65 65
diff --git a/kernel/cpu.c b/kernel/cpu.c
index a21f71af9d81..ebf6647a2bd4 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -98,7 +98,8 @@ static inline void check_for_tasks(int cpu)
98 !cputime_eq(p->stime, cputime_zero))) 98 !cputime_eq(p->stime, cputime_zero)))
99 printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d\ 99 printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d\
100 (state = %ld, flags = %x) \n", 100 (state = %ld, flags = %x) \n",
101 p->comm, p->pid, cpu, p->state, p->flags); 101 p->comm, task_pid_nr(p), cpu,
102 p->state, p->flags);
102 } 103 }
103 write_unlock_irq(&tasklist_lock); 104 write_unlock_irq(&tasklist_lock);
104} 105}
diff --git a/kernel/exit.c b/kernel/exit.c
index 6838d4d77e05..7dab2defec63 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -959,7 +959,7 @@ fastcall NORET_TYPE void do_exit(long code)
959 959
960 if (unlikely(in_atomic())) 960 if (unlikely(in_atomic()))
961 printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n", 961 printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
962 current->comm, current->pid, 962 current->comm, task_pid_nr(current),
963 preempt_count()); 963 preempt_count());
964 964
965 acct_update_integrals(tsk); 965 acct_update_integrals(tsk);
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index b5392ff7e6a6..55fe0c7cd95f 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -511,11 +511,11 @@ static void lockdep_print_held_locks(struct task_struct *curr)
511 int i, depth = curr->lockdep_depth; 511 int i, depth = curr->lockdep_depth;
512 512
513 if (!depth) { 513 if (!depth) {
514 printk("no locks held by %s/%d.\n", curr->comm, curr->pid); 514 printk("no locks held by %s/%d.\n", curr->comm, task_pid_nr(curr));
515 return; 515 return;
516 } 516 }
517 printk("%d lock%s held by %s/%d:\n", 517 printk("%d lock%s held by %s/%d:\n",
518 depth, depth > 1 ? "s" : "", curr->comm, curr->pid); 518 depth, depth > 1 ? "s" : "", curr->comm, task_pid_nr(curr));
519 519
520 for (i = 0; i < depth; i++) { 520 for (i = 0; i < depth; i++) {
521 printk(" #%d: ", i); 521 printk(" #%d: ", i);
@@ -904,7 +904,7 @@ print_circular_bug_header(struct lock_list *entry, unsigned int depth)
904 print_kernel_version(); 904 print_kernel_version();
905 printk( "-------------------------------------------------------\n"); 905 printk( "-------------------------------------------------------\n");
906 printk("%s/%d is trying to acquire lock:\n", 906 printk("%s/%d is trying to acquire lock:\n",
907 curr->comm, curr->pid); 907 curr->comm, task_pid_nr(curr));
908 print_lock(check_source); 908 print_lock(check_source);
909 printk("\nbut task is already holding lock:\n"); 909 printk("\nbut task is already holding lock:\n");
910 print_lock(check_target); 910 print_lock(check_target);
@@ -1085,7 +1085,7 @@ print_bad_irq_dependency(struct task_struct *curr,
1085 print_kernel_version(); 1085 print_kernel_version();
1086 printk( "------------------------------------------------------\n"); 1086 printk( "------------------------------------------------------\n");
1087 printk("%s/%d [HC%u[%lu]:SC%u[%lu]:HE%u:SE%u] is trying to acquire:\n", 1087 printk("%s/%d [HC%u[%lu]:SC%u[%lu]:HE%u:SE%u] is trying to acquire:\n",
1088 curr->comm, curr->pid, 1088 curr->comm, task_pid_nr(curr),
1089 curr->hardirq_context, hardirq_count() >> HARDIRQ_SHIFT, 1089 curr->hardirq_context, hardirq_count() >> HARDIRQ_SHIFT,
1090 curr->softirq_context, softirq_count() >> SOFTIRQ_SHIFT, 1090 curr->softirq_context, softirq_count() >> SOFTIRQ_SHIFT,
1091 curr->hardirqs_enabled, 1091 curr->hardirqs_enabled,
@@ -1237,7 +1237,7 @@ print_deadlock_bug(struct task_struct *curr, struct held_lock *prev,
1237 print_kernel_version(); 1237 print_kernel_version();
1238 printk( "---------------------------------------------\n"); 1238 printk( "---------------------------------------------\n");
1239 printk("%s/%d is trying to acquire lock:\n", 1239 printk("%s/%d is trying to acquire lock:\n",
1240 curr->comm, curr->pid); 1240 curr->comm, task_pid_nr(curr));
1241 print_lock(next); 1241 print_lock(next);
1242 printk("\nbut task is already holding lock:\n"); 1242 printk("\nbut task is already holding lock:\n");
1243 print_lock(prev); 1243 print_lock(prev);
@@ -1641,7 +1641,7 @@ print_usage_bug(struct task_struct *curr, struct held_lock *this,
1641 usage_str[prev_bit], usage_str[new_bit]); 1641 usage_str[prev_bit], usage_str[new_bit]);
1642 1642
1643 printk("%s/%d [HC%u[%lu]:SC%u[%lu]:HE%u:SE%u] takes:\n", 1643 printk("%s/%d [HC%u[%lu]:SC%u[%lu]:HE%u:SE%u] takes:\n",
1644 curr->comm, curr->pid, 1644 curr->comm, task_pid_nr(curr),
1645 trace_hardirq_context(curr), hardirq_count() >> HARDIRQ_SHIFT, 1645 trace_hardirq_context(curr), hardirq_count() >> HARDIRQ_SHIFT,
1646 trace_softirq_context(curr), softirq_count() >> SOFTIRQ_SHIFT, 1646 trace_softirq_context(curr), softirq_count() >> SOFTIRQ_SHIFT,
1647 trace_hardirqs_enabled(curr), 1647 trace_hardirqs_enabled(curr),
@@ -1694,7 +1694,7 @@ print_irq_inversion_bug(struct task_struct *curr, struct lock_class *other,
1694 print_kernel_version(); 1694 print_kernel_version();
1695 printk( "---------------------------------------------------------\n"); 1695 printk( "---------------------------------------------------------\n");
1696 printk("%s/%d just changed the state of lock:\n", 1696 printk("%s/%d just changed the state of lock:\n",
1697 curr->comm, curr->pid); 1697 curr->comm, task_pid_nr(curr));
1698 print_lock(this); 1698 print_lock(this);
1699 if (forwards) 1699 if (forwards)
1700 printk("but this lock took another, %s-irq-unsafe lock in the past:\n", irqclass); 1700 printk("but this lock took another, %s-irq-unsafe lock in the past:\n", irqclass);
@@ -2487,7 +2487,7 @@ print_unlock_inbalance_bug(struct task_struct *curr, struct lockdep_map *lock,
2487 printk( "[ BUG: bad unlock balance detected! ]\n"); 2487 printk( "[ BUG: bad unlock balance detected! ]\n");
2488 printk( "-------------------------------------\n"); 2488 printk( "-------------------------------------\n");
2489 printk("%s/%d is trying to release lock (", 2489 printk("%s/%d is trying to release lock (",
2490 curr->comm, curr->pid); 2490 curr->comm, task_pid_nr(curr));
2491 print_lockdep_cache(lock); 2491 print_lockdep_cache(lock);
2492 printk(") at:\n"); 2492 printk(") at:\n");
2493 print_ip_sym(ip); 2493 print_ip_sym(ip);
@@ -2737,7 +2737,7 @@ print_lock_contention_bug(struct task_struct *curr, struct lockdep_map *lock,
2737 printk( "[ BUG: bad contention detected! ]\n"); 2737 printk( "[ BUG: bad contention detected! ]\n");
2738 printk( "---------------------------------\n"); 2738 printk( "---------------------------------\n");
2739 printk("%s/%d is trying to contend lock (", 2739 printk("%s/%d is trying to contend lock (",
2740 curr->comm, curr->pid); 2740 curr->comm, task_pid_nr(curr));
2741 print_lockdep_cache(lock); 2741 print_lockdep_cache(lock);
2742 printk(") at:\n"); 2742 printk(") at:\n");
2743 print_ip_sym(ip); 2743 print_ip_sym(ip);
@@ -3072,7 +3072,7 @@ print_freed_lock_bug(struct task_struct *curr, const void *mem_from,
3072 printk( "[ BUG: held lock freed! ]\n"); 3072 printk( "[ BUG: held lock freed! ]\n");
3073 printk( "-------------------------\n"); 3073 printk( "-------------------------\n");
3074 printk("%s/%d is freeing memory %p-%p, with a lock still held there!\n", 3074 printk("%s/%d is freeing memory %p-%p, with a lock still held there!\n",
3075 curr->comm, curr->pid, mem_from, mem_to-1); 3075 curr->comm, task_pid_nr(curr), mem_from, mem_to-1);
3076 print_lock(hlock); 3076 print_lock(hlock);
3077 lockdep_print_held_locks(curr); 3077 lockdep_print_held_locks(curr);
3078 3078
@@ -3125,7 +3125,7 @@ static void print_held_locks_bug(struct task_struct *curr)
3125 printk( "[ BUG: lock held at task exit time! ]\n"); 3125 printk( "[ BUG: lock held at task exit time! ]\n");
3126 printk( "-------------------------------------\n"); 3126 printk( "-------------------------------------\n");
3127 printk("%s/%d is exiting with locks still held!\n", 3127 printk("%s/%d is exiting with locks still held!\n",
3128 curr->comm, curr->pid); 3128 curr->comm, task_pid_nr(curr));
3129 lockdep_print_held_locks(curr); 3129 lockdep_print_held_locks(curr);
3130 3130
3131 printk("\nstack backtrace:\n"); 3131 printk("\nstack backtrace:\n");
diff --git a/kernel/rtmutex-debug.c b/kernel/rtmutex-debug.c
index 6b0703db152d..56d73cb8826d 100644
--- a/kernel/rtmutex-debug.c
+++ b/kernel/rtmutex-debug.c
@@ -87,7 +87,7 @@ static int rt_trace_on = 1;
87static void printk_task(struct task_struct *p) 87static void printk_task(struct task_struct *p)
88{ 88{
89 if (p) 89 if (p)
90 printk("%16s:%5d [%p, %3d]", p->comm, p->pid, p, p->prio); 90 printk("%16s:%5d [%p, %3d]", p->comm, task_pid_nr(p), p, p->prio);
91 else 91 else
92 printk("<none>"); 92 printk("<none>");
93} 93}
@@ -152,22 +152,25 @@ void debug_rt_mutex_print_deadlock(struct rt_mutex_waiter *waiter)
152 printk( "[ BUG: circular locking deadlock detected! ]\n"); 152 printk( "[ BUG: circular locking deadlock detected! ]\n");
153 printk( "--------------------------------------------\n"); 153 printk( "--------------------------------------------\n");
154 printk("%s/%d is deadlocking current task %s/%d\n\n", 154 printk("%s/%d is deadlocking current task %s/%d\n\n",
155 task->comm, task->pid, current->comm, current->pid); 155 task->comm, task_pid_nr(task),
156 current->comm, task_pid_nr(current));
156 157
157 printk("\n1) %s/%d is trying to acquire this lock:\n", 158 printk("\n1) %s/%d is trying to acquire this lock:\n",
158 current->comm, current->pid); 159 current->comm, task_pid_nr(current));
159 printk_lock(waiter->lock, 1); 160 printk_lock(waiter->lock, 1);
160 161
161 printk("\n2) %s/%d is blocked on this lock:\n", task->comm, task->pid); 162 printk("\n2) %s/%d is blocked on this lock:\n",
163 task->comm, task_pid_nr(task));
162 printk_lock(waiter->deadlock_lock, 1); 164 printk_lock(waiter->deadlock_lock, 1);
163 165
164 debug_show_held_locks(current); 166 debug_show_held_locks(current);
165 debug_show_held_locks(task); 167 debug_show_held_locks(task);
166 168
167 printk("\n%s/%d's [blocked] stackdump:\n\n", task->comm, task->pid); 169 printk("\n%s/%d's [blocked] stackdump:\n\n",
170 task->comm, task_pid_nr(task));
168 show_stack(task, NULL); 171 show_stack(task, NULL);
169 printk("\n%s/%d's [current] stackdump:\n\n", 172 printk("\n%s/%d's [current] stackdump:\n\n",
170 current->comm, current->pid); 173 current->comm, task_pid_nr(current));
171 dump_stack(); 174 dump_stack();
172 debug_show_all_locks(); 175 debug_show_all_locks();
173 176
diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c
index 8cd9bd2cdb34..0deef71ff8d2 100644
--- a/kernel/rtmutex.c
+++ b/kernel/rtmutex.c
@@ -185,7 +185,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
185 prev_max = max_lock_depth; 185 prev_max = max_lock_depth;
186 printk(KERN_WARNING "Maximum lock depth %d reached " 186 printk(KERN_WARNING "Maximum lock depth %d reached "
187 "task: %s (%d)\n", max_lock_depth, 187 "task: %s (%d)\n", max_lock_depth,
188 top_task->comm, top_task->pid); 188 top_task->comm, task_pid_nr(top_task));
189 } 189 }
190 put_task_struct(task); 190 put_task_struct(task);
191 191
diff --git a/kernel/sched.c b/kernel/sched.c
index 9d458504e3a6..a7e30462600f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3502,7 +3502,7 @@ EXPORT_SYMBOL(sub_preempt_count);
3502static noinline void __schedule_bug(struct task_struct *prev) 3502static noinline void __schedule_bug(struct task_struct *prev)
3503{ 3503{
3504 printk(KERN_ERR "BUG: scheduling while atomic: %s/0x%08x/%d\n", 3504 printk(KERN_ERR "BUG: scheduling while atomic: %s/0x%08x/%d\n",
3505 prev->comm, preempt_count(), prev->pid); 3505 prev->comm, preempt_count(), task_pid_nr(prev));
3506 debug_show_held_locks(prev); 3506 debug_show_held_locks(prev);
3507 if (irqs_disabled()) 3507 if (irqs_disabled())
3508 print_irqtrace_events(prev); 3508 print_irqtrace_events(prev);
@@ -4865,7 +4865,8 @@ static void show_task(struct task_struct *p)
4865 free = (unsigned long)n - (unsigned long)end_of_stack(p); 4865 free = (unsigned long)n - (unsigned long)end_of_stack(p);
4866 } 4866 }
4867#endif 4867#endif
4868 printk(KERN_CONT "%5lu %5d %6d\n", free, p->pid, p->parent->pid); 4868 printk(KERN_CONT "%5lu %5d %6d\n", free,
4869 task_pid_nr(p), task_pid_nr(p->parent));
4869 4870
4870 if (state != TASK_RUNNING) 4871 if (state != TASK_RUNNING)
4871 show_stack(p, NULL); 4872 show_stack(p, NULL);
@@ -5172,7 +5173,7 @@ static void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p)
5172 if (p->mm && printk_ratelimit()) 5173 if (p->mm && printk_ratelimit())
5173 printk(KERN_INFO "process %d (%s) no " 5174 printk(KERN_INFO "process %d (%s) no "
5174 "longer affine to cpu%d\n", 5175 "longer affine to cpu%d\n",
5175 p->pid, p->comm, dead_cpu); 5176 task_pid_nr(p), p->comm, dead_cpu);
5176 } 5177 }
5177 } while (!__migrate_task_irq(p, dead_cpu, dest_cpu)); 5178 } while (!__migrate_task_irq(p, dead_cpu, dest_cpu));
5178} 5179}
diff --git a/kernel/signal.c b/kernel/signal.c
index 08364e75bb58..12006308c7eb 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -730,7 +730,7 @@ int print_fatal_signals;
730static void print_fatal_signal(struct pt_regs *regs, int signr) 730static void print_fatal_signal(struct pt_regs *regs, int signr)
731{ 731{
732 printk("%s/%d: potentially unexpected fatal signal %d.\n", 732 printk("%s/%d: potentially unexpected fatal signal %d.\n",
733 current->comm, current->pid, signr); 733 current->comm, task_pid_nr(current), signr);
734 734
735#ifdef __i386__ 735#ifdef __i386__
736 printk("code at %08lx: ", regs->eip); 736 printk("code at %08lx: ", regs->eip);
diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index edeeef3a6a32..11df812263c8 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -113,7 +113,7 @@ void softlockup_tick(void)
113 spin_lock(&print_lock); 113 spin_lock(&print_lock);
114 printk(KERN_ERR "BUG: soft lockup - CPU#%d stuck for %lus! [%s:%d]\n", 114 printk(KERN_ERR "BUG: soft lockup - CPU#%d stuck for %lus! [%s:%d]\n",
115 this_cpu, now - touch_timestamp, 115 this_cpu, now - touch_timestamp,
116 current->comm, current->pid); 116 current->comm, task_pid_nr(current));
117 if (regs) 117 if (regs)
118 show_regs(regs); 118 show_regs(regs);
119 else 119 else
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index d1916fea7108..52d5e7c9a8e6 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -282,7 +282,7 @@ static void run_workqueue(struct cpu_workqueue_struct *cwq)
282 printk(KERN_ERR "BUG: workqueue leaked lock or atomic: " 282 printk(KERN_ERR "BUG: workqueue leaked lock or atomic: "
283 "%s/0x%08x/%d\n", 283 "%s/0x%08x/%d\n",
284 current->comm, preempt_count(), 284 current->comm, preempt_count(),
285 current->pid); 285 task_pid_nr(current));
286 printk(KERN_ERR " last function: "); 286 printk(KERN_ERR " last function: ");
287 print_symbol("%s\n", (unsigned long)f); 287 print_symbol("%s\n", (unsigned long)f);
288 debug_show_held_locks(current); 288 debug_show_held_locks(current);
diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
index 479fd462eaa9..9c4b0256490b 100644
--- a/lib/spinlock_debug.c
+++ b/lib/spinlock_debug.c
@@ -60,12 +60,12 @@ static void spin_bug(spinlock_t *lock, const char *msg)
60 owner = lock->owner; 60 owner = lock->owner;
61 printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n", 61 printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n",
62 msg, raw_smp_processor_id(), 62 msg, raw_smp_processor_id(),
63 current->comm, current->pid); 63 current->comm, task_pid_nr(current));
64 printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, " 64 printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, "
65 ".owner_cpu: %d\n", 65 ".owner_cpu: %d\n",
66 lock, lock->magic, 66 lock, lock->magic,
67 owner ? owner->comm : "<none>", 67 owner ? owner->comm : "<none>",
68 owner ? owner->pid : -1, 68 owner ? task_pid_nr(owner) : -1,
69 lock->owner_cpu); 69 lock->owner_cpu);
70 dump_stack(); 70 dump_stack();
71} 71}
@@ -116,7 +116,7 @@ static void __spin_lock_debug(spinlock_t *lock)
116 printk(KERN_EMERG "BUG: spinlock lockup on CPU#%d, " 116 printk(KERN_EMERG "BUG: spinlock lockup on CPU#%d, "
117 "%s/%d, %p\n", 117 "%s/%d, %p\n",
118 raw_smp_processor_id(), current->comm, 118 raw_smp_processor_id(), current->comm,
119 current->pid, lock); 119 task_pid_nr(current), lock);
120 dump_stack(); 120 dump_stack();
121#ifdef CONFIG_SMP 121#ifdef CONFIG_SMP
122 trigger_all_cpu_backtrace(); 122 trigger_all_cpu_backtrace();
@@ -161,7 +161,7 @@ static void rwlock_bug(rwlock_t *lock, const char *msg)
161 161
162 printk(KERN_EMERG "BUG: rwlock %s on CPU#%d, %s/%d, %p\n", 162 printk(KERN_EMERG "BUG: rwlock %s on CPU#%d, %s/%d, %p\n",
163 msg, raw_smp_processor_id(), current->comm, 163 msg, raw_smp_processor_id(), current->comm,
164 current->pid, lock); 164 task_pid_nr(current), lock);
165 dump_stack(); 165 dump_stack();
166} 166}
167 167
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index e3778f1215c0..824cade07827 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -278,7 +278,8 @@ static void __oom_kill_task(struct task_struct *p, int verbose)
278 } 278 }
279 279
280 if (verbose) 280 if (verbose)
281 printk(KERN_ERR "Killed process %d (%s)\n", p->pid, p->comm); 281 printk(KERN_ERR "Killed process %d (%s)\n",
282 task_pid_nr(p), p->comm);
282 283
283 /* 284 /*
284 * We give our sacrificial lamb high priority and access to 285 * We give our sacrificial lamb high priority and access to
@@ -356,7 +357,7 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
356 } 357 }
357 358
358 printk(KERN_ERR "%s: kill process %d (%s) score %li or a child\n", 359 printk(KERN_ERR "%s: kill process %d (%s) score %li or a child\n",
359 message, p->pid, p->comm, points); 360 message, task_pid_nr(p), p->comm, points);
360 361
361 /* Try to kill a child first */ 362 /* Try to kill a child first */
362 list_for_each_entry(c, &p->children, sibling) { 363 list_for_each_entry(c, &p->children, sibling) {
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 9d6e6f18838b..7ac703171ff3 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3514,7 +3514,7 @@ static int pktgen_thread_worker(void *arg)
3514 3514
3515 init_waitqueue_head(&t->queue); 3515 init_waitqueue_head(&t->queue);
3516 3516
3517 pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, current->pid); 3517 pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, task_pid_nr(current));
3518 3518
3519 set_current_state(TASK_INTERRUPTIBLE); 3519 set_current_state(TASK_INTERRUPTIBLE);
3520 3520
diff --git a/net/core/sock.c b/net/core/sock.c
index d292b4113d6e..febbcbcf8022 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -232,7 +232,7 @@ static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen)
232 warned++; 232 warned++;
233 printk(KERN_INFO "sock_set_timeout: `%s' (pid %d) " 233 printk(KERN_INFO "sock_set_timeout: `%s' (pid %d) "
234 "tries to set negative timeout\n", 234 "tries to set negative timeout\n",
235 current->comm, current->pid); 235 current->comm, task_pid_nr(current));
236 return 0; 236 return 0;
237 } 237 }
238 *timeo_p = MAX_SCHEDULE_TIMEOUT; 238 *timeo_p = MAX_SCHEDULE_TIMEOUT;
diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c
index 1960747f354c..3b0d32291d5e 100644
--- a/net/ipv4/ipvs/ip_vs_sync.c
+++ b/net/ipv4/ipvs/ip_vs_sync.c
@@ -877,7 +877,7 @@ int start_sync_thread(int state, char *mcast_ifn, __u8 syncid)
877 if (!tinfo) 877 if (!tinfo)
878 return -ENOMEM; 878 return -ENOMEM;
879 879
880 IP_VS_DBG(7, "%s: pid %d\n", __FUNCTION__, current->pid); 880 IP_VS_DBG(7, "%s: pid %d\n", __FUNCTION__, task_pid_nr(current));
881 IP_VS_DBG(7, "Each ip_vs_sync_conn entry need %Zd bytes\n", 881 IP_VS_DBG(7, "Each ip_vs_sync_conn entry need %Zd bytes\n",
882 sizeof(struct ip_vs_sync_conn)); 882 sizeof(struct ip_vs_sync_conn));
883 883
@@ -917,7 +917,7 @@ int stop_sync_thread(int state)
917 (state == IP_VS_STATE_BACKUP && !sync_backup_pid)) 917 (state == IP_VS_STATE_BACKUP && !sync_backup_pid))
918 return -ESRCH; 918 return -ESRCH;
919 919
920 IP_VS_DBG(7, "%s: pid %d\n", __FUNCTION__, current->pid); 920 IP_VS_DBG(7, "%s: pid %d\n", __FUNCTION__, task_pid_nr(current));
921 IP_VS_INFO("stopping sync thread %d ...\n", 921 IP_VS_INFO("stopping sync thread %d ...\n",
922 (state == IP_VS_STATE_MASTER) ? 922 (state == IP_VS_STATE_MASTER) ?
923 sync_master_pid : sync_backup_pid); 923 sync_master_pid : sync_backup_pid);
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 4f322003835d..2e6ad6dbba6c 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1334,7 +1334,7 @@ do_prequeue:
1334 if ((flags & MSG_PEEK) && peek_seq != tp->copied_seq) { 1334 if ((flags & MSG_PEEK) && peek_seq != tp->copied_seq) {
1335 if (net_ratelimit()) 1335 if (net_ratelimit())
1336 printk(KERN_DEBUG "TCP(%s:%d): Application bug, race in MSG_PEEK.\n", 1336 printk(KERN_DEBUG "TCP(%s:%d): Application bug, race in MSG_PEEK.\n",
1337 current->comm, current->pid); 1337 current->comm, task_pid_nr(current));
1338 peek_seq = tp->copied_seq; 1338 peek_seq = tp->copied_seq;
1339 } 1339 }
1340 continue; 1340 continue;
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 49eacba824df..46cf962f7f88 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -762,7 +762,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock,
762 if (net_ratelimit()) 762 if (net_ratelimit())
763 printk(KERN_DEBUG "LLC(%s:%d): Application " 763 printk(KERN_DEBUG "LLC(%s:%d): Application "
764 "bug, race in MSG_PEEK.\n", 764 "bug, race in MSG_PEEK.\n",
765 current->comm, current->pid); 765 current->comm, task_pid_nr(current));
766 peek_seq = llc->copied_seq; 766 peek_seq = llc->copied_seq;
767 } 767 }
768 continue; 768 continue;
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 3c773c53e12e..c98873f39aec 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -847,7 +847,7 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, int flags, cons
847 task->tk_start = jiffies; 847 task->tk_start = jiffies;
848 848
849 dprintk("RPC: new task initialized, procpid %u\n", 849 dprintk("RPC: new task initialized, procpid %u\n",
850 current->pid); 850 task_pid_nr(current));
851} 851}
852 852
853static struct rpc_task * 853static struct rpc_task *