diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/socket.c b/net/socket.c index 95ee7d8682e7..4cdbc107606f 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -734,8 +734,7 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk, | |||
734 | } | 734 | } |
735 | 735 | ||
736 | memset(&tss, 0, sizeof(tss)); | 736 | memset(&tss, 0, sizeof(tss)); |
737 | if ((sk->sk_tsflags & SOF_TIMESTAMPING_SOFTWARE || | 737 | if ((sk->sk_tsflags & SOF_TIMESTAMPING_SOFTWARE) && |
738 | skb_shinfo(skb)->tx_flags & SKBTX_ANY_SW_TSTAMP) && | ||
739 | ktime_to_timespec_cond(skb->tstamp, tss.ts + 0)) | 738 | ktime_to_timespec_cond(skb->tstamp, tss.ts + 0)) |
740 | empty = 0; | 739 | empty = 0; |
741 | if (shhwtstamps && | 740 | if (shhwtstamps && |
@@ -1997,6 +1996,9 @@ static int copy_msghdr_from_user(struct msghdr *kmsg, | |||
1997 | if (copy_from_user(kmsg, umsg, sizeof(struct msghdr))) | 1996 | if (copy_from_user(kmsg, umsg, sizeof(struct msghdr))) |
1998 | return -EFAULT; | 1997 | return -EFAULT; |
1999 | 1998 | ||
1999 | if (kmsg->msg_name == NULL) | ||
2000 | kmsg->msg_namelen = 0; | ||
2001 | |||
2000 | if (kmsg->msg_namelen < 0) | 2002 | if (kmsg->msg_namelen < 0) |
2001 | return -EINVAL; | 2003 | return -EINVAL; |
2002 | 2004 | ||
@@ -2602,7 +2604,7 @@ SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args) | |||
2602 | * | 2604 | * |
2603 | * This function is called by a protocol handler that wants to | 2605 | * This function is called by a protocol handler that wants to |
2604 | * advertise its address family, and have it linked into the | 2606 | * advertise its address family, and have it linked into the |
2605 | * socket interface. The value ops->family coresponds to the | 2607 | * socket interface. The value ops->family corresponds to the |
2606 | * socket system call protocol family. | 2608 | * socket system call protocol family. |
2607 | */ | 2609 | */ |
2608 | int sock_register(const struct net_proto_family *ops) | 2610 | int sock_register(const struct net_proto_family *ops) |