Explorar o código

niu: BUG on inability to find page in rx page hashes.

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller %!s(int64=15) %!d(string=hai) anos
pai
achega
a038716957
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      drivers/net/niu.c

+ 3 - 1
drivers/net/niu.c

@@ -3330,10 +3330,12 @@ static struct page *niu_find_rxpage(struct rx_ring_info *rp, u64 addr,
 	for (; (p = *pp) != NULL; pp = (struct page **) &p->mapping) {
 		if (p->index == addr) {
 			*link = pp;
-			break;
+			goto found;
 		}
 	}
+	BUG();
 
+found:
 	return p;
 }