aboutsummaryrefslogtreecommitdiff
path: root/net/netfilter/ipvs/ip_vs_sched.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2015-11-04 09:14:16 -0800
committerKevin Hilman <khilman@linaro.org>2015-11-04 09:14:16 -0800
commit9ce0d731981a1489331e12bb7f94907438515622 (patch)
treedbaf88cffe4c6207b21fc39061fae46f38b6fb2c /net/netfilter/ipvs/ip_vs_sched.c
parentc1fa16368f309a6f636ad193a47cde9253db97a7 (diff)
parentb12403044336e7d567f309eb443aa9acf76380af (diff)
Merge tag 'v3.18.24' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-linaro-lsk-v3.18
Linux 3.18.24 # gpg: Signature made Sat Oct 31 13:44:30 2015 PDT using RSA key ID 97772CDC # gpg: Can't check signature: public key not found * tag 'v3.18.24' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (234 commits) Linux 3.18.24 tty: fix stall caused by missing memory barrier in drivers/tty/n_tty.c Revert "tty: fix stall caused by missing memory barrier in drivers/tty/n_tty.c" Linux 3.18.23 x86: Init per-cpu shadow copy of CR4 on 32-bit CPUs too 3w-9xxx: don't unmap bounce buffered commands fib_rules: Fix dump_rules() not to exit early vfs: Test for and handle paths that are unreachable from their mnt_root md: flush ->event_work before stopping array. x86/nmi/64: Fix a paravirt stack-clobbering bug in the NMI code Revert "iio: bmg160: IIO_BUFFER and IIO_TRIGGERED_BUFFER are required" net: Fix skb_set_peeked use-after-free bug mm: check if section present during memory block registering hpfs: update ctime and mtime on directory modification drivercore: Fix unregistration path of platform devices ARM: OMAP2+: DRA7: clockdomain: change l4per2_7xx_clkdm to SW_WKUP of/address: Don't loop forever in of_find_matching_node_by_address(). auxdisplay: ks0108: fix refcount Doc: ABI: testing: configfs-usb-gadget-sourcesink Doc: ABI: testing: configfs-usb-gadget-loopback ...
Diffstat (limited to 'net/netfilter/ipvs/ip_vs_sched.c')
-rw-r--r--net/netfilter/ipvs/ip_vs_sched.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/netfilter/ipvs/ip_vs_sched.c b/net/netfilter/ipvs/ip_vs_sched.c
index 4dbcda6258bc..21b6b515a09c 100644
--- a/net/netfilter/ipvs/ip_vs_sched.c
+++ b/net/netfilter/ipvs/ip_vs_sched.c
@@ -74,7 +74,7 @@ void ip_vs_unbind_scheduler(struct ip_vs_service *svc,
if (sched->done_service)
sched->done_service(svc);
- /* svc->scheduler can not be set to NULL */
+ /* svc->scheduler can be set to NULL only by caller */
}
@@ -148,21 +148,21 @@ void ip_vs_scheduler_put(struct ip_vs_scheduler *scheduler)
void ip_vs_scheduler_err(struct ip_vs_service *svc, const char *msg)
{
- struct ip_vs_scheduler *sched;
+ struct ip_vs_scheduler *sched = rcu_dereference(svc->scheduler);
+ char *sched_name = sched ? sched->name : "none";
- sched = rcu_dereference(svc->scheduler);
if (svc->fwmark) {
IP_VS_ERR_RL("%s: FWM %u 0x%08X - %s\n",
- sched->name, svc->fwmark, svc->fwmark, msg);
+ sched_name, svc->fwmark, svc->fwmark, msg);
#ifdef CONFIG_IP_VS_IPV6
} else if (svc->af == AF_INET6) {
IP_VS_ERR_RL("%s: %s [%pI6c]:%d - %s\n",
- sched->name, ip_vs_proto_name(svc->protocol),
+ sched_name, ip_vs_proto_name(svc->protocol),
&svc->addr.in6, ntohs(svc->port), msg);
#endif
} else {
IP_VS_ERR_RL("%s: %s %pI4:%d - %s\n",
- sched->name, ip_vs_proto_name(svc->protocol),
+ sched_name, ip_vs_proto_name(svc->protocol),
&svc->addr.ip, ntohs(svc->port), msg);
}
}