media: usb: em28xx: resolve WinTV dualHD plugging/unplugging crash
authorSungtak Lee <taklee@google.com>
Thu, 9 Feb 2017 18:02:35 +0000 (10:02 -0800)
committerManish Tuteja <mtuteja@nvidia.com>
Tue, 25 Apr 2017 18:30:10 +0000 (11:30 -0700)
commitd0cc413ef80e4bbd90d3ce6d8eaad22aa72e7881
treeebea3caf1b38ade3bb0f07376782a52634629879
parent4da3d427ac18ebbc77a0f4ce44ee5003444f39fb
media: usb: em28xx: resolve WinTV dualHD plugging/unplugging crash

The second adapter has to be removed first because the data structure of
the first adapter contains a pointer to the second. If memory of the
first adapter is freed before the second adapter is removed the pointer
could be corrupted and kernel crashes could follow.
SHA1 commit:d86686b5879b5fba57a0fac47d94982cafaa65bb

Bug: 32669837
Bug 1904252

Change-Id: Ie3e8d726261e7d88822a5875e89b31e04bef9fce
Signed-off-by: Jean Huang <jeanh@nvidia.com>
Signed-off-by: Patrick Horng<phorng@nvidia.com>
Reviewed-on: http://git-master/r/1460865
Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>
Tested-by: Manish Tuteja <mtuteja@nvidia.com>
drivers/media/usb/em28xx/em28xx-audio.c
drivers/media/usb/em28xx/em28xx-cards.c
drivers/media/usb/em28xx/em28xx-core.c
drivers/media/usb/em28xx/em28xx-dvb.c
drivers/media/usb/em28xx/em28xx-i2c.c
drivers/media/usb/em28xx/em28xx-input.c
drivers/media/usb/em28xx/em28xx-video.c
drivers/media/usb/em28xx/em28xx.h