linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the pstore tree
@ 2021-06-15 10:15 Stephen Rothwell
  2021-06-15 15:36 ` Kees Cook
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2021-06-15 10:15 UTC (permalink / raw)
  To: Kees Cook
  Cc: Christoph Hellwig, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

Hi all,

After merging the pstore tree, today's linux-next build (htmldocs)
produced this warning:

fs/pstore/blk.c:1: warning: no structured comments found

Introduced by commit

  38c18fec13fb ("pstore/blk: Use the normal block device I/O path")

The last kernedoc comment in this file is removed by this commit.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: build warning after merge of the pstore tree
  2021-06-15 10:15 linux-next: build warning after merge of the pstore tree Stephen Rothwell
@ 2021-06-15 15:36 ` Kees Cook
  0 siblings, 0 replies; 5+ messages in thread
From: Kees Cook @ 2021-06-15 15:36 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Christoph Hellwig, Linux Kernel Mailing List, Linux Next Mailing List

On Tue, Jun 15, 2021 at 08:15:16PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the pstore tree, today's linux-next build (htmldocs)
> produced this warning:
> 
> fs/pstore/blk.c:1: warning: no structured comments found
> 
> Introduced by commit
> 
>   38c18fec13fb ("pstore/blk: Use the normal block device I/O path")
> 
> The last kernedoc comment in this file is removed by this commit.

I was briefly quite confused by this. I see now it's the
:internal: not the :export: use of blk.c. If it's possible to
improve this error report email with more details in the future,
that would be nice. For example, "blk.c:1" isn't helpful, but
"Documentation/admin-guide/pstore-blk.rst:230" would be. :)

I'll get this fixed up; thanks!

-Kees

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: build warning after merge of the pstore tree
  2016-11-16  0:35 ` Kees Cook
@ 2016-11-16  5:19   ` Joel Fernandes
  0 siblings, 0 replies; 5+ messages in thread
From: Joel Fernandes @ 2016-11-16  5:19 UTC (permalink / raw)
  To: Kees Cook; +Cc: Stephen Rothwell, Linux-Next, LKML

On Tue, Nov 15, 2016 at 4:35 PM, Kees Cook <keescook@chromium.org> wrote:
> On Tue, Nov 15, 2016 at 4:27 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> Hi Kees,
>>
>> After merging the pstore tree, today's linux-next build (x86_64
>> allmodconfig) produced this warning:
>>
>> In file included from include/linux/rcupdate.h:38:0,
>>                  from include/linux/idr.h:18,
>>                  from include/linux/kernfs.h:14,
>>                  from include/linux/sysfs.h:15,
>>                  from include/linux/kobject.h:21,
>>                  from include/linux/device.h:17,
>>                  from fs/pstore/ram_core.c:17:
>> fs/pstore/ram_core.c: In function 'buffer_size_add':
>> include/linux/spinlock.h:246:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>    _raw_spin_unlock_irqrestore(lock, flags); \
>>    ^
>> fs/pstore/ram_core.c:78:16: note: 'flags' was declared here
>>   unsigned long flags;
>>                 ^
>> In file included from include/linux/rcupdate.h:38:0,
>>                  from include/linux/idr.h:18,
>>                  from include/linux/kernfs.h:14,
>>                  from include/linux/sysfs.h:15,
>>                  from include/linux/kobject.h:21,
>>                  from include/linux/device.h:17,
>>                  from fs/pstore/ram_core.c:17:
>> fs/pstore/ram_core.c: In function 'buffer_start_add':
>> include/linux/spinlock.h:246:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>    _raw_spin_unlock_irqrestore(lock, flags); \
>>    ^
>> fs/pstore/ram_core.c:56:16: note: 'flags' was declared here
>>   unsigned long flags;
>>                 ^
>>
>> Introduced by commit
>>
>>   95937ddce59a ("pstore: Allow prz to control need for locking")
>>
>> They appear to be a very noisy false positives. :-(
>
> Hah. Ironically, I ran sparse against this code to make sure it would
> be happy with the conditional locking, and totally missed the flags
> bit. I'll switch it to explicitly initialize flags to silence this.
>

Ah! False positive.

Thanks a lot Kees for fixing it.

Regards,
Joel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: build warning after merge of the pstore tree
  2016-11-16  0:27 Stephen Rothwell
@ 2016-11-16  0:35 ` Kees Cook
  2016-11-16  5:19   ` Joel Fernandes
  0 siblings, 1 reply; 5+ messages in thread
From: Kees Cook @ 2016-11-16  0:35 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Linux-Next, LKML, Joel Fernandes

On Tue, Nov 15, 2016 at 4:27 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Kees,
>
> After merging the pstore tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> In file included from include/linux/rcupdate.h:38:0,
>                  from include/linux/idr.h:18,
>                  from include/linux/kernfs.h:14,
>                  from include/linux/sysfs.h:15,
>                  from include/linux/kobject.h:21,
>                  from include/linux/device.h:17,
>                  from fs/pstore/ram_core.c:17:
> fs/pstore/ram_core.c: In function 'buffer_size_add':
> include/linux/spinlock.h:246:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    _raw_spin_unlock_irqrestore(lock, flags); \
>    ^
> fs/pstore/ram_core.c:78:16: note: 'flags' was declared here
>   unsigned long flags;
>                 ^
> In file included from include/linux/rcupdate.h:38:0,
>                  from include/linux/idr.h:18,
>                  from include/linux/kernfs.h:14,
>                  from include/linux/sysfs.h:15,
>                  from include/linux/kobject.h:21,
>                  from include/linux/device.h:17,
>                  from fs/pstore/ram_core.c:17:
> fs/pstore/ram_core.c: In function 'buffer_start_add':
> include/linux/spinlock.h:246:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    _raw_spin_unlock_irqrestore(lock, flags); \
>    ^
> fs/pstore/ram_core.c:56:16: note: 'flags' was declared here
>   unsigned long flags;
>                 ^
>
> Introduced by commit
>
>   95937ddce59a ("pstore: Allow prz to control need for locking")
>
> They appear to be a very noisy false positives. :-(

Hah. Ironically, I ran sparse against this code to make sure it would
be happy with the conditional locking, and totally missed the flags
bit. I'll switch it to explicitly initialize flags to silence this.

Thanks!

-Kees

-- 
Kees Cook
Nexus Security

^ permalink raw reply	[flat|nested] 5+ messages in thread

* linux-next: build warning after merge of the pstore tree
@ 2016-11-16  0:27 Stephen Rothwell
  2016-11-16  0:35 ` Kees Cook
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2016-11-16  0:27 UTC (permalink / raw)
  To: Kees Cook; +Cc: linux-next, linux-kernel, Joel Fernandes

Hi Kees,

After merging the pstore tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In file included from include/linux/rcupdate.h:38:0,
                 from include/linux/idr.h:18,
                 from include/linux/kernfs.h:14,
                 from include/linux/sysfs.h:15,
                 from include/linux/kobject.h:21,
                 from include/linux/device.h:17,
                 from fs/pstore/ram_core.c:17:
fs/pstore/ram_core.c: In function 'buffer_size_add':
include/linux/spinlock.h:246:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
   _raw_spin_unlock_irqrestore(lock, flags); \
   ^
fs/pstore/ram_core.c:78:16: note: 'flags' was declared here
  unsigned long flags;
                ^
In file included from include/linux/rcupdate.h:38:0,
                 from include/linux/idr.h:18,
                 from include/linux/kernfs.h:14,
                 from include/linux/sysfs.h:15,
                 from include/linux/kobject.h:21,
                 from include/linux/device.h:17,
                 from fs/pstore/ram_core.c:17:
fs/pstore/ram_core.c: In function 'buffer_start_add':
include/linux/spinlock.h:246:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
   _raw_spin_unlock_irqrestore(lock, flags); \
   ^
fs/pstore/ram_core.c:56:16: note: 'flags' was declared here
  unsigned long flags;
                ^

Introduced by commit

  95937ddce59a ("pstore: Allow prz to control need for locking")

They appear to be a very noisy false positives. :-(

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-15 15:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 10:15 linux-next: build warning after merge of the pstore tree Stephen Rothwell
2021-06-15 15:36 ` Kees Cook
  -- strict thread matches above, loose matches on Subject: below --
2016-11-16  0:27 Stephen Rothwell
2016-11-16  0:35 ` Kees Cook
2016-11-16  5:19   ` Joel Fernandes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).