]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/socket.c
Merge tag 'led-fixes-for-5.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / net / socket.c
index 472fbefa5d9bbf080f96d6f1b88748fb056733a8..38eec1583f6dae49d4c59ed1ded8c7d1805f9435 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * NET         An implementation of the SOCKET network access protocol.
  *
  *             Tigran Aivazian :       Made listen(2) backlog sanity checks
  *                                     protocol-independent
  *
- *
- *             This program is free software; you can redistribute it and/or
- *             modify it under the terms of the GNU General Public License
- *             as published by the Free Software Foundation; either version
- *             2 of the License, or (at your option) any later version.
- *
- *
  *     This module is effectively the top level interface to the BSD socket
  *     paradigm.
  *
@@ -645,14 +639,6 @@ void __sock_tx_timestamp(__u16 tsflags, __u8 *tx_flags)
 }
 EXPORT_SYMBOL(__sock_tx_timestamp);
 
-/**
- *     sock_sendmsg - send a message through @sock
- *     @sock: socket
- *     @msg: message to send
- *
- *     Sends @msg through @sock, passing through LSM.
- *     Returns the number of bytes sent, or an error code.
- */
 INDIRECT_CALLABLE_DECLARE(int inet_sendmsg(struct socket *, struct msghdr *,
                                           size_t));
 static inline int sock_sendmsg_nosec(struct socket *sock, struct msghdr *msg)
@@ -663,6 +649,14 @@ static inline int sock_sendmsg_nosec(struct socket *sock, struct msghdr *msg)
        return ret;
 }
 
+/**
+ *     sock_sendmsg - send a message through @sock
+ *     @sock: socket
+ *     @msg: message to send
+ *
+ *     Sends @msg through @sock, passing through LSM.
+ *     Returns the number of bytes sent, or an error code.
+ */
 int sock_sendmsg(struct socket *sock, struct msghdr *msg)
 {
        int err = security_socket_sendmsg(sock, msg,
@@ -875,15 +869,6 @@ void __sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk,
 }
 EXPORT_SYMBOL_GPL(__sock_recv_ts_and_drops);
 
-/**
- *     sock_recvmsg - receive a message from @sock
- *     @sock: socket
- *     @msg: message to receive
- *     @flags: message flags
- *
- *     Receives @msg from @sock, passing through LSM. Returns the total number
- *     of bytes received, or an error.
- */
 INDIRECT_CALLABLE_DECLARE(int inet_recvmsg(struct socket *, struct msghdr *,
                                           size_t , int ));
 static inline int sock_recvmsg_nosec(struct socket *sock, struct msghdr *msg,
@@ -893,6 +878,15 @@ static inline int sock_recvmsg_nosec(struct socket *sock, struct msghdr *msg,
                                   msg_data_left(msg), flags);
 }
 
+/**
+ *     sock_recvmsg - receive a message from @sock
+ *     @sock: socket
+ *     @msg: message to receive
+ *     @flags: message flags
+ *
+ *     Receives @msg from @sock, passing through LSM. Returns the total number
+ *     of bytes received, or an error.
+ */
 int sock_recvmsg(struct socket *sock, struct msghdr *msg, int flags)
 {
        int err = security_socket_recvmsg(sock, msg, msg_data_left(msg), flags);