Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: ethernet: mtk-star-emac: fix error path in RX handling
The dma_addr field in desc_data must not be overwritten until after the new skb is mapped. Currently we do replace it with uninitialized value in error path. This change fixes it by moving the assignment before the label to which we jump after mapping or allocation errors. Fixes: 8c7bd5a ("net: ethernet: mtk-star-emac: new driver") Reported-by: Nathan Chancellor <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Tested-by: Nathan Chancellor <[email protected]> # build Signed-off-by: David S. Miller <[email protected]>
- Loading branch information