mmc: block: Fix an invalid use of req->cmd_flag in DISCARD operation
When handling a DISCARD operation, the MMC request data structure may be freed in memory. Therefore, it can't be used to retrieve the cmd_flags for checking if MMC_REQ_NOREINSERT_MASK is set: (!(mq->mqrq_cur->req->cmd_flags & MMC_REQ_NOREINSERT_MASK)))). To prevent the issue we should use the local variable of cmd_flags. Change-Id: Idef53d5bd66fa6f1faaf79644c8efb5177c75e89 Signed-off-by:Maya Erez <merez@codeaurora.org> Signed-off-by:
Konstantin Dorfman <kdorfman@codeaurora.org>
Loading
Please register or sign in to comment