media: dvb_net: ensure that dvb_net_ule_handle is fully initialized
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 11 Dec 2017 16:37:24 +0000 (11:37 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 19 Dec 2017 11:28:42 +0000 (06:28 -0500)
commitb93a25e120d5a4154c8902957e7440b10b47a260
tree225dc7a162eacc7f9919b3b71220c96546d39779
parent8ea636dcecfa7b05d60309a50beabc5317a845bf
media: dvb_net: ensure that dvb_net_ule_handle is fully initialized

commit efb9ab67255f ("[media] dvb_net: prepare to split a very
complex function") changed the ULE handling logic, simplifying it.
However, it forgot to keep the initialization for .priv and to
zero .ule_hist fields.

The lack of .priv cause crashes if dvb_net_ule() is called, as
the function assuems that .priv field to be initialized.

With regards to .ule_hist, the current logic is broken and don't
even compile if ULE_DEBUG. Fix it by making the debug vars static
again, and be sure to pass iov parameter to dvb_net_ule_check_crc().

Fixes: efb9ab67255f ("[media] dvb_net: prepare to split a very complex function")

Suggested-by: Ron Economos <w6rz@comcast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-core/dvb_net.c