• Matthew Wilcox's avatar
    radix-tree: Fix UBSAN warning · 76f070b4
    Matthew Wilcox authored
    get_slot_offset() can be called with a NULL 'parent' argument.
    In this case, the calculated value will not be used, but calculating
    it is undefined.  Rather than fixing the caller (__radix_tree_delete)
    to not call get_slot_offset(), make get_slot_offset() robust against
    being called with a NULL parent.
    Signed-off-by: default avatarMatthew Wilcox <willy@infradead.org>
    76f070b4
radix-tree.c 62.2 KB