mptfusion: use memdup_user
authorJoe Lawrence <joe.lawrence@stratus.com>
Wed, 25 Jun 2014 21:06:12 +0000 (17:06 -0400)
committerChristoph Hellwig <hch@lst.de>
Fri, 25 Jul 2014 21:16:57 +0000 (17:16 -0400)
commit3e67c459d0ac945ac09639d85de299e65317aefe
tree2dcf88d2311361e90e102d1c74b757c0d23f0fb5
parent5074b1b60edd47e0ce4485e57990f7ca75c3e67e
mptfusion: use memdup_user

Let memdup_user handle the kmalloc, copy_from_user and error checking
kfree code.

Spotted by the following smatch (false positive) warning:

  drivers/message/fusion/mptctl.c:1369 mptctl_getiocinfo() warn:
    possible info leak 'karg'

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/message/fusion/mptctl.c