From: Cornelia Huck <cohuck@redhat.com>
To: Tony Krowiak <akrowiak@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org, heiko.carstens@de.ibm.com,
gor@linux.ibm.com, borntraeger@de.ibm.com, freude@linux.ibm.com,
mjrosato@linux.ibm.com, pmorel@linux.ibm.com,
pasic@linux.ibm.com, jjherne@linux.ibm.com
Subject: Re: [PATCH] s390: vfio-ap: disable IRQ in remove callback results in kernel OOPS
Date: Tue, 29 Oct 2019 23:19:17 +0100 [thread overview]
Message-ID: <20191029231917.0e6a62b9.cohuck@redhat.com> (raw)
In-Reply-To: <1572386946-22566-1-git-send-email-akrowiak@linux.ibm.com>
On Tue, 29 Oct 2019 18:09:06 -0400
Tony Krowiak <akrowiak@linux.ibm.com> wrote:
> From: aekrowia <akrowiak@linux.ibm.com>
Some accident seems to have happened to your git config.
>
> When an AP adapter card is configured off via the SE or the SCLP
> Deconfigure Adjunct Processor command and the AP bus subsequently detects
> that the adapter card is no longer in the AP configuration, the card
> device representing the adapter card as well as each of its associated
> AP queue devices will be removed by the AP bus. If one or more of the
> affected queue devices is bound to the VFIO AP device driver, its remove
> callback will be invoked for each queue to be removed. The remove callback
> resets the queue and disables IRQ processing. If interrupt processing was
> never enabled for the queue, disabling IRQ processing will fail resulting
> in a kernel OOPS.
>
> This patch verifies IRQ processing is enabled before attempting to disable
> interrupts for the queue.
>
> Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
> Signed-off-by: aekrowia <akrowiak@linux.ibm.com>
> ---
> drivers/s390/crypto/vfio_ap_drv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c
> index be2520cc010b..42d8308fd3a1 100644
> --- a/drivers/s390/crypto/vfio_ap_drv.c
> +++ b/drivers/s390/crypto/vfio_ap_drv.c
> @@ -79,7 +79,8 @@ static void vfio_ap_queue_dev_remove(struct ap_device *apdev)
> apid = AP_QID_CARD(q->apqn);
> apqi = AP_QID_QUEUE(q->apqn);
> vfio_ap_mdev_reset_queue(apid, apqi, 1);
> - vfio_ap_irq_disable(q);
> + if (q->saved_isc != VFIO_AP_ISC_INVALID)
> + vfio_ap_irq_disable(q);
Hm... would it make sense to move that check into vfio_ap_irq_disable()
instead? Or are we sure that in all other cases the irq processing had
been enabled before?
Also, if that oops is reasonably easy to trigger, it would probably
make sense to cc:stable. (Or is this a new problem?)
> kfree(q);
> mutex_unlock(&matrix_dev->lock);
> }
next prev parent reply other threads:[~2019-10-29 22:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-29 22:09 [PATCH] s390: vfio-ap: disable IRQ in remove callback results in kernel OOPS Tony Krowiak
2019-10-29 22:19 ` Cornelia Huck [this message]
2019-10-30 7:44 ` Harald Freudenberger
2019-10-30 14:00 ` Pierre Morel
2019-10-30 16:51 ` Tony Krowiak
2019-10-30 18:02 ` Pierre Morel
2019-10-31 13:26 ` Tony Krowiak
2019-11-01 20:04 ` Tony Krowiak
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=20191029231917.0e6a62b9.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=akrowiak@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=freude@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=jjherne@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=pmorel@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