Commit 7b3887d5 authored by Qiang Yu's avatar Qiang Yu Committed by Steev Klimaszewski
Browse files

bus: mhi: host: Fix race between channel preparation and M0 event



There is a race condition where mhi_prepare_channel() updates the
read and write pointers as the base address and in parallel, if
an M0 transition occurs, the tasklet goes ahead and rings
doorbells for all channels with a delta in TRE rings assuming
they are already enabled. This causes a null pointer access. Fix
it by adding a channel enabled check before ringing channel
doorbells.

Signed-off-by: default avatarQiang Yu <quic_qianyu@quicinc.com>
parent ac2af864
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment