Skip to content

Commit 9d98e19

Browse files
Yuval Shaiajgunthorpe
authored andcommitted
IB/ipoib: Restore MM behavior in case of tx_ring allocation failure
memalloc_noio_save modifies the behavior of MM, we must restore it after we are done. Fixes: d83187d ("IB/IPoIB: Convert IPoIB to memalloc_noio_* calls") Signed-off-by: Yuval Shaia <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent c058ecf commit 9d98e19

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/infiniband/ulp/ipoib/ipoib_cm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,7 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
11451145
noio_flag = memalloc_noio_save();
11461146
p->tx_ring = vzalloc(ipoib_sendq_size * sizeof(*p->tx_ring));
11471147
if (!p->tx_ring) {
1148+
memalloc_noio_restore(noio_flag);
11481149
ret = -ENOMEM;
11491150
goto err_tx;
11501151
}

0 commit comments

Comments
 (0)