[jlayton:ceph-fscache-iter 76/77] fs/ceph/addr.c:225 ceph_fsreq_issue_op() error: uninitialized symbol 'err'.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscache-iter
head: ce11bedb85675dee88f70d28fc09cb5bca59c73e
commit: abd9e1c4c6c6d86ef46c1782a886b52f09d87ebb [76/77] ceph: convert writepage over to new helper
config: x86_64-randconfig-m001-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
fs/ceph/addr.c:225 ceph_fsreq_issue_op() error: uninitialized symbol 'err'.
fs/ceph/addr.c:1356 writeback_older_snapc() error: potentially dereferencing uninitialized 'oldest'.
Old smatch warnings:
fs/ceph/addr.c:432 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:468 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:2044 __ceph_pool_perm_get() error: we previously assumed 'pool_ns' could be null (see line 2033)
include/linux/ceph/string_table.h:46 ceph_compare_string() error: we previously assumed 'cs' could be null (see line 41)
# https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/commit/...
git remote add jlayton https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
git remote update jlayton
git checkout abd9e1c4c6c6d86ef46c1782a886b52f09d87ebb
vim +/err +225 fs/ceph/addr.c
e4de9a35b08dcf Jeff Layton 2020-05-21 188 static void ceph_fsreq_issue_op(struct fscache_io_request *fsreq)
e4de9a35b08dcf Jeff Layton 2020-05-21 189 {
e4de9a35b08dcf Jeff Layton 2020-05-21 190 struct ceph_fsc_request *cfreq = container_of(fsreq,
e4de9a35b08dcf Jeff Layton 2020-05-21 191 struct ceph_fsc_request,
e4de9a35b08dcf Jeff Layton 2020-05-21 192 fsc_req);
e4de9a35b08dcf Jeff Layton 2020-05-21 193 struct ceph_osd_request *req = &cfreq->osd_req;
e4de9a35b08dcf Jeff Layton 2020-05-21 194 struct ceph_fs_client *fsc = req->r_priv;
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 195 struct ceph_inode_info *ci = ceph_inode(fsreq->mapping->host);
e4de9a35b08dcf Jeff Layton 2020-05-21 196 int err;
e4de9a35b08dcf Jeff Layton 2020-05-21 197
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 198 if (ci->i_inline_version != CEPH_INLINE_NONE) {
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 199 /*
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 200 * Uptodate inline data should have been added
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 201 * into page cache while getting Fcr caps.
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 202 */
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 203 if (fsreq->pos == 0)
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 204 err = -EINVAL;
err not set if ->pos != 0
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 205 goto out;
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 206 }
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 207
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 208 /* FIXME: in read-for-write case, don't issue a read if the write will
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 209 * cover the whole page.
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 210 */
e4de9a35b08dcf Jeff Layton 2020-05-21 211 err = ceph_osdc_start_request(req->r_osdc, req, false);
e4de9a35b08dcf Jeff Layton 2020-05-21 212 if (!err)
e4de9a35b08dcf Jeff Layton 2020-05-21 213 err = ceph_osdc_wait_request(req->r_osdc, req);
e4de9a35b08dcf Jeff Layton 2020-05-21 214
e4de9a35b08dcf Jeff Layton 2020-05-21 215 ceph_update_read_latency(&fsc->mdsc->metric, req->r_start_latency,
e4de9a35b08dcf Jeff Layton 2020-05-21 216 req->r_end_latency, err);
e4de9a35b08dcf Jeff Layton 2020-05-21 217
e4de9a35b08dcf Jeff Layton 2020-05-21 218 /* no object means success but no data */
e4de9a35b08dcf Jeff Layton 2020-05-21 219 if (err == -ENOENT)
e4de9a35b08dcf Jeff Layton 2020-05-21 220 err = 0;
e4de9a35b08dcf Jeff Layton 2020-05-21 221 else if (err == -EBLACKLISTED)
e4de9a35b08dcf Jeff Layton 2020-05-21 222 fsc->blacklisted = true;
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 223 out:
e4de9a35b08dcf Jeff Layton 2020-05-21 224 dout("readpage result %d\n", err);
e4de9a35b08dcf Jeff Layton 2020-05-21 @225 fsreq->error = err;
e4de9a35b08dcf Jeff Layton 2020-05-21 226 if (fsreq->io_done)
e4de9a35b08dcf Jeff Layton 2020-05-21 227 fsreq->io_done(fsreq);
e4de9a35b08dcf Jeff Layton 2020-05-21 228 }
e4de9a35b08dcf Jeff Layton 2020-05-21 229
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
2 years
[jlayton:ceph-fscache-iter 76/77] fs/ceph/addr.c:225 ceph_fsreq_issue_op() error: uninitialized symbol 'err'.
by kbuild test robot
CC: kbuild-all(a)lists.01.org
TO: "Jeff, Layton," <jlayton(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscache-iter
head: ce11bedb85675dee88f70d28fc09cb5bca59c73e
commit: abd9e1c4c6c6d86ef46c1782a886b52f09d87ebb [76/77] ceph: convert writepage over to new helper
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-m001-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
fs/ceph/addr.c:225 ceph_fsreq_issue_op() error: uninitialized symbol 'err'.
fs/ceph/addr.c:1356 writeback_older_snapc() error: potentially dereferencing uninitialized 'oldest'.
Old smatch warnings:
fs/ceph/addr.c:432 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:468 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:2044 __ceph_pool_perm_get() error: we previously assumed 'pool_ns' could be null (see line 2033)
include/linux/ceph/string_table.h:46 ceph_compare_string() error: we previously assumed 'cs' could be null (see line 41)
# https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/commit/...
git remote add jlayton https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
git remote update jlayton
git checkout abd9e1c4c6c6d86ef46c1782a886b52f09d87ebb
vim +/err +225 fs/ceph/addr.c
1d3576fd10f0d7 Sage Weil 2009-10-06 187
e4de9a35b08dcf Jeff Layton 2020-05-21 188 static void ceph_fsreq_issue_op(struct fscache_io_request *fsreq)
e4de9a35b08dcf Jeff Layton 2020-05-21 189 {
e4de9a35b08dcf Jeff Layton 2020-05-21 190 struct ceph_fsc_request *cfreq = container_of(fsreq,
e4de9a35b08dcf Jeff Layton 2020-05-21 191 struct ceph_fsc_request,
e4de9a35b08dcf Jeff Layton 2020-05-21 192 fsc_req);
e4de9a35b08dcf Jeff Layton 2020-05-21 193 struct ceph_osd_request *req = &cfreq->osd_req;
e4de9a35b08dcf Jeff Layton 2020-05-21 194 struct ceph_fs_client *fsc = req->r_priv;
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 195 struct ceph_inode_info *ci = ceph_inode(fsreq->mapping->host);
e4de9a35b08dcf Jeff Layton 2020-05-21 196 int err;
e4de9a35b08dcf Jeff Layton 2020-05-21 197
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 198 if (ci->i_inline_version != CEPH_INLINE_NONE) {
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 199 /*
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 200 * Uptodate inline data should have been added
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 201 * into page cache while getting Fcr caps.
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 202 */
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 203 if (fsreq->pos == 0)
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 204 err = -EINVAL;
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 205 goto out;
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 206 }
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 207
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 208 /* FIXME: in read-for-write case, don't issue a read if the write will
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 209 * cover the whole page.
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 210 */
e4de9a35b08dcf Jeff Layton 2020-05-21 211 err = ceph_osdc_start_request(req->r_osdc, req, false);
e4de9a35b08dcf Jeff Layton 2020-05-21 212 if (!err)
e4de9a35b08dcf Jeff Layton 2020-05-21 213 err = ceph_osdc_wait_request(req->r_osdc, req);
e4de9a35b08dcf Jeff Layton 2020-05-21 214
e4de9a35b08dcf Jeff Layton 2020-05-21 215 ceph_update_read_latency(&fsc->mdsc->metric, req->r_start_latency,
e4de9a35b08dcf Jeff Layton 2020-05-21 216 req->r_end_latency, err);
e4de9a35b08dcf Jeff Layton 2020-05-21 217
e4de9a35b08dcf Jeff Layton 2020-05-21 218 /* no object means success but no data */
e4de9a35b08dcf Jeff Layton 2020-05-21 219 if (err == -ENOENT)
e4de9a35b08dcf Jeff Layton 2020-05-21 220 err = 0;
e4de9a35b08dcf Jeff Layton 2020-05-21 221 else if (err == -EBLACKLISTED)
e4de9a35b08dcf Jeff Layton 2020-05-21 222 fsc->blacklisted = true;
abd9e1c4c6c6d8 Jeff Layton 2020-05-26 223 out:
e4de9a35b08dcf Jeff Layton 2020-05-21 224 dout("readpage result %d\n", err);
e4de9a35b08dcf Jeff Layton 2020-05-21 @225 fsreq->error = err;
e4de9a35b08dcf Jeff Layton 2020-05-21 226 if (fsreq->io_done)
e4de9a35b08dcf Jeff Layton 2020-05-21 227 fsreq->io_done(fsreq);
e4de9a35b08dcf Jeff Layton 2020-05-21 228 }
e4de9a35b08dcf Jeff Layton 2020-05-21 229
:::::: The code at line 225 was first introduced by commit
:::::: e4de9a35b08dcfef40ba17f087c6a4a984407445 ceph: convert to using fscache_read_helper
:::::: TO: Jeff Layton <jlayton(a)kernel.org>
:::::: CC: Jeff Layton <jlayton(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH 1/2] tracing: Move synthetic events to a separate file
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <9fc01420bdbf756ef3f8267b33aff6de2e6f2b60.1590608239.git.zanussi(a)kernel.org>
References: <9fc01420bdbf756ef3f8267b33aff6de2e6f2b60.1590608239.git.zanussi(a)kernel.org>
TO: Tom Zanussi <zanussi(a)kernel.org>
Hi Tom,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/perf/core]
[also build test WARNING on trace/for-next linus/master v5.7-rc7 next-20200529]
[cannot apply to linux/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Tom-Zanussi/tracing-Make-synthet...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git c50c75e9b87946499a62bffc021e95c87a1d57cd
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: i386-randconfig-m021-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
kernel/trace/trace_events_synth.c:604 register_synth_event() warn: passing a valid pointer to 'PTR_ERR'
# https://github.com/0day-ci/linux/commit/09cc706157bf55e5f7e0a29222b5c5c5c...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 09cc706157bf55e5f7e0a29222b5c5c5ca9f420c
vim +/PTR_ERR +604 kernel/trace/trace_events_synth.c
09cc706157bf55 Tom Zanussi 2020-05-27 589
09cc706157bf55 Tom Zanussi 2020-05-27 590 static int register_synth_event(struct synth_event *event)
09cc706157bf55 Tom Zanussi 2020-05-27 591 {
09cc706157bf55 Tom Zanussi 2020-05-27 592 struct trace_event_call *call = &event->call;
09cc706157bf55 Tom Zanussi 2020-05-27 593 int ret = 0;
09cc706157bf55 Tom Zanussi 2020-05-27 594
09cc706157bf55 Tom Zanussi 2020-05-27 595 event->call.class = &event->class;
09cc706157bf55 Tom Zanussi 2020-05-27 596 event->class.system = kstrdup(SYNTH_SYSTEM, GFP_KERNEL);
09cc706157bf55 Tom Zanussi 2020-05-27 597 if (!event->class.system) {
09cc706157bf55 Tom Zanussi 2020-05-27 598 ret = -ENOMEM;
09cc706157bf55 Tom Zanussi 2020-05-27 599 goto out;
09cc706157bf55 Tom Zanussi 2020-05-27 600 }
09cc706157bf55 Tom Zanussi 2020-05-27 601
09cc706157bf55 Tom Zanussi 2020-05-27 602 event->tp = alloc_synth_tracepoint(event->name);
09cc706157bf55 Tom Zanussi 2020-05-27 603 if (IS_ERR(event->tp)) {
09cc706157bf55 Tom Zanussi 2020-05-27 @604 ret = PTR_ERR(event->tp);
09cc706157bf55 Tom Zanussi 2020-05-27 605 event->tp = NULL;
09cc706157bf55 Tom Zanussi 2020-05-27 606 goto out;
09cc706157bf55 Tom Zanussi 2020-05-27 607 }
09cc706157bf55 Tom Zanussi 2020-05-27 608
09cc706157bf55 Tom Zanussi 2020-05-27 609 INIT_LIST_HEAD(&call->class->fields);
09cc706157bf55 Tom Zanussi 2020-05-27 610 call->event.funcs = &synth_event_funcs;
09cc706157bf55 Tom Zanussi 2020-05-27 611 call->class->fields_array = synth_event_fields_array;
09cc706157bf55 Tom Zanussi 2020-05-27 612
09cc706157bf55 Tom Zanussi 2020-05-27 613 ret = register_trace_event(&call->event);
09cc706157bf55 Tom Zanussi 2020-05-27 614 if (!ret) {
09cc706157bf55 Tom Zanussi 2020-05-27 615 ret = -ENODEV;
09cc706157bf55 Tom Zanussi 2020-05-27 616 goto out;
09cc706157bf55 Tom Zanussi 2020-05-27 617 }
09cc706157bf55 Tom Zanussi 2020-05-27 618 call->flags = TRACE_EVENT_FL_TRACEPOINT;
09cc706157bf55 Tom Zanussi 2020-05-27 619 call->class->reg = trace_event_reg;
09cc706157bf55 Tom Zanussi 2020-05-27 620 call->class->probe = trace_event_raw_event_synth;
09cc706157bf55 Tom Zanussi 2020-05-27 621 call->data = event;
09cc706157bf55 Tom Zanussi 2020-05-27 622 call->tp = event->tp;
09cc706157bf55 Tom Zanussi 2020-05-27 623
09cc706157bf55 Tom Zanussi 2020-05-27 624 ret = trace_add_event_call(call);
09cc706157bf55 Tom Zanussi 2020-05-27 625 if (ret) {
09cc706157bf55 Tom Zanussi 2020-05-27 626 pr_warn("Failed to register synthetic event: %s\n",
09cc706157bf55 Tom Zanussi 2020-05-27 627 trace_event_name(call));
09cc706157bf55 Tom Zanussi 2020-05-27 628 goto err;
09cc706157bf55 Tom Zanussi 2020-05-27 629 }
09cc706157bf55 Tom Zanussi 2020-05-27 630
09cc706157bf55 Tom Zanussi 2020-05-27 631 ret = set_synth_event_print_fmt(call);
09cc706157bf55 Tom Zanussi 2020-05-27 632 if (ret < 0) {
09cc706157bf55 Tom Zanussi 2020-05-27 633 trace_remove_event_call(call);
09cc706157bf55 Tom Zanussi 2020-05-27 634 goto err;
09cc706157bf55 Tom Zanussi 2020-05-27 635 }
09cc706157bf55 Tom Zanussi 2020-05-27 636 out:
09cc706157bf55 Tom Zanussi 2020-05-27 637 return ret;
09cc706157bf55 Tom Zanussi 2020-05-27 638 err:
09cc706157bf55 Tom Zanussi 2020-05-27 639 unregister_trace_event(&call->event);
09cc706157bf55 Tom Zanussi 2020-05-27 640 goto out;
09cc706157bf55 Tom Zanussi 2020-05-27 641 }
09cc706157bf55 Tom Zanussi 2020-05-27 642
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
kernel/trace/trace_events_trigger.c:1564:21-25: ERROR: invalid reference to the index variable of the iterator on line 1550
by kbuild test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Masami, Hiramatsu," <mhiramat(a)kernel.org>
CC: "Steven Rostedt (VMware)" <rostedt(a)goodmis.org>
CC: Tom Zanussi <zanussi(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 86852175b016f0c6873dcbc24b93d12b7b246612
commit: aeed8aa3874dc15b9d82a6fe796fd7cfbb684448 tracing: trigger: Replace unneeded RCU-list traversals
date: 5 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 5 months ago
config: x86_64-randconfig-c002-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> kernel/trace/trace_events_trigger.c:1564:21-25: ERROR: invalid reference to the index variable of the iterator on line 1550
kernel/trace/trace_events_trigger.c:600:21-25: ERROR: invalid reference to the index variable of the iterator on line 590
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout aeed8aa3874dc15b9d82a6fe796fd7cfbb684448
vim +1564 kernel/trace/trace_events_trigger.c
7862ad1846e994 Tom Zanussi 2013-10-24 1537
d0bad49bb0a094 Tom Zanussi 2016-03-03 1538 void event_enable_unregister_trigger(char *glob,
7862ad1846e994 Tom Zanussi 2013-10-24 1539 struct event_trigger_ops *ops,
7862ad1846e994 Tom Zanussi 2013-10-24 1540 struct event_trigger_data *test,
7f1d2f8210195c Steven Rostedt (Red Hat 2015-05-05 1541) struct trace_event_file *file)
7862ad1846e994 Tom Zanussi 2013-10-24 1542 {
7862ad1846e994 Tom Zanussi 2013-10-24 1543 struct enable_trigger_data *test_enable_data = test->private_data;
7862ad1846e994 Tom Zanussi 2013-10-24 1544 struct enable_trigger_data *enable_data;
7862ad1846e994 Tom Zanussi 2013-10-24 1545 struct event_trigger_data *data;
7862ad1846e994 Tom Zanussi 2013-10-24 1546 bool unregistered = false;
7862ad1846e994 Tom Zanussi 2013-10-24 1547
aeed8aa3874dc1 Masami Hiramatsu 2019-12-20 1548 lockdep_assert_held(&event_mutex);
aeed8aa3874dc1 Masami Hiramatsu 2019-12-20 1549
aeed8aa3874dc1 Masami Hiramatsu 2019-12-20 @1550 list_for_each_entry(data, &file->triggers, list) {
7862ad1846e994 Tom Zanussi 2013-10-24 1551 enable_data = data->private_data;
7862ad1846e994 Tom Zanussi 2013-10-24 1552 if (enable_data &&
d0bad49bb0a094 Tom Zanussi 2016-03-03 1553 (data->cmd_ops->trigger_type ==
d0bad49bb0a094 Tom Zanussi 2016-03-03 1554 test->cmd_ops->trigger_type) &&
7862ad1846e994 Tom Zanussi 2013-10-24 1555 (enable_data->file == test_enable_data->file)) {
7862ad1846e994 Tom Zanussi 2013-10-24 1556 unregistered = true;
7862ad1846e994 Tom Zanussi 2013-10-24 1557 list_del_rcu(&data->list);
7862ad1846e994 Tom Zanussi 2013-10-24 1558 trace_event_trigger_enable_disable(file, 0);
4e4a4d75700da6 Tom Zanussi 2015-11-23 1559 update_cond_flag(file);
7862ad1846e994 Tom Zanussi 2013-10-24 1560 break;
7862ad1846e994 Tom Zanussi 2013-10-24 1561 }
7862ad1846e994 Tom Zanussi 2013-10-24 1562 }
7862ad1846e994 Tom Zanussi 2013-10-24 1563
7862ad1846e994 Tom Zanussi 2013-10-24 @1564 if (unregistered && data->ops->free)
7862ad1846e994 Tom Zanussi 2013-10-24 1565 data->ops->free(data->ops, data);
7862ad1846e994 Tom Zanussi 2013-10-24 1566 }
7862ad1846e994 Tom Zanussi 2013-10-24 1567
:::::: The code at line 1564 was first introduced by commit
:::::: 7862ad1846e994574cb47dc503cc2b1646ea6593 tracing: Add 'enable_event' and 'disable_event' event trigger commands
:::::: TO: Tom Zanussi <tom.zanussi(a)linux.intel.com>
:::::: CC: Steven Rostedt <rostedt(a)goodmis.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH] ceph: show max caps in debugfs caps file
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200521093845.15101-1-gmayyyha(a)gmail.com>
References: <20200521093845.15101-1-gmayyyha(a)gmail.com>
TO: Yanhu Cao <gmayyyha(a)gmail.com>
TO: jlayton(a)kernel.org
CC: idryomov(a)gmail.com
CC: ceph-devel(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: Yanhu Cao <gmayyyha(a)gmail.com>
Hi Yanhu,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on ceph-client/for-linus]
[also build test WARNING on v5.7-rc7 next-20200529]
[cannot apply to sage-ceph/for-linus]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Yanhu-Cao/ceph-show-max-caps-in-...
base: https://github.com/ceph/ceph-client.git for-linus
:::::: branch date: 9 days ago
:::::: commit date: 9 days ago
config: x86_64-randconfig-m001-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
fs/ceph/debugfs.c:151 caps_show() warn: excess argument passed to 'seq_printf'
# https://github.com/0day-ci/linux/commit/d35440110f623b99d201f15fa3cc062a3...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout d35440110f623b99d201f15fa3cc062a35dc6373
vim +/seq_printf +151 fs/ceph/debugfs.c
ff4a80bf2d3f80 Jeff Layton 2019-04-24 136
76aa844d5b2fb8 Sage Weil 2009-10-06 137 static int caps_show(struct seq_file *s, void *p)
76aa844d5b2fb8 Sage Weil 2009-10-06 138 {
3d14c5d2b6e15c Yehuda Sadeh 2010-04-06 139 struct ceph_fs_client *fsc = s->private;
ff4a80bf2d3f80 Jeff Layton 2019-04-24 140 struct ceph_mds_client *mdsc = fsc->mdsc;
d35440110f623b Yanhu Cao 2020-05-21 141 int total, avail, used, max, reserved, min, i;
3a3430affce5de Jeff Layton 2019-11-20 142 struct cap_wait *cw;
76aa844d5b2fb8 Sage Weil 2009-10-06 143
d35440110f623b Yanhu Cao 2020-05-21 144 ceph_reservation_status(fsc, &total, &avail, &used, &max,
d35440110f623b Yanhu Cao 2020-05-21 145 &reserved, &min);
76aa844d5b2fb8 Sage Weil 2009-10-06 146 seq_printf(s, "total\t\t%d\n"
76aa844d5b2fb8 Sage Weil 2009-10-06 147 "avail\t\t%d\n"
76aa844d5b2fb8 Sage Weil 2009-10-06 148 "used\t\t%d\n"
85ccce43a3fc15 Sage Weil 2010-02-17 149 "reserved\t%d\n"
ff4a80bf2d3f80 Jeff Layton 2019-04-24 150 "min\t\t%d\n\n",
d35440110f623b Yanhu Cao 2020-05-21 @151 total, avail, used, max, reserved, min);
ff4a80bf2d3f80 Jeff Layton 2019-04-24 152 seq_printf(s, "ino issued implemented\n");
ff4a80bf2d3f80 Jeff Layton 2019-04-24 153 seq_printf(s, "-----------------------------------------------\n");
ff4a80bf2d3f80 Jeff Layton 2019-04-24 154
ff4a80bf2d3f80 Jeff Layton 2019-04-24 155 mutex_lock(&mdsc->mutex);
ff4a80bf2d3f80 Jeff Layton 2019-04-24 156 for (i = 0; i < mdsc->max_sessions; i++) {
ff4a80bf2d3f80 Jeff Layton 2019-04-24 157 struct ceph_mds_session *session;
ff4a80bf2d3f80 Jeff Layton 2019-04-24 158
ff4a80bf2d3f80 Jeff Layton 2019-04-24 159 session = __ceph_lookup_mds_session(mdsc, i);
ff4a80bf2d3f80 Jeff Layton 2019-04-24 160 if (!session)
ff4a80bf2d3f80 Jeff Layton 2019-04-24 161 continue;
ff4a80bf2d3f80 Jeff Layton 2019-04-24 162 mutex_unlock(&mdsc->mutex);
ff4a80bf2d3f80 Jeff Layton 2019-04-24 163 mutex_lock(&session->s_mutex);
ff4a80bf2d3f80 Jeff Layton 2019-04-24 164 ceph_iterate_session_caps(session, caps_show_cb, s);
ff4a80bf2d3f80 Jeff Layton 2019-04-24 165 mutex_unlock(&session->s_mutex);
ff4a80bf2d3f80 Jeff Layton 2019-04-24 166 ceph_put_mds_session(session);
ff4a80bf2d3f80 Jeff Layton 2019-04-24 167 mutex_lock(&mdsc->mutex);
ff4a80bf2d3f80 Jeff Layton 2019-04-24 168 }
ff4a80bf2d3f80 Jeff Layton 2019-04-24 169 mutex_unlock(&mdsc->mutex);
ff4a80bf2d3f80 Jeff Layton 2019-04-24 170
3a3430affce5de Jeff Layton 2019-11-20 171 seq_printf(s, "\n\nWaiters:\n--------\n");
3a3430affce5de Jeff Layton 2019-11-20 172 seq_printf(s, "tgid ino need want\n");
3a3430affce5de Jeff Layton 2019-11-20 173 seq_printf(s, "-----------------------------------------------------\n");
3a3430affce5de Jeff Layton 2019-11-20 174
3a3430affce5de Jeff Layton 2019-11-20 175 spin_lock(&mdsc->caps_list_lock);
3a3430affce5de Jeff Layton 2019-11-20 176 list_for_each_entry(cw, &mdsc->cap_wait_list, list) {
3a3430affce5de Jeff Layton 2019-11-20 177 seq_printf(s, "%-13d0x%-17lx%-17s%-17s\n", cw->tgid, cw->ino,
3a3430affce5de Jeff Layton 2019-11-20 178 ceph_cap_string(cw->need),
3a3430affce5de Jeff Layton 2019-11-20 179 ceph_cap_string(cw->want));
3a3430affce5de Jeff Layton 2019-11-20 180 }
3a3430affce5de Jeff Layton 2019-11-20 181 spin_unlock(&mdsc->caps_list_lock);
3a3430affce5de Jeff Layton 2019-11-20 182
76aa844d5b2fb8 Sage Weil 2009-10-06 183 return 0;
76aa844d5b2fb8 Sage Weil 2009-10-06 184 }
76aa844d5b2fb8 Sage Weil 2009-10-06 185
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <1590471145-4436-1-git-send-email-lingshan.zhu(a)intel.com>
References: <1590471145-4436-1-git-send-email-lingshan.zhu(a)intel.com>
TO: Zhu Lingshan <lingshan.zhu(a)intel.com>
TO: mst(a)redhat.com
TO: kvm(a)vger.kernel.org
TO: virtualization(a)lists.linux-foundation.org
TO: linux-kernel(a)vger.kernel.org
TO: netdev(a)vger.kernel.org
TO: jasowang(a)redhat.com
CC: lulu(a)redhat.com
CC: dan.daly(a)intel.com
CC: cunming.liang(a)intel.com
CC: Zhu Lingshan <lingshan.zhu(a)intel.com>
Hi Zhu,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on vhost/linux-next]
[also build test WARNING on v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Zhu-Lingshan/vdpa-bypass-waking-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: x86_64-randconfig-m001-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/vhost/vdpa.c:348 vhost_vdpa_set_vring_kick() error: uninitialized symbol 'r'.
# https://github.com/0day-ci/linux/commit/a84ddbf1ef29f18aafb2bb8a93bcedd4a...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout a84ddbf1ef29f18aafb2bb8a93bcedd4a29a967d
vim +/r +348 drivers/vhost/vdpa.c
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 315
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 316 static long vhost_vdpa_set_vring_kick(struct vhost_virtqueue *vq,
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 317 void __user *argp)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 318 {
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 319 bool pollstart = false, pollstop = false;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 320 struct file *eventfp, *filep = NULL;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 321 struct vhost_vring_file f;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 322 long r;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 323
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 324 if (copy_from_user(&f, argp, sizeof(f)))
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 325 return -EFAULT;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 326
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 327 eventfp = f.fd == -1 ? NULL : eventfd_fget(f.fd);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 328 if (IS_ERR(eventfp)) {
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 329 r = PTR_ERR(eventfp);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 330 return r;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 331 }
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 332
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 333 if (eventfp != vq->kick) {
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 334 pollstop = (filep = vq->kick) != NULL;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 335 pollstart = (vq->kick = eventfp) != NULL;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 336 } else
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 337 filep = eventfp;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 338
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 339 if (pollstop && vq->handle_kick)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 340 vhost_vdpa_poll_stop(vq);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 341
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 342 if (filep)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 343 fput(filep);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 344
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 345 if (pollstart && vq->handle_kick)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 346 r = vhost_vdpa_poll_start(vq);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 347
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 @348 return r;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 349 }
4c8cf31885f69e Tiwei Bie 2020-03-26 350
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v3 4/7] watchdog: dw_wdt: Support devices with non-fixed TOP values
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200526154123.24402-5-Sergey.Semin(a)baikalelectronics.ru>
References: <20200526154123.24402-5-Sergey.Semin(a)baikalelectronics.ru>
TO: Serge Semin <Sergey.Semin(a)baikalelectronics.ru>
Hi Serge,
I love your patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on hwmon/hwmon-next soc/for-next linus/master v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Serge-Semin/watchdog-dw_wdt-Take...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: i386-randconfig-m021-20200528 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/watchdog/dw_wdt.c:124 dw_wdt_get_min_timeout() error: buffer overflow 'dw_wdt->timeouts' 16 <= 16 (assuming for loop doesn't break)
drivers/watchdog/dw_wdt.c:147 dw_wdt_get_timeout() error: buffer overflow 'dw_wdt->timeouts' 16 <= 16 (assuming for loop doesn't break)
# https://github.com/0day-ci/linux/commit/2d6c220c0b6cbc1fd04065b904a6a2f0b...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 2d6c220c0b6cbc1fd04065b904a6a2f0bfe086e7
vim +124 drivers/watchdog/dw_wdt.c
2d6c220c0b6cbc Serge Semin 2020-05-26 110
2d6c220c0b6cbc Serge Semin 2020-05-26 111 static unsigned int dw_wdt_get_min_timeout(struct dw_wdt *dw_wdt)
c9353ae1c69ba1 Jamie Iles 2011-01-24 112 {
2d6c220c0b6cbc Serge Semin 2020-05-26 113 int idx;
2d6c220c0b6cbc Serge Semin 2020-05-26 114
2d6c220c0b6cbc Serge Semin 2020-05-26 115 /*
2d6c220c0b6cbc Serge Semin 2020-05-26 116 * We'll find a timeout greater or equal to one second anyway because
2d6c220c0b6cbc Serge Semin 2020-05-26 117 * the driver probe would have failed if there was none.
2d6c220c0b6cbc Serge Semin 2020-05-26 118 */
2d6c220c0b6cbc Serge Semin 2020-05-26 119 for (idx = 0; idx < DW_WDT_NUM_TOPS; ++idx) {
2d6c220c0b6cbc Serge Semin 2020-05-26 120 if (dw_wdt->timeouts[idx].sec)
2d6c220c0b6cbc Serge Semin 2020-05-26 121 break;
2d6c220c0b6cbc Serge Semin 2020-05-26 122 }
c9353ae1c69ba1 Jamie Iles 2011-01-24 123
2d6c220c0b6cbc Serge Semin 2020-05-26 @124 return dw_wdt->timeouts[idx].sec;
2d6c220c0b6cbc Serge Semin 2020-05-26 125 }
2d6c220c0b6cbc Serge Semin 2020-05-26 126
2d6c220c0b6cbc Serge Semin 2020-05-26 127 static unsigned int dw_wdt_get_max_timeout_ms(struct dw_wdt *dw_wdt)
2d6c220c0b6cbc Serge Semin 2020-05-26 128 {
2d6c220c0b6cbc Serge Semin 2020-05-26 129 struct dw_wdt_timeout *timeout = &dw_wdt->timeouts[DW_WDT_NUM_TOPS - 1];
2d6c220c0b6cbc Serge Semin 2020-05-26 130 u64 msec;
2d6c220c0b6cbc Serge Semin 2020-05-26 131
2d6c220c0b6cbc Serge Semin 2020-05-26 132 msec = (u64)timeout->sec * MSEC_PER_SEC + timeout->msec;
2d6c220c0b6cbc Serge Semin 2020-05-26 133
2d6c220c0b6cbc Serge Semin 2020-05-26 134 return msec < UINT_MAX ? msec : UINT_MAX;
2d6c220c0b6cbc Serge Semin 2020-05-26 135 }
2d6c220c0b6cbc Serge Semin 2020-05-26 136
2d6c220c0b6cbc Serge Semin 2020-05-26 137 static unsigned int dw_wdt_get_timeout(struct dw_wdt *dw_wdt)
2d6c220c0b6cbc Serge Semin 2020-05-26 138 {
2d6c220c0b6cbc Serge Semin 2020-05-26 139 int top_val = readl(dw_wdt->regs + WDOG_TIMEOUT_RANGE_REG_OFFSET) & 0xF;
2d6c220c0b6cbc Serge Semin 2020-05-26 140 int idx;
2d6c220c0b6cbc Serge Semin 2020-05-26 141
2d6c220c0b6cbc Serge Semin 2020-05-26 142 for (idx = 0; idx < DW_WDT_NUM_TOPS; ++idx) {
2d6c220c0b6cbc Serge Semin 2020-05-26 143 if (dw_wdt->timeouts[idx].top_val == top_val)
2d6c220c0b6cbc Serge Semin 2020-05-26 144 break;
2d6c220c0b6cbc Serge Semin 2020-05-26 145 }
2d6c220c0b6cbc Serge Semin 2020-05-26 146
2d6c220c0b6cbc Serge Semin 2020-05-26 @147 return dw_wdt->timeouts[idx].sec;
c9353ae1c69ba1 Jamie Iles 2011-01-24 148 }
c9353ae1c69ba1 Jamie Iles 2011-01-24 149
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[ext4:dev 43/50] fs/ext4/mballoc.c:2209:9: sparse: sparse: context imbalance in 'ext4_mb_good_group_nolock' - different lock contexts for basic block
by kbuild test robot
CC: kbuild-all(a)lists.01.org
CC: linux-ext4(a)vger.kernel.org
TO: "Ritesh, Harjani," <riteshh(a)linux.ibm.com>
CC: "Theodore Ts'o" <tytso(a)mit.edu>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
head: 38bd76b9696c5582dcef4ab1af437e0666021f65
commit: bf53b03e9d2ac23fb4a3e639fe023f5f1af607b0 [43/50] ext4: mballoc: use lock for checking free blocks while retrying
:::::: branch date: 21 hours ago
:::::: commit date: 22 hours ago
config: x86_64-randconfig-s022-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-243-gc100a7ab-dirty
git checkout bf53b03e9d2ac23fb4a3e639fe023f5f1af607b0
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/ext4/mballoc.c:2209:9: sparse: sparse: context imbalance in 'ext4_mb_good_group_nolock' - different lock contexts for basic block
# https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/commit/?id...
git remote add ext4 https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
git remote update ext4
git checkout bf53b03e9d2ac23fb4a3e639fe023f5f1af607b0
vim +/ext4_mb_good_group_nolock +2209 fs/ext4/mballoc.c
9e467ce0e92226 Ritesh Harjani 2020-05-20 2169
9e467ce0e92226 Ritesh Harjani 2020-05-20 2170 /*
9e467ce0e92226 Ritesh Harjani 2020-05-20 2171 * This could return negative error code if something goes wrong
9e467ce0e92226 Ritesh Harjani 2020-05-20 2172 * during ext4_mb_init_group(). This should not be called with
9e467ce0e92226 Ritesh Harjani 2020-05-20 2173 * ext4_lock_group() held.
9e467ce0e92226 Ritesh Harjani 2020-05-20 2174 */
9e467ce0e92226 Ritesh Harjani 2020-05-20 2175 static int ext4_mb_good_group_nolock(struct ext4_allocation_context *ac,
9e467ce0e92226 Ritesh Harjani 2020-05-20 2176 ext4_group_t group, int cr)
9e467ce0e92226 Ritesh Harjani 2020-05-20 2177 {
9e467ce0e92226 Ritesh Harjani 2020-05-20 2178 struct ext4_group_info *grp = ext4_get_group_info(ac->ac_sb, group);
bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2179 struct super_block *sb = ac->ac_sb;
bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2180 bool should_lock = ac->ac_flags & EXT4_MB_STRICT_CHECK;
9e467ce0e92226 Ritesh Harjani 2020-05-20 2181 ext4_grpblk_t free;
9e467ce0e92226 Ritesh Harjani 2020-05-20 2182 int ret = 0;
9e467ce0e92226 Ritesh Harjani 2020-05-20 2183
bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2184 if (should_lock)
bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2185 ext4_lock_group(sb, group);
9e467ce0e92226 Ritesh Harjani 2020-05-20 2186 free = grp->bb_free;
9e467ce0e92226 Ritesh Harjani 2020-05-20 2187 if (free == 0)
9e467ce0e92226 Ritesh Harjani 2020-05-20 2188 goto out;
9e467ce0e92226 Ritesh Harjani 2020-05-20 2189 if (cr <= 2 && free < ac->ac_g_ex.fe_len)
9e467ce0e92226 Ritesh Harjani 2020-05-20 2190 goto out;
9e467ce0e92226 Ritesh Harjani 2020-05-20 2191 if (unlikely(EXT4_MB_GRP_BBITMAP_CORRUPT(grp)))
9e467ce0e92226 Ritesh Harjani 2020-05-20 2192 goto out;
bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2193 if (should_lock)
bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2194 ext4_unlock_group(sb, group);
9e467ce0e92226 Ritesh Harjani 2020-05-20 2195
9e467ce0e92226 Ritesh Harjani 2020-05-20 2196 /* We only do this if the grp has never been initialized */
9e467ce0e92226 Ritesh Harjani 2020-05-20 2197 if (unlikely(EXT4_MB_GRP_NEED_INIT(grp))) {
9e467ce0e92226 Ritesh Harjani 2020-05-20 2198 ret = ext4_mb_init_group(ac->ac_sb, group, GFP_NOFS);
9e467ce0e92226 Ritesh Harjani 2020-05-20 2199 if (ret)
9e467ce0e92226 Ritesh Harjani 2020-05-20 2200 return ret;
9e467ce0e92226 Ritesh Harjani 2020-05-20 2201 }
9e467ce0e92226 Ritesh Harjani 2020-05-20 2202
bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2203 if (should_lock)
bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2204 ext4_lock_group(sb, group);
9e467ce0e92226 Ritesh Harjani 2020-05-20 2205 ret = ext4_mb_good_group(ac, group, cr);
9e467ce0e92226 Ritesh Harjani 2020-05-20 2206 out:
bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2207 if (should_lock)
bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2208 ext4_unlock_group(sb, group);
9e467ce0e92226 Ritesh Harjani 2020-05-20 @2209 return ret;
c9de560ded61fa Alex Tomas 2008-01-29 2210 }
c9de560ded61fa Alex Tomas 2008-01-29 2211
:::::: The code at line 2209 was first introduced by commit
:::::: 9e467ce0e92226a8c859d7850e6a6065f6eff8fd ext4: mballoc: refactor ext4_mb_good_group()
:::::: TO: Ritesh Harjani <riteshh(a)linux.ibm.com>
:::::: CC: Theodore Ts'o <tytso(a)mit.edu>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH 1/4] scsi: convert target lookup to xarray
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200527141400.58087-2-hare(a)suse.de>
References: <20200527141400.58087-2-hare(a)suse.de>
TO: Hannes Reinecke <hare(a)suse.de>
TO: "Martin K. Petersen" <martin.petersen(a)oracle.com>
CC: Christoph Hellwig <hch(a)lst.de>
CC: Doug Gilbert <dgilbert(a)interlog.com>
CC: Daniel Wagner <daniel.wagner(a)suse.com>
CC: James Bottomley <james.bottomley(a)hansenpartnership.com>
CC: linux-scsi(a)vger.kernel.org
CC: Hannes Reinecke <hare(a)suse.de>
Hi Hannes,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi-use-xarray-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-m001-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/scsi/scsi_scan.c:482 scsi_alloc_target() warn: inconsistent returns '*shost->host_lock'.
drivers/scsi/scsi_scan.c:482 scsi_alloc_target() warn: inconsistent returns 'flags'.
# https://github.com/0day-ci/linux/commit/45b149b239ea9a86968ddbd8ecda1e6c4...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 45b149b239ea9a86968ddbd8ecda1e6c44937b68
vim +482 drivers/scsi/scsi_scan.c
e63ed0d7a98014 James Bottomley 2014-01-21 379
884d25cc4fda20 James Bottomley 2006-09-05 380 /**
884d25cc4fda20 James Bottomley 2006-09-05 381 * scsi_alloc_target - allocate a new or find an existing target
884d25cc4fda20 James Bottomley 2006-09-05 382 * @parent: parent of the target (need not be a scsi host)
884d25cc4fda20 James Bottomley 2006-09-05 383 * @channel: target channel number (zero if no channels)
884d25cc4fda20 James Bottomley 2006-09-05 384 * @id: target id number
884d25cc4fda20 James Bottomley 2006-09-05 385 *
884d25cc4fda20 James Bottomley 2006-09-05 386 * Return an existing target if one exists, provided it hasn't already
884d25cc4fda20 James Bottomley 2006-09-05 387 * gone into STARGET_DEL state, otherwise allocate a new target.
884d25cc4fda20 James Bottomley 2006-09-05 388 *
884d25cc4fda20 James Bottomley 2006-09-05 389 * The target is returned with an incremented reference, so the caller
884d25cc4fda20 James Bottomley 2006-09-05 390 * is responsible for both reaping and doing a last put
884d25cc4fda20 James Bottomley 2006-09-05 391 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 392 static struct scsi_target *scsi_alloc_target(struct device *parent,
^1da177e4c3f41 Linus Torvalds 2005-04-16 393 int channel, uint id)
^1da177e4c3f41 Linus Torvalds 2005-04-16 394 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 395 struct Scsi_Host *shost = dev_to_shost(parent);
^1da177e4c3f41 Linus Torvalds 2005-04-16 396 struct device *dev = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 397 unsigned long flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 398 const int size = sizeof(struct scsi_target)
^1da177e4c3f41 Linus Torvalds 2005-04-16 399 + shost->transportt->target_size;
5c44cd2afad3f7 James.Smart(a)Emulex.Com 2005-06-10 400 struct scsi_target *starget;
^1da177e4c3f41 Linus Torvalds 2005-04-16 401 struct scsi_target *found_target;
e63ed0d7a98014 James Bottomley 2014-01-21 402 int error, ref_got;
45b149b239ea9a Hannes Reinecke 2020-05-27 403 unsigned long tid;
^1da177e4c3f41 Linus Torvalds 2005-04-16 404
24669f75a3231f Jes Sorensen 2006-01-16 405 starget = kzalloc(size, GFP_KERNEL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 406 if (!starget) {
cadbd4a5e36dde Harvey Harrison 2008-07-03 407 printk(KERN_ERR "%s: allocation failure\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 408 return NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 409 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 410 dev = &starget->dev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 411 device_initialize(dev);
e63ed0d7a98014 James Bottomley 2014-01-21 412 kref_init(&starget->reap_ref);
^1da177e4c3f41 Linus Torvalds 2005-04-16 413 dev->parent = get_device(parent);
71610f55fa4db6 Kay Sievers 2008-12-03 414 dev_set_name(dev, "target%d:%d:%d", shost->host_no, channel, id);
b0ed43360fdca2 Hannes Reinecke 2008-03-18 415 dev->bus = &scsi_bus_type;
b0ed43360fdca2 Hannes Reinecke 2008-03-18 416 dev->type = &scsi_target_type;
^1da177e4c3f41 Linus Torvalds 2005-04-16 417 starget->id = id;
^1da177e4c3f41 Linus Torvalds 2005-04-16 418 starget->channel = channel;
f0c0a376d0fcd4 Mike Christie 2008-08-17 419 starget->can_queue = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 420 INIT_LIST_HEAD(&starget->devices);
643eb2d932c97a James Bottomley 2008-03-22 421 starget->state = STARGET_CREATED;
7c9d6f16f50d3a Alan Stern 2007-01-08 422 starget->scsi_level = SCSI_2;
c53a284f8be237 Edward Goggin 2009-04-09 423 starget->max_target_blocked = SCSI_DEFAULT_TARGET_BLOCKED;
45b149b239ea9a Hannes Reinecke 2020-05-27 424 tid = scsi_target_index(starget);
ffedb4522571ac James Bottomley 2006-02-23 425 retry:
^1da177e4c3f41 Linus Torvalds 2005-04-16 426 spin_lock_irqsave(shost->host_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 427
45b149b239ea9a Hannes Reinecke 2020-05-27 428 found_target = xa_load(&shost->__targets, tid);
^1da177e4c3f41 Linus Torvalds 2005-04-16 429 if (found_target)
^1da177e4c3f41 Linus Torvalds 2005-04-16 430 goto found;
45b149b239ea9a Hannes Reinecke 2020-05-27 431 if (xa_insert(&shost->__targets, tid, starget, GFP_KERNEL)) {
45b149b239ea9a Hannes Reinecke 2020-05-27 432 dev_printk(KERN_ERR, dev, "target index busy\n");
45b149b239ea9a Hannes Reinecke 2020-05-27 433 kfree(starget);
45b149b239ea9a Hannes Reinecke 2020-05-27 434 return NULL;
45b149b239ea9a Hannes Reinecke 2020-05-27 435 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 436 spin_unlock_irqrestore(shost->host_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 437 /* allocate and add */
a283bd37d00e92 James Bottomley 2005-05-24 438 transport_setup_device(dev);
a283bd37d00e92 James Bottomley 2005-05-24 439 if (shost->hostt->target_alloc) {
32f95792500794 Brian King 2006-02-22 440 error = shost->hostt->target_alloc(starget);
a283bd37d00e92 James Bottomley 2005-05-24 441
a283bd37d00e92 James Bottomley 2005-05-24 442 if(error) {
a283bd37d00e92 James Bottomley 2005-05-24 443 dev_printk(KERN_ERR, dev, "target allocation failed, error %d\n", error);
a283bd37d00e92 James Bottomley 2005-05-24 444 /* don't want scsi_target_reap to do the final
a283bd37d00e92 James Bottomley 2005-05-24 445 * put because it will be under the host lock */
643eb2d932c97a James Bottomley 2008-03-22 446 scsi_target_destroy(starget);
a283bd37d00e92 James Bottomley 2005-05-24 447 return NULL;
a283bd37d00e92 James Bottomley 2005-05-24 448 }
a283bd37d00e92 James Bottomley 2005-05-24 449 }
884d25cc4fda20 James Bottomley 2006-09-05 450 get_device(dev);
a283bd37d00e92 James Bottomley 2005-05-24 451
^1da177e4c3f41 Linus Torvalds 2005-04-16 452 return starget;
^1da177e4c3f41 Linus Torvalds 2005-04-16 453
^1da177e4c3f41 Linus Torvalds 2005-04-16 454 found:
e63ed0d7a98014 James Bottomley 2014-01-21 455 /*
e63ed0d7a98014 James Bottomley 2014-01-21 456 * release routine already fired if kref is zero, so if we can still
e63ed0d7a98014 James Bottomley 2014-01-21 457 * take the reference, the target must be alive. If we can't, it must
e63ed0d7a98014 James Bottomley 2014-01-21 458 * be dying and we need to wait for a new target
e63ed0d7a98014 James Bottomley 2014-01-21 459 */
e63ed0d7a98014 James Bottomley 2014-01-21 460 ref_got = kref_get_unless_zero(&found_target->reap_ref);
e63ed0d7a98014 James Bottomley 2014-01-21 461
^1da177e4c3f41 Linus Torvalds 2005-04-16 462 spin_unlock_irqrestore(shost->host_lock, flags);
e63ed0d7a98014 James Bottomley 2014-01-21 463 if (ref_got) {
12fb8c1574d7d0 Alan Stern 2010-03-18 464 put_device(dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 465 return found_target;
^1da177e4c3f41 Linus Torvalds 2005-04-16 466 }
e63ed0d7a98014 James Bottomley 2014-01-21 467 /*
e63ed0d7a98014 James Bottomley 2014-01-21 468 * Unfortunately, we found a dying target; need to wait until it's
e63ed0d7a98014 James Bottomley 2014-01-21 469 * dead before we can get a new one. There is an anomaly here. We
e63ed0d7a98014 James Bottomley 2014-01-21 470 * *should* call scsi_target_reap() to balance the kref_get() of the
e63ed0d7a98014 James Bottomley 2014-01-21 471 * reap_ref above. However, since the target being released, it's
e63ed0d7a98014 James Bottomley 2014-01-21 472 * already invisible and the reap_ref is irrelevant. If we call
e63ed0d7a98014 James Bottomley 2014-01-21 473 * scsi_target_reap() we might spuriously do another device_del() on
e63ed0d7a98014 James Bottomley 2014-01-21 474 * an already invisible target.
e63ed0d7a98014 James Bottomley 2014-01-21 475 */
ffedb4522571ac James Bottomley 2006-02-23 476 put_device(&found_target->dev);
e63ed0d7a98014 James Bottomley 2014-01-21 477 /*
e63ed0d7a98014 James Bottomley 2014-01-21 478 * length of time is irrelevant here, we just want to yield the CPU
e63ed0d7a98014 James Bottomley 2014-01-21 479 * for a tick to avoid busy waiting for the target to die.
e63ed0d7a98014 James Bottomley 2014-01-21 480 */
e63ed0d7a98014 James Bottomley 2014-01-21 481 msleep(1);
ffedb4522571ac James Bottomley 2006-02-23 @482 goto retry;
ffedb4522571ac James Bottomley 2006-02-23 483 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 484
:::::: The code at line 482 was first introduced by commit
:::::: ffedb4522571ac170f941678d138a31bc0884ab4 [SCSI] fix scsi process problems and clean up the target reap issues
:::::: TO: James Bottomley <James.Bottomley(a)steeleye.com>
:::::: CC: James Bottomley <jejb(a)mulgrave.il.steeleye.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[dhowells-fs:afs-operation 20/27] fs/afs/vl_alias.c:318:8-17: ERROR: reference preceded by free on line 316
by kbuild test robot
CC: kbuild-all(a)lists.01.org
TO: "David, Howells," <dhowells(a)redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git afs-operation
head: 028362346b339f27505b0eb27e7c7f68cd0fc8b9
commit: 298b5d29c83596b495250fdcc97d16183f67b895 [20/27] afs: Detect cell aliases 3 - YFS Cells with a canonical cell name op
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago
config: nds32-randconfig-c021-20200529 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> fs/afs/vl_alias.c:318:8-17: ERROR: reference preceded by free on line 316
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git remote update dhowells-fs
git checkout 298b5d29c83596b495250fdcc97d16183f67b895
vim +318 fs/afs/vl_alias.c
298b5d29c83596b David Howells 2020-04-27 299
298b5d29c83596b David Howells 2020-04-27 300 static int yfs_check_canonical_cell_name(struct afs_cell *cell, struct key *key)
298b5d29c83596b David Howells 2020-04-27 301 {
298b5d29c83596b David Howells 2020-04-27 302 struct afs_cell *master;
298b5d29c83596b David Howells 2020-04-27 303 char *cell_name;
298b5d29c83596b David Howells 2020-04-27 304
298b5d29c83596b David Howells 2020-04-27 305 cell_name = afs_vl_get_cell_name(cell, key);
298b5d29c83596b David Howells 2020-04-27 306 if (IS_ERR(cell_name))
298b5d29c83596b David Howells 2020-04-27 307 return PTR_ERR(cell_name);
298b5d29c83596b David Howells 2020-04-27 308
298b5d29c83596b David Howells 2020-04-27 309 if (strcmp(cell_name, cell->name) == 0) {
298b5d29c83596b David Howells 2020-04-27 310 kfree(cell_name);
298b5d29c83596b David Howells 2020-04-27 311 return 0;
298b5d29c83596b David Howells 2020-04-27 312 }
298b5d29c83596b David Howells 2020-04-27 313
298b5d29c83596b David Howells 2020-04-27 314 master = afs_lookup_cell(cell->net, cell_name, strlen(cell_name),
298b5d29c83596b David Howells 2020-04-27 315 NULL, false);
298b5d29c83596b David Howells 2020-04-27 @316 kfree(cell_name);
298b5d29c83596b David Howells 2020-04-27 317 if (IS_ERR(master)) {
298b5d29c83596b David Howells 2020-04-27 @318 kfree(cell_name);
298b5d29c83596b David Howells 2020-04-27 319 return PTR_ERR(master);
298b5d29c83596b David Howells 2020-04-27 320 }
298b5d29c83596b David Howells 2020-04-27 321
298b5d29c83596b David Howells 2020-04-27 322 cell->alias_of = master; /* Transfer our ref */
298b5d29c83596b David Howells 2020-04-27 323 return 1;
298b5d29c83596b David Howells 2020-04-27 324 }
298b5d29c83596b David Howells 2020-04-27 325
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years