Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1411104
| From | Yuval Mintz <Yuval.Mintz@qlogic.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH] qed: fix qed_fill_link() error handling |
| Date | 2016-06-01 13:20 +0200 |
| Message-ID | <rFclQ-7HG-15@gated-at.bofh.it> (permalink) |
| References | <rExC2-67g-5@gated-at.bofh.it> <rF0um-8u2-13@gated-at.bofh.it> <rFc2t-7m8-5@gated-at.bofh.it> <rFcc9-7Eu-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> > > I think we can just remove the IS_ENABLED() check there and define > > > the > > > IS_PF() macro conditionally to become 'true' if CONFIG_QED_SRIOV is > > > not set, like some other drivers do > > > > I think that would be unsafe with current qede - qede currently > > publishes its VFs' PCI device-id as part its MODULE_DEVICE_TABLE, even > > if CONFIG_QED_SRIOV isn't enabled [might be the wrong thing to do, but > > that how it goes]. > > Without changing this, if for some reason we'd have an assigned VF to > > a VM whose kernel isn't compiled with CONFIG_QED_SRIOV [which is an > > odd config], that VM is likely to miserably crash. > > Wouldn't it crash anyway if the code to handle VF devices is not present? > E.g. the warning we got here tells us that qed_get_link_data() operates on > uninitialized data when called on a VF device and SRIOV support is not built into > the driver. I haven't looked if all the other functions handle that right, but my > guess is that there are other functions with similar problems. > > Maybe it's best to remove the PCI IDs fort the virtual devices from the table if > they are not supported by the configuration. Actually, I think VF probe should gracefully fail in that case, as qed_vf_hw_prepare() would simply return -EINVAL. But I can honestly say I've never tested this flow, and I agree there's no reason to allow VF probe in case we're not supporting SRIOV. So I guess removing the PCI ID and defining IS_PF to be true in case CONFIG_QED_SRIOV isn't set is the right way to go. Do you want to revise your patch, or do you want me to do it? Thanks, Yuval
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] qed: fix qed_fill_link() error handling David Miller <davem@davemloft.net> - 2016-05-31 23:30 +0200
Re: [PATCH] qed: fix qed_fill_link() error handling Arnd Bergmann <arnd@arndb.de> - 2016-06-01 00:40 +0200
RE: [PATCH] qed: fix qed_fill_link() error handling Yuval Mintz <Yuval.Mintz@qlogic.com> - 2016-06-01 13:00 +0200
Re: [PATCH] qed: fix qed_fill_link() error handling Arnd Bergmann <arnd@arndb.de> - 2016-06-01 13:10 +0200
RE: [PATCH] qed: fix qed_fill_link() error handling Yuval Mintz <Yuval.Mintz@qlogic.com> - 2016-06-01 13:20 +0200
[PATCH v2] qed: fix qed_fill_link() error handling Arnd Bergmann <arnd@arndb.de> - 2016-06-01 15:30 +0200
RE: [PATCH v2] qed: fix qed_fill_link() error handling Yuval Mintz <Yuval.Mintz@qlogic.com> - 2016-06-01 15:40 +0200
Re: [PATCH v2] qed: fix qed_fill_link() error handling David Miller <davem@davemloft.net> - 2016-06-02 07:10 +0200
csiph-web