diff options
author | Jon Maloy <jon.maloy@ericsson.com> | 2017-10-25 10:19:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-25 20:38:34 -0400 |
commit | f65163fed0e7dc3c79be4f96a8fe97fc89328b93 (patch) | |
tree | cec14916009c021f240e2a3ce3f1654b56acc3de /net/tipc | |
parent | 56546e3b9f2284a750c9ca24617544ff5cf56af4 (diff) |
tipc: eliminate KASAN warning
The following warning was reported by syzbot on Oct 24. 2017:
KASAN: slab-out-of-bounds Read in tipc_nametbl_lookup_dst_nodes
This is a harmless bug, but we still want to get rid of the warning,
so we swap the two conditions in question.
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/name_table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 2856e19e036e..b3829bcf63c7 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c | |||
@@ -697,7 +697,7 @@ void tipc_nametbl_lookup_dst_nodes(struct net *net, u32 type, u32 lower, | |||
697 | spin_lock_bh(&seq->lock); | 697 | spin_lock_bh(&seq->lock); |
698 | sseq = seq->sseqs + nameseq_locate_subseq(seq, lower); | 698 | sseq = seq->sseqs + nameseq_locate_subseq(seq, lower); |
699 | stop = seq->sseqs + seq->first_free; | 699 | stop = seq->sseqs + seq->first_free; |
700 | for (; sseq->lower <= upper && sseq != stop; sseq++) { | 700 | for (; sseq != stop && sseq->lower <= upper; sseq++) { |
701 | info = sseq->info; | 701 | info = sseq->info; |
702 | list_for_each_entry(publ, &info->zone_list, zone_list) { | 702 | list_for_each_entry(publ, &info->zone_list, zone_list) { |
703 | if (tipc_in_scope(domain, publ->node)) | 703 | if (tipc_in_scope(domain, publ->node)) |