Commit 319a782
bnxt_en: Prevent kernel panic when receiving unexpected PHC_UPDATE event
The firmware can send PHC_RTC_UPDATE async event on a PF that may not
have PTP registered. In such a case, there will be a null pointer
deference for bp->ptp_cfg when we try to handle the event.
Fix it by not registering for this event with the firmware if !bp->ptp_cfg.
Also, check that bp->ptp_cfg is valid before proceeding when we receive
the event.
Fixes: 8bcf6f0 ("bnxt_en: Handle async event when the PHC is updated in RTC mode")
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent 83474a9 commit 319a782
2 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2365 | 2365 | | |
2366 | 2366 | | |
2367 | 2367 | | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
2368 | 2371 | | |
2369 | 2372 | | |
2370 | 2373 | | |
| |||
4763 | 4766 | | |
4764 | 4767 | | |
4765 | 4768 | | |
| 4769 | + | |
| 4770 | + | |
| 4771 | + | |
4766 | 4772 | | |
4767 | 4773 | | |
4768 | 4774 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
| 955 | + | |
955 | 956 | | |
956 | 957 | | |
957 | 958 | | |
| |||
0 commit comments