qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 5e2fb7: hw/misc/imx6_src: Don't crash trying


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 5e2fb7: hw/misc/imx6_src: Don't crash trying to reset miss...
Date: Tue, 14 Mar 2017 10:00:11 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 5e2fb7c598c6ae2481ca65d3a730b7fc29fdefbb
      
https://github.com/qemu/qemu/commit/5e2fb7c598c6ae2481ca65d3a730b7fc29fdefbb
  Author: Peter Maydell <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M hw/misc/imx6_src.c

  Log Message:
  -----------
  hw/misc/imx6_src: Don't crash trying to reset missing CPUs

Commit 4881658a4b introduced a call to arm_get_cpu_by_id(),
and Coverity noticed that we weren't checking that it didn't
return NULL (CID 1371652).

Normally this won't happen (because all 4 CPUs are expected
to exist), but it's possible the user requested fewer CPUs
on the command line. Handle this possibility by silently
doing nothing, which is the same behaviour as before commit
4881658a4b and also how we handle the other CPU operations
(since we ignore the INVALID_PARAM returns from arm_set_cpu_on()
and friends).

There is a slight behavioural difference to the pre-4881658a4b
situation: the "reset this core" bit will remain set rather
than not being permitted to be set. The imx6 datasheet is
unclear about the behaviour in this odd corner case, so we
opt for the simpler code rather than complicated logic to
maintain identical behaviour.

Signed-off-by: Peter Maydell <address@hidden>
Message-id: address@hidden
Reviewed-by: Alex Bennée <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]