lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOssrKc_bNuY+HUPrRgxJUHtc5hT5_3mDXrGn00j7fhYZ=VH7Q@mail.gmail.com>
Date:   Mon, 30 Oct 2017 15:27:06 +0100
From:   Miklos Szeredi <mszeredi@...hat.com>
To:     Jan Kara <jack@...e.cz>
Cc:     linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Amir Goldstein <amir73il@...il.com>,
        Xiong Zhou <xzhou@...hat.com>,
        lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 4/7] fsnotify: skip unattached marks

On Mon, Oct 30, 2017 at 3:00 PM, Jan Kara <jack@...e.cz> wrote:
> On Wed 25-10-17 10:41:36, Miklos Szeredi wrote:
>> After having gone through a ref-unref for the mark, dereferencing the group
>> (e.g. in fsnotify_compare_groups()) is wrong since the group may be
>> completely gone by that time.  So before continuing to traverse the mark
>> list, check if the mark is still attached.
>
> Are you sure this can happen? The thing is: Group reference from mark is
> dropped only in fsnotify_final_mark_destroy(). That gets called after SRCU
> period is finished from fsnotify_mark_destroy_workfn(). And SRCU period in
> which we have dropped our mark reference in fsnotify_finish_user_wait() has
> not yet ended. What am I missing?

Ah, missed that fact that mark holds a ref on the group until it's destroyed.

Yes, the patch is unnecessary in this case.

Thanks,
Miklos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ