pn533 driver crash

From: Nikita Yushchenko
Date: Tue Jul 05 2016 - 10:25:57 EST


Hi

We have ported pn533 driver from current upstream kernel to vendor
kernel that our target hardware runs, and are having crashes.

Analysis shows that same is possible in upstream kernel as well.

commit b31d5103c message states that pn533_recv_frame() can be entered
with dev->cmd not set. And in this case, change done by that commit
jumps directly to queue_work().

However, work routine pn533_wq_cmd_complete() unconditionally calls
pn533_send_async_complete(), and that unconditionally dereferences
dev->cmd. Thus crash.

Not yet sure how to fix that properly...

WBR,
Nikita Yushchenko