From: Jes Sorensen <jes.sorensen@gmail.com>
To: minyard@acm.org
Cc: openipmi-developer@lists.sourceforge.net, kernel-team@fb.com,
linux-kernel@vger.kernel.org
Subject: Re: [Openipmi-developer] [PATCH 0/1] Fix race in ipmi timer cleanup
Date: Mon, 16 Sep 2019 10:01:37 -0400 [thread overview]
Message-ID: <d93bbba3-16e0-7c68-2fec-fde840bd7072@gmail.com> (raw)
In-Reply-To: <20190915010852.GG13407@t560>
On 9/14/19 9:08 PM, Corey Minyard wrote:
>>
>>>
>>> {disable,enable}_si_irq() themselves are racy:
>>>
>>> static inline bool disable_si_irq(struct smi_info *smi_info)
>>> {
>>> if ((smi_info->io.irq) && (!smi_info->interrupt_disabled)) {
>>> smi_info->interrupt_disabled = true;
>>>
>>> Basically interrupt_disabled need to be atomic here to have any value,
>>> unless you ensure to have a spin lock around every access to it.
>>
>> It needs to be atomic, yes, but I think just adding the spinlock like
>> I suggested will work. You are right, the check for timer_running is
>> not necessary here, and I'm fine with removing it, but there are other
>> issues with interrupt_disabled (as you said) and with memory ordering
>> in the timer case. So even if you remove the timer running check, the
>> lock is still required here.
>
> It turns out you were right, all that really needs to be done is the
> del_timer_sync(). I've added your patch to my queue.
>
> Sorry for the trouble.
Awesome!
Sorry I was going to get back and look at it again, but Linux Plumbers
and playing sardine i a tin can got in the way.
Cheers,
Jes
prev parent reply other threads:[~2019-09-16 14:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 20:36 Jes Sorensen
2019-08-28 20:36 ` [PATCH 1/1] ipmi_si_intf: Fix race in timer shutdown handling Jes Sorensen
2019-08-28 22:32 ` [PATCH 0/1] Fix race in ipmi timer cleanup Corey Minyard
2019-08-29 0:53 ` Jes Sorensen
2019-08-29 18:15 ` Corey Minyard
2019-09-15 1:08 ` [Openipmi-developer] " Corey Minyard
2019-09-16 14:01 ` Jes Sorensen [this message]
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=d93bbba3-16e0-7c68-2fec-fde840bd7072@gmail.com \
--to=jes.sorensen@gmail.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.org \
--cc=openipmi-developer@lists.sourceforge.net \
/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®