[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGudoHHBRhU+XidV9U4osc2Ta4w0Lgi2XiFkYukKQoH45zT6vw@mail.gmail.com>
Date: Mon, 25 Aug 2025 23:43:00 +0200
From: Mateusz Guzik <mjguzik@...il.com>
To: Christian Brauner <brauner@...nel.org>
Cc: linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Infinite loop in get_file_rcu() in face of a saturated ref count
__get_file_rcu() bails early:
if (unlikely(!file_ref_get(&file->f_ref)))
return ERR_PTR(-EAGAIN);
But get_file_rcu():
for (;;) {
struct file __rcu *file;
file = __get_file_rcu(f);
if (!IS_ERR(file))
return file;
}
So if this encounters a saturated refcount, the loop with never end.
I don't know what makes the most sense to do here and I'm no position
to mess with any patches.
This is not a serious problem either, so I would put this on the back
burner. Just reporting for interested.
--
Mateusz Guzik <mjguzik gmail.com>
Powered by blists - more mailing lists