]> www.infradead.org Git - users/jedix/linux-maple.git/commit
megaraid: Fix possible NULL pointer deference in mraid_mm_ioctl
authorNicholas Krause <xerofoify@gmail.com>
Tue, 5 Jan 2016 19:32:54 +0000 (14:32 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 16 Mar 2016 13:36:32 +0000 (06:36 -0700)
commit624531424751003ce12e0d72eb933ff9a3507014
tree87d0fbe163d54a381873c8ac4b6bc2f07068ae74
parent2b7c9a726383a4a282dd473df9f0ed1a66a4e24a
megaraid: Fix possible NULL pointer deference in mraid_mm_ioctl

Orabug: 22620626

This adds the needed check after the call to the function
mraid_mm_alloc_kioc in order to make sure that this function has not
returned NULL and therefore makes sure we do not deference a NULL
pointer if one is returned by mraid_mm_alloc_kioc.  Further more add
needed comments explaining that this function call can return NULL if
the list head is empty for the pointer passed in order to allow furture
users to understand this required pointer check.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
Acked-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 7296f62f0322d808362b21064deb34f20799c20d)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_mm.c