Undelivered Mail Returned to Sender
by Mail Delivery System
This is the mail system at host ml01.01.org.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<kbuild-all(a)lists.01.org>: host 127.0.0.1[127.0.0.1] said: 550 No Message-ID
header provided (in reply to end of DATA command)
Final-Recipient: rfc822; kbuild-all(a)lists.01.org
Original-Recipient: rfc822;kbuild-all(a)lists.01.org
Action: failed
Status: 5.0.0
Remote-MTA: dns; 127.0.0.1
Diagnostic-Code: smtp; 550 No Message-ID header provided
.74; helo=3Dlocalhost; envelope-from=3Dkbuild-all(a)lists.01.org; receiver=3D=
<UNKNOWN>=20
Received: from localhost (unknown [121.61.136.74])
by ml01.01.org (Postfix) with UTF8SMTP id AAFCE100E3F44
for <kbuild-all(a)lists.01.org>; Thu, 10 Feb 2022 02:15:00 -0800 (PST)
From: "jack" <kbuild-all(a)lists.01.org>
Date: Thu, 10 Feb 2022 18:14:58 +0800
To: kbuild-all(a)lists.01.org
Subject: =3D?UTF-8?B?d2hvbGVzYWxlIG9sZCBtb2JpbGUgcGhvbmVzIGF0IGNoZWFwIHBy=
aWNlcw=3D=3D?=3D
Reply-To: jack_helloworld(a)163.com
MIME-Version: 1.0
Importance: high
Content-Type: text/html; charset=3Dutf-8
hi,<br><p>i'm jack from shenzhen, china. professionally provide used mobi=
le phones with competitive prices to global customers, add whtasapp video=
to buy mobile phones.<br>provide second-hand mobile phones of all brands=
in the world, such as: apple, huawei, samsung, xiaomi, vivo, oppo, etc.<=
br>please contact us. (wholesale, retail, one piece also shipped)</p><p>w=
hatsapp:+86 13423994073 jack</p>
7 months, 1 week
[mtd:spi-mem-ecc 16/29] drivers/mtd/nand/ecc-mxic.c:652 mxic_ecc_finish_io_req_external() error: uninitialized symbol 'ret'.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-mem-ecc
head: b556a86810e25b9d5a56da553bc65e5f4dcbedb6
commit: f46b431b115d2ead7ccf71da53a5d1993f0acfcd [16/29] mtd: nand: mxic-ecc: Support SPI pipelined mode
config: arm64-randconfig-m031-20220209 (https://download.01.org/0day-ci/archive/20220210/202202100023.AD5wMMvp-lk...)
compiler: aarch64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
vim +/ret +652 drivers/mtd/nand/ecc-mxic.c
48e6633a9fa2400 Miquel Raynal 2021-12-16 611 static int mxic_ecc_finish_io_req_external(struct nand_device *nand,
48e6633a9fa2400 Miquel Raynal 2021-12-16 612 struct nand_page_io_req *req)
48e6633a9fa2400 Miquel Raynal 2021-12-16 613 {
48e6633a9fa2400 Miquel Raynal 2021-12-16 614 struct mxic_ecc_engine *mxic = nand_to_mxic(nand);
48e6633a9fa2400 Miquel Raynal 2021-12-16 615 struct mxic_ecc_ctx *ctx = nand_to_ecc_ctx(nand);
48e6633a9fa2400 Miquel Raynal 2021-12-16 616 int nents, step, ret;
48e6633a9fa2400 Miquel Raynal 2021-12-16 617
48e6633a9fa2400 Miquel Raynal 2021-12-16 618 if (req->mode == MTD_OPS_RAW)
48e6633a9fa2400 Miquel Raynal 2021-12-16 619 return 0;
48e6633a9fa2400 Miquel Raynal 2021-12-16 620
48e6633a9fa2400 Miquel Raynal 2021-12-16 621 if (req->type == NAND_PAGE_WRITE) {
48e6633a9fa2400 Miquel Raynal 2021-12-16 622 nand_ecc_restore_req(&ctx->req_ctx, req);
48e6633a9fa2400 Miquel Raynal 2021-12-16 623 return 0;
48e6633a9fa2400 Miquel Raynal 2021-12-16 624 }
48e6633a9fa2400 Miquel Raynal 2021-12-16 625
48e6633a9fa2400 Miquel Raynal 2021-12-16 626 /* Copy the OOB buffer and add room for the ECC engine status bytes */
48e6633a9fa2400 Miquel Raynal 2021-12-16 627 mxic_ecc_add_room_in_oobbuf(ctx, ctx->oobwithstat, ctx->req->oobbuf.in);
48e6633a9fa2400 Miquel Raynal 2021-12-16 628
48e6633a9fa2400 Miquel Raynal 2021-12-16 629 sg_set_buf(&ctx->sg[0], req->databuf.in, req->datalen);
48e6633a9fa2400 Miquel Raynal 2021-12-16 630 sg_set_buf(&ctx->sg[1], ctx->oobwithstat,
48e6633a9fa2400 Miquel Raynal 2021-12-16 631 req->ooblen + (ctx->steps * STAT_BYTES));
48e6633a9fa2400 Miquel Raynal 2021-12-16 632 nents = dma_map_sg(mxic->dev, ctx->sg, 2, DMA_BIDIRECTIONAL);
48e6633a9fa2400 Miquel Raynal 2021-12-16 633 if (!nents)
48e6633a9fa2400 Miquel Raynal 2021-12-16 634 return -EINVAL;
48e6633a9fa2400 Miquel Raynal 2021-12-16 635
48e6633a9fa2400 Miquel Raynal 2021-12-16 636 mutex_lock(&mxic->lock);
48e6633a9fa2400 Miquel Raynal 2021-12-16 637
48e6633a9fa2400 Miquel Raynal 2021-12-16 638 for (step = 0; step < ctx->steps; step++) {
48e6633a9fa2400 Miquel Raynal 2021-12-16 639 writel(sg_dma_address(&ctx->sg[0]) + (step * ctx->data_step_sz),
48e6633a9fa2400 Miquel Raynal 2021-12-16 640 mxic->regs + SDMA_MAIN_ADDR);
48e6633a9fa2400 Miquel Raynal 2021-12-16 641 writel(sg_dma_address(&ctx->sg[1]) + (step * (ctx->oob_step_sz + STAT_BYTES)),
48e6633a9fa2400 Miquel Raynal 2021-12-16 642 mxic->regs + SDMA_SPARE_ADDR);
48e6633a9fa2400 Miquel Raynal 2021-12-16 643 ret = mxic_ecc_process_data(mxic, ctx->req->type);
48e6633a9fa2400 Miquel Raynal 2021-12-16 644 if (ret)
48e6633a9fa2400 Miquel Raynal 2021-12-16 645 break;
48e6633a9fa2400 Miquel Raynal 2021-12-16 646 }
48e6633a9fa2400 Miquel Raynal 2021-12-16 647
48e6633a9fa2400 Miquel Raynal 2021-12-16 648 mutex_unlock(&mxic->lock);
48e6633a9fa2400 Miquel Raynal 2021-12-16 649
48e6633a9fa2400 Miquel Raynal 2021-12-16 650 dma_unmap_sg(mxic->dev, ctx->sg, 2, DMA_BIDIRECTIONAL);
48e6633a9fa2400 Miquel Raynal 2021-12-16 651
f46b431b115d2ea Miquel Raynal 2021-12-16 @652 if (!ret) {
Hi Miquel,
This if statement is reversed. No !
f46b431b115d2ea Miquel Raynal 2021-12-16 653 nand_ecc_restore_req(&ctx->req_ctx, req);
f46b431b115d2ea Miquel Raynal 2021-12-16 654 return ret;
f46b431b115d2ea Miquel Raynal 2021-12-16 655 }
f46b431b115d2ea Miquel Raynal 2021-12-16 656
48e6633a9fa2400 Miquel Raynal 2021-12-16 657 /* Extract the status bytes and reconstruct the buffer */
48e6633a9fa2400 Miquel Raynal 2021-12-16 658 mxic_ecc_extract_status_bytes(ctx);
48e6633a9fa2400 Miquel Raynal 2021-12-16 659 mxic_ecc_reconstruct_oobbuf(ctx, ctx->req->oobbuf.in, ctx->oobwithstat);
48e6633a9fa2400 Miquel Raynal 2021-12-16 660
48e6633a9fa2400 Miquel Raynal 2021-12-16 661 nand_ecc_restore_req(&ctx->req_ctx, req);
48e6633a9fa2400 Miquel Raynal 2021-12-16 662
48e6633a9fa2400 Miquel Raynal 2021-12-16 663 return mxic_ecc_count_biterrs(mxic, nand);
48e6633a9fa2400 Miquel Raynal 2021-12-16 664 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[android-common:android13-5.15 2/21] net/wireless/nl80211.c:5573:2: warning: Argument to kfree() is a constant address (4294966772), which is not memory allocated by malloc() [clang-analyzer-unix.Malloc]
by kernel test robot
tree: https://android.googlesource.com/kernel/common android13-5.15
head: b5660868d7d68ff418e70b6512ed7925236575c6
commit: 42c6a8abb782f2378b17b9a3657411f54764780a [2/21] UPSTREAM: nl80211: don't put struct cfg80211_ap_settings on stack
config: arm-randconfig-c002-20220130 (https://download.01.org/0day-ci/archive/20220205/202202050546.q8sMQuis-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a73e4ce6a59b01f0e37037761c1e6889d539d233)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android13-5.15
git checkout 42c6a8abb782f2378b17b9a3657411f54764780a
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <yujie.liu(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> net/wireless/nl80211.c:5573:2: warning: Argument to kfree() is a constant address (4294966772), which is not memory allocated by malloc() [clang-analyzer-unix.Malloc]
kfree(params->acl);
^ ~~~~~~~~~~~
net/wireless/nl80211.c:5510:2: note: Taking true branch
if (info->attrs[NL80211_ATTR_ACL_POLICY]) {
^
net/wireless/nl80211.c:5512:3: note: Taking true branch
if (IS_ERR(params->acl)) {
^
net/wireless/nl80211.c:5514:4: note: Control jumps to line 5573
goto out;
^
net/wireless/nl80211.c:5573:2: note: Argument to kfree() is a constant address (4294967284), which is not memory allocated by malloc()
kfree(params->acl);
^ ~~~~~~~~~~~
vim +5573 net/wireless/nl80211.c
e39e5b5e720676 Jouni Malinen 2012-09-30 5324
8860020e0be1f0 Johannes Berg 2012-02-13 5325 static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
8860020e0be1f0 Johannes Berg 2012-02-13 5326 {
8860020e0be1f0 Johannes Berg 2012-02-13 5327 struct cfg80211_registered_device *rdev = info->user_ptr[0];
8860020e0be1f0 Johannes Berg 2012-02-13 5328 struct net_device *dev = info->user_ptr[1];
8860020e0be1f0 Johannes Berg 2012-02-13 5329 struct wireless_dev *wdev = dev->ieee80211_ptr;
42c6a8abb782f2 Johannes Berg 2021-09-23 5330 struct cfg80211_ap_settings *params;
8860020e0be1f0 Johannes Berg 2012-02-13 5331 int err;
8860020e0be1f0 Johannes Berg 2012-02-13 5332
074ac8df9f93f2 Johannes Berg 2010-09-16 5333 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
4c476991062a0a Johannes Berg 2010-10-04 5334 dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
4c476991062a0a Johannes Berg 2010-10-04 5335 return -EOPNOTSUPP;
eec60b037a8755 Jouni Malinen 2009-03-20 5336
8860020e0be1f0 Johannes Berg 2012-02-13 5337 if (!rdev->ops->start_ap)
8860020e0be1f0 Johannes Berg 2012-02-13 5338 return -EOPNOTSUPP;
8860020e0be1f0 Johannes Berg 2012-02-13 5339
8860020e0be1f0 Johannes Berg 2012-02-13 5340 if (wdev->beacon_interval)
8860020e0be1f0 Johannes Berg 2012-02-13 5341 return -EALREADY;
8860020e0be1f0 Johannes Berg 2012-02-13 5342
8860020e0be1f0 Johannes Berg 2012-02-13 5343 /* these are required for START_AP */
ed1b6cc7f80f83 Johannes Berg 2007-12-19 5344 if (!info->attrs[NL80211_ATTR_BEACON_INTERVAL] ||
ed1b6cc7f80f83 Johannes Berg 2007-12-19 5345 !info->attrs[NL80211_ATTR_DTIM_PERIOD] ||
4c476991062a0a Johannes Berg 2010-10-04 5346 !info->attrs[NL80211_ATTR_BEACON_HEAD])
4c476991062a0a Johannes Berg 2010-10-04 5347 return -EINVAL;
ed1b6cc7f80f83 Johannes Berg 2007-12-19 5348
42c6a8abb782f2 Johannes Berg 2021-09-23 5349 params = kzalloc(sizeof(*params), GFP_KERNEL);
42c6a8abb782f2 Johannes Berg 2021-09-23 5350 if (!params)
42c6a8abb782f2 Johannes Berg 2021-09-23 5351 return -ENOMEM;
42c6a8abb782f2 Johannes Berg 2021-09-23 5352
42c6a8abb782f2 Johannes Berg 2021-09-23 5353 err = nl80211_parse_beacon(rdev, info->attrs, ¶ms->beacon);
8860020e0be1f0 Johannes Berg 2012-02-13 5354 if (err)
42c6a8abb782f2 Johannes Berg 2021-09-23 5355 goto out;
8860020e0be1f0 Johannes Berg 2012-02-13 5356
42c6a8abb782f2 Johannes Berg 2021-09-23 5357 params->beacon_interval =
56d1893d94bc06 Johannes Berg 2011-05-09 5358 nla_get_u32(info->attrs[NL80211_ATTR_BEACON_INTERVAL]);
42c6a8abb782f2 Johannes Berg 2021-09-23 5359 params->dtim_period =
56d1893d94bc06 Johannes Berg 2011-05-09 5360 nla_get_u32(info->attrs[NL80211_ATTR_DTIM_PERIOD]);
56d1893d94bc06 Johannes Berg 2011-05-09 5361
0c317a02ca982c Purushottam Kushwaha 2016-10-12 5362 err = cfg80211_validate_beacon_int(rdev, dev->ieee80211_ptr->iftype,
42c6a8abb782f2 Johannes Berg 2021-09-23 5363 params->beacon_interval);
56d1893d94bc06 Johannes Berg 2011-05-09 5364 if (err)
42c6a8abb782f2 Johannes Berg 2021-09-23 5365 goto out;
56d1893d94bc06 Johannes Berg 2011-05-09 5366
32e9de846be885 Jouni Malinen 2011-08-10 5367 /*
8860020e0be1f0 Johannes Berg 2012-02-13 5368 * In theory, some of these attributes should be required here
8860020e0be1f0 Johannes Berg 2012-02-13 5369 * but since they were not used when the command was originally
8860020e0be1f0 Johannes Berg 2012-02-13 5370 * added, keep them optional for old user space programs to let
8860020e0be1f0 Johannes Berg 2012-02-13 5371 * them continue to work with drivers that do not need the
8860020e0be1f0 Johannes Berg 2012-02-13 5372 * additional information -- drivers must check!
32e9de846be885 Jouni Malinen 2011-08-10 5373 */
32e9de846be885 Jouni Malinen 2011-08-10 5374 if (info->attrs[NL80211_ATTR_SSID]) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5375 params->ssid = nla_data(info->attrs[NL80211_ATTR_SSID]);
42c6a8abb782f2 Johannes Berg 2021-09-23 5376 params->ssid_len =
32e9de846be885 Jouni Malinen 2011-08-10 5377 nla_len(info->attrs[NL80211_ATTR_SSID]);
42c6a8abb782f2 Johannes Berg 2021-09-23 5378 if (params->ssid_len == 0) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5379 err = -EINVAL;
42c6a8abb782f2 Johannes Berg 2021-09-23 5380 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5381 }
32e9de846be885 Jouni Malinen 2011-08-10 5382 }
32e9de846be885 Jouni Malinen 2011-08-10 5383
ab0d76f6823cc3 Johannes Berg 2018-10-02 5384 if (info->attrs[NL80211_ATTR_HIDDEN_SSID])
42c6a8abb782f2 Johannes Berg 2021-09-23 5385 params->hidden_ssid = nla_get_u32(
32e9de846be885 Jouni Malinen 2011-08-10 5386 info->attrs[NL80211_ATTR_HIDDEN_SSID]);
32e9de846be885 Jouni Malinen 2011-08-10 5387
42c6a8abb782f2 Johannes Berg 2021-09-23 5388 params->privacy = !!info->attrs[NL80211_ATTR_PRIVACY];
5fb628e9105eef Jouni Malinen 2011-08-10 5389
5fb628e9105eef Jouni Malinen 2011-08-10 5390 if (info->attrs[NL80211_ATTR_AUTH_TYPE]) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5391 params->auth_type = nla_get_u32(
5fb628e9105eef Jouni Malinen 2011-08-10 5392 info->attrs[NL80211_ATTR_AUTH_TYPE]);
42c6a8abb782f2 Johannes Berg 2021-09-23 5393 if (!nl80211_valid_auth_type(rdev, params->auth_type,
42c6a8abb782f2 Johannes Berg 2021-09-23 5394 NL80211_CMD_START_AP)) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5395 err = -EINVAL;
42c6a8abb782f2 Johannes Berg 2021-09-23 5396 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5397 }
5fb628e9105eef Jouni Malinen 2011-08-10 5398 } else
42c6a8abb782f2 Johannes Berg 2021-09-23 5399 params->auth_type = NL80211_AUTHTYPE_AUTOMATIC;
5fb628e9105eef Jouni Malinen 2011-08-10 5400
42c6a8abb782f2 Johannes Berg 2021-09-23 5401 err = nl80211_crypto_settings(rdev, info, ¶ms->crypto,
5fb628e9105eef Jouni Malinen 2011-08-10 5402 NL80211_MAX_NR_CIPHER_SUITES);
5fb628e9105eef Jouni Malinen 2011-08-10 5403 if (err)
42c6a8abb782f2 Johannes Berg 2021-09-23 5404 goto out;
5fb628e9105eef Jouni Malinen 2011-08-10 5405
1b658f118b11de Vasanthakumar Thiagarajan 2012-03-02 5406 if (info->attrs[NL80211_ATTR_INACTIVITY_TIMEOUT]) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5407 if (!(rdev->wiphy.features & NL80211_FEATURE_INACTIVITY_TIMER)) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5408 err = -EOPNOTSUPP;
42c6a8abb782f2 Johannes Berg 2021-09-23 5409 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5410 }
42c6a8abb782f2 Johannes Berg 2021-09-23 5411 params->inactivity_timeout = nla_get_u16(
1b658f118b11de Vasanthakumar Thiagarajan 2012-03-02 5412 info->attrs[NL80211_ATTR_INACTIVITY_TIMEOUT]);
1b658f118b11de Vasanthakumar Thiagarajan 2012-03-02 5413 }
1b658f118b11de Vasanthakumar Thiagarajan 2012-03-02 5414
53cabad70ecf0c Johannes Berg 2012-11-14 5415 if (info->attrs[NL80211_ATTR_P2P_CTWINDOW]) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5416 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5417 err = -EINVAL;
42c6a8abb782f2 Johannes Berg 2021-09-23 5418 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5419 }
42c6a8abb782f2 Johannes Berg 2021-09-23 5420 params->p2p_ctwindow =
53cabad70ecf0c Johannes Berg 2012-11-14 5421 nla_get_u8(info->attrs[NL80211_ATTR_P2P_CTWINDOW]);
42c6a8abb782f2 Johannes Berg 2021-09-23 5422 if (params->p2p_ctwindow != 0 &&
42c6a8abb782f2 Johannes Berg 2021-09-23 5423 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_CTWIN)) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5424 err = -EINVAL;
42c6a8abb782f2 Johannes Berg 2021-09-23 5425 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5426 }
53cabad70ecf0c Johannes Berg 2012-11-14 5427 }
53cabad70ecf0c Johannes Berg 2012-11-14 5428
53cabad70ecf0c Johannes Berg 2012-11-14 5429 if (info->attrs[NL80211_ATTR_P2P_OPPPS]) {
53cabad70ecf0c Johannes Berg 2012-11-14 5430 u8 tmp;
53cabad70ecf0c Johannes Berg 2012-11-14 5431
42c6a8abb782f2 Johannes Berg 2021-09-23 5432 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5433 err = -EINVAL;
42c6a8abb782f2 Johannes Berg 2021-09-23 5434 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5435 }
53cabad70ecf0c Johannes Berg 2012-11-14 5436 tmp = nla_get_u8(info->attrs[NL80211_ATTR_P2P_OPPPS]);
42c6a8abb782f2 Johannes Berg 2021-09-23 5437 params->p2p_opp_ps = tmp;
42c6a8abb782f2 Johannes Berg 2021-09-23 5438 if (params->p2p_opp_ps != 0 &&
42c6a8abb782f2 Johannes Berg 2021-09-23 5439 !(rdev->wiphy.features & NL80211_FEATURE_P2P_GO_OPPPS)) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5440 err = -EINVAL;
42c6a8abb782f2 Johannes Berg 2021-09-23 5441 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5442 }
53cabad70ecf0c Johannes Berg 2012-11-14 5443 }
53cabad70ecf0c Johannes Berg 2012-11-14 5444
aa430da41019c1 Johannes Berg 2012-05-16 5445 if (info->attrs[NL80211_ATTR_WIPHY_FREQ]) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5446 err = nl80211_parse_chandef(rdev, info, ¶ms->chandef);
683b6d3b31a519 Johannes Berg 2012-11-08 5447 if (err)
42c6a8abb782f2 Johannes Berg 2021-09-23 5448 goto out;
683b6d3b31a519 Johannes Berg 2012-11-08 5449 } else if (wdev->preset_chandef.chan) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5450 params->chandef = wdev->preset_chandef;
42c6a8abb782f2 Johannes Berg 2021-09-23 5451 } else if (!nl80211_get_ap_channel(rdev, params)) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5452 err = -EINVAL;
42c6a8abb782f2 Johannes Berg 2021-09-23 5453 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5454 }
aa430da41019c1 Johannes Berg 2012-05-16 5455
42c6a8abb782f2 Johannes Berg 2021-09-23 5456 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, ¶ms->chandef,
42c6a8abb782f2 Johannes Berg 2021-09-23 5457 wdev->iftype)) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5458 err = -EINVAL;
42c6a8abb782f2 Johannes Berg 2021-09-23 5459 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5460 }
aa430da41019c1 Johannes Berg 2012-05-16 5461
a7c7fbff6a408d Purushottam Kushwaha 2016-09-14 5462 if (info->attrs[NL80211_ATTR_TX_RATES]) {
9a5f6488623730 Tamizh Chelvam 2020-05-13 5463 err = nl80211_parse_tx_bitrate_mask(info, info->attrs,
9a5f6488623730 Tamizh Chelvam 2020-05-13 5464 NL80211_ATTR_TX_RATES,
42c6a8abb782f2 Johannes Berg 2021-09-23 5465 ¶ms->beacon_rate,
857b34c4fb104c Rajkumar Manoharan 2020-10-16 5466 dev, false);
a7c7fbff6a408d Purushottam Kushwaha 2016-09-14 5467 if (err)
42c6a8abb782f2 Johannes Berg 2021-09-23 5468 goto out;
a7c7fbff6a408d Purushottam Kushwaha 2016-09-14 5469
42c6a8abb782f2 Johannes Berg 2021-09-23 5470 err = validate_beacon_tx_rate(rdev, params->chandef.chan->band,
42c6a8abb782f2 Johannes Berg 2021-09-23 5471 ¶ms->beacon_rate);
a7c7fbff6a408d Purushottam Kushwaha 2016-09-14 5472 if (err)
42c6a8abb782f2 Johannes Berg 2021-09-23 5473 goto out;
a7c7fbff6a408d Purushottam Kushwaha 2016-09-14 5474 }
a7c7fbff6a408d Purushottam Kushwaha 2016-09-14 5475
18998c381b19bf Eliad Peller 2014-09-10 5476 if (info->attrs[NL80211_ATTR_SMPS_MODE]) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5477 params->smps_mode =
18998c381b19bf Eliad Peller 2014-09-10 5478 nla_get_u8(info->attrs[NL80211_ATTR_SMPS_MODE]);
42c6a8abb782f2 Johannes Berg 2021-09-23 5479 switch (params->smps_mode) {
18998c381b19bf Eliad Peller 2014-09-10 5480 case NL80211_SMPS_OFF:
18998c381b19bf Eliad Peller 2014-09-10 5481 break;
18998c381b19bf Eliad Peller 2014-09-10 5482 case NL80211_SMPS_STATIC:
18998c381b19bf Eliad Peller 2014-09-10 5483 if (!(rdev->wiphy.features &
42c6a8abb782f2 Johannes Berg 2021-09-23 5484 NL80211_FEATURE_STATIC_SMPS)) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5485 err = -EINVAL;
42c6a8abb782f2 Johannes Berg 2021-09-23 5486 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5487 }
18998c381b19bf Eliad Peller 2014-09-10 5488 break;
18998c381b19bf Eliad Peller 2014-09-10 5489 case NL80211_SMPS_DYNAMIC:
18998c381b19bf Eliad Peller 2014-09-10 5490 if (!(rdev->wiphy.features &
42c6a8abb782f2 Johannes Berg 2021-09-23 5491 NL80211_FEATURE_DYNAMIC_SMPS)) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5492 err = -EINVAL;
42c6a8abb782f2 Johannes Berg 2021-09-23 5493 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5494 }
18998c381b19bf Eliad Peller 2014-09-10 5495 break;
18998c381b19bf Eliad Peller 2014-09-10 5496 default:
42c6a8abb782f2 Johannes Berg 2021-09-23 5497 err = -EINVAL;
42c6a8abb782f2 Johannes Berg 2021-09-23 5498 goto out;
18998c381b19bf Eliad Peller 2014-09-10 5499 }
18998c381b19bf Eliad Peller 2014-09-10 5500 } else {
42c6a8abb782f2 Johannes Berg 2021-09-23 5501 params->smps_mode = NL80211_SMPS_OFF;
18998c381b19bf Eliad Peller 2014-09-10 5502 }
18998c381b19bf Eliad Peller 2014-09-10 5503
42c6a8abb782f2 Johannes Berg 2021-09-23 5504 params->pbss = nla_get_flag(info->attrs[NL80211_ATTR_PBSS]);
42c6a8abb782f2 Johannes Berg 2021-09-23 5505 if (params->pbss && !rdev->wiphy.bands[NL80211_BAND_60GHZ]) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5506 err = -EOPNOTSUPP;
42c6a8abb782f2 Johannes Berg 2021-09-23 5507 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5508 }
6e8ef842223b90 Purushottam Kushwaha 2016-07-05 5509
4baf6bea37247e Ola Olsson 2015-10-29 5510 if (info->attrs[NL80211_ATTR_ACL_POLICY]) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5511 params->acl = parse_acl_data(&rdev->wiphy, info);
42c6a8abb782f2 Johannes Berg 2021-09-23 5512 if (IS_ERR(params->acl)) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5513 err = PTR_ERR(params->acl);
42c6a8abb782f2 Johannes Berg 2021-09-23 @5514 goto out;
42c6a8abb782f2 Johannes Berg 2021-09-23 5515 }
4baf6bea37247e Ola Olsson 2015-10-29 5516 }
4baf6bea37247e Ola Olsson 2015-10-29 5517
42c6a8abb782f2 Johannes Berg 2021-09-23 5518 params->twt_responder =
a0de1ca383c77a John Crispin 2019-05-28 5519 nla_get_flag(info->attrs[NL80211_ATTR_TWT_RESPONDER]);
a0de1ca383c77a John Crispin 2019-05-28 5520
796e90f42b7e52 John Crispin 2019-07-30 5521 if (info->attrs[NL80211_ATTR_HE_OBSS_PD]) {
796e90f42b7e52 John Crispin 2019-07-30 5522 err = nl80211_parse_he_obss_pd(
796e90f42b7e52 John Crispin 2019-07-30 5523 info->attrs[NL80211_ATTR_HE_OBSS_PD],
42c6a8abb782f2 Johannes Berg 2021-09-23 5524 ¶ms->he_obss_pd);
bc7a39b4272b96 Luca Coelho 2020-06-26 5525 if (err)
9951ebfcdf2b97 Johannes Berg 2020-02-21 5526 goto out;
796e90f42b7e52 John Crispin 2019-07-30 5527 }
796e90f42b7e52 John Crispin 2019-07-30 5528
5c5e52d1bb9625 John Crispin 2019-12-17 5529 if (info->attrs[NL80211_ATTR_HE_BSS_COLOR]) {
5c5e52d1bb9625 John Crispin 2019-12-17 5530 err = nl80211_parse_he_bss_color(
5c5e52d1bb9625 John Crispin 2019-12-17 5531 info->attrs[NL80211_ATTR_HE_BSS_COLOR],
42c6a8abb782f2 Johannes Berg 2021-09-23 5532 ¶ms->he_bss_color);
5c5e52d1bb9625 John Crispin 2019-12-17 5533 if (err)
60a0121f8fa64b Luca Coelho 2020-06-26 5534 goto out;
5c5e52d1bb9625 John Crispin 2019-12-17 5535 }
5c5e52d1bb9625 John Crispin 2019-12-17 5536
291c49ded2fda1 Aloka Dixit 2020-09-11 5537 if (info->attrs[NL80211_ATTR_FILS_DISCOVERY]) {
291c49ded2fda1 Aloka Dixit 2020-09-11 5538 err = nl80211_parse_fils_discovery(rdev,
291c49ded2fda1 Aloka Dixit 2020-09-11 5539 info->attrs[NL80211_ATTR_FILS_DISCOVERY],
42c6a8abb782f2 Johannes Berg 2021-09-23 5540 params);
291c49ded2fda1 Aloka Dixit 2020-09-11 5541 if (err)
291c49ded2fda1 Aloka Dixit 2020-09-11 5542 goto out;
291c49ded2fda1 Aloka Dixit 2020-09-11 5543 }
291c49ded2fda1 Aloka Dixit 2020-09-11 5544
7443dcd1f1718a Aloka Dixit 2020-09-11 5545 if (info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP]) {
7443dcd1f1718a Aloka Dixit 2020-09-11 5546 err = nl80211_parse_unsol_bcast_probe_resp(
7443dcd1f1718a Aloka Dixit 2020-09-11 5547 rdev, info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP],
42c6a8abb782f2 Johannes Berg 2021-09-23 5548 params);
7443dcd1f1718a Aloka Dixit 2020-09-11 5549 if (err)
abaf94ecc9c356 Johannes Berg 2021-04-08 5550 goto out;
7443dcd1f1718a Aloka Dixit 2020-09-11 5551 }
7443dcd1f1718a Aloka Dixit 2020-09-11 5552
42c6a8abb782f2 Johannes Berg 2021-09-23 5553 nl80211_calculate_ap_params(params);
66cd794e3c30b8 Johannes Berg 2017-02-07 5554
fe4943702c850f Srinivas Dasari 2019-01-23 5555 if (info->attrs[NL80211_ATTR_EXTERNAL_AUTH_SUPPORT])
42c6a8abb782f2 Johannes Berg 2021-09-23 5556 params->flags |= AP_SETTINGS_EXTERNAL_AUTH_SUPPORT;
fe4943702c850f Srinivas Dasari 2019-01-23 5557
c56589ed1d25ae Simon Wunderlich 2013-11-21 5558 wdev_lock(wdev);
42c6a8abb782f2 Johannes Berg 2021-09-23 5559 err = rdev_start_ap(rdev, dev, params);
46c1dd0c7fac54 Felix Fietkau 2012-06-19 5560 if (!err) {
42c6a8abb782f2 Johannes Berg 2021-09-23 5561 wdev->preset_chandef = params->chandef;
42c6a8abb782f2 Johannes Berg 2021-09-23 5562 wdev->beacon_interval = params->beacon_interval;
42c6a8abb782f2 Johannes Berg 2021-09-23 5563 wdev->chandef = params->chandef;
42c6a8abb782f2 Johannes Berg 2021-09-23 5564 wdev->ssid_len = params->ssid_len;
42c6a8abb782f2 Johannes Berg 2021-09-23 5565 memcpy(wdev->ssid, params->ssid, wdev->ssid_len);
466a306142c002 Denis Kenzior 2018-03-26 5566
466a306142c002 Denis Kenzior 2018-03-26 5567 if (info->attrs[NL80211_ATTR_SOCKET_OWNER])
466a306142c002 Denis Kenzior 2018-03-26 5568 wdev->conn_owner_nlportid = info->snd_portid;
46c1dd0c7fac54 Felix Fietkau 2012-06-19 5569 }
c56589ed1d25ae Simon Wunderlich 2013-11-21 5570 wdev_unlock(wdev);
77765eaf5cfb6b Vasanthakumar Thiagarajan 2013-01-18 5571
9951ebfcdf2b97 Johannes Berg 2020-02-21 5572 out:
42c6a8abb782f2 Johannes Berg 2021-09-23 @5573 kfree(params->acl);
42c6a8abb782f2 Johannes Berg 2021-09-23 5574 kfree(params);
77765eaf5cfb6b Vasanthakumar Thiagarajan 2013-01-18 5575
8860020e0be1f0 Johannes Berg 2012-02-13 5576 return err;
ed1b6cc7f80f83 Johannes Berg 2007-12-19 5577 }
ed1b6cc7f80f83 Johannes Berg 2007-12-19 5578
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH v2 07/10] nvmet: add copy command support for bdev and file ns
by kernel test robot
Hi Nitesh,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on linus/master v5.17-rc3 next-20220209]
[cannot apply to device-mapper-dm/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Nitesh-Shetty/block-make-bio_map...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: arm64-randconfig-s032-20220207 (https://download.01.org/0day-ci/archive/20220210/202202101647.VtWTgalm-lk...)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/6bb6ea64499e1ac27975e79bb2eee89f0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Nitesh-Shetty/block-make-bio_map_kern-non-static/20220207-231407
git checkout 6bb6ea64499e1ac27975e79bb2eee89f07861893
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/nvme/target/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/nvme/target/io-cmd-bdev.c:52:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] mcl @@ got restricted __le64 [usertype] @@
drivers/nvme/target/io-cmd-bdev.c:52:25: sparse: expected restricted __le32 [usertype] mcl
drivers/nvme/target/io-cmd-bdev.c:52:25: sparse: got restricted __le64 [usertype]
>> drivers/nvme/target/io-cmd-bdev.c:53:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] mssrl @@ got restricted __le32 [usertype] @@
drivers/nvme/target/io-cmd-bdev.c:53:27: sparse: expected restricted __le16 [usertype] mssrl
drivers/nvme/target/io-cmd-bdev.c:53:27: sparse: got restricted __le32 [usertype]
>> drivers/nvme/target/io-cmd-bdev.c:55:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned char [usertype] msrc @@ got restricted __le16 @@
drivers/nvme/target/io-cmd-bdev.c:55:26: sparse: expected unsigned char [usertype] msrc
drivers/nvme/target/io-cmd-bdev.c:55:26: sparse: got restricted __le16
drivers/nvme/target/io-cmd-bdev.c:58:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned char [usertype] msrc @@ got restricted __le16 @@
drivers/nvme/target/io-cmd-bdev.c:58:34: sparse: expected unsigned char [usertype] msrc
drivers/nvme/target/io-cmd-bdev.c:58:34: sparse: got restricted __le16
drivers/nvme/target/io-cmd-bdev.c:59:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] mssrl @@ got restricted __le32 [usertype] @@
drivers/nvme/target/io-cmd-bdev.c:59:35: sparse: expected restricted __le16 [usertype] mssrl
drivers/nvme/target/io-cmd-bdev.c:59:35: sparse: got restricted __le32 [usertype]
>> drivers/nvme/target/io-cmd-bdev.c:61:35: sparse: sparse: cast to restricted __le32
>> drivers/nvme/target/io-cmd-bdev.c:61:35: sparse: sparse: cast from restricted __le16
drivers/nvme/target/io-cmd-bdev.c:61:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] mcl @@ got restricted __le64 [usertype] @@
drivers/nvme/target/io-cmd-bdev.c:61:33: sparse: expected restricted __le32 [usertype] mcl
drivers/nvme/target/io-cmd-bdev.c:61:33: sparse: got restricted __le64 [usertype]
drivers/nvme/target/io-cmd-bdev.c:65:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned char [usertype] msrc @@ got restricted __le16 @@
drivers/nvme/target/io-cmd-bdev.c:65:34: sparse: expected unsigned char [usertype] msrc
drivers/nvme/target/io-cmd-bdev.c:65:34: sparse: got restricted __le16
drivers/nvme/target/io-cmd-bdev.c:66:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] mssrl @@ got restricted __le32 [usertype] @@
drivers/nvme/target/io-cmd-bdev.c:66:35: sparse: expected restricted __le16 [usertype] mssrl
drivers/nvme/target/io-cmd-bdev.c:66:35: sparse: got restricted __le32 [usertype]
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast to restricted __le32
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast from restricted __le16
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast to restricted __le32
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast from restricted __le16
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast to restricted __le32
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast from restricted __le16
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast to restricted __le32
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast from restricted __le16
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast to restricted __le32
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast from restricted __le16
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast to restricted __le32
drivers/nvme/target/io-cmd-bdev.c:68:35: sparse: sparse: cast from restricted __le16
drivers/nvme/target/io-cmd-bdev.c:68:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] mcl @@ got restricted __le64 [usertype] @@
drivers/nvme/target/io-cmd-bdev.c:68:33: sparse: expected restricted __le32 [usertype] mcl
drivers/nvme/target/io-cmd-bdev.c:68:33: sparse: got restricted __le64 [usertype]
--
>> drivers/nvme/target/admin-cmd.c:533:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned char [usertype] msrc @@ got restricted __le16 @@
drivers/nvme/target/admin-cmd.c:533:26: sparse: expected unsigned char [usertype] msrc
drivers/nvme/target/admin-cmd.c:533:26: sparse: got restricted __le16
>> drivers/nvme/target/admin-cmd.c:534:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] mssrl @@ got restricted __le32 [usertype] @@
drivers/nvme/target/admin-cmd.c:534:27: sparse: expected restricted __le16 [usertype] mssrl
drivers/nvme/target/admin-cmd.c:534:27: sparse: got restricted __le32 [usertype]
>> drivers/nvme/target/admin-cmd.c:535:27: sparse: sparse: cast to restricted __le32
>> drivers/nvme/target/admin-cmd.c:535:27: sparse: sparse: cast from restricted __le16
>> drivers/nvme/target/admin-cmd.c:535:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] mcl @@ got restricted __le64 [usertype] @@
drivers/nvme/target/admin-cmd.c:535:25: sparse: expected restricted __le32 [usertype] mcl
drivers/nvme/target/admin-cmd.c:535:25: sparse: got restricted __le64 [usertype]
vim +52 drivers/nvme/target/io-cmd-bdev.c
11
12 void nvmet_bdev_set_limits(struct block_device *bdev, struct nvme_id_ns *id)
13 {
14 const struct queue_limits *ql = &bdev_get_queue(bdev)->limits;
15 /* Number of logical blocks per physical block. */
16 const u32 lpp = ql->physical_block_size / ql->logical_block_size;
17 /* Logical blocks per physical block, 0's based. */
18 const __le16 lpp0b = to0based(lpp);
19
20 /*
21 * For NVMe 1.2 and later, bit 1 indicates that the fields NAWUN,
22 * NAWUPF, and NACWU are defined for this namespace and should be
23 * used by the host for this namespace instead of the AWUN, AWUPF,
24 * and ACWU fields in the Identify Controller data structure. If
25 * any of these fields are zero that means that the corresponding
26 * field from the identify controller data structure should be used.
27 */
28 id->nsfeat |= 1 << 1;
29 id->nawun = lpp0b;
30 id->nawupf = lpp0b;
31 id->nacwu = lpp0b;
32
33 /*
34 * Bit 4 indicates that the fields NPWG, NPWA, NPDG, NPDA, and
35 * NOWS are defined for this namespace and should be used by
36 * the host for I/O optimization.
37 */
38 id->nsfeat |= 1 << 4;
39 /* NPWG = Namespace Preferred Write Granularity. 0's based */
40 id->npwg = lpp0b;
41 /* NPWA = Namespace Preferred Write Alignment. 0's based */
42 id->npwa = id->npwg;
43 /* NPDG = Namespace Preferred Deallocate Granularity. 0's based */
44 id->npdg = to0based(ql->discard_granularity / ql->logical_block_size);
45 /* NPDG = Namespace Preferred Deallocate Alignment */
46 id->npda = id->npdg;
47 /* NOWS = Namespace Optimal Write Size */
48 id->nows = to0based(ql->io_opt / ql->logical_block_size);
49
50 /*Copy limits*/
51 if (ql->max_copy_sectors) {
> 52 id->mcl = cpu_to_le64((ql->max_copy_sectors << 9) / ql->logical_block_size);
> 53 id->mssrl = cpu_to_le32((ql->max_copy_range_sectors << 9) /
54 ql->logical_block_size);
> 55 id->msrc = to0based(ql->max_copy_nr_ranges);
56 } else {
57 if (ql->zoned == BLK_ZONED_NONE) {
58 id->msrc = to0based(BIO_MAX_VECS);
59 id->mssrl = cpu_to_le32(
60 (BIO_MAX_VECS << PAGE_SHIFT) / ql->logical_block_size);
> 61 id->mcl = cpu_to_le64(le32_to_cpu(id->mssrl) * BIO_MAX_VECS);
62 #ifdef CONFIG_BLK_DEV_ZONED
63 } else {
64 /* TODO: get right values for zoned device */
65 id->msrc = to0based(BIO_MAX_VECS);
66 id->mssrl = cpu_to_le32(min((BIO_MAX_VECS << PAGE_SHIFT),
67 ql->chunk_sectors) / ql->logical_block_size);
68 id->mcl = cpu_to_le64(min(le32_to_cpu(id->mssrl) * BIO_MAX_VECS,
69 ql->chunk_sectors));
70 #endif
71 }
72 }
73 }
74
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[axboe-block:for-5.18/io_uring 2/5] fs/io_uring.c:9406:9: warning: Uninitialized variable: ret [uninitvar]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.18/io_uring
head: 971d72eb476604fc91a8e82f0421e6f599f9c300
commit: b77e315a96445e5f19a83546c73d2abbcedfa5db [2/5] io_uring: avoid ring quiesce while registering/unregistering eventfd
compiler: riscv64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <yujie.liu(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not be real problems)
>> fs/io_uring.c:9406:9: warning: Uninitialized variable: ret [uninitvar]
return ret;
^
vim +9406 fs/io_uring.c
634d00df5e1cfc Pavel Begunkov 2021-04-25 9379
9b402849e80c85 Jens Axboe 2019-04-11 9380 static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg)
9b402849e80c85 Jens Axboe 2019-04-11 9381 {
b77e315a96445e Usama Arif 2022-02-04 9382 struct io_ev_fd *ev_fd;
9b402849e80c85 Jens Axboe 2019-04-11 9383 __s32 __user *fds = arg;
b77e315a96445e Usama Arif 2022-02-04 9384 int fd, ret;
9b402849e80c85 Jens Axboe 2019-04-11 9385
b77e315a96445e Usama Arif 2022-02-04 9386 ev_fd = rcu_dereference_protected(ctx->io_ev_fd,
b77e315a96445e Usama Arif 2022-02-04 9387 lockdep_is_held(&ctx->uring_lock));
b77e315a96445e Usama Arif 2022-02-04 9388 if (ev_fd)
9b402849e80c85 Jens Axboe 2019-04-11 9389 return -EBUSY;
9b402849e80c85 Jens Axboe 2019-04-11 9390
9b402849e80c85 Jens Axboe 2019-04-11 9391 if (copy_from_user(&fd, fds, sizeof(*fds)))
9b402849e80c85 Jens Axboe 2019-04-11 9392 return -EFAULT;
9b402849e80c85 Jens Axboe 2019-04-11 9393
b77e315a96445e Usama Arif 2022-02-04 9394 ev_fd = kmalloc(sizeof(*ev_fd), GFP_KERNEL);
b77e315a96445e Usama Arif 2022-02-04 9395 if (!ev_fd)
b77e315a96445e Usama Arif 2022-02-04 9396 return -ENOMEM;
fe7e3257502991 Pavel Begunkov 2021-06-24 9397
b77e315a96445e Usama Arif 2022-02-04 9398 ev_fd->cq_ev_fd = eventfd_ctx_fdget(fd);
b77e315a96445e Usama Arif 2022-02-04 9399 if (IS_ERR(ev_fd->cq_ev_fd)) {
b77e315a96445e Usama Arif 2022-02-04 9400 ret = PTR_ERR(ev_fd->cq_ev_fd);
b77e315a96445e Usama Arif 2022-02-04 9401 kfree(ev_fd);
9b402849e80c85 Jens Axboe 2019-04-11 9402 return ret;
9b402849e80c85 Jens Axboe 2019-04-11 9403 }
9b402849e80c85 Jens Axboe 2019-04-11 9404
b77e315a96445e Usama Arif 2022-02-04 9405 rcu_assign_pointer(ctx->io_ev_fd, ev_fd);
b77e315a96445e Usama Arif 2022-02-04 @9406 return ret;
b77e315a96445e Usama Arif 2022-02-04 9407 }
b77e315a96445e Usama Arif 2022-02-04 9408
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week