]> git.baikalelectronics.ru Git - kernel.git/commit
net: dp83640: Avoid NULL pointer dereference.
authorRichard Cochran <richardcochran@gmail.com>
Fri, 23 Jun 2017 15:51:31 +0000 (17:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jun 2017 18:38:16 +0000 (14:38 -0400)
commita1579038cb257471c2c95ee5a5b2de7501b27c1d
tree936e6b6ea82e1a2b571a8dcc616ee3d5234cdfac
parentc2b67902289a879c904769fa9bdde37f235cd6be
net: dp83640: Avoid NULL pointer dereference.

The function, skb_complete_tx_timestamp(), used to allow passing in a
NULL pointer for the time stamps, but that was changed in commit
a6c6368adf2b43349e8e77f1485bab974d4b6caf ("net-timestamp: Make the
clone operation stand-alone from phy timestamping"), and the existing
call sites, all of which are in the dp83640 driver, were fixed up.

Even though the kernel-doc was subsequently updated in commit
4dce9098e830bebda76f7b075c9a17d88c7b2a0b ("net-timestamp: Update
skb_complete_tx_timestamp comment"), still a bug fix from Manfred
Rudigier came into the driver using the old semantics.  Probably
Manfred derived that patch from an older kernel version.

This fix should be applied to the stable trees as well.

Fixes: 31779931c424 ("net: dp83640: Fix tx timestamp overflow handling.")
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/dp83640.c