]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: clear 'next'-pointer of message fragments before reassembly
authorJon Paul Maloy <jon.maloy@ericsson.com>
Fri, 11 Jul 2014 12:45:27 +0000 (08:45 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Jul 2014 22:02:10 +0000 (15:02 -0700)
commitee729032a396e1cdcdb5a974d2e1725001be4eb1
treebc6c9abeee8bf65d9785cc9b867e39aab7754729
parenta1983d68bd1fb3628d874f20a6fc0d81688b7214
tipc: clear 'next'-pointer of message fragments before reassembly

If the 'next' pointer of the last fragment buffer in a message is not
zeroed before reassembly, we risk ending up with a corrupt message,
since the reassembly function itself isn't doing this.

Currently, when a buffer is retrieved from the deferred queue of the
broadcast link, the next pointer is not cleared, with the result as
described above.

This commit corrects this, and thereby fixes a bug that may occur when
long broadcast messages are transmitted across dual interfaces. The bug
has been present since dcc1a12edfd7523c248cf72c7f8af019e5379795 ("tipc:
message reassembly using fragment chain")

This commit should be applied to both net and net-next.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/bcast.c