Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/ipath: Translate legacy diagpkt into newer extended diagpkt

This patch addresses an issue where the legacy diagpacket is sent in
from the user, but the driver operates on only the extended
diagpkt. This patch specifically initializes the extended diagpkt
based on the legacy packet.

Cc: <stable@vger.kernel.org>
Reported-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>

authored by

Dennis Dalessandro and committed by
Roland Dreier
7e6d3e5c 911eccd2

+4
+4
drivers/infiniband/hw/ipath/ipath_diag.c
··· 346 346 ret = -EFAULT; 347 347 goto bail; 348 348 } 349 + dp.len = odp.len; 350 + dp.unit = odp.unit; 351 + dp.data = odp.data; 352 + dp.pbc_wd = 0; 349 353 } else { 350 354 ret = -EINVAL; 351 355 goto bail;