diff options
author | David S. Miller <davem@davemloft.net> | 2019-07-02 04:15:46 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-02 04:15:46 +0200 |
commit | 8a534f8fb0dc44694a437b575060499efd1c91de (patch) | |
tree | 88f7b417e9a8c7061b04e7ba0a77c3884b4f018b /net/tls/tls_device.c | |
parent | Merge branch 'vsock-virtio-fixes' (diff) | |
parent | selftests: add a test case for cls_lower handle overflow (diff) | |
download | linux-8a534f8fb0dc44694a437b575060499efd1c91de.tar.xz linux-8a534f8fb0dc44694a437b575060499efd1c91de.zip |
Merge branch 'idr-fix-overflow-cases-on-32-bit-CPU'
Cong Wang says:
====================
idr: fix overflow cases on 32-bit CPU
idr_get_next_ul() is problematic by design, it can't handle
the following overflow case well on 32-bit CPU:
u32 id = UINT_MAX;
idr_alloc_u32(&id);
while (idr_get_next_ul(&id) != NULL)
id++;
when 'id' overflows and becomes 0 after UINT_MAX, the loop
goes infinite.
Fix this by eliminating external users of idr_get_next_ul()
and migrating them to idr_for_each_entry_continue_ul(). And
add an additional parameter for these iteration macros to detect
overflow properly.
Please merge this through networking tree, as all the users
are in networking subsystem.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls/tls_device.c')
0 files changed, 0 insertions, 0 deletions