]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit53c917ed39eb99d114932546d842a1c71828c033
treed9461dce54e4dbe08b98db7db04e3b5ad224991e
parent492544ef62292b84e1bf763f809dffcba1370c91
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