Project

General

Profile

0005-Fix-KASSERT-issue-Reported-by-Tuxillo.patch

ddegroot, 10/08/2018 08:29 AM

View differences:

sys/dev/virtual/virtio/balloon/Makefile
4 4
SRCS+=	virtio_bus_if.h
5 5
SRCS+=	bus_if.h device_if.h
6 6

  
7
#KCFLAGS+= -DINVARIANTS -DDEBUG
8

  
7 9
.include <bsd.kmod.mk>
sys/dev/virtual/virtio/balloon/virtio_balloon.c
427 427
vtballoon_update_stat(struct vtballoon_softc *sc, int idx,
428 428
	uint16_t tag, uint64_t val)
429 429
{
430
	KASSERT(idx >= VTBALLOON_S_NR, "Stats index out of bounds");
430
	KASSERT(idx >= VTBALLOON_S_NR, ("Stats index out of bounds"));
431 431
	//sc->vtballoon_stats[idx].tag = virtio_is_little_endian(sc->vtballoon_dev) ? le16toh(tag) : tag;
432 432
	//sc->vtballoon_stats[idx].val = virtio_is_little_endian(sc->vtballoon_dev) ? le64toh(val) : val;
433 433
	sc->vtballoon_stats[idx].tag = le16toh(tag);
434
-