sfc: Fix null function pointer in efx_sriov_channel_type
Commit c31e5f9
('sfc: Add channel specific receive_skb handler and
post_remove callback') added the function pointer field
efx_channel_type::post_remove and an unconditional call through it.
This field should have been initialised to efx_channel_dummy_op_void
in the existing instances of efx_channel_type, but this was only done
in efx_default_channel_type. Consequently, if a device has SR-IOV
enabled then removing the driver or device will result in an oops.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
parent
abb17e6c0c
commit
726ba0e14a
|
@ -1035,6 +1035,7 @@ efx_sriov_get_channel_name(struct efx_channel *channel, char *buf, size_t len)
|
|||
static const struct efx_channel_type efx_sriov_channel_type = {
|
||||
.handle_no_channel = efx_sriov_handle_no_channel,
|
||||
.pre_probe = efx_sriov_probe_channel,
|
||||
.post_remove = efx_channel_dummy_op_void,
|
||||
.get_name = efx_sriov_get_channel_name,
|
||||
/* no copy operation; channel must not be reallocated */
|
||||
.keep_eventq = true,
|
||||
|
|
Loading…
Reference in New Issue