From e80c428a607e6a75aa5aabd23bdd9f07faf0a2d5 Mon Sep 17 00:00:00 2001 From: "Moger, Babu" Date: Wed, 22 Feb 2012 18:09:00 +0000 Subject: [PATCH] multipath-tools: fix the bug while processing vpd 0x83 designation descriptors This patch fixes the bug while processing the vpd 0x83 designation descriptors. Removing the buggy check(> sizeof(buf))while loping the descriptors. Sizeof(buf) will always return 8 (in 64 bit machine). Descriptor length can be more than 8 bytes in some cases. This was causing problems while configuring my storage with alua. Signed-off-by: Babu Moger --- libmultipath/prioritizers/alua_rtpg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libmultipath/prioritizers/alua_rtpg.c b/libmultipath/prioritizers/alua_rtpg.c index f98ae9e..b76db72 100644 --- a/libmultipath/prioritizers/alua_rtpg.c +++ b/libmultipath/prioritizers/alua_rtpg.c @@ -184,9 +184,6 @@ get_target_port_group(int fd) rc = -RTPG_NO_TPG_IDENTIFIER; FOR_EACH_VPD83_DSCR(vpd83, dscr) { - if ((((char *) dscr) - ((char *) vpd83)) > sizeof(buf)) - break; - if (vpd83_dscr_istype(dscr, IDTYPE_TARGET_PORT_GROUP)) { struct vpd83_tpg_dscr * p; -- 2.7.4