IB/srp: Add memory descriptor array pointer range checking
Although most paths through which a request is submitted check block layer parameters like the max_segments limit, these are not checked when an SG_IO or direct I/O request is submitted. Hence add a range check for the memory descriptor array pointer. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
7e85c91970
commit
f731ed6293
@@ -282,8 +282,14 @@ struct srp_fr_pool {
|
||||
*/
|
||||
struct srp_map_state {
|
||||
union {
|
||||
struct ib_pool_fmr **next_fmr;
|
||||
struct srp_fr_desc **next_fr;
|
||||
struct {
|
||||
struct ib_pool_fmr **next;
|
||||
struct ib_pool_fmr **end;
|
||||
} fmr;
|
||||
struct {
|
||||
struct srp_fr_desc **next;
|
||||
struct srp_fr_desc **end;
|
||||
} fr;
|
||||
};
|
||||
struct srp_direct_buf *desc;
|
||||
u64 *pages;
|
||||
|
Reference in New Issue
Block a user