lkml.org 
[lkml]   [2017]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: linux-4.15-rc1/drivers/gpu/drm/i915/gvt/cmd_parser.c:1640: poor error checking ?
Date
Thanks for the email. It has been refined recently, the code can be found here:

https://cgit.freedesktop.org/drm-intel/tree/drivers/gpu/drm/i915/gvt/cmd_parser.c

Thanks for the notification, again. :)

-----Original Message-----
From: David Binderman [mailto:dcb314@hotmail.com]
Sent: Monday, November 27, 2017 1:59 PM
To: zhenyuw@linux.intel.com; Wang, Zhi A <zhi.a.wang@intel.com>; jani.nikula@linux.intel.com; joonas.lahtinen@linux.intel.com; Vivi, Rodrigo <rodrigo.vivi@intel.com>; airlied@linux.ie; intel-gvt-dev@lists.freedesktop.org; intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
Subject: linux-4.15-rc1/drivers/gpu/drm/i915/gvt/cmd_parser.c:1640: poor error checking ?


Hello there,

linux-4.15-rc1/drivers/gpu/drm/i915/gvt/cmd_parser.c:1640]: (style) Checking if unsigned variable 'bb_size' is less than zero.

Source code is

/* get the size of the batch buffer */
bb_size = find_bb_size(s);
if (bb_size < 0)
return -EINVAL;

but

static int find_bb_size(struct parser_exec_state *s)

so the code isn't properly checking the return value. Suggest code rework.

Regards

David Binderman

\
 
 \ /
  Last update: 2017-11-27 13:14    [W:0.031 / U:6.284 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site