Commit 8e1ffb2
drm/syncobj: Fix syncobj leak in drm_syncobj_eventfd_ioctl
commit 8c7c44b upstream.
A syncobj reference is taken in drm_syncobj_find, but not released if
eventfd_ctx_fdget or kzalloc fails. Put the reference in these error
paths.
Reported-by: Xingyu Jin <xingyuj@google.com>
Fixes: c7a4722 ("drm/syncobj: add IOCTL to register an eventfd")
Signed-off-by: T.J. Mercier <tjmercier@google.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by. Christian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org # 6.6+
Link: https://patchwork.freedesktop.org/patch/msgid/20240909205400.3498337-1-tjmercier@google.com
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 28425a1 commit 8e1ffb2
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1421 | 1421 | | |
1422 | 1422 | | |
1423 | 1423 | | |
| 1424 | + | |
1424 | 1425 | | |
1425 | 1426 | | |
1426 | 1427 | | |
| |||
1436 | 1437 | | |
1437 | 1438 | | |
1438 | 1439 | | |
1439 | | - | |
1440 | | - | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
1441 | 1444 | | |
1442 | 1445 | | |
1443 | 1446 | | |
1444 | | - | |
1445 | | - | |
| 1447 | + | |
| 1448 | + | |
1446 | 1449 | | |
1447 | 1450 | | |
1448 | 1451 | | |
| |||
1453 | 1456 | | |
1454 | 1457 | | |
1455 | 1458 | | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
1456 | 1465 | | |
1457 | 1466 | | |
1458 | 1467 | | |
| |||
0 commit comments