IB/qib: Fix potential buffer overrun in sending diag packet routine
IB/qib: Fix potential buffer overrun in sending diag packet routine

Guard against a potential buffer overrun.  Right now the qib driver is
protected by the fact that the data structure in question is only 16
bits.  Should that ever change the problem will be exposed. There is a
similar defect in the ipath driver and this brings the two code paths
into sync.

Reported-by: Nico Golde <d659c10e27d52b00987b65e85d99bce5480adcae@ngolde.de>
Reported-by: Fabian Yamaguchi <195db6c7707f62bc764ff27f358431900af97df5@goesec.de>
Reviewed-by: Mike Marciniszyn <8b6671d72f65e2bb5dd5241f258fc1c5c815d085@intel.com>
Signed-off-by: Dennis Dalessandro <c5647ee2cc874023512af531fa0cfc4dc8a4595d@intel.com>
Signed-off-by: Roland Dreier <0d270388f2f92757a5de0f4bd891d3b392c44c4f@purestorage.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs