[Nbd] [PATCH 1/2] server: Close socket pair when fork fails.

2018-05-18 Thread Thadeu Lima de Souza Cascardo
When fork fails, we return without closing the socket pair that was just created. This might cause file descriptor leaks. Signed-off-by: Thadeu Lima de Souza Cascardo <casca...@canonical.com> --- nbd-server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nbd-server.c b/nbd-server.c

[Nbd] [PATCH 2/2] server: do not crash when handling child name

2018-05-18 Thread Thadeu Lima de Souza Cascardo
The parent will receive the servename from the child to verify if it has reached the max number of connections. When the servename is the empty name, it will try to allocate a 0-sized buffer, which will return a NULL pointer, and that segfaults when running strcmp. Signed-off-by: Thadeu Lima de

Re: [Nbd] [PATCH 5/6] platform/x86: make device_attribute const

2017-08-21 Thread Thadeu Lima de Souza Cascardo
For classmate-laptop.c Acked-by: Thadeu Lima de Souza Cascardo <casca...@holoscopio.com> -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/sl