acrn-hypervisor/devicemodel/core
Zide Chen f6a7206200 acrn-dm: fix corner cases in acrn_parse_cpu_affinity()
- re-arange the code to make static code analysis tool happy.

- If no valid conversion could be performed, a zero value is returned
  (0L) from strtol(), so add a sanity check "isdigit(cp[0])" to ensure
  that it won't unexpectedly parse CPU 0 if the string starts or ends
  with the valid delimiters ',' or '-', for example:

  -- cpu_affinity 1,
  -- cpu_affinity ,1

Tracked-On: #4616
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-05-29 11:51:09 +08:00
..
console.c DM: remove unused function console_ptr_event 2019-05-24 11:51:00 +08:00
gc.c dm: gc: clean up assert 2019-07-03 09:40:15 +08:00
hugetlb.c dm:replace perror with pr_err 2020-01-08 13:37:57 +08:00
inout.c dm:use acrn-dm logger function instread of printf 2019-11-14 15:34:04 +08:00
main.c acrn-dm: add some logs for vm state transition 2020-05-15 10:06:23 +08:00
mem.c dm:use acrn-dm logger function instread of printf 2019-11-14 15:34:04 +08:00
mevent.c dm:replace perror with pr_err 2020-01-08 13:37:57 +08:00
monitor.c acrn-dm: add some logs for vm state transition 2020-05-15 10:06:23 +08:00
mptbl.c dm:use acrn-dm logger function instread of fprintf 2019-11-14 15:34:04 +08:00
pm.c acrn-dm: add some logs for vm state transition 2020-05-15 10:06:23 +08:00
pm_vuart.c dm:refine pm_vuart code 2020-04-16 22:01:54 +08:00
post.c dm: refine 'assert' in inout.c and post.c 2019-06-20 08:55:44 +08:00
sw_load_bzimage.c dm: bzimage: dynamically adapt to ramdisk size 2020-05-28 08:49:47 +08:00
sw_load_common.c dm:passthrough graphics stolen memory to uos gpu 2020-01-17 09:23:13 +08:00
sw_load_elf.c dm:use acrn-dm logger function instread of fprintf 2019-11-14 15:34:04 +08:00
sw_load_ovmf.c dm:use acrn-dm logger function instread of fprintf 2019-11-14 15:34:04 +08:00
sw_load_vsbl.c dm:use acrn-dm logger function instread of fprintf 2019-11-14 15:34:04 +08:00
timer.c dm:replace perror with pr_err 2020-01-08 13:37:57 +08:00
vmmapi.c acrn-dm: fix corner cases in acrn_parse_cpu_affinity() 2020-05-29 11:51:09 +08:00
vrpmb.c dm:use acrn-dm logger function instread of fprintf 2019-11-14 15:34:04 +08:00