Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752253Ab1EKAXp (ORCPT ); Tue, 10 May 2011 20:23:45 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:46494 "EHLO e38.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751146Ab1EKAXM (ORCPT ); Tue, 10 May 2011 20:23:12 -0400 From: John Stultz To: LKML Cc: John Stultz , "Ted Ts'o" , KOSAKI Motohiro , David Rientjes , Dave Hansen , Andrew Morton , linux-mm@kvack.org Subject: [PATCH 3/3] comm: ext4: Protect task->comm access by using %ptc Date: Tue, 10 May 2011 17:23:06 -0700 Message-Id: <1305073386-4810-4-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1305073386-4810-1-git-send-email-john.stultz@linaro.org> References: <1305073386-4810-1-git-send-email-john.stultz@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2607 Lines: 71 Converts ext4 comm access to use the safe printk %ptc accessor. CC: Ted Ts'o CC: KOSAKI Motohiro CC: David Rientjes CC: Dave Hansen CC: Andrew Morton CC: linux-mm@kvack.org Signed-off-by: John Stultz --- fs/ext4/file.c | 4 ++-- fs/ext4/super.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 7b80d54..31438a0 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -126,9 +126,9 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov, /* Warn about this once per day */ if (printk_timed_ratelimit(&unaligned_warn_time, 60*60*24*HZ)) ext4_msg(inode->i_sb, KERN_WARNING, - "Unaligned AIO/DIO on inode %ld by %s; " + "Unaligned AIO/DIO on inode %ld by %ptc; " "performance will be poor.", - inode->i_ino, current->comm); + inode->i_ino, current); mutex_lock(ext4_aio_mutex(inode)); ext4_aiodio_wait(inode); } diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 8553dfb..d4ab4c0 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -413,8 +413,8 @@ void __ext4_error(struct super_block *sb, const char *function, va_start(args, fmt); vaf.fmt = fmt; vaf.va = &args; - printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: comm %s: %pV\n", - sb->s_id, function, line, current->comm, &vaf); + printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: comm %ptc: %pV\n", + sb->s_id, function, line, current, &vaf); va_end(args); ext4_handle_error(sb); @@ -438,7 +438,7 @@ void ext4_error_inode(struct inode *inode, const char *function, inode->i_sb->s_id, function, line, inode->i_ino); if (block) printk(KERN_CONT "block %llu: ", block); - printk(KERN_CONT "comm %s: %pV\n", current->comm, &vaf); + printk(KERN_CONT "comm %ptc: %pV\n", current, &vaf); va_end(args); ext4_handle_error(inode->i_sb); @@ -468,7 +468,7 @@ void ext4_error_file(struct file *file, const char *function, va_start(args, fmt); vaf.fmt = fmt; vaf.va = &args; - printk(KERN_CONT "comm %s: path %s: %pV\n", current->comm, path, &vaf); + printk(KERN_CONT "comm %ptc: path %s: %pV\n", current, path, &vaf); va_end(args); ext4_handle_error(inode->i_sb); -- 1.7.3.2.146.gca209 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/