Skip to content

Commit f65163f

Browse files
Jon Maloydavem330
authored andcommitted
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>
1 parent 56546e3 commit f65163f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/tipc/name_table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ void tipc_nametbl_lookup_dst_nodes(struct net *net, u32 type, u32 lower,
697697
spin_lock_bh(&seq->lock);
698698
sseq = seq->sseqs + nameseq_locate_subseq(seq, lower);
699699
stop = seq->sseqs + seq->first_free;
700-
for (; sseq->lower <= upper && sseq != stop; sseq++) {
700+
for (; sseq != stop && sseq->lower <= upper; sseq++) {
701701
info = sseq->info;
702702
list_for_each_entry(publ, &info->zone_list, zone_list) {
703703
if (tipc_in_scope(domain, publ->node))

0 commit comments

Comments
 (0)