Bug 8726 - MSG_TRUNC not regarded in unix_dgram_recvmsg()
Summary: MSG_TRUNC not regarded in unix_dgram_recvmsg()
Status: CLOSED CODE_FIX
Alias: None
Product: Networking
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Arnaldo Carvalho de Melo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-09 04:06 UTC by Daniel
Modified: 2008-09-23 09:56 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.22
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Daniel 2007-07-09 04:06:36 UTC
Problem Description:

In unix_dgram_recvmsg() in af_unix.c the flag MSG_TRUNC is not regarded as described in the recv(2) man page.

This did work in older kernels (I have a working 2.6.13, but am not sure if that is a plain kernel.org one, nor if it was the last working revision).
I believe the bug was introduced when the variable "copied" was removed from the code.

IMHO, the line 1650:

err = size;

should read

err = (flags & MSG_TRUNC) ? skb->len : size;
Comment 1 Daniel 2007-07-09 04:24:18 UTC
Kernel Version changed to 2.6.22 + regression
Comment 2 Andrew Morton 2007-07-09 09:21:34 UTC
Subject: Re: [Bugme-new]  New: MSG_TRUNC not regarded in
 unix_dgram_recvmsg()

On Mon,  9 Jul 2007 04:01:58 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=8726
> 
>            Summary: MSG_TRUNC not regarded in unix_dgram_recvmsg()
>            Product: Networking
>            Version: 2.5
>      KernelVersion: 2.6.19
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Other
>         AssignedTo: acme@ghostprotocols.net
>         ReportedBy: garkein@mailueberfall.de
> 
> 
> Problem Description:
> 
> In unix_dgram_recvmsg() in af_unix.c the flag MSG_TRUNC is not regarded as
> described in the recv(2) man page.
> 
> This did work in older kernels (I have a working 2.6.13, but am not sure if
> that is a plain kernel.org one, nor if it was the last working revision).
> I believe the bug was introduced when the variable "copied" was removed from
> the code.
> 
> IMHO, the line 1650:
> 
> err = size;
> 
> should read
> 
> err = (flags & MSG_TRUNC) ? skb->len : size;
> 
Comment 3 Daniel 2007-07-10 05:12:55 UTC
I'm a bit confused by the above comment. Yes? No? Need more info?
Comment 4 Natalie Protasevich 2007-11-08 05:50:06 UTC
I will address this question to appropriate parties. Sounds like we need help from
netdev developers.

Note You need to log in before you can comment on or make changes to this bug.