* [jlayton:ceph-fscache-iter 8/12] fs/ceph/addr.c:259 ceph_netfs_issue_op() warn: unsigned 'len' is never less than zero.
@ 2020-12-23 21:17 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-12-23 21:17 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3153 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscache-iter
head: 3e29c2cb365e881f595bf6ba77ee07eb4525c188
commit: 960c2cee655fdd20886fafe695d6ea3c2e1deb77 [8/12] ceph: convert readpage to fscache read helper
config: i386-randconfig-m021-20201223 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
New smatch warnings:
fs/ceph/addr.c:259 ceph_netfs_issue_op() warn: unsigned 'len' is never less than zero.
Old smatch warnings:
fs/ceph/addr.c:521 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:556 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:2164 __ceph_pool_perm_get() error: we previously assumed 'pool_ns' could be null (see line 2153)
include/linux/ceph/string_table.h:46 ceph_compare_string() error: we previously assumed 'cs' could be null (see line 41)
vim +/len +259 fs/ceph/addr.c
232
233 static void ceph_netfs_issue_op(struct netfs_read_subrequest *subreq)
234 {
235 struct netfs_read_request *rreq = subreq->rreq;
236 struct inode *inode = rreq->mapping->host;
237 struct ceph_inode_info *ci = ceph_inode(inode);
238 struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
239 struct ceph_osd_request *req = NULL;
240 struct ceph_vino vino = ceph_vino(inode);
241 struct iov_iter iter;
242 struct page **pages;
243 size_t page_off;
244 int err = 0;
245 u64 len = subreq->len;
246
247 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, vino, subreq->start, &len,
248 0, 1, CEPH_OSD_OP_READ,
249 CEPH_OSD_FLAG_READ | fsc->client->osdc.client->options->read_from_replica,
250 NULL, ci->i_truncate_seq, ci->i_truncate_size, false);
251 if (IS_ERR(req)) {
252 err = PTR_ERR(req);
253 goto out;
254 }
255
256 dout("%s: pos=%llu orig_len=%zu len=%llu\n", __func__, subreq->start, subreq->len, len);
257 iov_iter_xarray(&iter, READ, &rreq->mapping->i_pages, subreq->start, len);
258 len = iov_iter_get_pages_alloc(&iter, &pages, len, &page_off);
> 259 if (len < 0) {
260 err = len;
261 dout("%s: iov_ter_get_pages_alloc returned %d\n", __func__, err);
262 goto out;
263 }
264
265 /* should always give us a page-aligned read */
266 WARN_ON_ONCE(page_off);
267
268 osd_req_op_extent_osd_data_pages(req, 0, pages, len, 0, false, false);
269 req->r_callback = finish_netfs_read;
270 req->r_priv = subreq;
271 req->r_inode = inode;
272 ihold(inode);
273
274 err = ceph_osdc_start_request(req->r_osdc, req, false);
275 if (err)
276 iput(inode);
277 out:
278 if (req)
279 ceph_osdc_put_request(req);
280 if (err)
281 netfs_subreq_terminated(subreq, err);
282 dout("%s: result %d\n", __func__, err);
283 }
284
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36278 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [jlayton:ceph-fscache-iter 8/12] fs/ceph/addr.c:259 ceph_netfs_issue_op() warn: unsigned 'len' is never less than zero.
@ 2020-12-24 2:48 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-12-24 2:48 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3153 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscache-iter
head: 3e29c2cb365e881f595bf6ba77ee07eb4525c188
commit: 960c2cee655fdd20886fafe695d6ea3c2e1deb77 [8/12] ceph: convert readpage to fscache read helper
config: i386-randconfig-m021-20201223 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
New smatch warnings:
fs/ceph/addr.c:259 ceph_netfs_issue_op() warn: unsigned 'len' is never less than zero.
Old smatch warnings:
fs/ceph/addr.c:521 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:556 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:2164 __ceph_pool_perm_get() error: we previously assumed 'pool_ns' could be null (see line 2153)
include/linux/ceph/string_table.h:46 ceph_compare_string() error: we previously assumed 'cs' could be null (see line 41)
vim +/len +259 fs/ceph/addr.c
232
233 static void ceph_netfs_issue_op(struct netfs_read_subrequest *subreq)
234 {
235 struct netfs_read_request *rreq = subreq->rreq;
236 struct inode *inode = rreq->mapping->host;
237 struct ceph_inode_info *ci = ceph_inode(inode);
238 struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
239 struct ceph_osd_request *req = NULL;
240 struct ceph_vino vino = ceph_vino(inode);
241 struct iov_iter iter;
242 struct page **pages;
243 size_t page_off;
244 int err = 0;
245 u64 len = subreq->len;
246
247 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, vino, subreq->start, &len,
248 0, 1, CEPH_OSD_OP_READ,
249 CEPH_OSD_FLAG_READ | fsc->client->osdc.client->options->read_from_replica,
250 NULL, ci->i_truncate_seq, ci->i_truncate_size, false);
251 if (IS_ERR(req)) {
252 err = PTR_ERR(req);
253 goto out;
254 }
255
256 dout("%s: pos=%llu orig_len=%zu len=%llu\n", __func__, subreq->start, subreq->len, len);
257 iov_iter_xarray(&iter, READ, &rreq->mapping->i_pages, subreq->start, len);
258 len = iov_iter_get_pages_alloc(&iter, &pages, len, &page_off);
> 259 if (len < 0) {
260 err = len;
261 dout("%s: iov_ter_get_pages_alloc returned %d\n", __func__, err);
262 goto out;
263 }
264
265 /* should always give us a page-aligned read */
266 WARN_ON_ONCE(page_off);
267
268 osd_req_op_extent_osd_data_pages(req, 0, pages, len, 0, false, false);
269 req->r_callback = finish_netfs_read;
270 req->r_priv = subreq;
271 req->r_inode = inode;
272 ihold(inode);
273
274 err = ceph_osdc_start_request(req->r_osdc, req, false);
275 if (err)
276 iput(inode);
277 out:
278 if (req)
279 ceph_osdc_put_request(req);
280 if (err)
281 netfs_subreq_terminated(subreq, err);
282 dout("%s: result %d\n", __func__, err);
283 }
284
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36278 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [jlayton:ceph-fscache-iter 8/12] fs/ceph/addr.c:259 ceph_netfs_issue_op() warn: unsigned 'len' is never less than zero.
@ 2020-12-24 4:25 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-12-24 4:25 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3153 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscache-iter
head: 3e29c2cb365e881f595bf6ba77ee07eb4525c188
commit: 960c2cee655fdd20886fafe695d6ea3c2e1deb77 [8/12] ceph: convert readpage to fscache read helper
config: i386-randconfig-m021-20201223 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
New smatch warnings:
fs/ceph/addr.c:259 ceph_netfs_issue_op() warn: unsigned 'len' is never less than zero.
Old smatch warnings:
fs/ceph/addr.c:521 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:556 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:2164 __ceph_pool_perm_get() error: we previously assumed 'pool_ns' could be null (see line 2153)
include/linux/ceph/string_table.h:46 ceph_compare_string() error: we previously assumed 'cs' could be null (see line 41)
vim +/len +259 fs/ceph/addr.c
232
233 static void ceph_netfs_issue_op(struct netfs_read_subrequest *subreq)
234 {
235 struct netfs_read_request *rreq = subreq->rreq;
236 struct inode *inode = rreq->mapping->host;
237 struct ceph_inode_info *ci = ceph_inode(inode);
238 struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
239 struct ceph_osd_request *req = NULL;
240 struct ceph_vino vino = ceph_vino(inode);
241 struct iov_iter iter;
242 struct page **pages;
243 size_t page_off;
244 int err = 0;
245 u64 len = subreq->len;
246
247 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, vino, subreq->start, &len,
248 0, 1, CEPH_OSD_OP_READ,
249 CEPH_OSD_FLAG_READ | fsc->client->osdc.client->options->read_from_replica,
250 NULL, ci->i_truncate_seq, ci->i_truncate_size, false);
251 if (IS_ERR(req)) {
252 err = PTR_ERR(req);
253 goto out;
254 }
255
256 dout("%s: pos=%llu orig_len=%zu len=%llu\n", __func__, subreq->start, subreq->len, len);
257 iov_iter_xarray(&iter, READ, &rreq->mapping->i_pages, subreq->start, len);
258 len = iov_iter_get_pages_alloc(&iter, &pages, len, &page_off);
> 259 if (len < 0) {
260 err = len;
261 dout("%s: iov_ter_get_pages_alloc returned %d\n", __func__, err);
262 goto out;
263 }
264
265 /* should always give us a page-aligned read */
266 WARN_ON_ONCE(page_off);
267
268 osd_req_op_extent_osd_data_pages(req, 0, pages, len, 0, false, false);
269 req->r_callback = finish_netfs_read;
270 req->r_priv = subreq;
271 req->r_inode = inode;
272 ihold(inode);
273
274 err = ceph_osdc_start_request(req->r_osdc, req, false);
275 if (err)
276 iput(inode);
277 out:
278 if (req)
279 ceph_osdc_put_request(req);
280 if (err)
281 netfs_subreq_terminated(subreq, err);
282 dout("%s: result %d\n", __func__, err);
283 }
284
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36278 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-24 4:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-23 21:17 [jlayton:ceph-fscache-iter 8/12] fs/ceph/addr.c:259 ceph_netfs_issue_op() warn: unsigned 'len' is never less than zero kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2020-12-24 2:48 kernel test robot
2020-12-24 4:25 kernel test robot
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.