Project

General

Profile

Bug #10662

iscsit: NULL pointer errors

Added by Toomas Soome 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2019-04-02
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL pointer:

    ../../common/io/comstar/port/iscsit/iscsit_tgt.c: In function 'iscsit_tgt_dereg_retry':
    ../../common/io/comstar/port/iscsit/iscsit_tgt.c:653:47: error: comparison between pointer and integer [-Werror]
          iscsit_tgt_dereg_task, tgt, DDI_NOSLEEP) == NULL) {
                                                   ^~
    ../../common/io/comstar/port/iscsit/iscsit_tgt.c: In function 'iscsit_tgt_lookup_sess':
    ../../common/io/comstar/port/iscsit/iscsit_tgt.c:1227:29: error: comparison between pointer and integer [-Werror]
      if (avl_numnodes(sess_avl) == NULL) {
                                 ^~

    ../../common/io/comstar/port/iscsit/iscsit_login.c:385:43: error: comparison between pointer and integer [-Werror]
            login_sm_complete, ict, DDI_SLEEP) == NULL) {
                                               ^~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:28:
    ../../common/io/comstar/port/iscsit/iscsit.c: In function 'iscsit_rx_pdu':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/comstar/port/iscsit/iscsit.c:915:41: note: in expansion of macro 'NULL'
       idm_conn_event(ic, CE_TRANSPORT_FAIL, NULL);
                                             ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:44:
    ../../common/sys/idm/idm_conn_sm.h:284:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/comstar/port/iscsit/iscsit.c:936:41: note: in expansion of macro 'NULL'
       idm_conn_event(ic, CE_TRANSPORT_FAIL, NULL);
                                             ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:44:
    ../../common/sys/idm/idm_conn_sm.h:284:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:28:
    ../../common/io/comstar/port/iscsit/iscsit.c: In function 'iscsit_rx_scsi_rsp':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/comstar/port/iscsit/iscsit.c:961:40: note: in expansion of macro 'NULL'
      idm_conn_event(ic, CE_TRANSPORT_FAIL, NULL);
                                            ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:44:
    ../../common/sys/idm/idm_conn_sm.h:284:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:28:
    ../../common/io/comstar/port/iscsit/iscsit.c: In function 'iscsit_conn_logout':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/comstar/port/iscsit/iscsit.c:1430:58: note: in expansion of macro 'NULL'
       idm_conn_event(ict->ict_ic, CE_LOGOUT_SESSION_SUCCESS, NULL);
                                                              ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:44:
    ../../common/sys/idm/idm_conn_sm.h:284:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:28:
    ../../common/io/comstar/port/iscsit/iscsit.c: In function 'iscsit_send_async_event':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/comstar/port/iscsit/iscsit.c:2715:50: note: in expansion of macro 'NULL'
       idm_conn_event(ict->ict_ic, CE_TRANSPORT_FAIL, NULL);
                                                      ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:44:
    ../../common/sys/idm/idm_conn_sm.h:284:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:28:
    ../../common/io/comstar/port/iscsit/iscsit.c: In function 'iscsit_send_reject':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/comstar/port/iscsit/iscsit.c:2765:50: note: in expansion of macro 'NULL'
       idm_conn_event(ict->ict_ic, CE_TRANSPORT_FAIL, NULL);
                                                      ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/comstar/port/iscsit/iscsit.c:44:
    ../../common/sys/idm/idm_conn_sm.h:284:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
     ^~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Warning: Command failed for target `obj64/iscsit.o'
    Current working directory /code/illumos-gate/usr/src/uts/intel/iscsit
    *** Error code 1

History

#1

Updated by Electric Monk 8 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit 1f99504ab52e6927794513144ed20e8c0ba5ea6e

commit  1f99504ab52e6927794513144ed20e8c0ba5ea6e
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-10T06:18:20.000Z

    10662 iscsit: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF