diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-05-28 19:08:55 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-05-28 19:12:43 +0200 |
commit | 77e97abf129c5028385dd72587eabab68db0d954 (patch) | |
tree | fc52a8c2ba346da77281f00538a1eb6de49deb5d /target/linux/bcm27xx/patches-5.4/950-0737-dma-buf-fix-resource-leak-on-ENOTTY-error-return-pat.patch | |
parent | 5d3a0c6b26144eb5d62515b99613b5ad8dbdc717 (diff) | |
download | upstream-77e97abf129c5028385dd72587eabab68db0d954.tar.gz upstream-77e97abf129c5028385dd72587eabab68db0d954.tar.bz2 upstream-77e97abf129c5028385dd72587eabab68db0d954.zip |
bcm27xx: update to latest patches from RPi foundation
Also removes random module and switches to new bcm2711 thermal driver.
Boot tested on RPi 4B v1.1 4G.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0737-dma-buf-fix-resource-leak-on-ENOTTY-error-return-pat.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0737-dma-buf-fix-resource-leak-on-ENOTTY-error-return-pat.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0737-dma-buf-fix-resource-leak-on-ENOTTY-error-return-pat.patch b/target/linux/bcm27xx/patches-5.4/950-0737-dma-buf-fix-resource-leak-on-ENOTTY-error-return-pat.patch new file mode 100644 index 0000000000..89b66956e0 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0737-dma-buf-fix-resource-leak-on-ENOTTY-error-return-pat.patch @@ -0,0 +1,34 @@ +From 0960432c8261efb05bcf5ba6d8fe13c8293086a9 Mon Sep 17 00:00:00 2001 +From: Colin Ian King <colin.king@canonical.com> +Date: Mon, 16 Dec 2019 16:10:59 +0000 +Subject: [PATCH] dma-buf: fix resource leak on -ENOTTY error return + path + +Commit f9d3b2c600075d1f79efcd5cdb1718c2f554c0f9 upstream. + +The -ENOTTY error return path does not free the allocated +kdata as it returns directly. Fix this by returning via the +error handling label err. + +Addresses-Coverity: ("Resource leak") +Fixes: c02a81fba74f ("dma-buf: Add dma-buf heaps framework") +Signed-off-by: Colin Ian King <colin.king@canonical.com> +Acked-by: John Stultz <john.stultz@linaro.org> +Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> +Link: https://patchwork.freedesktop.org/patch/msgid/20191216161059.269492-1-colin.king@canonical.com +--- + drivers/dma-buf/dma-heap.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/dma-buf/dma-heap.c ++++ b/drivers/dma-buf/dma-heap.c +@@ -157,7 +157,8 @@ static long dma_heap_ioctl(struct file * + ret = dma_heap_ioctl_allocate(file, kdata); + break; + default: +- return -ENOTTY; ++ ret = -ENOTTY; ++ goto err; + } + + if (copy_to_user((void __user *)arg, kdata, out_size) != 0) |