diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-03-09 10:50:42 (GMT) |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-03-09 10:50:42 (GMT) |
commit | ab92f30875a7ec3e84644a5494febd8901e66742 (patch) | |
tree | 5254eb36b20b0d1c584c15d0bf3d6a5a9c1bb451 /lib/klist.c | |
parent | bb9eadf0c35f2e7eb5ca6468f46ebb7473b85537 (diff) | |
parent | b40c4892d175874d118860c8282a85ee7b64bcbb (diff) | |
download | linux-ab92f30875a7ec3e84644a5494febd8901e66742.tar.xz |
Merge tag 'kvm-arm-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/ARM updates for 4.6
- VHE support so that we can run the kernel at EL2 on ARMv8.1 systems
- PMU support for guests
- 32bit world switch rewritten in C
- Various optimizations to the vgic save/restore code
Conflicts:
include/uapi/linux/kvm.h
Diffstat (limited to 'lib/klist.c')
-rw-r--r-- | lib/klist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/klist.c b/lib/klist.c index d74cf7a..0507fa5 100644 --- a/lib/klist.c +++ b/lib/klist.c @@ -282,9 +282,9 @@ void klist_iter_init_node(struct klist *k, struct klist_iter *i, struct klist_node *n) { i->i_klist = k; - i->i_cur = n; - if (n) - kref_get(&n->n_ref); + i->i_cur = NULL; + if (n && kref_get_unless_zero(&n->n_ref)) + i->i_cur = n; } EXPORT_SYMBOL_GPL(klist_iter_init_node); |