Re: [PATCHv2] net/bnxt: fix null pointer dereference in bnxt_hwrm_port_led_cfg()

2022-08-01 Thread Somnath Kotur
On Tue, Aug 2, 2022 at 9:17 AM Mao YingMing wrote: > > For VFs, bp->leds is uninitialized, check bp->leds is > not null before use bp->leds->num_leds. Sorry for missing this the first time around, Rephrase it to say 'before checking for bp->leds->num_leds' > segfault backtrace in trex program when

[PATCHv2] net/bnxt: fix null pointer dereference in bnxt_hwrm_port_led_cfg()

2022-08-01 Thread Mao YingMing
For VFs, bp->leds is uninitialized, check bp->leds is not null before use bp->leds->num_leds. segfault backtrace in trex program when use VF: 11: bnxt_hwrm_port_led_cfg (bp=0x23ffb2140, led_on=true) 10: bnxt_dev_led_on_op (dev=0x22d7780 ) 9: rte_eth_led_on (port_id=0) 8: DpdkTRexPortAttr::set_le