Bug 204597

Summary: Tevii s480. Kernel panic during unload module dvb_usb_dw2102
Product: v4l-dvb Reporter: AngelMine (angelmineru)
Component: dvb-usbAssignee: dvb-usb (v4l-dvb_dvb-usb)
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.19.66 Subsystem:
Regression: No Bisected commit-id:

Description AngelMine 2019-08-16 14:53:28 UTC
Hello! We use about hundred DVB boards Tevii S480 and Tevii S482 
Sometime DVB boards lost the lock or hard packet loss.
In this case we do cold-reset OS or unload all dvb modules and Unregister/Register dvb-usb device. 

The issue with S480 board is:
With Kernel v4.14.0 dvb_usb_dw2102 module unloads fine,
But with Kernel v.4.19.66 after command "modprobe -r dvb_usb_dw2102" system hangs until Power Off / Power ON.

Only difference between Kernel v4.14.0 and v4.19.66 is the patch 299c7007e93645067e1d2743f4e50156de78c4ff  in the dw2102.с https://lkml.org/lkml/2018/9/18/378
And looks like this patch along with DVB board Tevii S480 sometime causes a kernel panic during module unload: "modprobe -r dvb_usb_dw2102"

According to our observations kernel panic occurs in about 80% of cases. In other cases, the module is unloaded successfully.  We tested it with more than ten S480 boards, so the issue is not related to DVB board malfunction. 
On the other hand, the same operation with another DVB board: Tevii S482 always succeeds (100% cases).

We think the reason of system hangs is the patch,  because after we remove it hangs stopped happening (despite the fact that the patch code is quite simple)

Steps to reproduce:

Tevii S480. Dell R510/R710. CentOS 7. kernel 4.14.0
1. Wait for the lock
2. modprobe -r dvb_usb_dw2102
Result : Мodule unload successful

Tevii S480. Dell R510/R710. CentOS 7. kernel 4.19.66
1. Wait for the lock
2. modprobe -r dvb_usb_dw2102
Result : Hard Kernel panic in 80% cases.
For obvious reasons there are no logs. To continue work cold reboot needed.

Tevii S482. Dell R510/R710. CentOS 7. kernel 4.14.0 and 4.19.66
1. Wait for the lock
2. modprobe -r dvb_usb_dw2102
Result : Мodule unload successful