Re: [Devel] [PATCH rh7 v2] keys, user: Fix high order allocation in user_instantiate() #PSBM-107794

2020-09-15 Thread Denis V. Lunev
On 9/15/20 9:49 AM, Vasily Averin wrote: > On 9/14/20 2:16 PM, Andrey Ryabinin wrote: >> @@ -96,7 +97,8 @@ static void user_free_payload_rcu(struct rcu_head *head) >> struct user_key_payload *payload; >> >> payload = container_of(head, struct user_key_payload, rcu); >> -

Re: [Devel] [PATCH rh7 v2] keys, user: Fix high order allocation in user_instantiate() #PSBM-107794

2020-09-15 Thread Vasily Averin
On 9/14/20 2:16 PM, Andrey Ryabinin wrote: > @@ -96,7 +97,8 @@ static void user_free_payload_rcu(struct rcu_head *head) > struct user_key_payload *payload; > > payload = container_of(head, struct user_key_payload, rcu); > - kzfree(payload); can payload be NULL here? > +

[Devel] [PATCH rh7 v2] keys, user: Fix high order allocation in user_instantiate() #PSBM-107794

2020-09-14 Thread Andrey Ryabinin
Adding user key might trigger 4-order allocation which is unreliable in case of fragmented memory: [ cut here ] WARNING: CPU: 3 PID: 134927 at mm/page_alloc.c:3533 __alloc_pages_nodemask+0x1b1/0x600 order 4 >= 3, gfp 0x40d0 Kernel panic - not syncing: panic_on_warn