summaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel/sys_sparc.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2007-10-18 18:47:05 +0200
committerAdrian Bunk <bunk@kernel.org>2007-10-18 18:47:05 +0200
commit43f903ce5f313983fca91a96f786730cf8c8c645 (patch)
treec51bf1576a82efe91a5b90214aa16db2f9661d16 /arch/sparc64/kernel/sys_sparc.c
parent9bae2c81c89bed8ddf1334cc3b11ca65385163c0 (diff)
[NET]: Zero length write() on socket should not simply return 0.
This fixes kernel bugzilla #5731 It should generate an empty packet for datagram protocols when the socket is connected, for one. The check is doubly-wrong because all that a write() can be is a sendmsg() call with a NULL msg_control and a single entry iovec. No special semantics should be assigned to it, therefore the zero length check should be removed entirely. This matches the behavior of BSD and several other systems. Alan Cox notes that SuSv3 says the behavior of a zero length write on non-files is "unspecified", but that's kind of useless since BSD has defined this behavior for a quarter century and BSD is essentially what application folks code to. Based upon a patch from Stephen Hemminger. Adrian Bunk: Backported to 2.6.16. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Adrian Bunk <bunk@kernel.org>
Diffstat (limited to 'arch/sparc64/kernel/sys_sparc.c')
0 files changed, 0 insertions, 0 deletions