All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 5/9] staging: media: atomisp: fix stack overflow in init_pipe_defaults()
Date: Mon, 01 Jun 2020 04:41:55 +0800	[thread overview]
Message-ID: <202006010414.aq5oGx8b%lkp@intel.com> (raw)
In-Reply-To: <20200529200031.4117841-5-arnd@arndb.de>

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

Hi Arnd,

I love your patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on next-20200529]
[cannot apply to staging/staging-testing media-next/master soc/for-next linus/master v5.7-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Arnd-Bergmann/staging-media-atomisp-fix-incorrect-NULL-pointer-check/20200601-003254
base:   git://linuxtv.org/media_tree.git master
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from drivers/staging/media/atomisp//pci/runtime/debug/interface/ia_css_debug.h:30,
from drivers/staging/media/atomisp/pci/sh_css.c:38:
drivers/staging/media/atomisp/pci/sh_css.c: In function 'init_pipe_defaults':
>> drivers/staging/media/atomisp//pci/ia_css_pipe.h:160:1: error: initializer element is not constant
160 | (struct ia_css_pipe) {          | ^
>> drivers/staging/media/atomisp/pci/sh_css.c:2267:49: note: in expansion of macro 'IA_CSS_DEFAULT_PIPE'
2267 |  static const struct ia_css_pipe default_pipe = IA_CSS_DEFAULT_PIPE;
|                                                 ^~~~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/ia_css_pipe.h:43:1: error: initializer element is not constant
43 | (struct ia_css_preview_settings) {          | ^
>> drivers/staging/media/atomisp/pci/sh_css.c:2268:56: note: in expansion of macro 'IA_CSS_DEFAULT_PREVIEW_SETTINGS'
2268 |  static const struct ia_css_preview_settings preview = IA_CSS_DEFAULT_PREVIEW_SETTINGS;
|                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/ia_css_pipe.h:68:1: error: initializer element is not constant
68 | (struct ia_css_capture_settings) {          | ^
>> drivers/staging/media/atomisp/pci/sh_css.c:2269:56: note: in expansion of macro 'IA_CSS_DEFAULT_CAPTURE_SETTINGS'
2269 |  static const struct ia_css_capture_settings capture = IA_CSS_DEFAULT_CAPTURE_SETTINGS;
|                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/ia_css_pipe.h:94:1: error: initializer element is not constant
94 | (struct ia_css_video_settings) {          | ^
>> drivers/staging/media/atomisp/pci/sh_css.c:2270:52: note: in expansion of macro 'IA_CSS_DEFAULT_VIDEO_SETTINGS'
2270 |  static const struct ia_css_video_settings video = IA_CSS_DEFAULT_VIDEO_SETTINGS;
|                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/ia_css_pipe.h:111:1: error: initializer element is not constant
111 | (struct ia_css_yuvpp_settings) {          | ^
>> drivers/staging/media/atomisp/pci/sh_css.c:2271:52: note: in expansion of macro 'IA_CSS_DEFAULT_YUVPP_SETTINGS'
2271 |  static const struct ia_css_yuvpp_settings yuvpp = IA_CSS_DEFAULT_YUVPP_SETTINGS;
|                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/IA_CSS_DEFAULT_PIPE +2267 drivers/staging/media/atomisp/pci/sh_css.c

  2262	
  2263	static enum ia_css_err
  2264	init_pipe_defaults(enum ia_css_pipe_mode mode,
  2265			   struct ia_css_pipe *pipe,
  2266			   bool copy_pipe) {
> 2267		static const struct ia_css_pipe default_pipe = IA_CSS_DEFAULT_PIPE;
> 2268		static const struct ia_css_preview_settings preview = IA_CSS_DEFAULT_PREVIEW_SETTINGS;
> 2269		static const struct ia_css_capture_settings capture = IA_CSS_DEFAULT_CAPTURE_SETTINGS;
> 2270		static const struct ia_css_video_settings video = IA_CSS_DEFAULT_VIDEO_SETTINGS;
> 2271		static const struct ia_css_yuvpp_settings yuvpp = IA_CSS_DEFAULT_YUVPP_SETTINGS;
  2272	
  2273		if (!pipe)
  2274		{
  2275			IA_CSS_ERROR("NULL pipe parameter");
  2276			return IA_CSS_ERR_INVALID_ARGUMENTS;
  2277		}
  2278	
  2279		/* Initialize pipe to pre-defined defaults */
  2280		memcpy(pipe, &default_pipe, sizeof(default_pipe));
  2281	
  2282		/* TODO: JB should not be needed, but temporary backward reference */
  2283		switch (mode)
  2284		{
  2285		case IA_CSS_PIPE_MODE_PREVIEW:
  2286			pipe->mode = IA_CSS_PIPE_ID_PREVIEW;
  2287			memcpy(&pipe->pipe_settings.preview, &preview, sizeof(preview));
  2288			break;
  2289		case IA_CSS_PIPE_MODE_CAPTURE:
  2290			if (copy_pipe) {
  2291				pipe->mode = IA_CSS_PIPE_ID_COPY;
  2292			} else {
  2293				pipe->mode = IA_CSS_PIPE_ID_CAPTURE;
  2294			}
  2295			memcpy(&pipe->pipe_settings.capture, &capture, sizeof(capture));
  2296			break;
  2297		case IA_CSS_PIPE_MODE_VIDEO:
  2298			pipe->mode = IA_CSS_PIPE_ID_VIDEO;
  2299			memcpy(&pipe->pipe_settings.video, &video, sizeof(video));
  2300			break;
  2301		case IA_CSS_PIPE_MODE_ACC:
  2302			pipe->mode = IA_CSS_PIPE_ID_ACC;
  2303			break;
  2304		case IA_CSS_PIPE_MODE_COPY:
  2305			pipe->mode = IA_CSS_PIPE_ID_CAPTURE;
  2306			break;
  2307		case IA_CSS_PIPE_MODE_YUVPP:
  2308			pipe->mode = IA_CSS_PIPE_ID_YUVPP;
  2309			memcpy(&pipe->pipe_settings.yuvpp, &yuvpp, sizeof(yuvpp));
  2310			break;
  2311		default:
  2312			return IA_CSS_ERR_INVALID_ARGUMENTS;
  2313		}
  2314	
  2315		return IA_CSS_SUCCESS;
  2316	}
  2317	

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

  parent reply	other threads:[~2020-05-31 20:41 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 20:00 [PATCH 1/9] staging: media: atomisp: fix incorrect NULL pointer check Arnd Bergmann
2020-05-29 20:00 ` Arnd Bergmann
2020-05-29 20:00 ` [PATCH 2/9] staging: media: atomisp: declare 'struct device' before using it Arnd Bergmann
2020-05-29 20:00   ` Arnd Bergmann
2020-05-30  2:55   ` Nathan Chancellor
2020-05-30  2:55     ` Nathan Chancellor
2020-05-29 20:00 ` [PATCH 3/9] staging: media: atomisp: annotate an unused function Arnd Bergmann
2020-05-29 20:00   ` Arnd Bergmann
2020-05-30  2:56   ` Nathan Chancellor
2020-05-30  2:56     ` Nathan Chancellor
2020-05-29 20:00 ` [PATCH 4/9] staging: media: atomisp: fix a type conversion warning Arnd Bergmann
2020-05-29 20:00   ` Arnd Bergmann
2020-05-29 20:00 ` [PATCH 5/9] staging: media: atomisp: fix stack overflow in init_pipe_defaults() Arnd Bergmann
2020-05-29 20:00   ` Arnd Bergmann
2020-05-30  2:57   ` Nathan Chancellor
2020-05-30  2:57     ` Nathan Chancellor
2020-05-31 20:41   ` kbuild test robot [this message]
2020-05-29 20:00 ` [PATCH 6/9] staging: media: atomisp: fix type mismatch Arnd Bergmann
2020-05-29 20:00   ` Arnd Bergmann
2020-05-29 20:00 ` [PATCH 7/9] staging: media: atomisp: fix enum type mixups Arnd Bergmann
2020-05-29 20:00   ` Arnd Bergmann
2020-05-30  3:00   ` Nathan Chancellor
2020-05-30  3:00     ` Nathan Chancellor
2020-05-29 20:00 ` [PATCH 8/9] staging: media: atomisp: disable all custom formats Arnd Bergmann
2020-05-29 20:00   ` Arnd Bergmann
2020-05-30  3:03   ` Nathan Chancellor
2020-05-30  3:03     ` Nathan Chancellor
2020-05-29 20:00 ` [PATCH 9/9] staging: media: atomisp: add PMIC_OPREGION dependency Arnd Bergmann
2020-05-29 20:00   ` Arnd Bergmann
2020-05-30  3:11   ` Nathan Chancellor
2020-05-30  3:11     ` Nathan Chancellor
2020-05-30  5:25     ` Mauro Carvalho Chehab
2020-05-30  5:25       ` Mauro Carvalho Chehab
2020-05-29 20:04 ` [PATCH 1/9] staging: media: atomisp: fix incorrect NULL pointer check Nick Desaulniers
2020-05-29 20:04   ` Nick Desaulniers
2020-05-29 20:23   ` Arnd Bergmann
2020-05-29 20:23     ` Arnd Bergmann
2020-05-29 20:31     ` Arnd Bergmann
2020-05-29 20:31       ` Arnd Bergmann
2020-05-30  2:49       ` Nathan Chancellor
2020-05-30  2:49         ` Nathan Chancellor
2020-05-30  9:22       ` Mauro Carvalho Chehab
2020-05-30  9:22         ` Mauro Carvalho Chehab

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=202006010414.aq5oGx8b%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@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.