Fix locking and lock usage, making it compile for SMP. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 43578