Review Request 129993: Fix SFTP unmount

Yuxuan Shui yshuiv7 at gmail.com
Wed Mar 8 01:35:10 UTC 2017



> On March 7, 2017, 2:36 p.m., Aleix Pol Gonzalez wrote:
> > plugins/sftp/mounter.cpp, line 225
> > <https://git.reviewboard.kde.org/r/129993/diff/1/?file=492313#file492313line225>
> >
> >     `m_proc` needs to be destroyed either way... the other branch is not doing so.
> >     
> >     I'm a bit concerned about how random the finished argument feels. Maybe we can trigger the deletion of `m_proc` on the case that it doesn't work and skip the argument altogether?

We can move this part into ~Mounter, maybe?


> On March 7, 2017, 2:36 p.m., Aleix Pol Gonzalez wrote:
> > plugins/sftp/mounter.h, line 57
> > <https://git.reviewboard.kde.org/r/129993/diff/1/?file=492312#file492312line57>
> >
> >     Maybe it should be called `umount`?

Why?


- Yuxuan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129993/#review102755
-----------------------------------------------------------


On March 8, 2017, 1:23 a.m., Yuxuan Shui wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129993/
> -----------------------------------------------------------
> 
> (Updated March 8, 2017, 1:23 a.m.)
> 
> 
> Review request for kdeconnect and Albert Vaca Cintora.
> 
> 
> Bugs: 377040
>     http://bugs.kde.org/show_bug.cgi?id=377040
> 
> 
> Repository: kdeconnect-kde
> 
> 
> Description
> -------
> 
> The destructor of Mounter says it doesn't call unmount because it will crash.
> 
> I tracked down the root cause of that. In unmount(), m_proc is set to nullptr before the process is killed. And Stderr/StdoutReadReady is triggered after that. So in the signal handler there's a nullptr dereference.
> 
> In this patch I take some actions to make sure the process is shutdown properly.
> 
> 
> Diffs
> -----
> 
>   plugins/sftp/mounter.h a9edc26 
>   plugins/sftp/mounter.cpp f43a445 
> 
> Diff: https://git.reviewboard.kde.org/r/129993/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Yuxuan Shui
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20170308/3a577235/attachment.html>


More information about the KDEConnect mailing list