8562 xencons: 'instance' may be used uninitialized in this function

Review Request #639 — Created Aug. 5, 2017 and submitted

yuripv
illumos-gate
master
8562
9cbc39d...
general

Initialize 'instance' right after entering the mutex.



igork
  1. i'd like do not drop instabce number in this message - it is useful with debug xen pv guests where you have to know instance number like at line 675

    1. I'm not touching the line 675, you'll still have the instance number in the messages when there's real issue.

    2. I've updated the fix to conditionally print the error message, please check if you like it better.

    3. why not just init it to 0?
      no need extra prints - print with0 will be enough i think

    4. Won't that be a lie if that sanity check doesn't pass? I thought you do care about the instance number in that message.

    5. Or yet another update, as we are entering the mutex, we assume the instance is initialized, so just move the assignment right after entering the mutex.

  2. 
      
yuripv
yuripv
yuripv
igork
  1. Ship It!
  2. 
      
tsoome
  1. Ship It!
  2. 
      
yuripv
Review request changed

Status: Closed (submitted)

Loading...