History

Merge tag 'slab-for-6.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab

Pull slab fix from Vlastimil Babka: - Fix for potential infinite loop in kmalloc_nolock() when debugging is enabled for the cache (Vlastimil Babka) * tag 'slab-for-6.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: slab: prevent infinite loop in kmalloc_nolock() with debugging

Linus Torvalds committed 1 year ago

Commit a80abfb2 parents 9dc5206 c379b741 file · +5 −1Browse files

Unified · Split

mm/slub.c+5−1
@@ -4666,8 +4666,12 @@ new_objects: · 4665 unmodified lines
4666 if (kmem_cache_debug(s)) {4666 if (kmem_cache_debug(s)) {
4667 freelist = alloc_single_from_new_slab(s, slab, orig_size, gfpflags);4667 freelist = alloc_single_from_new_slab(s, slab, orig_size, gfpflags);
4668 4668
4669 if (unlikely(!freelist))4669 if (unlikely(!freelist)) {
4670 /* This could cause an endless loop. Fail instead. */
4671 if (!allow_spin)
4672 return NULL;
4670 goto new_objects;4673 goto new_objects;
4674 }
4671 4675
4672 if (s->flags & SLAB_STORE_USER)4676 if (s->flags & SLAB_STORE_USER)
4673 set_track(s, freelist, TRACK_ALLOC, addr,4677 set_track(s, freelist, TRACK_ALLOC, addr,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t