mbox series

[v2,0/2] net: mscc: ocelot: fix potential issues accessing skbs list

Message ID 20191127072757.34502-1-yangbo.lu@nxp.com
Headers show
Series net: mscc: ocelot: fix potential issues accessing skbs list | expand

Message

Yangbo Lu Nov. 27, 2019, 7:27 a.m. UTC
Fix two prtential issues accessing skbs list.
- Break the matching loop when find the matching skb to avoid
  consuming more skbs incorrectly. The timestamp ID is only
  from 0 to 3 while the FIFO supports 128 timestamps at most.
- Convert to use skb queue instead of the list of skbs to provide
  protect with lock.

---
Changes for v2:
	- Split into two patches.
	- Converted to use skb queue.

Yangbo Lu (2):
  net: mscc: ocelot: avoid incorrect consuming in skbs list
  net: mscc: ocelot: use skb queue instead of skbs list

 drivers/net/ethernet/mscc/ocelot.c | 55 +++++++++++++-------------------------
 include/soc/mscc/ocelot.h          |  9 +------
 2 files changed, 20 insertions(+), 44 deletions(-)

Comments

David Miller Nov. 27, 2019, 6:53 p.m. UTC | #1
From: Yangbo Lu <yangbo.lu@nxp.com>
Date: Wed, 27 Nov 2019 15:27:55 +0800

> Fix two prtential issues accessing skbs list.
> - Break the matching loop when find the matching skb to avoid
>   consuming more skbs incorrectly. The timestamp ID is only
>   from 0 to 3 while the FIFO supports 128 timestamps at most.
> - Convert to use skb queue instead of the list of skbs to provide
>   protect with lock.
> 
> ---
> Changes for v2:
> 	- Split into two patches.
> 	- Converted to use skb queue.

Series applied, thanks.