9baa09c7210c69141944c0c23bed00bdcbc774f1
[oweals/openwrt.git] /
1 From dffde3390eb21fe0dc748a06894641a81d009b4e Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Wed, 14 Nov 2018 11:54:46 +0000
4 Subject: [PATCH 442/454] vcsm: Fix an NULL dereference in the import_dmabuf
5  error path
6
7 resource was dereferenced even though it was NULL.
8
9 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
10 ---
11  drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 +-
12  1 file changed, 1 insertion(+), 1 deletion(-)
13
14 --- a/drivers/char/broadcom/vc_sm/vmcs_sm.c
15 +++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c
16 @@ -2315,8 +2315,8 @@ int vc_sm_ioctl_import_dmabuf(struct sm_
17         return 0;
18  
19  error:
20 -       resource->res_stats[IMPORT_FAIL]++;
21         if (resource) {
22 +               resource->res_stats[IMPORT_FAIL]++;
23                 vc_sm_resource_deceased(resource, 1);
24                 kfree(resource);
25         }