diff options
author | David Rientjes <rientjes@google.com> | 2015-04-14 18:48:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:49:06 -0400 |
commit | 11d83360452ea2a95e699da01f8e1bcc4676a5de (patch) | |
tree | 22d85ebbc47a9152cafc9373a8300d0abf92106b /drivers/s390 | |
parent | 2415b9f5cb048a803b30b790af994ba71ff0bd4c (diff) |
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.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Steffen Maier <maier@linux.vnet.ibm.com> [zfcp]
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Steve French <sfrench@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 2c5d4567d1da..acde3f5d6e9e 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -738,11 +738,11 @@ static int zfcp_erp_adapter_strategy_open_fsf(struct zfcp_erp_action *act) | |||
738 | return ZFCP_ERP_FAILED; | 738 | return ZFCP_ERP_FAILED; |
739 | 739 | ||
740 | if (mempool_resize(act->adapter->pool.sr_data, | 740 | if (mempool_resize(act->adapter->pool.sr_data, |
741 | act->adapter->stat_read_buf_num, GFP_KERNEL)) | 741 | act->adapter->stat_read_buf_num)) |
742 | return ZFCP_ERP_FAILED; | 742 | return ZFCP_ERP_FAILED; |
743 | 743 | ||
744 | if (mempool_resize(act->adapter->pool.status_read_req, | 744 | if (mempool_resize(act->adapter->pool.status_read_req, |
745 | act->adapter->stat_read_buf_num, GFP_KERNEL)) | 745 | act->adapter->stat_read_buf_num)) |
746 | return ZFCP_ERP_FAILED; | 746 | return ZFCP_ERP_FAILED; |
747 | 747 | ||
748 | atomic_set(&act->adapter->stat_miss, act->adapter->stat_read_buf_num); | 748 | atomic_set(&act->adapter->stat_miss, act->adapter->stat_read_buf_num); |