[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200428114141.GL29705@bombadil.infradead.org>
Date: Tue, 28 Apr 2020 04:41:41 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Ritesh Harjani <riteshh@...ux.ibm.com>
Cc: linux-fsdevel@...r.kernel.org, linux-xfs@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>,
"Darrick J . Wong" <darrick.wong@...cle.com>,
Christoph Hellwig <hch@...radead.org>,
Jan Kara <jack@...e.com>, tytso@....edu,
"Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
linux-ext4@...r.kernel.org, Jan Kara <jack@...e.cz>,
Christoph Hellwig <hch@....de>
Subject: Re: [PATCHv2] fibmap: Warn and return an error in case of block >
INT_MAX
On Tue, Apr 28, 2020 at 01:08:31PM +0530, Ritesh Harjani wrote:
> @@ -71,6 +72,13 @@ static int ioctl_fibmap(struct file *filp, int __user *p)
> block = ur_block;
> error = bmap(inode, &block);
>
> + if (block > INT_MAX) {
> + error = -ERANGE;
> + pr_warn_ratelimited("[%s/%d] FS (%s): would truncate fibmap result\n",
> + current->comm, task_pid_nr(current),
> + sb->s_id);
Why is it useful to print the pid?
And why print the superblock when we could print the filename instead?
We have a struct file, so we can printk("%pD4", filp) to print the
last four components of the pathname.
Powered by blists - more mailing lists