diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-13 07:31:21 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-13 07:31:21 -0700 |
| commit | 83a4f90e9835d3d61fe3dd39ffbbcac752467d09 (patch) | |
| tree | 3bab72e9ae6a57ae6f25d92e518bae40cc8ef974 /drivers | |
| parent | b4f5144d37403d529334573ef2a1bb6ca4a2c553 (diff) | |
| parent | 42d217add8d80d6e7d9f58f80d11ea9b07ea113e (diff) | |
| download | linux-83a4f90e9835d3d61fe3dd39ffbbcac752467d09.tar.gz linux-83a4f90e9835d3d61fe3dd39ffbbcac752467d09.zip | |
Merge tag 'firewire-fixes-7.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
Pull firewire fix from Takashi Sakamoto:
"Fix a NULL pointer dereference in 1394 OHCI PCI driver when probe()
returns early with an error, as detected by Syzkaller"
* tag 'firewire-fixes-7.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
firewire: ohci: fix NULL pointer dereference in ar_context_release
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/firewire/ohci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 8153d62c58f0..e947227e01ac 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -540,11 +540,13 @@ static void ar_context_link_page(struct ar_context *ctx, unsigned int index) static void ar_context_release(struct ar_context *ctx) { - struct device *dev = ctx->ohci->card.device; + struct device *dev; if (!ctx->buffer) return; + dev = ctx->ohci->card.device; + for (int i = 0; i < AR_BUFFERS; ++i) { dma_addr_t dma_addr = ctx->dma_addrs[i]; if (dma_addr) |
