ipv6: fix null pointer dereference in __ip6addrlbl_add
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Tue, 3 Sep 2013 00:13:31 +0000 (02:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Sep 2013 13:54:56 +0000 (06:54 -0700)
commitef1f8bcdc2febd53978905b5b0a5201104cce653
treefbd2fe454407b2a86dce8f3785abb7bd571639d2
parentbd35c1a7f659dfa01179e456881285a9f057d30c
ipv6: fix null pointer dereference in __ip6addrlbl_add

[ Upstream commit 639739b5e609a5074839bb22fc061b37baa06269 ]

Commit b67bfe0d42cac56c512dd5da4b1b347a23f4b70a ("hlist: drop
the node parameter from iterators") changed the behavior of
hlist_for_each_entry_safe to leave the p argument NULL.

Fix this up by tracking the last argument.

Reported-by: Michele Baldessari <michele@acksyn.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Tested-by: Michele Baldessari <michele@acksyn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/addrlabel.c