From: Alexander Duyck Date: Thu, 12 Mar 2015 21:46:23 +0000 (-0700) Subject: fib_trie: Avoid NULL pointer if local table is not allocated X-Git-Tag: omap-for-v4.1/fixes-rc1~141^2~256^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c9e9f7320f0138497ef7879c0903246746e0ed3;p=pandora-kernel.git fib_trie: Avoid NULL pointer if local table is not allocated The function fib_unmerge assumed the local table had already been allocated. If that is not the case however when custom rules are applied then this can result in a NULL pointer dereference. In order to prevent this we must check the value of the local table pointer and if it is NULL simply return 0 as there is no local table to separate from the main. Fixes: 0ddcf43d5 ("ipv4: FIB Local/MAIN table collapse") Reported-by: Madhu Challa Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller --- Reading git-diff-tree failed