Skip to content
Commit 04172043 authored by linke li's avatar linke li Committed by Paolo Abeni
Browse files

net: ethernet: mtk_eth_soc: Reuse value using READ_ONCE instead of re-rereading it



In mtk_flow_entry_update_l2, the hwe->ib1 is read using READ_ONCE at the
beginning of the function, checked, and then re-read from hwe->ib1,
may void all guarantees of the checks. Reuse the value that was read by
READ_ONCE to ensure the consistency of the ib1 throughout the function.

Signed-off-by: default avatarlinke li <lilinke99@qq.com>
Link: https://lore.kernel.org/r/tencent_C699E9540505523424F11A9BD3D21B86840A@qq.com
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent d72b7357
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment