]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Split copy_to_user data copy for better security
authorMichael J. Ruhl <michael.j.ruhl@intel.com>
Mon, 24 Jul 2017 14:46:42 +0000 (07:46 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 31 Jul 2017 19:18:37 +0000 (15:18 -0400)
commit90a8609081c31f5771af958083d1c557e91b4afa
treed2d4316f48919763916db9e769f58d8a35c10ad2
parent861991f1aa6b2a6372f1f2bb7453bdeffbec82fd
IB/hfi1: Split copy_to_user data copy for better security

A copy_to_user() call assumes that two members of a data structure
are sequential.  Since this may not always be true, separate the copies
to ensure a safe copy.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/file_ops.c