projects
/
platform
/
kernel
/
linux-tizen-modules.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d97fec4
)
WIP: handle error values from filp_open()
sandbox/lstelmach/logger-handle-errors
author
Łukasz Stelmach
<l.stelmach@samsung.com>
Fri, 10 Sep 2021 18:02:53 +0000
(20:02 +0200)
committer
Łukasz Stelmach
<l.stelmach@samsung.com>
Fri, 10 Sep 2021 18:02:53 +0000
(20:02 +0200)
Change-Id: I5a694555bcd082506330e08f48ed4b7043c4e120
kernel/logger.c
patch
|
blob
|
history
diff --git
a/kernel/logger.c
b/kernel/logger.c
index 48dbf4aab9e5e55ffa5122c83269f4fafc8424d8..811e7452d33ecc253ecc82d036c024ecd6b2ead6 100644
(file)
--- a/
kernel/logger.c
+++ b/
kernel/logger.c
@@
-484,10
+484,13
@@
static struct file *make_new_file(struct file *file)
nfile = filp_open(p, O_WRONLY, 0);
kfree(pbuf);
- if (!nfile) {
+ if (IS_ERR_OR_NULL(nfile)) {
+ pr_err("filp_open(%s): %ld\n", pbuf, PTR_ERR(nfile));
+ kfree(pbuf);
return ERR_PTR(-EFAULT);
}
+ kfree(pbuf);
nwriter = nfile->private_data;
nwriter->prio = writer->prio;
nwriter->tag = kstrdup(writer->tag, GFP_KERNEL);