Re: [PATCH] [PATCH net-next v2] net: stmmac: fix NULL pointerdereference in stmmac_get_tx_hwtstamp
From: David Miller
Date: Sun Jan 19 2014 - 23:04:00 EST
From: Bruce Liu <damuzi000@xxxxxxxxx>
Date: Fri, 17 Jan 2014 23:47:59 +0800
> When timestamping is enabled, stmmac_tx_clean will call
> stmmac_get_tx_hwtstamp to get tx TS.
> But the skb can be NULL because the last of its tx_skbuff is NULL
> if this packet frame is filled in more than one descriptors.
>
> To fix the issue, change the code:
> - Store TX skb to the tx_skbuff[] of frame's last segment.
> - Check skb is not NULL in stmmac_get_tx_hwtstamp.
>
> Signed-off-by: Bruce Liu <damuzi000@xxxxxxxxx>
Looks a lot better, applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/