aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-10-21 10:11:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-10-21 10:11:11 -0700
commit4d7b04c0cda365f190c4a8f7fddc535b93aae9f9 (patch)
tree7f4fe68f8bb58f45ca53c0b8b976ef6172a3b804 /drivers/s390
parentf51de61ce7cf27202fe1357b6c35a39a98ecd9cf (diff)
parentc1ae1c59c8c6e0b66a718308c623e0cb394dab6b (diff)
downloadlinux-4d7b04c0cda365f190c4a8f7fddc535b93aae9f9.tar.gz
Merge tag 's390-6.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Vasily Gorbik: - Fix IOMMU bitmap allocation in s390 PCI to avoid out of bounds access when IOMMU pages aren't a multiple of 64 - Fix kasan crashes when accessing DCSS mapping in memory holes by adding corresponding kasan zero shadow mappings - Fix a memory leak in css_alloc_subchannel in case dma_set_coherent_mask fails * tag 's390-6.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/pci: fix iommu bitmap allocation s390/kasan: handle DCSS mapping in memory holes s390/cio: fix a memleak in css_alloc_subchannel
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/cio/css.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index 3ef636935a547c..3ff46fc694f85e 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -233,17 +233,19 @@ struct subchannel *css_alloc_subchannel(struct subchannel_id schid,
*/
ret = dma_set_coherent_mask(&sch->dev, DMA_BIT_MASK(31));
if (ret)
- goto err;
+ goto err_lock;
/*
* But we don't have such restrictions imposed on the stuff that
* is handled by the streaming API.
*/
ret = dma_set_mask(&sch->dev, DMA_BIT_MASK(64));
if (ret)
- goto err;
+ goto err_lock;
return sch;
+err_lock:
+ kfree(sch->lock);
err:
kfree(sch);
return ERR_PTR(ret);