• Nicholas Bellinger's avatar
    target/sbc: Fix sbc_dif_copy_prot addr offset bug · 10762e80
    Nicholas Bellinger authored
    This patch fixes a bug in sbc_dif_copy_prot() where the updated addr
    offset did not take into account the case where the associated
    scatterlist had not been incremented.
    
    This addresses the case where incoming protection scatterlists may
    contain a length smaller than PAGE_SIZE across multiple entires,
    when the target protection scatterlists are always being explicitly
    filled up to PAGE_SIZE before adding another entry.
    
    Cc: Martin K. Petersen <martin.petersen@oracle.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Hannes Reinecke <hare@suse.de>
    Cc: Sagi Grimberg <sagig@mellanox.com>
    Cc: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    10762e80
target_core_sbc.c 32 KB