aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorChristophe JAILLET <[email protected]>2022-01-09 22:56:10 +0100
committerGreg Kroah-Hartman <[email protected]>2022-02-04 16:45:39 +0100
commit83ba7e895debc529803a7a258653f2fe9bf3bf40 (patch)
treed70b16b486f1210d7cc977fcd90d92c7ab55cef1 /tools/perf/scripts/python/syscall-counts.py
parentaafce7bc5908205c9169a9a362e1c5a46b4d2cf2 (diff)
fsi: Aspeed: Fix a potential double free
A struct device can never be devm_alloc()'ed. Here, it is embedded in "struct fsi_master", and "struct fsi_master" is embedded in "struct fsi_master_aspeed". Since "struct device" is embedded, the data structure embedding it must be released with the release function, as is already done here. So use kzalloc() instead of devm_kzalloc() when allocating "aspeed" and update all error handling branches accordingly. This prevent a potential double free(). This also fix another issue if opb_readl() fails. Instead of a direct return, it now jumps in the error handling path. Fixes: 606397d67f41 ("fsi: Add ast2600 master driver") Suggested-by: Greg KH <[email protected]> Suggested-by: Guenter Roeck <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/2c123f8b0a40dc1a061fae982169fe030b4f47e6.1641765339.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions