mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 22:20:45 +00:00
usb: eth: fix memalign() parameter order
The alignment and size were swapped, leading to malloc heap corruption.
On my system, this sometimes caused U-Boot to crash during or after
certain USB Ethernet operations.
Fixes: c8c2797c38
("dm: usb: eth: Support driver model with USB Ethernet")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
parent
7124a8c4cf
commit
53419bac4e
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ int usb_ether_register(struct udevice *dev, struct ueth_data *ueth, int rxsize)
|
|||
}
|
||||
|
||||
ueth->rxsize = rxsize;
|
||||
ueth->rxbuf = memalign(rxsize, ARCH_DMA_MINALIGN);
|
||||
ueth->rxbuf = memalign(ARCH_DMA_MINALIGN, rxsize);
|
||||
if (!ueth->rxbuf)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
Loading…
Reference in a new issue