Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions kernel/manager/throne_tracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ FILLDIR_RETURN_TYPE my_actor(struct dir_context *ctx, const char *name, int name
}
} else {
struct apk_path_hash *apk_data = kzalloc(sizeof(struct apk_path_hash), GFP_KERNEL);
if (!apk_data) {
pr_err("Failed to allocate apk_path_hash for %s\n", dirpath);
return FILLDIR_ACTOR_CONTINUE;
}
apk_data->hash = hash;
apk_data->exists = true;
list_add_tail(&apk_data->list, &apk_path_hash_list);
Expand Down
15 changes: 15 additions & 0 deletions kernel/selinux/sepolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,24 @@ static bool add_filename_trans(struct policydb *db, const char *s, const char *t

if (trans == NULL) {
trans = (struct filename_trans_datum *)kcalloc(1, sizeof(*trans), GFP_KERNEL);
if (!trans) {
pr_err("add_filename_trans: alloc filename_trans_datum failed\n");
return false;
}
struct filename_trans_key *new_key = (struct filename_trans_key *)kzalloc(sizeof(*new_key), GFP_KERNEL);
if (!new_key) {
pr_err("add_filename_trans: alloc filename_trans_key failed\n");
kfree(trans);
return false;
}
*new_key = key;
new_key->name = kstrdup(key.name, GFP_KERNEL);
if (!new_key->name) {
pr_err("add_filename_trans: kstrdup name failed\n");
kfree(new_key);
kfree(trans);
return false;
}
trans->next = last;
trans->otype = def->value;
hashtab_insert(&db->filename_trans, new_key, trans, filenametr_key_params);
Expand Down