]> 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)
commit045f93396d44af065379ff8206c0b0d2cb284116
treebc6c9abeee8bf65d9785cc9b867e39aab7754729
parent73fb18749f50a6a035d217117914eeabefbf535d
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 ee0ad5bdb891a58083ec0746113cbdda881ff439 ("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