[Spice-devel,2/2] Revert "Remove use of opaque from vdi_port_read_one_msg_from_device"

Submitted by Eduardo Lima (Etrunko) on May 6, 2016, 12:35 p.m.

Details

Message ID 45cd481c-8820-25a1-0ff2-f568458a7b4b@redhat.com
State Rejected
Headers show
Series "Fix some regression introduced by recent patches" ( rev: 4 ) in Spice

Not browsing as part of any series.

Commit Message

Eduardo Lima (Etrunko) May 6, 2016, 12:35 p.m.
On 05/06/2016 08:19 AM, Frediano Ziglio wrote:
>>
>> Hi,
>>
>> On Fri, May 06, 2016 at 12:11:46PM +0200, Victor Toso wrote:
>>> Hi,
>>>
>>> On Thu, May 05, 2016 at 01:33:05PM +0100, Frediano Ziglio wrote:
>>>> This reverts commit 0f947b425cc2219f3c5a8705f4214c2deb607a5b.
>>>> This patch causes bug as sin->st can be NULL in some cases.
>>>> opaque is always referring to RedsState.
>>>>
>>>
>>> This patch fixes (avoids?) crash that happens when I reboot a win7 VM;
>>> Let me know if you need more info from my side to track the issue.
>>>
>>> Acked-by: Victor Toso <victortoso@redhat.com>
>>
>> Sorry to jump in with the 'ack'. Crashing is no good but I can see that
>> you were discussing the best approach for this.
>>
>>   toso
>>
> 
> No problem.
> 
> Just to recap:
> - commit 0f947b425cc2219f3c5a8705f4214c2deb607a5b introduced a bug due
>   to sin->st possibly being NULL;
> - rolling back solve the issue;
> - patch was written by Jonathon;
>   - different people acked the patch;
>   - Christophe said didn't like the idea of rolling back;
>   - I don't like too, looks like we move back and does not make sense
>     that st pointer disappears.
> 
> So we have 2 solutions that works and we should decide which one is
> the best.

Can you post the second solution as a separate patch, so it is easier to
keep track?

     }
 #ifdef USE_SMARTCARD


Toso, this is the second one you need, instead of reverting the original
one.

Patch hide | download patch | download mbox

diff --git a/server/reds.c b/server/reds.c
index efd1429..cd1b2fc 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3266,6 +3266,7 @@  static void
spice_server_char_device_remove_interface(RedsState *reds, SpiceBase
     if (strcmp(char_device->subtype, SUBTYPE_VDAGENT) == 0) {
         if (reds->vdagent) {
             reds_agent_remove(reds);
+
red_char_device_reset_dev_instance(RED_CHAR_DEVICE(reds->agent_dev), NULL);
         }