lkml.org 
[lkml]   [2004]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectBug or dead code in net/unix/af_unix.c:unix_mkname()
From
Date

unix_mkname() looks like (in both 2.4.x and 2.6.x)...

static int unix_mkname(struct sockaddr_un * sunaddr, int len, unsigned *hashp)
{
if (len <= sizeof(short) || len > sizeof(*sunaddr))
return -EINVAL;
[...]
if (len > sizeof(*sunaddr))
len = sizeof(*sunaddr);


...so if you pass a "large" sockaddr_un struct bind() just returns
-EINVAL. I assume that is intentional, but that just makes the huge
comment and test later dead code.

--
James Antill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.514 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site