svn commit: r343065 - head/sys/dev/iwm

Bjoern A. Zeeb bz at FreeBSD.org
Tue Jan 15 22:31:55 UTC 2019


Author: bz
Date: Tue Jan 15 22:31:54 2019
New Revision: 343065
URL: https://svnweb.freebsd.org/changeset/base/343065

Log:
  With the sync from Dragonfly BSD in r318216 a bug slipped in (also still present
  upstream it seems).
  
  The tlv variable was changed to a pointer but the advancement of the data pointer
  was left as sizeof(tlv).  While the sizeof the (now) pointer equals the
  sizeof 2 x uint32_t (size of the struct) on 64bit platforms, on 32bit platforms
  the size of the advancement of the data pointer was wrong leading to
  firmware load issues.
  
  Correctly advance the data pointer by the size of the structure and not by
  the size of a pointer.
  
  PR:		219683
  Submitted by:	waddlesplash gamil.com (Haiku) on irc
  MFC after:	1 week

Modified:
  head/sys/dev/iwm/if_iwm.c

Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c	Tue Jan 15 21:43:18 2019	(r343064)
+++ head/sys/dev/iwm/if_iwm.c	Tue Jan 15 22:31:54 2019	(r343065)
@@ -626,7 +626,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode
 			goto parse_out;
 		}
 		len -= roundup2(tlv_len, 4);
-		data += sizeof(tlv) + roundup2(tlv_len, 4);
+		data += sizeof(*tlv) + roundup2(tlv_len, 4);
 
 		switch ((int)tlv_type) {
 		case IWM_UCODE_TLV_PROBE_MAX_LEN:


More information about the svn-src-head mailing list