OSDN Git Service

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)
commit7f05b467a735aba1476d9ae8e0ae9d9d8e60066c
treefd465f66ae953e9abedce0d2374ae48b1900d3bd
parentf58869c44fb3f0835dd2dabce06e5919a18655c6
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