]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: hv: storvsc: Fix a bug in create_bounce_buffer()
authorK. Y. Srinivasan <kys@microsoft.com>
Wed, 7 Dec 2011 15:15:52 +0000 (07:15 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Dec 2011 22:59:47 +0000 (14:59 -0800)
commit42ade168125495c0be00fbd80d117b1b56826a63
tree0cc4ccf175bebde512a4a0cf14bd116e28ed50b4
parenteca7b2136823c30e0bf30980522fc913c12c9a21
Staging: hv: storvsc: Fix a bug in create_bounce_buffer()

Set the length field of the scatter gather elements correctly when we create
the bounce buffer. When we use the bounce buffer for a "write" operation,
the act of copying to the bounce buffer, correctly deals with this issue.
However, on the "read" side, the current code was not correctly setting
the buffer length. Fix this bug. Note that when we copy from the bounce
buffer (for the read case), the amount we copy is controlled by the original
scatter gather list given to the driver.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reported-by: Dadok Milan <dadok@kvados.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/storvsc_drv.c