[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140119.200352.719528361166763885.davem@davemloft.net>
Date: Sun, 19 Jan 2014 20:03:52 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: damuzi000@...il.com
Cc: peppe.cavallaro@...com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [PATCH net-next v2] net: stmmac: fix NULL pointer
dereference in stmmac_get_tx_hwtstamp
From: Bruce Liu <damuzi000@...il.com>
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@...il.com>
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists