diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-03-16 20:41:03 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-03-16 21:24:23 +0100 |
commit | 0f6d04457a64f2393b05f662dc8d381ea1963c66 (patch) | |
tree | 2d6a3c82d5e6d02b030b16df66da8bf9209b02ec /target/linux/bcm27xx/patches-5.4/950-0391-driver-char-rpivid-Fix-access-to-freed-memory.patch | |
parent | d890f85e59617228b1e76e8cf45a9309904d9124 (diff) | |
download | upstream-0f6d04457a64f2393b05f662dc8d381ea1963c66.tar.gz upstream-0f6d04457a64f2393b05f662dc8d381ea1963c66.tar.bz2 upstream-0f6d04457a64f2393b05f662dc8d381ea1963c66.zip |
bcm27xx: sync 5.4 patches with RPi Foundation
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0391-driver-char-rpivid-Fix-access-to-freed-memory.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0391-driver-char-rpivid-Fix-access-to-freed-memory.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0391-driver-char-rpivid-Fix-access-to-freed-memory.patch b/target/linux/bcm27xx/patches-5.4/950-0391-driver-char-rpivid-Fix-access-to-freed-memory.patch new file mode 100644 index 0000000000..67147fa58d --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0391-driver-char-rpivid-Fix-access-to-freed-memory.patch @@ -0,0 +1,27 @@ +From be492eed9f4724798a7b85cf8779772dc901f986 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <dave.stevenson@raspberrypi.com> +Date: Tue, 21 Jan 2020 16:44:14 +0000 +Subject: [PATCH] driver: char: rpivid: Fix access to freed memory + +The error path during probe frees the private memory block, and +then promptly dereferences it to log an error message. + +Use the base device instead of the pointer to it in the private +structure. + +Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> +--- + drivers/char/broadcom/rpivid-mem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/char/broadcom/rpivid-mem.c ++++ b/drivers/char/broadcom/rpivid-mem.c +@@ -229,7 +229,7 @@ failed_alloc_chrdev: + failed_get_resource: + kfree(priv); + failed_inst_alloc: +- dev_err(priv->dev, "could not load rpivid_mem"); ++ dev_err(&pdev->dev, "could not load rpivid_mem"); + return err; + } + |