git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Linux 3.2.82
[pandora-kernel.git]
/
net
/
nfc
/
rawsock.c
diff --git
a/net/nfc/rawsock.c
b/net/nfc/rawsock.c
index
9fd652a
..
0d570d3
100644
(file)
--- a/
net/nfc/rawsock.c
+++ b/
net/nfc/rawsock.c
@@
-23,6
+23,7
@@
#include <net/tcp_states.h>
#include <linux/nfc.h>
#include <net/tcp_states.h>
#include <linux/nfc.h>
+#include <linux/export.h>
#include "nfc.h"
#include "nfc.h"
@@
-51,7
+52,10
@@
static int rawsock_release(struct socket *sock)
{
struct sock *sk = sock->sk;
{
struct sock *sk = sock->sk;
- nfc_dbg("sock=%p", sock);
+ nfc_dbg("sock=%p sk=%p", sock, sk);
+
+ if (!sk)
+ return 0;
sock_orphan(sk);
sock_put(sk);
sock_orphan(sk);
sock_put(sk);
@@
-244,8
+248,6
@@
static int rawsock_recvmsg(struct kiocb *iocb, struct socket *sock,
if (!skb)
return rc;
if (!skb)
return rc;
- msg->msg_namelen = 0;
-
copied = skb->len;
if (len < copied) {
msg->msg_flags |= MSG_TRUNC;
copied = skb->len;
if (len < copied) {
msg->msg_flags |= MSG_TRUNC;