diff options
author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2014-11-24 10:06:14 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-11-26 10:31:52 +1100 |
commit | 7854b261c98ca419e3f33af969ccc5e74f3b5716 (patch) | |
tree | 7215199e2311b8aa8e483d8885e01e46bca61b91 /hw/fsp/fsp.c | |
parent | 82b950bc00a61f0c18634ede0df09fd5fcbc8a59 (diff) | |
download | blackbird-skiboot-7854b261c98ca419e3f33af969ccc5e74f3b5716.tar.gz blackbird-skiboot-7854b261c98ca419e3f33af969ccc5e74f3b5716.zip |
FSP: Validate fsp_msg in fsp_queue_msg
There are many places where we just pass fsp_msg without
validating whether message allocation succeded or not (like
fsp_queue_msg(fsp_mkmsg(...))).
If message allocation fails then we endup crashing OPAL. This
patch validates fsp_msg before using.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/fsp/fsp.c')
-rw-r--r-- | hw/fsp/fsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index 57cba317..8a73f2c2 100644 --- a/hw/fsp/fsp.c +++ b/hw/fsp/fsp.c @@ -949,7 +949,7 @@ int fsp_queue_msg(struct fsp_msg *msg, void (*comp)(struct fsp_msg *msg)) u16 seq; int rc = 0; - if (!fsp) + if (!fsp || !msg) return -1; /* Recursive locking */ |