]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: check for xdo_dev_state_free
authorShannon Nelson <shannon.nelson@oracle.com>
Tue, 19 Dec 2017 23:35:47 +0000 (15:35 -0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 21 Dec 2017 07:17:48 +0000 (08:17 +0100)
commitb6ceb0cfff732af47b454f9fbe44b7c9db7c7ebb
treefd465f66ae953e9abedce0d2374ae48b1900d3bd
parentb905f333c9517e76215264bd2b42271a7a8f01aa
xfrm: check for xdo_dev_state_free

The current XFRM code assumes that we've implemented the
xdo_dev_state_free() callback, even if it is meaningless to the driver.
This patch adds a check for it before calling, as done in other APIs,
to prevent a NULL function pointer kernel crash.

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h