ax25: fix possible use-after-free

From: f6bvp
Date: Sat Feb 16 2019 - 16:46:42 EST


Patch applied successfully on Linux draws-f6bvp 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux

However ax25_route_lock_use and ax25_route_lock_unuse() are not declared and compile failed.

makeÂ: on entre dans le rÃpertoire ÂÂ/usr/src/linux-headers-4.14.79-v7+ÂÂ
CC [M] /usr/src/linux-4.14.y/net/ax25/ax25_ip.o
/usr/src/linux-4.14.y/net/ax25/ax25_ip.c: In function âax25_ip_xmitâ:
/usr/src/linux-4.14.y/net/ax25/ax25_ip.c:117:2: error: implicit declaration of function âax25_route_lock_useâ [-Werror=implicit-function-declaration]
ax25_route_lock_use();
^~~~~~~~~~~~~~~~~~~
/usr/src/linux-4.14.y/net/ax25/ax25_ip.c:211:2: error: implicit declaration of function âax25_route_lock_unuseâ [-Werror=implicit-function-declaration]
ax25_route_lock_unuse();
^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:328Â: la recette pour la cible ÂÂ/usr/src/linux-4.14.y/net/ax25/ax25_ip.oÂÂ a ÃchouÃe
make[1]: *** [/usr/src/linux-4.14.y/net/ax25/ax25_ip.o] Erreur 1
Makefile:1527Â: la recette pour la cible ÂÂ_module_/usr/src/linux-4.14.y/net/ax25ÂÂ a ÃchouÃe
make: *** [_module_/usr/src/linux-4.14.y/net/ax25] Erreur 2
makeÂ: on quitte le rÃpertoire ÂÂ/usr/src/linux-headers-4.14.79-v7+ÂÂ


Bernard, f6bvp