commit | 4a2ae92993be24ba727faa733e99d7980d389ec0 | [log] [tgz] |
---|---|---|
author | Gustavo A. R. Silva <[email protected]> | Thu Mar 07 16:30:26 2019 -0800 |
committer | Linus Torvalds <[email protected]> | Thu Mar 07 18:32:02 2019 -0800 |
tree | 14fe968e60afb75c04fa37c4f7ddeb66279d4d17 | |
parent | 667da6a2688ab061fcd365de677a0ee880fe2bea [diff] |
ipc/sem.c: replace kvmalloc/memset with kvzalloc and use struct_size Use kvzalloc() instead of kvmalloc() and memset(). Also, make use of the struct_size() helper instead of the open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle. Link: http://lkml.kernel.org/r/20190131214221.GA28930@embeddedor Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: Manfred Spraul <[email protected]> Cc: Kees Cook <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>