|
@@ -99,6 +99,9 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
|
|
if (dmasync)
|
|
if (dmasync)
|
|
dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs);
|
|
dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs);
|
|
|
|
|
|
|
|
+ if (!size)
|
|
|
|
+ return ERR_PTR(-EINVAL);
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* If the combination of the addr and size requested for this memory
|
|
* If the combination of the addr and size requested for this memory
|
|
* region causes an integer overflow, return error.
|
|
* region causes an integer overflow, return error.
|