diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2013-07-03 16:17:34 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-14 06:44:33 -0700 |
commit | 96ca9726343c0166dbdbe85c0d80a95c44a0c90a (patch) | |
tree | 47702801499ae014b4b750ca9c6ab097599d7533 /drivers/media/video/saa7164/saa7164-core.c | |
parent | 092bc21ef043d7fb4515f54ccbd17d98a20e76fb (diff) |
media: hdpvr: fix iteration over uninitialized lists in hdpvr_probe()
commit 2e923a0527ac439e135b9961e58d3acd876bba10 upstream.
free_buff_list and rec_buff_list are initialized in the middle of hdpvr_probe(),
but if something bad happens before that, error handling code calls hdpvr_delete(),
which contains iteration over the lists (via hdpvr_free_buffers()).
The patch moves the lists initialization to the beginning and by the way fixes
goto label in error handling of registering videodev.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Jianguo Wu <wujianguo@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-core.c')
0 files changed, 0 insertions, 0 deletions