]> 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)
commit704ae75ac3f5646169d2271315deabf68fde789d
treed9461dce54e4dbe08b98db7db04e3b5ad224991e
parenta8b2f621a873eb2aded050e41c2e2abe2569ce14
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