2008-12-18 14:48:33

by Victor Shcherbatyuk

[permalink] [raw]
Subject: [PATCH] rfcomm/sock.c: rfcomm_sock_sendmsg() does not return error on a connection faulure

Hi,

We noticed a problem, when a connection from the remote device is
dropper the write() function does not return the error in the user
space, returning 0 instead - indicating that 0 bytes are sent. We've
also noticed that with some older kernels it used to work (2.6.13 vs
2.6.23-17). The patch fixes the problem.

Regards,
Victor.


Attachments:
sock.c.patch (461.00 B)
sock.c.patch

2008-12-19 13:04:07

by Victor Shcherbatyuk

[permalink] [raw]
Subject: RE: [PATCH] rfcomm/sock.c: rfcomm_sock_sendmsg() does not return error on a connection faulure

Hi Marcel,

Is this ok?

Regards,
Victor.

-----Original Message-----
From: Marcel Holtmann [mailto:[email protected]]
Sent: Friday, December 19, 2008 8:01 AM
To: Victor Shcherbatyuk
Cc: [email protected]
Subject: Re: [PATCH] rfcomm/sock.c: rfcomm_sock_sendmsg() does not
return error on a connection faulure

Hi Victor,

> We noticed a problem, when a connection from the remote device is
> dropper the write() function does not return the error in the user
> space, returning 0 instead - indicating that 0 bytes are sent. We've
> also noticed that with some older kernels it used to work (2.6.13 vs
> 2.6.23-17). The patch fixes the problem.

that is a bug and your patch looks good. However can you use
git-format-patch and sent it again with proper Signed-off-by line for me
to apply.

Regards

Marcel



Attachments:
0001-Fixed-rfcomm_sock_sendmsg-to-return-an-error-on-th.patch (0.98 kB)
0001-Fixed-rfcomm_sock_sendmsg-to-return-an-error-on-th.patch

2008-12-19 07:00:42

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] rfcomm/sock.c: rfcomm_sock_sendmsg() does not return error on a connection faulure

Hi Victor,

> We noticed a problem, when a connection from the remote device is
> dropper the write() function does not return the error in the user
> space, returning 0 instead - indicating that 0 bytes are sent. We've
> also noticed that with some older kernels it used to work (2.6.13 vs
> 2.6.23-17). The patch fixes the problem.

that is a bug and your patch looks good. However can you use
git-format-patch and sent it again with proper Signed-off-by line for me
to apply.

Regards

Marcel