Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/hns3: fix crash when secondary process access FW
[ upstream commit a8f1f7cf1b429c3b95fa94f794f697a30f4c482d ] Currently, to prevent missing reporting of reset interrupts and quickly identify reset interrupts, the following logic is designed in the FW (firmware) command interface hns3_cmd_send: if an unprocessed interrupt exist (by checking reset registers), related reset task is scheduled. The secondary process may invoke the hns3_cmd_send interface (e.g. using proc-info query some stats). Unfortunately, the secondary process does not support reset processing, and a segment fault may occur if it schedules reset task. Fix it by limit the checking and scheduling of reset under only primary process. Fixes: 2790c64 ("net/hns3: support device reset") Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
- Loading branch information