Project

General

Profile

Actions

Bug #10766

closed

ibcm: NULL pointer errors

Added by Toomas Soome about 4 years ago. Updated about 4 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

NULL pointer errors:

    ../../common/io/ib/mgt/ibcm/ibcm_path.c: In function 'ibcm_val_ipattr':
    ../../common/io/ib/mgt/ibcm/ibcm_path.c:4043:49: error: comparison between pointer and integer [-Werror]
      if ((attrp->ipa_ndst == 0) || (attrp->ipa_ndst == NULL)) {
                                                     ^~
    cc1: all warnings being treated as errors

Noted by Dan:

Actually, it should be

       if ((attrp->ipa_ndst == 0) || (attrp->ipa_dst_ip == NULL))

It was clearly a copy/paste mistake where someone didn't rename what attrp-> was actually needed.

Check it out here:

http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/sys/ib/ibtl/ibti_common.h#1703

ipa_dst_ip is a POINTER TO ibt_ip_addr_t.

Please fix.

Actions #1

Updated by Toomas Soome about 4 years ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk about 4 years ago

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

git commit 5392d11ac74a493636fce7ed2e9598b095b68151

commit  5392d11ac74a493636fce7ed2e9598b095b68151
Author: Toomas Soome <tsoome@me.com>
Date:   2019-05-03T14:07:33.000Z

    10766 ibcm: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

Actions

Also available in: Atom PDF