Re: [PATCH v1 10/10] j1939: socket: make sure all sessions are finished on close

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

 



On 12/12/18 8:48 PM, Oliver Hartkopp wrote:
> Hi Marc,
> 
> On 12/12/18 3:57 PM, Marc Kleine-Budde wrote:
>> On 12/5/18 7:07 AM, Oleksij Rempel wrote:
>>> Currently, (E)TP transfers will be aborted, as soon application will
>>> call close() or exit, as the socket will be automatically closed by the
>>> kernel.
>>
>> With this patch, the application hangs on the close() call until all
>> data has been send out. This might take a while. What happens if you
>> attach a debugger? I think the wait_event_interruptible() will return as
>> attaching a debugger involves signals.
> 
> I'm not sure whether this could be solved differently.

The solution is correct IMHO, just the signal related error handling is
missing.

> It might be that we're currently running into a similar problem with 
> isotp.c, see
> 
> 	https://github.com/linux-can/can-utils/issues/113
> 
> But I think UDP/IP should have an analogue requirement. Will take a look 
> into it.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux