Commit 1af7f88
inet: fix inet_fill_ifaddr() flags truncation
I missed that (struct ifaddrmsg)->ifa_flags was only 8bits,
while (struct in_ifaddr)->ifa_flags is 32bits.
Use a temporary 32bit variable as I did in set_ifa_lifetime()
and check_lifetime().
Fixes: 3ddc223 ("inet: annotate data-races around ifa->ifa_flags")
Reported-by: Yu Watanabe <watanabe.yu@gmail.com>
Dianosed-by: Yu Watanabe <watanabe.yu@gmail.com>
Closes: systemd/systemd#32666 (comment)
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240510072932.2678952-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent c9f9df3 commit 1af7f88
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1683 | 1683 | | |
1684 | 1684 | | |
1685 | 1685 | | |
| 1686 | + | |
1686 | 1687 | | |
1687 | 1688 | | |
1688 | 1689 | | |
| |||
1692 | 1693 | | |
1693 | 1694 | | |
1694 | 1695 | | |
1695 | | - | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
1696 | 1703 | | |
1697 | 1704 | | |
1698 | 1705 | | |
| |||
1701 | 1708 | | |
1702 | 1709 | | |
1703 | 1710 | | |
1704 | | - | |
| 1711 | + | |
1705 | 1712 | | |
1706 | 1713 | | |
1707 | 1714 | | |
| |||
1732 | 1739 | | |
1733 | 1740 | | |
1734 | 1741 | | |
1735 | | - | |
| 1742 | + | |
1736 | 1743 | | |
1737 | 1744 | | |
1738 | 1745 | | |
| |||
0 commit comments