1
0
Fork 0
alistair23-linux/drivers/char/agp
Qiushi Wu e3b04e1b5b agp/intel: Fix a memory leak on module initialisation failure
[ Upstream commit b975abbd38 ]

In intel_gtt_setup_scratch_page(), pointer "page" is not released if
pci_dma_mapping_error() return an error, leading to a memory leak on
module initialisation failure.  Simply fix this issue by freeing "page"
before return.

Fixes: 0e87d2b06c ("intel-gtt: initialize our own scratch page")
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200522083451.7448-1-chris@chris-wilson.co.uk
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-19 08:16:05 +02:00
..
Kconfig ia64: remove support for machvecs 2019-08-16 14:32:26 -07:00
Makefile char/agp: remove the sgi-agp driver 2019-08-16 11:33:56 -07:00
agp.h agp: change agp_free_page_array to use kvfree 2015-01-29 12:37:41 +10:00
ali-agp.c agp: ali: constify pci_device_id. 2017-08-04 16:59:47 +10:00
alpha-agp.c char: agp: Change return type to vm_fault_t 2018-07-10 13:48:11 +10:00
amd-k7-agp.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
amd64-agp.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
ati-agp.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
backend.c mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
compat_ioctl.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
compat_ioctl.h agp: kill agp_flush_chipset and corresponding ioctl 2010-11-23 20:14:45 +00:00
efficeon-agp.c agp: efficeon: no need to set PG_reserved on GATT tables 2019-03-05 21:07:18 -08:00
frontend.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
generic.c smp: Remove smp_call_function() and on_each_cpu() return values 2019-06-23 14:26:26 +02:00
hp-agp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
i460-agp.c Drivers: char: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
intel-agp.c agp: intel: constify pci_device_id. 2017-08-04 16:59:46 +10:00
intel-agp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
intel-gtt.c agp/intel: Fix a memory leak on module initialisation failure 2020-08-19 08:16:05 +02:00
isoch.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
nvidia-agp.c agp: nvidia: Deprecate pci_get_bus_and_slot() 2018-01-11 17:23:50 -06:00
parisc-agp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sis-agp.c agp: sis: constify pci_device_id. 2017-08-04 16:59:48 +10:00
sworks-agp.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
uninorth-agp.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
via-agp.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00