aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/radix-tree/bitmap.c
diff options
context:
space:
mode:
authorKévin L'hôpital <[email protected]>2024-03-07 12:19:06 +0100
committerDavid S. Miller <[email protected]>2024-03-08 10:18:33 +0000
commit4469c0c5b14a0919f5965c7ceac96b523eb57b79 (patch)
tree3dcddf51aeea7697ea2caa59dc1ab6c253fde72f /tools/testing/radix-tree/bitmap.c
parentfc1b2901e0feed933aaee273d0b0ca961539f4d7 (diff)
net: phy: fix phy_get_internal_delay accessing an empty array
The phy_get_internal_delay function could try to access to an empty array in the case that the driver is calling phy_get_internal_delay without defining delay_values and rx-internal-delay-ps or tx-internal-delay-ps is defined to 0 in the device-tree. This will lead to "unable to handle kernel NULL pointer dereference at virtual address 0". To avoid this kernel oops, the test should be delay >= 0. As there is already delay < 0 test just before, the test could only be size == 0. Fixes: 92252eec913b ("net: phy: Add a helper to return the index for of the internal delay") Co-developed-by: Enguerrand de Ribaucourt <[email protected]> Signed-off-by: Enguerrand de Ribaucourt <[email protected]> Signed-off-by: Kévin L'hôpital <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/testing/radix-tree/bitmap.c')
0 files changed, 0 insertions, 0 deletions