kernel-fxtec-pro1x/drivers/char/agp
Qiushi Wu ea01e491c3 agp/intel: Fix a memory leak on module initialisation failure
[ Upstream commit b975abbd382fe442713a4c233549abb90e57c22b ]

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:14:53 +02: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 char: amd64-agp: Use 64-bit arithmetic instead of 32-bit 2018-07-10 13:50:31 +10:00
ati-agp.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
backend.c agp: Fix up email address & attributions in AGP MODULE_AUTHOR tags 2014-12-23 20:03:10 +10:00
compat_ioctl.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
compat_ioctl.h
efficeon-agp.c agp: efficeon: constify pci_device_id. 2017-08-04 16:59:48 +10:00
frontend.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
generic.c agp: use set_memory.h header 2017-05-08 17:15:13 -07:00
hp-agp.c [IA64] agp/hp-agp: Allow binding user memory to the AGP GART 2011-08-23 13:31:59 -07: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:14:53 +02:00
isoch.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nvidia-agp.c agp: nvidia: Deprecate pci_get_bus_and_slot() 2018-01-11 17:23:50 -06:00
parisc-agp.c parisc: agp/parisc-agp: allow binding of user memory to the AGP GART 2013-07-31 23:42:00 +02:00
sgi-agp.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07: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: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
via-agp.c agp: Fix up email address & attributions in AGP MODULE_AUTHOR tags 2014-12-23 20:03:10 +10:00