All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [patch 04/11] ocfs2: fix a tiny race when running dirop_fileop_racer
Date: Thu, 13 Feb 2014 13:18:46 +0800	[thread overview]
Message-ID: <52FC55B6.7020403@huawei.com> (raw)
In-Reply-To: <20140212232921.GZ24361@wotan.suse.de>

On 2014/2/13 7:29, Mark Fasheh wrote:
>> @@ -1097,6 +1174,22 @@ static int ocfs2_rename(struct inode *ol
>>  			goto bail;
>>  		}
>>  		rename_lock = 1;
>> +
>> +		/* here we cannot guarantee the inodes haven't just been
>> +		 * changed, so check if they are nested again */
>> +		status = ocfs2_check_if_ancestor(osb, new_dir->i_ino,
>> +				old_inode->i_ino);
>> +		if (status < 0) {
>> +			mlog_errno(status);
>> +			goto bail;
>> +		} else if (status == 1) {
>> +			status = -EPERM;
>> +			mlog(ML_ERROR, "src inode %llu should not be ancestor "
>> +				"of new dir inode %llu\n",
>> +				(unsigned long long)old_inode->i_ino,
>> +				(unsigned long long)new_dir->i_ino);
> 
> Is it possible for the user to trigger this mlog(ML_ERROR, "....") print at
> will? If so we need to make it a debug print otherwise we risk blowing up
> systemlog when someone abuses rename().
> 	--Mark
> 
> --
> Mark Fasheh
> 
> 
The nested condition can be constructed but it is rare, isn't it?
And only one system log for one rename, so we log it as error message.

  reply	other threads:[~2014-02-13  5:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-24 20:47 [Ocfs2-devel] [patch 04/11] ocfs2: fix a tiny race when running dirop_fileop_racer akpm at linux-foundation.org
2014-02-05 23:31 ` Mark Fasheh
2014-02-11 12:42   ` Xue jiufei
2014-02-12 23:12     ` Mark Fasheh
2014-02-12 23:29 ` Mark Fasheh
2014-02-13  5:18   ` Joseph Qi [this message]
2014-02-13 20:48     ` Mark Fasheh
2014-03-19 21:03       ` Andrew Morton

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=52FC55B6.7020403@huawei.com \
    --to=joseph.qi@huawei.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.