mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
apparmor: add kvzalloc to handle zeroing for kvmalloc
Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Steve Beattie <sbeattie@ubuntu.com>
This commit is contained in:
parent
3cfcc19e0b
commit
0ca554b9fc
3 changed files with 22 additions and 8 deletions
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Returns: pointer to table else NULL on failure
|
||||
*
|
||||
* NOTE: must be freed by kvfree (not kmalloc)
|
||||
* NOTE: must be freed by kvfree (not kfree)
|
||||
*/
|
||||
static struct table_header *unpack_table(char *blob, size_t bsize)
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ static struct table_header *unpack_table(char *blob, size_t bsize)
|
|||
if (bsize < tsize)
|
||||
goto out;
|
||||
|
||||
table = kvmalloc(tsize);
|
||||
table = kvzalloc(tsize);
|
||||
if (table) {
|
||||
*table = th;
|
||||
if (th.td_flags == YYTD_DATA8)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue