Adapt the patch for multiple labels in onlycap to older kernel version.
It was previously backported without an important dependency. There is a
difference in smk_import_entry function. In upstream it returns error codes,
but here the error is indicated by returning NULL.
Without this fix the kernel could crash when empty string is written to
onlycap interface file.
Change-Id: Ibadab8b78b86453526cd423100619ab0a10fa68c
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
continue;
skp = smk_import_entry(tok, 0);
- if (IS_ERR(skp)) {
- rc = PTR_ERR(skp);
+ if (skp == NULL) {
+ rc = -EINVAL;
break;
}