Re: [PATCH 1/1] drm/vmwgfx: avoid possible NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Heinrich,

[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.8-rc3 next-20160823]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Heinrich-Schuchardt/drm-vmwgfx-avoid-possible-NULL-pointer-dereference/20160822-051807
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: x86_64-randconfig-x016-201634 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c: In function 'vmw_cmd_res_reloc_add':
>> drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:656:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
      return;
      ^~~~~~
   drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:646:12: note: declared here
    static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv,
               ^~~~~~~~~~~~~~~~~~~~~

vim +/return +656 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c

   640	 * @sw_context: Pointer to the software context.
   641	 * @id_loc: Pointer to where the id that needs translation is located.
   642	 * @res: Valid pointer to a struct vmw_resource.
   643	 * @p_val: If non null, a pointer to the struct vmw_resource_validate_node
   644	 * used for this resource is returned here.
   645	 */
   646	static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv,
   647					 struct vmw_sw_context *sw_context,
   648					 uint32_t *id_loc,
   649					 struct vmw_resource *res,
   650					 struct vmw_resource_val_node **p_val)
   651	{
   652		int ret;
   653		struct vmw_resource_val_node *node;
   654	
   655		if (!p_val)
 > 656			return;
   657	
   658		*p_val = NULL;
   659	
   660		ret = vmw_resource_relocation_add(&sw_context->res_relocations,
   661						  res,
   662						  id_loc - sw_context->buf_start);
   663		if (unlikely(ret != 0))
   664			return ret;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux