]> git.baikalelectronics.ru Git - kernel.git/commit
staging: unisys: visorbus: tolerate larger-than-expected controlvm channel
authorTim Sell <Timothy.Sell@unisys.com>
Wed, 2 Mar 2016 00:45:03 +0000 (19:45 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Mar 2016 03:14:07 +0000 (19:14 -0800)
commit774d67b8c02a45f9e32e5331c5788ee029aad4aa
tree18b74a00401b335379a6c2ad2691532225296ae9
parent3c2476df7714c2364fd0caddcd668097ec35bc57
staging: unisys: visorbus: tolerate larger-than-expected controlvm channel

Use the dynamic size of the controlvm channel (struct channel_header.size)
instead of the statically computed sizeof(struct controlvm_channel) when
determining the valid bounds for visorchannel_read() and
visorchannel_write().

This prevents an observed problem where kdump was failing because
controlvm_channel.local_crash_msg_offset was pointing beyond the statically
computed size of the channel, even though the channel was physically large
enough.  This was causing visorchannel_read() to unecessarily fail, because
we thought we were attempting to access memory outside of the channel.

Signed-off-by: Timothy Sell <timothy.sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorchipset.c