Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e6a3a4bb
Commit
e6a3a4bb
authored
Feb 21, 2013
by
Samuel Ortiz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFC: llcp: Clean raw sockets from nfc_llcp_socket_release
Signed-off-by:
Samuel Ortiz
<
sameo@linux.intel.com
>
parent
3536da06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
net/nfc/llcp/llcp.c
net/nfc/llcp/llcp.c
+29
-0
No files found.
net/nfc/llcp/llcp.c
View file @
e6a3a4bb
...
@@ -133,6 +133,35 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen)
...
@@ -133,6 +133,35 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen)
}
}
write_unlock
(
&
local
->
sockets
.
lock
);
write_unlock
(
&
local
->
sockets
.
lock
);
/*
* If we want to keep the listening sockets alive,
* we don't touch the RAW ones.
*/
if
(
listen
==
true
)
return
;
write_lock
(
&
local
->
raw_sockets
.
lock
);
sk_for_each_safe
(
sk
,
tmp
,
&
local
->
raw_sockets
.
head
)
{
llcp_sock
=
nfc_llcp_sock
(
sk
);
bh_lock_sock
(
sk
);
nfc_llcp_socket_purge
(
llcp_sock
);
sk
->
sk_state
=
LLCP_CLOSED
;
sk
->
sk_state_change
(
sk
);
bh_unlock_sock
(
sk
);
sock_orphan
(
sk
);
sk_del_node_init
(
sk
);
}
write_unlock
(
&
local
->
raw_sockets
.
lock
);
}
}
struct
nfc_llcp_local
*
nfc_llcp_local_get
(
struct
nfc_llcp_local
*
local
)
struct
nfc_llcp_local
*
nfc_llcp_local_get
(
struct
nfc_llcp_local
*
local
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment