From: Thomas Gleixner <tglx@linutronix.de>
To: Jinjie Ruan <ruanjinjie@huawei.com>,
anna-maria@linutronix.de, frederic@kernel.org, kuba@kernel.org,
ruanjinjie@huawei.com, richardcochran@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime()
Date: Sat, 19 Oct 2024 01:26:34 +0200 [thread overview]
Message-ID: <878qul802d.ffs@tglx> (raw)
In-Reply-To: <20241018100748.706462-1-ruanjinjie@huawei.com>
On Fri, Oct 18 2024 at 18:07, Jinjie Ruan wrote:
If get_clock_desc() succeeds, it calls fget() for the clockid's fd,
> and get the clk->rwsem read lock, so the error path should release
> the lock to make the lock balance and fput the clockid's fd to make
> the refcount balance and release the fd related reosurce.
>
> However the below commit left the error path locked behind resulting in
> unbalanced locking. Check timespec64_valid_strict() before
> get_clock_desc() to fix it, because the "ts" is not changed
> after that.
>
> Fixes: d8794ac20a29 ("posix-clock: Fix missing timespec64 check in
> pc_clock_settime()")
Jakub, I expect _you_ are going to pick this up and explain to Linus and
the stable people why we need a fix for the rushed in "fix".
Thanks,
tglx
next prev parent reply other threads:[~2024-10-18 23:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 10:07 [PATCH v2] posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime() Jinjie Ruan
2024-10-18 23:26 ` Thomas Gleixner [this message]
2024-10-22 15:42 ` Paolo Abeni
2024-10-23 14:21 ` Paolo Abeni
2024-10-22 10:04 ` Anna-Maria Behnsen
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=878qul802d.ffs@tglx \
--to=tglx@linutronix.de \
--cc=anna-maria@linutronix.de \
--cc=frederic@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=ruanjinjie@huawei.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.