mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mm, mempool: do not allow atomic resizing
Allocating a large number of elements in atomic context could quickly deplete memory reserves, so just disallow atomic resizing entirely. Nothing currently uses mempool_resize() with anything other than GFP_KERNEL, so convert existing callers to drop the gfp_mask. [[email protected]: coding-style fixes] Signed-off-by: David Rientjes <[email protected]> Acked-by: Steffen Maier <[email protected]> [zfcp] Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Steve French <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
2415b9f5cb
commit
11d8336045
4 changed files with 11 additions and 11 deletions
|
|
@ -738,11 +738,11 @@ static int zfcp_erp_adapter_strategy_open_fsf(struct zfcp_erp_action *act)
|
|||
return ZFCP_ERP_FAILED;
|
||||
|
||||
if (mempool_resize(act->adapter->pool.sr_data,
|
||||
act->adapter->stat_read_buf_num, GFP_KERNEL))
|
||||
act->adapter->stat_read_buf_num))
|
||||
return ZFCP_ERP_FAILED;
|
||||
|
||||
if (mempool_resize(act->adapter->pool.status_read_req,
|
||||
act->adapter->stat_read_buf_num, GFP_KERNEL))
|
||||
act->adapter->stat_read_buf_num))
|
||||
return ZFCP_ERP_FAILED;
|
||||
|
||||
atomic_set(&act->adapter->stat_miss, act->adapter->stat_read_buf_num);
|
||||
|
|
|
|||
Loading…
Reference in a new issue