• Dwight Engen's avatar
    sunvdc: limit each sg segment to a page · 5eed69ff
    Dwight Engen authored
    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: default avatarDwight Engen <dwight.engen@oracle.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5eed69ff
sunvdc.c 21.2 KB