public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Karsten Graul <kgraul@linux.ibm.com>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	linux-s390@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Tony Lu <tonylu@linux.alibaba.com>
Cc: syzbot+4f322a6d84e991c38775@syzkaller.appspotmail.com
Subject: Re: [PATCH] net/smc: Use a mutex for locking "struct smc_pnettable"
Date: Wed, 23 Feb 2022 18:59:10 +0100	[thread overview]
Message-ID: <9725f86f-eabe-6aaf-0ef1-74138d895834@linux.ibm.com> (raw)
In-Reply-To: <20220223100252.22562-1-fmdefrancesco@gmail.com>

On 23/02/2022 11:02, Fabio M. De Francesco wrote:
> smc_pnetid_by_table_ib() uses read_lock() and then it calls smc_pnet_apply_ib()
> which, in turn, calls mutex_lock(&smc_ib_devices.mutex).
> 
> read_lock() disables preemption. Therefore, the code acquires a mutex while in
> atomic context and it leads to a SAC bug.
> 
> Fix this bug by replacing the rwlock with a mutex.
> 
> Reported-and-tested-by: syzbot+4f322a6d84e991c38775@syzkaller.appspotmail.com
> Fixes: 64e28b52c7a6 ("net/smc: add pnet table namespace support")
> Confirmed-by: Tony Lu <tonylu@linux.alibaba.com>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---

Thank you Fabio!

This should go to the net tree...

Acked-by: Karsten Graul <kgraul@linux.ibm.com>

      reply	other threads:[~2022-02-23 17:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 10:02 [PATCH] net/smc: Use a mutex for locking "struct smc_pnettable" Fabio M. De Francesco
2022-02-23 17:59 ` Karsten Graul [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=9725f86f-eabe-6aaf-0ef1-74138d895834@linux.ibm.com \
    --to=kgraul@linux.ibm.com \
    --cc=davem@davemloft.net \
    --cc=fmdefrancesco@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+4f322a6d84e991c38775@syzkaller.appspotmail.com \
    --cc=tonylu@linux.alibaba.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