diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-10-01 20:43:45 -0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-10-01 20:57:25 -0400 |
commit | 726ba0e14a7915effee9e8e652a37306d9637d13 (patch) | |
tree | 53765b1e20c178fcf762c9263746752121ec2405 /drivers/net/ethernet | |
parent | abb17e6c0c7b27693201dc85f75dbb184279fd10 (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/sfc/siena_sriov.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/siena_sriov.c b/drivers/net/ethernet/sfc/siena_sriov.c index a8f48a45584..d49b53dc2a5 100644 --- a/drivers/net/ethernet/sfc/siena_sriov.c +++ b/drivers/net/ethernet/sfc/siena_sriov.c | |||
@@ -1035,6 +1035,7 @@ efx_sriov_get_channel_name(struct efx_channel *channel, char *buf, size_t len) | |||
1035 | static const struct efx_channel_type efx_sriov_channel_type = { | 1035 | static const struct efx_channel_type efx_sriov_channel_type = { |
1036 | .handle_no_channel = efx_sriov_handle_no_channel, | 1036 | .handle_no_channel = efx_sriov_handle_no_channel, |
1037 | .pre_probe = efx_sriov_probe_channel, | 1037 | .pre_probe = efx_sriov_probe_channel, |
1038 | .post_remove = efx_channel_dummy_op_void, | ||
1038 | .get_name = efx_sriov_get_channel_name, | 1039 | .get_name = efx_sriov_get_channel_name, |
1039 | /* no copy operation; channel must not be reallocated */ | 1040 | /* no copy operation; channel must not be reallocated */ |
1040 | .keep_eventq = true, | 1041 | .keep_eventq = true, |