Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
3
-
15333
Description
Found 2 new static analysis issues in 2.6.50-112-g01def2b:
- Result of function that can return NULL may be dereferenced
- lnet/lnet/api-ni.c: in LNetNIInit, Pointer 'nets' returned from call to function 'lnet_get_networks' at line 1779 may be NULL and may be dereferenced at line 1785.
TRACEBACK
api-ni.c:1779: 'nets' is assigned the return value from function 'lnet_get_networks'.
api-ni.c:85: 'lnet_get_networks' explicitly returns a NULL value.
api-ni.c:1785: 'nets' is dereferenced by passing argument 2 to function 'lnet_parse_networks'.
config.c:197: 'networks' is passed to function 'lnet_parse_networks'.
config.c:200: 'networks' is dereferenced by passing argument 1 to function 'strlen'.
- lnet/lnet/api-ni.c: in LNetNIInit, Pointer 'nets' returned from call to function 'lnet_get_networks' at line 1779 may be NULL and may be dereferenced at line 1785.
- Joining with binary operator does not respect strong typing
- lnet/lnet/api-ni.c: in lnet_ping_info_install_locked, A strongly typed value of type '__u32' is compared with a value of a different type 'int'
The list of commits since the previous build 2.6.50-106-g9593c98:
01def2b | |
92c5184 | |
18ad797 | |
c079e8c | |
d018343 | |
94d923d |
Attachments
Issue Links
Activity
Fix Version/s | New: Lustre 2.7.0 [ 10631 ] | |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Description |
Original:
Found 2 new static analysis issues in 2.6.50-112-g01def2b: # *Result of function that can return NULL may be dereferenced* #* {{lnet/lnet/api-ni.c}}: in _LNetNIInit_, Pointer 'nets' returned from call to function 'lnet\_get\_networks' at line 1779 may be NULL and may be dereferenced at line 1785. # *Joining with binary operator does not respect strong typing* #* {{lnet/lnet/api-ni.c}}: in _lnet_ping_info_install_locked_, A strongly typed value of type '\_\_u32' is compared with a value of a different type 'int' The list of commits since the previous build 2.6.50-106-g9593c98: |[01def2b|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=01def2b635ff0b7bacde158d9124334c42cd5d2b]| |[92c5184|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=92c51841c50cc4061c20b277d3f7c4468f2a80cc]| |[18ad797|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=18ad797d5da11a8ce886c8d0cce9b1e043c4c898]| |[c079e8c|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=c079e8c57a09419b1e5978dba2a469d6ae4c712c]| |[d018343|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=d01834323af7a14d2d4959d9bea58073e3bb16ea]| |[94d923d|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=94d923de400fc1c6a50b67a55ce700251f93ab05]| |
New:
Found 2 new static analysis issues in 2.6.50-112-g01def2b: # *Result of function that can return NULL may be dereferenced* #* {{lnet/lnet/api-ni.c}}: in _LNetNIInit_, Pointer 'nets' returned from call to function 'lnet\_get\_networks' at line 1779 may be NULL and may be dereferenced at line 1785. TRACEBACK api-ni.c:1779: 'nets' is assigned the return value from function 'lnet_get_networks'. api-ni.c:85: 'lnet_get_networks' explicitly returns a NULL value. api-ni.c:1785: 'nets' is dereferenced by passing argument 2 to function 'lnet_parse_networks'. config.c:197: 'networks' is passed to function 'lnet_parse_networks'. config.c:200: 'networks' is dereferenced by passing argument 1 to function 'strlen'. # *Joining with binary operator does not respect strong typing* #* {{lnet/lnet/api-ni.c}}: in _lnet_ping_info_install_locked_, A strongly typed value of type '\_\_u32' is compared with a value of a different type 'int' The list of commits since the previous build 2.6.50-106-g9593c98: |[01def2b|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=01def2b635ff0b7bacde158d9124334c42cd5d2b]| |[92c5184|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=92c51841c50cc4061c20b277d3f7c4468f2a80cc]| |[18ad797|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=18ad797d5da11a8ce886c8d0cce9b1e043c4c898]| |[c079e8c|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=c079e8c57a09419b1e5978dba2a469d6ae4c712c]| |[d018343|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=d01834323af7a14d2d4959d9bea58073e3bb16ea]| |[94d923d|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=94d923de400fc1c6a50b67a55ce700251f93ab05]| |
Fixed by http://review.whamcloud.com/#/c/11626/5