Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Greg Kroah-Hartman
On Wed, Mar 28, 2018 at 11:50:09AM -0700, Matthias Kaehlcke wrote: > El Wed, Mar 28, 2018 at 08:19:36PM +0200 Greg Kroah-Hartman ha dit: > > > On Wed, Mar 28, 2018 at 11:14:56AM -0700, Matthias Kaehlcke wrote: > > > El Wed, Mar 28, 2018 at 08:05:56PM +0200 Greg Kroah-Hartman ha dit: > > > > > >

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Greg Kroah-Hartman
On Wed, Mar 28, 2018 at 11:50:09AM -0700, Matthias Kaehlcke wrote: > El Wed, Mar 28, 2018 at 08:19:36PM +0200 Greg Kroah-Hartman ha dit: > > > On Wed, Mar 28, 2018 at 11:14:56AM -0700, Matthias Kaehlcke wrote: > > > El Wed, Mar 28, 2018 at 08:05:56PM +0200 Greg Kroah-Hartman ha dit: > > > > > >

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Matthias Kaehlcke
El Wed, Mar 28, 2018 at 08:19:36PM +0200 Greg Kroah-Hartman ha dit: > On Wed, Mar 28, 2018 at 11:14:56AM -0700, Matthias Kaehlcke wrote: > > El Wed, Mar 28, 2018 at 08:05:56PM +0200 Greg Kroah-Hartman ha dit: > > > > > > > > A: Because it messes up the order in which people normally read text.

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Matthias Kaehlcke
El Wed, Mar 28, 2018 at 08:19:36PM +0200 Greg Kroah-Hartman ha dit: > On Wed, Mar 28, 2018 at 11:14:56AM -0700, Matthias Kaehlcke wrote: > > El Wed, Mar 28, 2018 at 08:05:56PM +0200 Greg Kroah-Hartman ha dit: > > > > > > > > A: Because it messes up the order in which people normally read text.

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Greg Kroah-Hartman
On Wed, Mar 28, 2018 at 11:14:56AM -0700, Matthias Kaehlcke wrote: > El Wed, Mar 28, 2018 at 08:05:56PM +0200 Greg Kroah-Hartman ha dit: > > > > > A: Because it messes up the order in which people normally read text. > > Q: Why is top-posting such a bad thing? > > A: Top-posting. > > Q: What is

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Greg Kroah-Hartman
On Wed, Mar 28, 2018 at 11:14:56AM -0700, Matthias Kaehlcke wrote: > El Wed, Mar 28, 2018 at 08:05:56PM +0200 Greg Kroah-Hartman ha dit: > > > > > A: Because it messes up the order in which people normally read text. > > Q: Why is top-posting such a bad thing? > > A: Top-posting. > > Q: What is

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Matthias Kaehlcke
El Wed, Mar 28, 2018 at 08:05:56PM +0200 Greg Kroah-Hartman ha dit: > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > A: No. > Q: Should I include quotations

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Matthias Kaehlcke
El Wed, Mar 28, 2018 at 08:05:56PM +0200 Greg Kroah-Hartman ha dit: > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > A: No. > Q: Should I include quotations

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Greg Kroah-Hartman
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Wed, Mar 28, 2018 at

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Greg Kroah-Hartman
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Wed, Mar 28, 2018 at

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Josh Poimboeuf
On Wed, Mar 28, 2018 at 10:30:51AM -0500, Josh Poimboeuf wrote: > On Wed, Mar 28, 2018 at 07:47:53AM -0700, Manoj Gupta wrote: > > Please note that there is nothing wrong in the generated code, just > > that it confuses objtool. > > Clang has simply omitted the statement where NULL is returned

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Josh Poimboeuf
On Wed, Mar 28, 2018 at 10:30:51AM -0500, Josh Poimboeuf wrote: > On Wed, Mar 28, 2018 at 07:47:53AM -0700, Manoj Gupta wrote: > > Please note that there is nothing wrong in the generated code, just > > that it confuses objtool. > > Clang has simply omitted the statement where NULL is returned

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Josh Poimboeuf
On Wed, Mar 28, 2018 at 07:47:53AM -0700, Manoj Gupta wrote: > Please note that there is nothing wrong in the generated code, just > that it confuses objtool. > Clang has simply omitted the statement where NULL is returned since > the pointer was always dereferenced post inlining. ... but

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Josh Poimboeuf
On Wed, Mar 28, 2018 at 07:47:53AM -0700, Manoj Gupta wrote: > Please note that there is nothing wrong in the generated code, just > that it confuses objtool. > Clang has simply omitted the statement where NULL is returned since > the pointer was always dereferenced post inlining. ... but

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Manoj Gupta
Please note that there is nothing wrong in the generated code, just that it confuses objtool. Clang has simply omitted the statement where NULL is returned since the pointer was always dereferenced post inlining. Note that GCC will also remove the NULL pointers if it knows that the pointer is

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Manoj Gupta
Please note that there is nothing wrong in the generated code, just that it confuses objtool. Clang has simply omitted the statement where NULL is returned since the pointer was always dereferenced post inlining. Note that GCC will also remove the NULL pointers if it knows that the pointer is

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Greg Kroah-Hartman
On Tue, Mar 27, 2018 at 04:55:53PM -0700, Matthias Kaehlcke wrote: > debugfs_real_fops() returns a NULL pointer when it is invoked without a > prior call to debugfs_file_get(). In code paths including this call it > is not strictly necessary to check the return value of > debugfs_real_fops().

Re: [PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-28 Thread Greg Kroah-Hartman
On Tue, Mar 27, 2018 at 04:55:53PM -0700, Matthias Kaehlcke wrote: > debugfs_real_fops() returns a NULL pointer when it is invoked without a > prior call to debugfs_file_get(). In code paths including this call it > is not strictly necessary to check the return value of > debugfs_real_fops().

[PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-27 Thread Matthias Kaehlcke
debugfs_real_fops() returns a NULL pointer when it is invoked without a prior call to debugfs_file_get(). In code paths including this call it is not strictly necessary to check the return value of debugfs_real_fops(). However clang inlines debugfs_real_fops(), detects the invalid dereferencing of

[PATCH] debugfs: Check return value of debugfs_real_fops() for NULL

2018-03-27 Thread Matthias Kaehlcke
debugfs_real_fops() returns a NULL pointer when it is invoked without a prior call to debugfs_file_get(). In code paths including this call it is not strictly necessary to check the return value of debugfs_real_fops(). However clang inlines debugfs_real_fops(), detects the invalid dereferencing of