]> www.infradead.org Git - users/hch/misc.git/commit
sfc: fix NULL dereferences in ef100_process_design_param()
authorEdward Cree <ecree.xilinx@gmail.com>
Tue, 1 Apr 2025 22:54:39 +0000 (23:54 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Apr 2025 22:08:25 +0000 (15:08 -0700)
commit8241ecec1cdc6699ae197d52d58e76bddd995fa5
tree341f4795afeacf5763db3e6750cc21a78f84bad9
parent15970e1b23f5c25db88c613fddf9131de086f28e
sfc: fix NULL dereferences in ef100_process_design_param()

Since cited commit, ef100_probe_main() and hence also
 ef100_check_design_params() run before efx->net_dev is created;
 consequently, we cannot netif_set_tso_max_size() or _segs() at this
 point.
Move those netif calls to ef100_probe_netdev(), and also replace
 netif_err within the design params code with pci_err.

Reported-by: Kyungwook Boo <bookyungwook@gmail.com>
Fixes: 98ff4c7c8ac7 ("sfc: Separate netdev probe/remove from PCI probe/remove")
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/20250401225439.2401047-1-edward.cree@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/sfc/ef100_netdev.c
drivers/net/ethernet/sfc/ef100_nic.c