• David Dillow's avatar
    IB/srp: Enforce protocol limit on srp_sg_tablesize · 1e89a194
    David Dillow authored
    The current SRP initiator will allow unlimited s/g entries in the
    indirect descriptors lists, but the entry count field in the SRP_CMD
    request is 8 bits, so setting srp_sg_tablesize too large will open the
    possibility of wrapping the count and generating invalid requests.
    
    Clamp srp_sg_tablesize to the protocol limits to prevent surprises.
    
    Reported by Martin W. Schlining III <mschlining@datadirectnet.com>.
    Signed-off-by: default avatarDavid Dillow <dillowda@ornl.gov>
    Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
    1e89a194
ib_srp.c 55.3 KB