lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 1 May 2013 23:36:42 +0000
From:	paul.ferrari@...il.com
To:	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: NFC: llcp: Only keep raw sockets alive when the LLCP local leaves

Dd0 ddddDDddD$

Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From:	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Sender:	git-commits-head-owner@...r.kernel.org
Date:	Wed,  1 May 2013 21:24:45 
To: <git-commits-head@...r.kernel.org>
Subject: NFC: llcp: Only keep raw sockets alive when the LLCP local leaves

Gitweb:     http://git.kernel.org/linus/;a=commit;h=b436a13debec2b3d2c671d6bebcdb91dabcb0795
Commit:     b436a13debec2b3d2c671d6bebcdb91dabcb0795
Parent:     495af72e1434724559e756ba32d9040125ac506b
Author:     Samuel Ortiz <sameo@...ux.intel.com>
AuthorDate: Wed Apr 3 16:34:19 2013 +0200
Committer:  Samuel Ortiz <sameo@...ux.intel.com>
CommitDate: Thu Apr 11 16:29:09 2013 +0200

    NFC: llcp: Only keep raw sockets alive when the LLCP local leaves
    
    When the MAC goes down, connected and connection less sockets should be
    notified, but raw sockets should be kept alive.
    They will get notified only when the physical devices goes away.
    
    Signed-off-by: Samuel Ortiz <sameo@...ux.intel.com>
---
 net/nfc/llcp/llcp.c |   26 +++-----------------------
 1 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c
index 83e788e..99ec39d 100644
--- a/net/nfc/llcp/llcp.c
+++ b/net/nfc/llcp/llcp.c
@@ -76,7 +76,7 @@ static void nfc_llcp_socket_purge(struct nfc_llcp_sock *sock)
 	}
 }
 
-static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen,
+static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool device,
 				    int err)
 {
 	struct sock *sk;
@@ -116,23 +116,6 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen,
 
 				bh_unlock_sock(accept_sk);
 			}
-
-			if (listen == true) {
-				nfc_llcp_socket_remote_param_init(llcp_sock);
-				bh_unlock_sock(sk);
-				continue;
-			}
-		}
-
-		/*
-		 * If we have a connection less socket bound, we keep it alive
-		 * if the device is still present.
-		 */
-		if (sk->sk_state == LLCP_BOUND && sk->sk_type == SOCK_DGRAM &&
-		    listen == true) {
-			nfc_llcp_socket_remote_param_init(llcp_sock);
-			bh_unlock_sock(sk);
-			continue;
 		}
 
 		if (err)
@@ -147,11 +130,8 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen,
 
 	write_unlock(&local->sockets.lock);
 
-	/*
-	 * If we want to keep the listening sockets alive,
-	 * we don't touch the RAW ones.
-	 */
-	if (listen == true)
+	/* If we still have a device, we keep the RAW sockets alive */
+	if (device == true)
 		return;
 
 	write_lock(&local->raw_sockets.lock);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ