From: Simon Horman <horms@kernel.org>
To: Subbaraya Sundeep <sbhatta@marvell.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com,
edumazet@google.com, sgoutham@marvell.com, gakula@marvell.com,
hkelam@marvell.com
Subject: Re: [PATCH net] octeontx2-pf: Add missing mutex lock in otx2_get_pauseparam
Date: Tue, 28 Nov 2023 17:20:53 +0000 [thread overview]
Message-ID: <20231128172053.GA43811@kernel.org> (raw)
In-Reply-To: <1700930141-5568-1-git-send-email-sbhatta@marvell.com>
On Sat, Nov 25, 2023 at 10:05:41PM +0530, Subbaraya Sundeep wrote:
> All the mailbox messages sent to AF needs to be guarded
> by mutex lock. Add the missing lock in otx2_get_pauseparam
> function.
>
> Fixes: 75f36270990c ("octeontx2-pf: Support to enable/disable pause frames via ethtool")
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Hi,
I am wondering if the call to otx2_nix_config_bp()
in otx2_dcbnl_ieee_setpfc() also needs to be protected by mbox.lock.
And although not strictly related to this patch, while looking over this, I
noticed that in otx2_init_hw_resources() it appears that &mbox->lock may be
unlocked twice in some error paths.
e.g.
/* Init Auras and pools used by NIX RQ, for free buffer ptrs */
err = otx2_rq_aura_pool_init(pf);
if (err) {
mutex_unlock(&mbox->lock);
goto err_free_nix_lf;
}
...
err_free_nix_lf:
mutex_lock(&mbox->lock);
...
...
next prev parent reply other threads:[~2023-11-28 17:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-25 16:35 [PATCH net] octeontx2-pf: Add missing mutex lock in otx2_get_pauseparam Subbaraya Sundeep
2023-11-28 17:20 ` Simon Horman [this message]
2023-11-29 4:55 ` [EXT] " Subbaraya Sundeep Bhatta
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=20231128172053.GA43811@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.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;
as well as URLs for NNTP newsgroup(s).