event: fix divide by 0 in send_event()
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 9 May 2019 00:40:27 +0000 (20:40 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 9 May 2019 00:44:53 +0000 (20:44 -0400)
commit299f4b5e23e34faa6225823d294be431898f189b
treedcfb0c6b619ae1404fbde405c9ee44b6afe50f1f
parentf24797cdfdfd67cea63a9c6f1e6cd4b07c76a2c6
event: fix divide by 0 in send_event()

SCPs have num_vcores == 0, which triggers a divide by zero.

You can tell how old the ROUND_ROBIN event style is - it's never been
used on an SCP.  Back in the day, SCPs couldn't even receive events.
Now they have vcore context and the ability to run a 2LS.

Reported-by: syzbot+a20f4107d5ec7009c1c4@syzkaller.appspotmail.com
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/event.c