mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-25 07:51:28 +00:00
Fixes crash on very big buffers allocations reported by Matteo Tescione <matteo@rmnet.it> and others
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1527 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1329,7 +1329,7 @@ static int sgv_pool_init(struct sgv_pool *pool, const char *name,
|
||||
pool->purge_interval = SGV_DEFAULT_PURGE_INTERVAL;
|
||||
if (single_alloc_pages == 0) {
|
||||
pool->max_caches = SGV_POOL_ELEMENTS;
|
||||
pool->max_cached_pages = 1 << SGV_POOL_ELEMENTS;
|
||||
pool->max_cached_pages = 1 << (SGV_POOL_ELEMENTS - 1);
|
||||
} else {
|
||||
pool->max_caches = 1;
|
||||
pool->max_cached_pages = single_alloc_pages;
|
||||
|
||||
Reference in New Issue
Block a user