]> git.baikalelectronics.ru Git - kernel.git/commit
sunvdc: limit each sg segment to a page
authorDwight Engen <dwight.engen@oracle.com>
Fri, 19 Sep 2014 13:42:53 +0000 (09:42 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Sep 2014 21:37:35 +0000 (14:37 -0700)
commitc839eaec6839ed71c10a5e83445d7e6c55c96cfc
tree6c5308b2f58cc6ceade6a149cf988966d61f956b
parent64bf5784d08bad8680a1bf4de74dc8f231ee90c9
sunvdc: limit each sg segment to a page

ldc_map_sg() could fail its check that the number of pages referred to
by the sg scatterlist was <= the number of cookies.

This fixes the issue by doing a similar thing to the xen-blkfront driver,
ensuring that the scatterlist will only ever contain a segment count <=
port->ring_cookies, and each segment will be page aligned, and <= page
size. This ensures that the scatterlist is always mappable.

Orabug: 19347817
OraBZ: 15945

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/block/sunvdc.c