All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [net-next 09/17] can: length: can_fd_len2dlc(): simplify length calculcation
Date: Thu, 14 Jan 2021 13:34:28 +0800	[thread overview]
Message-ID: <202101141319.WlSBTNMM-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1733 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210113211410.917108-10-mkl@pengutronix.de>
References: <20210113211410.917108-10-mkl@pengutronix.de>
TO: "Marc Kleine-Budde" <mkl@pengutronix.de>

Hi Marc,

I love your patch! Perhaps something to improve:

[auto build test WARNING on f50e2f9f791647aa4e5b19d0064f5cabf630bf6e]

url:    https://github.com/0day-ci/linux/commits/Marc-Kleine-Budde/MAINTAINERS-adjust-entry-to-tcan4x5x-file-split/20210114-102248
base:    f50e2f9f791647aa4e5b19d0064f5cabf630bf6e
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
config: i386-randconfig-m021-20210114 (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>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/net/can/dev/length.c:38 can_fd_len2dlc() error: buffer overflow 'len2dlc' 49 <= 49

vim +/len2dlc +38 drivers/net/can/dev/length.c

d4b90befe4bfafa1 Marc Kleine-Budde 2021-01-13  31  
d4b90befe4bfafa1 Marc Kleine-Budde 2021-01-13  32  /* map the sanitized data length to an appropriate data length code */
d4b90befe4bfafa1 Marc Kleine-Budde 2021-01-13  33  u8 can_fd_len2dlc(u8 len)
d4b90befe4bfafa1 Marc Kleine-Budde 2021-01-13  34  {
6ae761ad6c0557f0 Marc Kleine-Budde 2021-01-13  35  	if (len > ARRAY_SIZE(len2dlc))
6ae761ad6c0557f0 Marc Kleine-Budde 2021-01-13  36  		return CANFD_MAX_DLC;
d4b90befe4bfafa1 Marc Kleine-Budde 2021-01-13  37  
d4b90befe4bfafa1 Marc Kleine-Budde 2021-01-13 @38  	return len2dlc[len];

---
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: 32926 bytes --]

             reply	other threads:[~2021-01-14  5:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14  5:34 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-14  7:56 pull-request: can-next 2021-01-14 Marc Kleine-Budde
2021-01-14  7:56 ` [net-next 09/17] can: length: can_fd_len2dlc(): simplify length calculcation Marc Kleine-Budde
2021-01-13 21:13 pull-request: can-next 2021-01-13 Marc Kleine-Budde
2021-01-13 21:14 ` [net-next 09/17] can: length: can_fd_len2dlc(): simplify length calculcation Marc Kleine-Budde
2021-01-14  1:59   ` Vincent MAILHOL
2021-01-14  7:34     ` Marc Kleine-Budde
2021-01-14  8:23     ` Oliver Hartkopp
2021-01-14  9:16       ` Vincent MAILHOL
2021-01-14 17:03         ` Oliver Hartkopp
2021-01-15  1:57           ` Vincent MAILHOL
2021-01-15 12:38             ` Oliver Hartkopp
2021-01-15 13:20               ` Vincent MAILHOL
2021-01-15 13:51                 ` Marc Kleine-Budde
2021-01-15 14:18                   ` Vincent MAILHOL
2021-01-15 14:50                     ` Marc Kleine-Budde
2021-01-16 10:23                       ` Oliver Hartkopp
2021-01-17 22:16               ` Marc Kleine-Budde
2021-01-19  6:17   ` Dan Carpenter
2021-01-19  6:17     ` Dan Carpenter
2021-01-19  7:46     ` Marc Kleine-Budde

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=202101141319.WlSBTNMM-lkp@intel.com \
    --to=lkp@intel.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.