All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hyunjung Ko" <hj351016@gmail.com>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH] virtio_pci_modern: don't sleep in atomic context in admin cmd submission
Date: Wed, 11 Nov 2026 07:55:30 +0000	[thread overview]
Message-ID: <sashiko-outbox-208550@kernel.org> (raw)
In-Reply-To: <20261111075154.3017978-1-hj351016@gmail.com>

> virtqueue_exec_admin_cmd() calls virtqueue_add_sgs() with GFP_KERNEL while
> holding admin_vq->lock, which is taken with spin_lock_irqsave(). The admin
> virtqueue is created with ctx=false, so when the device has negotiated
> VIRTIO_RING_F_INDIRECT_DESC it uses indirect descriptors and
> virtqueue_add() allocates the indirect descriptor table with the passed
> gfp. Admin commands always have more than one sg (header plus status), so
> the indirect path is taken and a GFP_KERNEL allocation may sleep while
> interrupts are disabled under the spinlock, triggering a "BUG: sleeping
> function called from invalid context" splat with CONFIG_DEBUG_ATOMIC_SLEEP.
> 
> Use GFP_ATOMIC for the descriptor allocation that runs under the lock; the
> table is small and the -ENOMEM path is already handled.
> 
> Fixes: 4c3b54af907e ("virtio_pci_modern: use completion instead of busy loop to wait on admin cmd result")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hyunjung Ko <hj351016@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261111075154.3017978-1-hj351016@gmail.com?part=1


      reply	other threads:[~2026-11-11  7:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  7:51 [PATCH] virtio_pci_modern: don't sleep in atomic context in admin cmd submission Hyunjung Ko
2026-11-11  7:55 ` sashiko-bot [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=sashiko-outbox-208550@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=hj351016@gmail.com \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.