mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Jinjie Ruan <ruanjinjie@huawei.com>,
	anna-maria@linutronix.de, frederic@kernel.org, kuba@kernel.org,
	richardcochran@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime()
Date: Tue, 22 Oct 2024 17:42:30 +0200	[thread overview]
Message-ID: <e9e80c32-2988-487a-a1ee-fab0caa863dd@redhat.com> (raw)
In-Reply-To: <878qul802d.ffs@tglx>

On 10/19/24 01:26, Thomas Gleixner wrote:
> 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".

I'm sorry, I noticed this patch right now thanks to Anna-Maria head-up
on netdev.
I'll merge it into net before this week PR.

Again, I'm sorry for this mess.

Cheers,

Paolo


  reply	other threads:[~2024-10-22 15:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 10:07 Jinjie Ruan
2024-10-18 23:26 ` Thomas Gleixner
2024-10-22 15:42   ` Paolo Abeni [this message]
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=e9e80c32-2988-487a-a1ee-fab0caa863dd@redhat.com \
    --to=pabeni@redhat.com \
    --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 \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®