[PATCH v1 09/21] j1939: socket: j1939_sk_queue_drop_all(): iterate forwards not backwards over the socket session-queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
 net/can/j1939/socket.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/can/j1939/socket.c b/net/can/j1939/socket.c
index 7cc5d13f4885..8e236336a346 100644
--- a/net/can/j1939/socket.c
+++ b/net/can/j1939/socket.c
@@ -132,8 +132,8 @@ static void j1939_sk_queue_drop_all(struct j1939_sock *jsk)
 	struct j1939_session *session, *tmp;
 
 	spin_lock_bh(&jsk->sk_session_queue_lock);
-	list_for_each_entry_safe_reverse(session, tmp, &jsk->sk_session_queue,
-					 sk_session_queue_entry) {
+	list_for_each_entry_safe(session, tmp, &jsk->sk_session_queue,
+				 sk_session_queue_entry) {
 		list_del_init(&session->sk_session_queue_entry);
 		j1939_session_put(session);
 	}
-- 
2.20.1




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux