On Thu, 2017-10-19 at 08:40 +0300, Leon Romanovsky wrote: > From: Parav Pandit <parav@xxxxxxxxxxxx> > > In recent code, two path record entries are alwasy cleared while > allocated could be either one or two path record entries. > This leads to zero out of unallocated memory. > > This fix initializes alternative path record only when alternative > path > is set. > > While we are at it, path record allocation doesn't check for OPA > alternative path, but rest of the code checks for OPA alternative > path. > Path record allocation code doesn't check for OPA alternative LID. > This can further lead to memory corruption when only one path record > is > allocated, but there is actually alternative OPA path record present > in CM > request. > > Cc: <stable@xxxxxxxxxxxxxxx> # v4.12+ > Fixes: 9fdca4da4d8c ("IB/SA: Split struct sa_path_rec based on IB and > ROCE specific fields") > Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx> > Reviewed-by: Moni Shoua <monis@xxxxxxxxxxxx> > Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx> Thanks, applied. -- Doug Ledford <dledford@xxxxxxxxxx> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD