lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 20 Jul 2015 17:33:50 +0200
From:	Daniel Vetter <daniel@...ll.ch>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	Daniel Vetter <daniel.vetter@...el.com>,
	Jani Nikula <jani.nikula@...ux.intel.com>,
	David Airlie <airlied@...ux.ie>,
	intel-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	dri-devel@...ts.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915: remove unnecessary null test

On Mon, Jul 20, 2015 at 08:36:01PM +0530, Sudip Mukherjee wrote:
> While creating the debugfs file we are setting the inode->i_private to
> dev. That same dev is passed to these functions as private of struct
> seq_file via single_open(). So at this point it can never be NULL.
> 
> Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
> ---
> 
> v1 was drm/i915: fix possible null pointer dereference

There's still one left in i915_displayport_test_active_write. Also please
mention the commit that introduced these and Cc: the author. Also please
Cc: Chris since he's commented on v1 of this patch.

Thanks, Daniel

> 
>  drivers/gpu/drm/i915/i915_debugfs.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index bc817da..63cb886 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4103,9 +4103,6 @@ static int i915_displayport_test_active_show(struct seq_file *m, void *data)
>  	struct list_head *connector_list = &dev->mode_config.connector_list;
>  	struct intel_dp *intel_dp;
>  
> -	if (!dev)
> -		return -ENODEV;
> -
>  	list_for_each_entry(connector, connector_list, head) {
>  
>  		if (connector->connector_type !=
> @@ -4150,9 +4147,6 @@ static int i915_displayport_test_data_show(struct seq_file *m, void *data)
>  	struct list_head *connector_list = &dev->mode_config.connector_list;
>  	struct intel_dp *intel_dp;
>  
> -	if (!dev)
> -		return -ENODEV;
> -
>  	list_for_each_entry(connector, connector_list, head) {
>  
>  		if (connector->connector_type !=
> @@ -4192,9 +4186,6 @@ static int i915_displayport_test_type_show(struct seq_file *m, void *data)
>  	struct list_head *connector_list = &dev->mode_config.connector_list;
>  	struct intel_dp *intel_dp;
>  
> -	if (!dev)
> -		return -ENODEV;
> -
>  	list_for_each_entry(connector, connector_list, head) {
>  
>  		if (connector->connector_type !=
> -- 
> 1.8.1.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ