Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 799d2fff authored by Mirko Lindner's avatar Mirko Lindner Committed by David S. Miller
Browse files

sky2: Fix crash inside sky2_rx_clean



If sky2->tx_le = pci_alloc_consistent() or sky2->tx_ring = kcalloc() in
sky2_alloc_buffers() fails, sky2->rx_ring = kcalloc() will never be called.
In this error case handling, sky2_rx_clean() is called from within
sky2_free_buffers().

In sky2_rx_clean() we find the following:

...
   memset(sky2->rx_le, 0, RX_LE_BYTES);
...

This results in a memset using a NULL pointer and will crash the system.

Signed-off-by: default avatarMirko Lindner <mlindner@marvell.com>
Acked-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 92c7b0de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment