From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH 08/12] usb: yurex: Replace snprintf() with the safer scnprintf() variant
Date: Sun, 17 Dec 2023 02:16:08 +0800 [thread overview]
Message-ID: <202312170252.3udgrIcP-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20231213164246.1021885-9-lee@kernel.org>
References: <20231213164246.1021885-9-lee@kernel.org>
TO: Lee Jones <lee@kernel.org>
Hi Lee,
kernel test robot noticed the following build warnings:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus lee-leds/for-leds-next char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.7-rc5 next-20231215]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Lee-Jones/usb-gadget-configfs-Replace-snprintf-with-the-safer-scnprintf-variant/20231214-004543
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20231213164246.1021885-9-lee%40kernel.org
patch subject: [PATCH 08/12] usb: yurex: Replace snprintf() with the safer scnprintf() variant
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: riscv-randconfig-r081-20231216 (https://download.01.org/0day-ci/archive/20231217/202312170252.3udgrIcP-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202312170252.3udgrIcP-lkp@intel.com/
smatch warnings:
drivers/usb/misc/yurex.c:425 yurex_read() warn: inconsistent returns '&dev->io_mutex'.
vim +425 drivers/usb/misc/yurex.c
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 400
1cc373c654acde Sudip Mukherjee 2014-10-10 401 static ssize_t yurex_read(struct file *file, char __user *buffer, size_t count,
1cc373c654acde Sudip Mukherjee 2014-10-10 402 loff_t *ppos)
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 403 {
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 404 struct usb_yurex *dev;
f1e255d60ae66a Jann Horn 2018-07-06 405 int len = 0;
d9c494521b9f1e Lee Jones 2023-12-13 406 char in_buffer[MAX_S64_STRLEN];
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 407 unsigned long flags;
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 408
113ad911ad4a1c Arjun Sreedharan 2014-08-19 409 dev = file->private_data;
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 410
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 411 mutex_lock(&dev->io_mutex);
aafb00a977cf7d Johan Hovold 2019-10-09 412 if (dev->disconnected) { /* already disconnected */
f1e255d60ae66a Jann Horn 2018-07-06 413 mutex_unlock(&dev->io_mutex);
f1e255d60ae66a Jann Horn 2018-07-06 414 return -ENODEV;
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 415 }
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 416
d9c494521b9f1e Lee Jones 2023-12-13 417 if (WARN_ON_ONCE(dev->bbu > S64_MAX || dev->bbu < S64_MIN))
d9c494521b9f1e Lee Jones 2023-12-13 418 return -EIO;
d9c494521b9f1e Lee Jones 2023-12-13 419
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 420 spin_lock_irqsave(&dev->lock, flags);
d9c494521b9f1e Lee Jones 2023-12-13 421 scnprintf(in_buffer, MAX_S64_STRLEN, "%lld\n", dev->bbu);
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 422 spin_unlock_irqrestore(&dev->lock, flags);
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 423 mutex_unlock(&dev->io_mutex);
f1e255d60ae66a Jann Horn 2018-07-06 424
f1e255d60ae66a Jann Horn 2018-07-06 @425 return simple_read_from_buffer(buffer, count, ppos, in_buffer, len);
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 426 }
6bc235a2e24a5e Tomoki Sekiyama 2010-09-29 427
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-12-16 18:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-16 18:16 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-02 14:22 [PATCH 08/12] usb: yurex: Replace snprintf() with the safer scnprintf() variant Dan Carpenter
2023-12-13 16:42 [PATCH 00/12] usb: Replace {v}snprintf() variants with safer alternatives Lee Jones
2023-12-13 16:42 ` [PATCH 08/12] usb: yurex: Replace snprintf() with the safer scnprintf() variant Lee Jones
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=202312170252.3udgrIcP-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.