[CRIU] Re: [PATCH 0/8] Inotify support v7
Pavel Emelyanov
xemul at parallels.com
Tue Apr 17 12:27:29 EDT 2012
On 04/17/2012 08:24 PM, Cyrill Gorcunov wrote:
> On Tue, Apr 17, 2012 at 08:20:12PM +0400, Pavel Emelyanov wrote:
>> On 04/12/2012 07:53 PM, Cyrill Gorcunov wrote:
>>> On Thu, Apr 12, 2012 at 7:50 PM, Cyrill Gorcunov <gorcunov at openvz.org> wrote:
>>>> Hi, here is new versoin for inotify support.
>>>> Please review.
>>>>
>>> Forgot to attach kernel patch. Here is it.
>>
>>> @@ -660,6 +765,11 @@ static int inotify_new_watch(struct fsno
>>> goto out_err;
>>> }
>>>
>>> +#if defined(CONFIG_CHECKPOINT_RESTORE) && defined(CONFIG_EXPORTFS)
>>> + dget(dentry);
>>> + tmp_i_mark->fsn_mark.target = dentry;
>>> +#endif
>>> +
>>> /* increment the number of watches the user has */
>>> atomic_inc(&group->inotify_data.user->inotify_watches);
>>>
>>
>> dentry refcnt leak
>
> Where? We have
>
> inotify_new_watch
> dget(dentry);
This dget was in the code before your patch, you didn't add it.
> tmp_i_mark->fsn_mark.target = dentry;
>
> fsnotify_put_mark
> dput(mark->target);
This put is added by you. You put someone else's reference.
> mark->free_mark(mark);
>
> Cyrill
> .
>
More information about the CRIU
mailing list