Patch "ipv6: protect for_each_sk_fl_rcu in mem_check with rcu_read_lock_bh" has been added to the 3.10-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    ipv6: protect for_each_sk_fl_rcu in mem_check with rcu_read_lock_bh

to the 3.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ipv6-protect-for_each_sk_fl_rcu-in-mem_check-with-rcu_read_lock_bh.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 116a1c5c3f045ee7f444a0416ff72e5bc73d7c04 Mon Sep 17 00:00:00 2001
From: Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 8 Nov 2013 19:26:21 +0100
Subject: ipv6: protect for_each_sk_fl_rcu in mem_check with rcu_read_lock_bh

From: Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx>

[ Upstream commit f8c31c8f80dd882f7eb49276989a4078d33d67a7 ]

Fixes a suspicious rcu derference warning.

Cc: Florent Fourcot <florent.fourcot@xxxxxxxxxxxxxxxx>
Signed-off-by: Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 net/ipv6/ip6_flowlabel.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -453,8 +453,10 @@ static int mem_check(struct sock *sk)
 	if (room > FL_MAX_SIZE - FL_MAX_PER_SOCK)
 		return 0;
 
+	rcu_read_lock_bh();
 	for_each_sk_fl_rcu(np, sfl)
 		count++;
+	rcu_read_unlock_bh();
 
 	if (room <= 0 ||
 	    ((count >= FL_MAX_PER_SOCK ||


Patches currently in stable-queue which might be from hannes@xxxxxxxxxxxxxxxxxxx are

queue-3.10/ipv6-fix-headroom-calculation-in-udp6_ufo_fragment.patch
queue-3.10/inet-prevent-leakage-of-uninitialized-memory-to-user-in-recv-syscalls.patch
queue-3.10/net-rework-recvmsg-handler-msg_name-and-msg_namelen-logic.patch
queue-3.10/ipv6-use-rt6_get_dflt_router-to-get-default-router-in-rt6_route_rcv.patch
queue-3.10/ipv6-fix-possible-seqlock-deadlock-in-ip6_finish_output2.patch
queue-3.10/net-add-bug_on-if-kernel-advertises-msg_namelen-sizeof-struct-sockaddr_storage.patch
queue-3.10/random32-fix-off-by-one-in-seeding-requirement.patch
queue-3.10/inet-fix-possible-seqlock-deadlocks.patch
queue-3.10/inet-fix-addr_len-msg-msg_namelen-assignment-in-recv_error-and-rxpmtu-functions.patch
queue-3.10/ipv6-fix-leaking-uninitialized-port-number-of-offender-sockaddr.patch
queue-3.10/ipv6-protect-for_each_sk_fl_rcu-in-mem_check-with-rcu_read_lock_bh.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]