OSDN Git Service

unix_bind(): allocate addr earlier
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 19 Jun 2021 03:50:27 +0000 (03:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jun 2021 19:28:49 +0000 (12:28 -0700)
commitc34d4582518ff83a4848c2d33a46be82e2499a5b
tree816f17e3db1a03d9322da1a9955f9b8752512006
parent185ab886d3fb283e837283c343bf539c371e26cf
unix_bind(): allocate addr earlier

makes it easier to massage; we do pay for that by extra work
(kmalloc+memcpy+kfree) in some error cases, but those are not
on the hot paths anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/unix/af_unix.c