[PATCH] keys: correctly check failed allocation for kmemdup

2015-10-15 Thread Insu Yun
kmemdup return value is saved in 'key->index_key.description', not 'key->descrption' and kmemdup can be failed in memory pressure. Therefore, key->index_key.description should be checked. Signed-off-by: Insu Yun --- security/keys/key.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH] keys: correctly check failed allocation for kmemdup

2015-10-15 Thread David Howells
Insu Yun wrote: > Thanks David. Then it is not a bug. > It's a pure question. > Why use different name for allocation and check? > For me, it is quite confusing. Either I didn't notice at the time, or the shorter variant is the original. If you want to give me a patch