Jann Horn
992a5c90af
mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
...
commit fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 upstream.
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
freelist of length M, and N > M > 0, it will first remove the M elements
from the percpu freelist, then call ___slab_alloc() to allocate the next
element and repopulate the percpu freelist. ___slab_alloc() can re-enable
IRQs via allocate_slab(), so the TID must be bumped before ___slab_alloc()
to properly commit the freelist head change.
Fix it by unconditionally bumping c->tid when entering the slowpath.
Cc: stable@vger.kernel.org
Fixes: ebe909e0fdb3 ("slub: improve bulk alloc strategy")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-20 10:54:26 +01:00
..
2018-08-24 13:09:12 +02:00
2019-03-05 17:58:01 +01:00
2018-10-13 09:27:30 +02:00
2017-11-02 11:10:55 +01:00
2017-06-05 16:59:12 +02:00
2019-06-15 11:54:51 +02:00
2019-08-06 19:05:23 +02:00
2017-11-02 11:10:55 +01:00
2019-10-05 12:48:13 +02:00
2017-11-02 11:10:55 +01:00
2018-09-19 22:43:48 +02:00
2018-02-25 11:08:03 +01:00
2018-09-15 09:45:28 +02:00
2017-11-02 11:10:55 +01:00
2019-11-12 19:18:46 +01:00
2018-03-03 10:24:21 +01:00
2019-07-31 07:28:56 +02:00
2017-11-02 11:10:55 +01:00
2019-01-13 10:01:02 +01:00
2020-03-11 18:02:55 +01:00
2019-11-20 17:59:33 +01:00
2019-10-29 09:17:39 +01:00
2017-05-03 15:52:12 -07:00
2017-11-02 11:10:55 +01:00
2019-12-05 15:37:51 +01:00
2017-09-08 18:26:49 -07:00
2019-06-15 11:54:51 +02:00
2018-02-22 15:42:24 +01:00
2019-06-22 08:16:19 +02:00
2019-07-31 07:28:55 +02:00
2019-12-01 09:13:14 +01:00
2019-06-19 08:20:54 +02:00
2018-10-10 08:54:22 +02:00
2018-02-22 15:42:24 +01:00
2018-03-28 18:24:39 +02:00
2020-03-20 10:54:09 +01:00
2019-12-01 09:14:18 +01:00
2019-03-23 14:35:24 +01:00
2019-05-16 19:42:31 +02:00
2020-02-05 14:18:13 +00:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-04-03 06:25:20 +02:00
2019-05-21 18:50:16 +02:00
2019-07-10 09:54:36 +02:00
2020-01-09 10:17:56 +01:00
2019-07-31 07:28:56 +02:00
2017-11-02 11:10:55 +01:00
2020-03-11 18:03:02 +01:00
2018-10-20 09:48:53 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-14 18:13:32 -07:00
2019-10-05 12:48:09 +02:00
2019-06-15 11:54:51 +02:00
2017-11-02 11:10:55 +01:00
2019-04-05 22:31:27 +02:00
2019-07-03 13:15:59 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-10-29 09:17:39 +01:00
2019-04-05 22:31:28 +02:00
2018-11-13 11:15:08 -08:00
2020-01-23 08:20:32 +01:00
2017-11-24 08:37:04 +01:00
2017-11-02 11:10:55 +01:00
2019-02-12 19:46:05 +01:00
2017-09-27 14:45:57 -07:00
2018-04-08 14:26:29 +02:00
2019-06-15 11:54:59 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-09 19:55:53 +02:00
2018-10-13 09:27:22 +02:00
2017-10-03 17:54:24 -07:00
2020-01-23 08:20:32 +01:00
2018-12-01 09:42:51 +01:00
2019-06-15 11:54:51 +02:00
2018-02-22 15:42:23 +01:00
2017-11-02 11:10:55 +01:00
2020-03-20 10:54:26 +01:00
2017-11-02 11:10:55 +01:00
2018-05-16 10:10:27 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-03 17:54:24 -07:00
2019-01-26 09:37:06 +01:00
2018-12-08 13:03:40 +01:00
2019-10-11 18:18:34 +02:00
2019-05-31 06:47:12 -07:00
2019-01-16 22:07:11 +01:00
2018-09-19 22:43:48 +02:00
2019-08-16 10:13:48 +02:00
2017-07-10 16:32:31 -07:00
2020-02-28 16:36:12 +01:00
2019-12-17 20:37:57 +01:00
2017-11-02 11:10:55 +01:00
2018-12-01 09:42:54 +01:00
2020-01-09 10:17:54 +01:00
2018-09-05 09:26:30 +02:00