linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] gfs2: fix uaf in glock shrinker
       [not found] <20210519060809.1288-1-hdanton@sina.com>
@ 2021-05-20 11:29 ` Andreas Gruenbacher
  0 siblings, 0 replies; only message in thread
From: Andreas Gruenbacher @ 2021-05-20 11:29 UTC (permalink / raw)
  To: Hillf Danton; +Cc: cluster-devel, LKML, Bob Peterson, syzkaller-bugs, syzbot

On Wed, May 19, 2021 at 8:08 AM Hillf Danton <hdanton@sina.com> wrote:
> The GLF_LRU flag is checked under lru_lock in gfs2_glock_remove_from_lru() to
> remove glock from the lru list in __gfs2_glock_put().
>
> On the shrink scan path, the same flag is cleared under lru_lock but because
> of cond_resched_lock(&lru_lock) in gfs2_dispose_glock_lru() progress on the
> put side can be made without deleting glock from lru.
>
> Keep GLF_LRU across the race window opened by cond_resched_lock(&lru_lock) to
> ensure correct behaviors on both sides - clear GLF_LRU after list_del under
> lru_lock. That is the fix to uaf reported by the smart syzbot.

Thanks, I've added this to for-next.

Andreas


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-20 11:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210519060809.1288-1-hdanton@sina.com>
2021-05-20 11:29 ` [PATCH] gfs2: fix uaf in glock shrinker Andreas Gruenbacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).