Re: [PATCH] drm/radeon: fix a missing-check bug

2018-10-19 Thread Koenig, Christian
Am 18.10.18 um 19:13 schrieb Wenwen Wang: > In radeon_read_bios(), the bios rom is firstly mapped to the IO memory > region 'bios' through pci_map_rom(). Then the first two bytes of 'bios' are > copied to 'val1' and 'val2' respectively through readb(). After that, > 'val1' and 'val2' are checked

[PATCH] drm/radeon: fix a missing-check bug

2018-10-18 Thread Wenwen Wang
In radeon_read_bios(), the bios rom is firstly mapped to the IO memory region 'bios' through pci_map_rom(). Then the first two bytes of 'bios' are copied to 'val1' and 'val2' respectively through readb(). After that, 'val1' and 'val2' are checked to see whether they have expected values, i.e.,

[PATCH] drm/radeon: fix a missing-check bug

2018-10-18 Thread Wenwen Wang
In igp_read_bios_from_vram(), the start of vram is firstly remapped to the IO memory region 'bios' through ioremap(). Then the size and values of 'bios' are checked. For example, 'bios[0]' is compared against 0x55 and 'bios[1]' is compared against 0xaa. If no error happens during this checking