Commit 70c86ace authored by Liang Zhen's avatar Liang Zhen Committed by Greg Kroah-Hartman

staging/lustre/lnet: portal spreading rotor should be unsigned

Portal spreading rotor should be unsigned, otherwise lnet may get
negative CPT number and access invalid addresses.
Signed-off-by: default avatarLiang Zhen <liang.zhen@intel.com>
Reviewed-on: http://review.whamcloud.com/11936
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5639Reviewed-by: default avatarAmir Shehata <amir.shehata@intel.com>
Reviewed-by: default avatarIsaac Huang <he.huang@intel.com>
Reviewed-by: default avatarDoug Oucharek <doug.s.oucharek@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dbab2d85
...@@ -622,7 +622,7 @@ typedef struct lnet_portal { ...@@ -622,7 +622,7 @@ typedef struct lnet_portal {
/* Match table for each CPT */ /* Match table for each CPT */
struct lnet_match_table **ptl_mtables; struct lnet_match_table **ptl_mtables;
/* spread rotor of incoming "PUT" */ /* spread rotor of incoming "PUT" */
int ptl_rotor; unsigned int ptl_rotor;
/* # active entries for this portal */ /* # active entries for this portal */
int ptl_mt_nmaps; int ptl_mt_nmaps;
/* array of active entries' cpu-partition-id */ /* array of active entries' cpu-partition-id */
......
...@@ -262,10 +262,10 @@ lnet_mt_of_match(struct lnet_match_info *info, struct lnet_msg *msg) ...@@ -262,10 +262,10 @@ lnet_mt_of_match(struct lnet_match_info *info, struct lnet_msg *msg)
{ {
struct lnet_match_table *mtable; struct lnet_match_table *mtable;
struct lnet_portal *ptl; struct lnet_portal *ptl;
int nmaps; unsigned int nmaps;
int rotor; unsigned int rotor;
int routed; unsigned int cpt;
int cpt; bool routed;
/* NB: called w/o lock */ /* NB: called w/o lock */
LASSERT(info->mi_portal < the_lnet.ln_nportals); LASSERT(info->mi_portal < the_lnet.ln_nportals);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment