Commit e091cc1
perf/core: Don't leak AUX buffer refcount on allocation failure
commit 5468c0f upstream.
Failure of the AUX buffer allocation leaks the reference count.
Set the reference count to 1 only when the allocation succeeds.
Fixes: 45bfb2e ("perf/core: Add AUX area to ring buffer for raw data streams")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 1998919 commit e091cc1
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6988 | 6988 | | |
6989 | 6989 | | |
6990 | 6990 | | |
6991 | | - | |
6992 | | - | |
6993 | 6991 | | |
6994 | 6992 | | |
6995 | 6993 | | |
| |||
7056 | 7054 | | |
7057 | 7055 | | |
7058 | 7056 | | |
7059 | | - | |
| 7057 | + | |
| 7058 | + | |
7060 | 7059 | | |
| 7060 | + | |
7061 | 7061 | | |
7062 | 7062 | | |
7063 | 7063 | | |
| |||
7067 | 7067 | | |
7068 | 7068 | | |
7069 | 7069 | | |
| 7070 | + | |
7070 | 7071 | | |
7071 | 7072 | | |
7072 | 7073 | | |
| |||
0 commit comments