freebsd-nq/sys
Roger Pau Monné 60e749da3c mbuf_tags: use explicitly sized type for 'type' parameter
Functions manipulating mbuf tags are using an int type for passing the
'type' parameter, but the internal tag storage is using a 16bit
integer to store it. This leads to the following code:

t = m_tag_alloc(...,0xffffffff,...,...);
m_tag_prepend(m, t);
r = m_tag_locate(m ,...,0xffffffff, NULL);

Returning r == NULL because m_tag_locate doesn't truncate the type
parameter when doing the match. This is unexpected because the type of
the 'type' parameter is int, and the caller doesn't need to know about
the internal truncations.

Fix this by making the 'type' parameter of type uint16_t in order to
match the size of its internal storage and make it obvious to the
caller the actual size of the parameter.

While there also use uint uniformly replacing the existing u_int
instances.

Reviewed by: kp, donner, glebius
Differential revision: https://reviews.freebsd.org/D33680
2021-12-29 09:23:52 +01:00
..
amd64 Simplify swi for bus_dma. 2021-12-28 13:51:25 -08:00
arm Simplify swi for bus_dma. 2021-12-28 13:51:25 -08:00
arm64 arm64: Simplify pmap_ts_referenced 2021-12-28 17:59:39 -06:00
bsm
cam adaspindown: check disk power mode before sending IDLE command 2021-12-24 11:02:22 +02:00
cddl dtrace: Use C99 fixed-width integer types. 2021-12-28 09:41:25 -08:00
compat sys/compat: Use C99 fixed-width integer types. 2021-12-28 09:41:33 -08:00
conf LinuxKPI: add 802.11 compat code 2021-12-27 18:47:25 +00:00
contrib iwlwifi: plug memory modified after free 2021-12-27 18:47:26 +00:00
crypto sys/crypto: Use C99 fixed-width integer types. 2021-12-28 09:41:38 -08:00
ddb sys/ddb: Use C99 fixed-width integer types. 2021-12-28 09:41:47 -08:00
dev cxgbe(4): Fix panic on driver detach after a partially failed attach. 2021-12-28 16:57:37 -08:00
dts
fs nfscommon: Return NFSERR_ATTRNOTSUPP for AUDIT/ALARM ACEs 2021-12-27 08:03:41 -08:00
gdb
geom sys/geom: Use C99 fixed-width integer types. 2021-12-28 09:41:51 -08:00
gnu
i386 Simplify swi for bus_dma. 2021-12-28 13:51:25 -08:00
isa sys/isa: Use C99 fixed-width integer types. 2021-12-28 09:41:57 -08:00
kern mbuf_tags: use explicitly sized type for 'type' parameter 2021-12-29 09:23:52 +01:00
kgssapi
libkern sys/libkern: Use C99 fixed-width integer types. 2021-12-28 09:42:11 -08:00
mips Simplify swi for bus_dma. 2021-12-28 13:51:25 -08:00
modules iwlwifi: attach to the build 2021-12-27 18:47:26 +00:00
net net: iflib: sync isc_capenable to if_capenable 2021-12-28 10:55:21 +00:00
net80211 net80211: adjust a printf to toeee80211_note 2021-12-26 17:26:58 +00:00
netgraph netgraph: Remove CTLFLAG_NEEDGIANT from sysctl. 2021-12-26 19:42:53 -05:00
netinet tcp_usr_shutdown: don't cast inp_ppcb to tcpcb before checking inp_flags 2021-12-28 08:50:02 -08:00
netinet6 in_pcb: use jenkins hash over the entire IPv6 (or IPv4) address 2021-12-26 10:47:28 -08:00
netipsec crypto: Consistently use AES instead of Rijndael128 for the AES-CBC cipher. 2021-12-16 13:47:27 -08:00
netpfil ipfilter: Move kernel bits to netpfil 2021-12-20 06:16:33 -08:00
netsmb
nfs nfs: don't truncate directory cookies to 32-bits in the NFS server 2021-12-15 20:54:57 -07:00
nfsclient
nfsserver
nlm sys/nlm: Use C99 fixed-width integer types. 2021-12-28 09:42:42 -08:00
ofed sys/ofed: Use C99 fixed-width integer types. 2021-12-28 09:43:09 -08:00
opencrypto cryptodev.h: Drop 'extern' from function prototypes. 2021-12-21 12:33:49 -08:00
powerpc Simplify swi for bus_dma. 2021-12-28 13:51:25 -08:00
riscv Simplify swi for bus_dma. 2021-12-28 13:51:25 -08:00
rpc sys/rpc: Use C99 fixed-width integer types. 2021-12-28 09:43:15 -08:00
security
sys mbuf_tags: use explicitly sized type for 'type' parameter 2021-12-29 09:23:52 +01:00
teken
tests
tools arm64: Don't rely on host readelf for u-boot booti image generation 2021-12-24 19:25:20 +00:00
ufs Change VOP_READDIR's cookies argument to a **uint64_t 2021-12-15 20:54:57 -07:00
vm sys/vm: Use C99 fixed-width integer types. 2021-12-28 09:43:21 -08:00
x86 x86: Do not attempt to calibrate the LAPIC timer if no APIC is present 2021-12-28 17:47:49 -05:00
xdr sys/xdr: Use C99 fixed-width integer types. 2021-12-28 09:43:26 -08:00
xen
Makefile