diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2013-03-13 15:50:24 (GMT) |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-03-26 10:00:32 (GMT) |
commit | d0f63acc2ff354a525f7bc7ba90e81f49b6c2ef8 (patch) | |
tree | ff4321843c4c9ffe2806b3b276a20952824a3f60 /lib/lzo/lzo1x_decompress_safe.c | |
parent | 22c12752d183f39aa8e2cc884cfcb23c0cb6d98d (diff) | |
download | linux-fsl-qoriq-d0f63acc2ff354a525f7bc7ba90e81f49b6c2ef8.tar.xz |
igb: Fix null pointer dereference
The max_vfs= option has always been self limiting to the number of VFs
supported by the device. fa44f2f1 added SR-IOV configuration via
sysfs, but in the process broke this self correction factor. The
failing path is:
igb_probe
igb_sw_init
if (max_vfs > 7) {
adapter->vfs_allocated_count = 7;
...
igb_probe_vfs
igb_enable_sriov(, max_vfs)
if (num_vfs > 7) {
err = -EPERM;
...
This leaves vfs_allocated_count = 7 and vf_data = NULL, so we bomb out
when igb_probe finally calls igb_reset. It seems like a really bad
idea, and somewhat pointless, to set vfs_allocated_count separate from
vf_data, but limiting max_vfs is enough to avoid the null pointer.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'lib/lzo/lzo1x_decompress_safe.c')
0 files changed, 0 insertions, 0 deletions