lkml.org 
[lkml]   [2022]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH mm] mm: fix BUG with kvzalloc+GFP_ATOMIC
Michal Hocko <mhocko@suse.com> wrote:
> + old_tbl = rht_dereference_rcu(ht->tbl, ht);
> + size = tbl->size;
> +
> + data = ERR_PTR(-EBUSY);
> +
> + if (rht_grow_above_75(ht, tbl))
> + size *= 2;
> + /* Do not schedule more than one rehash */
> + else if (old_tbl != tbl)
> + return data;
> +
> + data = ERR_PTR(-ENOMEM);
> +
> + rcu_read_unlock();
> + new_tbl = bucket_table_alloc(ht, size, GFP_KERNEL);
> + rcu_read_lock();

I don't think this is going to work, there can be callers that
rely on rcu protected data structures getting free'd.

Also, network stack assumes synchronize_rcu() means that all
inflight packets have completed processing.

\
 
 \ /
  Last update: 2022-09-26 12:09    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog