Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'bootconfig-fixes-v7.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull bootconfig fixes from Masami Hiramatsu:

- Check error code of xbc_init_node() in override value path in
xbc_parse_kv()

- Fix fd leak in load_xbc_file() on fstat failure

* tag 'bootconfig-fixes-v7.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
tools/bootconfig: fix fd leak in load_xbc_file() on fstat failure
lib/bootconfig: check xbc_init_node() return in override path

+7 -3
+2 -1
lib/bootconfig.c
··· 723 723 if (op == ':') { 724 724 unsigned short nidx = child->next; 725 725 726 - xbc_init_node(child, v, XBC_VALUE); 726 + if (xbc_init_node(child, v, XBC_VALUE) < 0) 727 + return xbc_parse_error("Failed to override value", v); 727 728 child->next = nidx; /* keep subkeys */ 728 729 goto array; 729 730 }
+5 -2
tools/bootconfig/main.c
··· 162 162 if (fd < 0) 163 163 return -errno; 164 164 ret = fstat(fd, &stat); 165 - if (ret < 0) 166 - return -errno; 165 + if (ret < 0) { 166 + ret = -errno; 167 + close(fd); 168 + return ret; 169 + } 167 170 168 171 ret = load_xbc_fd(fd, buf, stat.st_size); 169 172