From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: [jlayton:ceph-fscache-iter 76/77] fs/ceph/addr.c:225 ceph_fsreq_issue_op() error: uninitialized symbol 'err'.
Date: Sat, 30 May 2020 23:44:35 +0300 [thread overview]
Message-ID: <20200530204435.GR22511@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 4796 bytes --]
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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@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/?id=abd9e1c4c6c6d86ef46c1782a886b52f09d87ebb
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(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37372 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [kbuild] [jlayton:ceph-fscache-iter 76/77] fs/ceph/addr.c:225 ceph_fsreq_issue_op() error: uninitialized symbol 'err'.
Date: Sat, 30 May 2020 23:44:35 +0300 [thread overview]
Message-ID: <20200530204435.GR22511@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 4796 bytes --]
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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@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/?id=abd9e1c4c6c6d86ef46c1782a886b52f09d87ebb
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(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37372 bytes --]
next reply other threads:[~2020-05-30 20:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-30 20:44 Dan Carpenter [this message]
2020-05-30 20:44 ` [kbuild] [jlayton:ceph-fscache-iter 76/77] fs/ceph/addr.c:225 ceph_fsreq_issue_op() error: uninitialized symbol 'err' Dan Carpenter
2020-05-30 20:49 ` Jeff Layton
2020-05-30 21:44 ` Dan Carpenter
2020-05-30 21:44 ` [kbuild] " Dan Carpenter
2020-05-31 13:21 ` Chen, Rong A
2020-05-31 13:21 ` [kbuild] " Chen, Rong A
-- strict thread matches above, loose matches on Subject: below --
2020-05-30 19:59 kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200530204435.GR22511@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.