mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: shyckless@gmail.com
Cc: tiwai@suse.com, perex@perex.cz, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: mixart: Don't touch the mailbox when the BAR mapping failed
Date: Tue, 24 Nov 2026 13:46:56 +0100	[thread overview]
Message-ID: <87wlq29z27.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261124-mixart-free-v1-1-13765d8d445b@gmail.com>

On Tue, 24 Nov 2026 05:47:07 +0100,
Suyuan Wang via B4 Relay wrote:
> 
> From: Suyuan Wang <stevewong@hust.edu.cn>
> 
> snd_mixart_probe() calls snd_mixart_free() when pci_ioremap_bar() fails
> for either BAR. snd_mixart_free() then unconditionally calls
> 
> 	snd_mixart_exit_mailbox(mgr);
> 
> which masks the outbound mailbox interrupts by writing to
> MIXART_REG(mgr, MIXART_PCI_OMIMR_OFFSET), i.e. through mgr->mem[1].virt.
> mem[1].virt is still NULL if either BAR mapping fails, so the error
> path oopses on a write near address 0 instead of returning -EBUSY.
> 
> Only call snd_mixart_exit_mailbox() when the register BAR is mapped. The
> rest of snd_mixart_free() already copes with a partly set up manager:
> iounmap() accepts NULL, and the IRQ and DMA buffers are checked before
> release.
> 
> Found with a static analysis tool and checked by hand.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Co-developed-by: Kaixuan Li <kaixuan.li@ntu.edu.sg>
> Signed-off-by: Kaixuan Li <kaixuan.li@ntu.edu.sg>
> Signed-off-by: Suyuan Wang <stevewong@hust.edu.cn>

Applied to for-next branch.  Thanks.


Takashi

      reply	other threads:[~2026-11-24 12:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  4:47 Suyuan Wang via B4 Relay
2026-11-24 12:46 ` Takashi Iwai [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=87wlq29z27.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=shyckless@gmail.com \
    --cc=tiwai@suse.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

all inboxes | Powered by JetHome®