tipc: fix nullpointer bug when subscribing to events
authorErik Hugne <erik.hugne@ericsson.com>
Fri, 27 Feb 2015 07:56:55 +0000 (08:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Feb 2015 23:18:47 +0000 (18:18 -0500)
commit7fe8097cef5ff4ba1c7ced42bda97830ce00eec6
treed9461dce54e4dbe08b98db7db04e3b5ad224991e
parent3622c36f37640078c9a706b71e02e6334c85f9e9
tipc: fix nullpointer bug when subscribing to events

If a subscription request is sent to a topology server
connection, and any error occurs (malformed request, oom
or limit reached) while processing this request, TIPC should
terminate the subscriber connection. While doing so, it tries
to access fields in an already freed (or never allocated)
subscription element leading to a nullpointer exception.
We fix this by removing the subscr_terminate function and
terminate the connection immediately upon any subscription
failure.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/subscr.c