提交 9d98e19b 编写于 作者: Y Yuval Shaia 提交者: Jason Gunthorpe

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: d83187dd ("IB/IPoIB: Convert IPoIB to memalloc_noio_* calls")
Signed-off-by: NYuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 c058ecf6
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册