Hello Tim Bird,

This is a semi-automatic email about new static checker warnings.

The patch 3492c71d374c: "kdb: Avoid using dbg_io_ops until it is 
initialized" from Sep 21, 2011, leads to the following Smatch 
complaint:

kernel/debug/kdb/kdb_io.c:746 vkdb_printf()
         error: we previously assumed 'dbg_io_ops' could be null (see line 692)

kernel/debug/kdb/kdb_io.c
   691          } else {
   692                  if (dbg_io_ops && !dbg_io_ops->is_console) {
                            ^^^^^^^^^^
New check.

   693                          len = strlen(kdb_buffer);
   694                          cp = kdb_buffer;
   695                          while (len--) {
   696                                  dbg_io_ops->write_char(*cp);
   697                                  cp++;
   698                          }
   699                  }

        [snip]

   742  
   743                  kdb_input_flush();
   744                  c = console_drivers;
   745  
   746                  if (!dbg_io_ops->is_console) {
                             ^^^^^^^^^^
Old dereference.  Should we check here as well?

   747                          len = strlen(moreprompt);
   748                          cp = moreprompt;

regards,
dan carpenter


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to