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]
Message-ID: <1359017171.18561.29.camel@suxuemin.sh.intel.com>
Date:	Thu, 24 Jan 2013 16:46:11 +0800
From:	"Su, Xuemin" <xuemin.su@...el.com>
To:	Jani Nikula <jani.nikula@...ux.intel.com>
Cc:	airlied@...ux.ie, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org, yanmin_zhang@...ux.intel.com,
	bo.he@...el.com
Subject: Re: [PATCH V3] drm_crtc: check if fb_create return NULL

On Thu, 2013-01-24 at 10:31 +0200, Jani Nikula wrote:
> >  	}
> > +	/* some buggy driver may return NULL here, which may cause panic */
> > +	BUG_ON(!fb);
> 
> I fail to see the benefit of this compared to just letting it oops...
> 
> >  	or->fb_id = fb->base.id;
> 
> ...right here.
> 
> 
For PATCH V3, I think a BUG_ON may give the user clearer information
about the reason of panic. Easier to debug.
I submitted a PATCH V2 yesterday which gives a warning and then return
-EVAL if fb==NULL, preventing the panic. Do you think this is
acceptable?

--
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