diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-19 20:12:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 13:10:18 -0400 |
commit | 5928a2b60cfdbad730f93696acab142d0b607280 (patch) | |
tree | 49bb21c9219673e61bad7a7c9202c7f25f5fe1be /net/ipv4 | |
parent | 5ed59af85077d28875a3a137b21933aaf1b4cd50 (diff) | |
parent | bdd4431c8d071491a68a65d9457996f222b5ecd3 (diff) |
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull RCU changes for v3.4 from Ingo Molnar. The major features of this
series are:
- making RCU more aggressive about entering dyntick-idle mode in order
to improve energy efficiency
- converting a few more call_rcu()s to kfree_rcu()s
- applying a number of rcutree fixes and cleanups to rcutiny
- removing CONFIG_SMP #ifdefs from treercu
- allowing RCU CPU stall times to be set via sysfs
- adding CPU-stall capability to rcutorture
- adding more RCU-abuse diagnostics
- updating documentation
- fixing yet more issues located by the still-ongoing top-to-bottom
inspection of RCU, this time with a special focus on the CPU-hotplug
code path.
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (48 commits)
rcu: Stop spurious warnings from synchronize_sched_expedited
rcu: Hold off RCU_FAST_NO_HZ after timer posted
rcu: Eliminate softirq-mediated RCU_FAST_NO_HZ idle-entry loop
rcu: Add RCU_NONIDLE() for idle-loop RCU read-side critical sections
rcu: Allow nesting of rcu_idle_enter() and rcu_idle_exit()
rcu: Remove redundant check for rcu_head misalignment
PTR_ERR should be called before its argument is cleared.
rcu: Convert WARN_ON_ONCE() in rcu_lock_acquire() to lockdep
rcu: Trace only after NULL-pointer check
rcu: Call out dangers of expedited RCU primitives
rcu: Rework detection of use of RCU by offline CPUs
lockdep: Add CPU-idle/offline warning to lockdep-RCU splat
rcu: No interrupt disabling for rcu_prepare_for_idle()
rcu: Move synchronize_sched_expedited() to rcutree.c
rcu: Check for illegal use of RCU from offlined CPUs
rcu: Update stall-warning documentation
rcu: Add CPU-stall capability to rcutorture
rcu: Make documentation give more realistic rcutorture duration
rcutorture: Permit holding off CPU-hotplug operations during boot
rcu: Print scheduling-clock information on RCU CPU stall-warning messages
...
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/cipso_ipv4.c | 11 | ||||
-rw-r--r-- | net/ipv4/ip_sockglue.c | 7 |
2 files changed, 4 insertions, 14 deletions
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index 86f3b885b4f3..c48adc565e92 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c | |||
@@ -1857,11 +1857,6 @@ static int cipso_v4_genopt(unsigned char *buf, u32 buf_len, | |||
1857 | return CIPSO_V4_HDR_LEN + ret_val; | 1857 | return CIPSO_V4_HDR_LEN + ret_val; |
1858 | } | 1858 | } |
1859 | 1859 | ||
1860 | static void opt_kfree_rcu(struct rcu_head *head) | ||
1861 | { | ||
1862 | kfree(container_of(head, struct ip_options_rcu, rcu)); | ||
1863 | } | ||
1864 | |||
1865 | /** | 1860 | /** |
1866 | * cipso_v4_sock_setattr - Add a CIPSO option to a socket | 1861 | * cipso_v4_sock_setattr - Add a CIPSO option to a socket |
1867 | * @sk: the socket | 1862 | * @sk: the socket |
@@ -1938,7 +1933,7 @@ int cipso_v4_sock_setattr(struct sock *sk, | |||
1938 | } | 1933 | } |
1939 | rcu_assign_pointer(sk_inet->inet_opt, opt); | 1934 | rcu_assign_pointer(sk_inet->inet_opt, opt); |
1940 | if (old) | 1935 | if (old) |
1941 | call_rcu(&old->rcu, opt_kfree_rcu); | 1936 | kfree_rcu(old, rcu); |
1942 | 1937 | ||
1943 | return 0; | 1938 | return 0; |
1944 | 1939 | ||
@@ -2005,7 +2000,7 @@ int cipso_v4_req_setattr(struct request_sock *req, | |||
2005 | req_inet = inet_rsk(req); | 2000 | req_inet = inet_rsk(req); |
2006 | opt = xchg(&req_inet->opt, opt); | 2001 | opt = xchg(&req_inet->opt, opt); |
2007 | if (opt) | 2002 | if (opt) |
2008 | call_rcu(&opt->rcu, opt_kfree_rcu); | 2003 | kfree_rcu(opt, rcu); |
2009 | 2004 | ||
2010 | return 0; | 2005 | return 0; |
2011 | 2006 | ||
@@ -2075,7 +2070,7 @@ static int cipso_v4_delopt(struct ip_options_rcu **opt_ptr) | |||
2075 | * remove the entire option struct */ | 2070 | * remove the entire option struct */ |
2076 | *opt_ptr = NULL; | 2071 | *opt_ptr = NULL; |
2077 | hdr_delta = opt->opt.optlen; | 2072 | hdr_delta = opt->opt.optlen; |
2078 | call_rcu(&opt->rcu, opt_kfree_rcu); | 2073 | kfree_rcu(opt, rcu); |
2079 | } | 2074 | } |
2080 | 2075 | ||
2081 | return hdr_delta; | 2076 | return hdr_delta; |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 8aa87c19fa00..5343d9ac510b 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -445,11 +445,6 @@ out: | |||
445 | } | 445 | } |
446 | 446 | ||
447 | 447 | ||
448 | static void opt_kfree_rcu(struct rcu_head *head) | ||
449 | { | ||
450 | kfree(container_of(head, struct ip_options_rcu, rcu)); | ||
451 | } | ||
452 | |||
453 | /* | 448 | /* |
454 | * Socket option code for IP. This is the end of the line after any | 449 | * Socket option code for IP. This is the end of the line after any |
455 | * TCP,UDP etc options on an IP socket. | 450 | * TCP,UDP etc options on an IP socket. |
@@ -525,7 +520,7 @@ static int do_ip_setsockopt(struct sock *sk, int level, | |||
525 | } | 520 | } |
526 | rcu_assign_pointer(inet->inet_opt, opt); | 521 | rcu_assign_pointer(inet->inet_opt, opt); |
527 | if (old) | 522 | if (old) |
528 | call_rcu(&old->rcu, opt_kfree_rcu); | 523 | kfree_rcu(old, rcu); |
529 | break; | 524 | break; |
530 | } | 525 | } |
531 | case IP_PKTINFO: | 526 | case IP_PKTINFO: |