mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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: d83187dda9
("IB/IPoIB: Convert IPoIB to memalloc_noio_* calls")
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
c058ecf6e4
commit
9d98e19ba0
1 changed files with 1 additions and 0 deletions
|
@ -1145,6 +1145,7 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
|
|||
noio_flag = memalloc_noio_save();
|
||||
p->tx_ring = vzalloc(ipoib_sendq_size * sizeof(*p->tx_ring));
|
||||
if (!p->tx_ring) {
|
||||
memalloc_noio_restore(noio_flag);
|
||||
ret = -ENOMEM;
|
||||
goto err_tx;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue