From: Alexandra Winter <wintera@linux.ibm.com>
To: Simon Horman <simon.horman@corigine.com>,
Niklas Schnelle <schnelle@linux.ibm.com>
Cc: Paolo Abeni <pabeni@redhat.com>,
Wenjia Zhang <wenjia@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
"David S. Miller" <davem@davemloft.net>,
Stefan Raspl <raspl@linux.ibm.com>,
Jan Karcher <jaka@linux.ibm.com>,
linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 1/3] s390/ism: Fix locking for forwarding of IRQs and events to clients
Date: Mon, 10 Jul 2023 08:35:09 +0200 [thread overview]
Message-ID: <99bee917-d874-11af-5c78-30852e057732@linux.ibm.com> (raw)
In-Reply-To: <ZKlmeDUEZf7F8+HW@corigine.com>
On 08.07.23 15:36, Simon Horman wrote:
> On Fri, Jul 07, 2023 at 12:43:57PM +0200, Niklas Schnelle wrote:
[...]
>> @@ -92,6 +102,9 @@ int ism_unregister_client(struct ism_client *client)
>> max_client--;
>> spin_unlock_irqrestore(&clients_lock, flags);
>> list_for_each_entry(ism, &ism_dev_list.list, list) {
>> + spin_lock_irqsave(&ism->lock, flags);
>
> Hi Niklas,
>
> The lock is taken here.
>
>> + /* Stop forwarding IRQs and events */
>> + ism->subs[client->id] = NULL;
>> for (int i = 0; i < ISM_NR_DMBS; ++i) {
>> if (ism->sba_client_arr[i] == client->id) {
>> pr_err("%s: attempt to unregister client '%s'"
>> @@ -101,6 +114,7 @@ int ism_unregister_client(struct ism_client *client)
>> goto out;
>
> But it does not appear to be released
> (by the call to spin_unlock_irqrestore() below)
> if goto out is called here.
>
>> }
>> }
>> + spin_unlock_irqrestore(&ism->lock, flags);
>> }
>> out:
>> mutex_unlock(&ism_dev_list.mutex);
>
Great catch, Simon.
@Niklas, the missing unlock accidentially got moved to "[PATCH net v2 3/3] s390/ism: Do not unregister clients with registered DMBs"
next prev parent reply other threads:[~2023-07-10 6:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230707104359.3324039-1-schnelle@linux.ibm.com>
2023-07-07 10:43 ` [PATCH net v2 1/3] s390/ism: Fix locking for forwarding of IRQs and events to clients Niklas Schnelle
2023-07-07 11:08 ` Niklas Schnelle
2023-07-08 13:36 ` Simon Horman
2023-07-10 6:35 ` Alexandra Winter [this message]
2023-07-10 7:28 ` Niklas Schnelle
2023-07-10 7:45 ` Simon Horman
2023-07-07 10:43 ` [PATCH net v2 2/3] s390/ism: Fix and simplify add()/remove() callback handling Niklas Schnelle
2023-07-07 10:43 ` [PATCH net v2 3/3] s390/ism: Do not unregister clients with registered DMBs Niklas Schnelle
2023-07-07 10:56 [PATCH net v2 0/3] s390/ism: Fixes to client handling Niklas Schnelle
2023-07-07 10:56 ` [PATCH net v2 1/3] s390/ism: Fix locking for forwarding of IRQs and events to clients Niklas Schnelle
2023-07-07 13:37 ` Alexandra Winter
2023-07-07 14:08 ` Niklas Schnelle
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=99bee917-d874-11af-5c78-30852e057732@linux.ibm.com \
--to=wintera@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=jaka@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=raspl@linux.ibm.com \
--cc=schnelle@linux.ibm.com \
--cc=simon.horman@corigine.com \
--cc=svens@linux.ibm.com \
--cc=wenjia@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox