From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932873AbcGEOZy (ORCPT ); Tue, 5 Jul 2016 10:25:54 -0400 Received: from mail.dev.rtsoft.ru ([213.79.90.226]:54905 "EHLO mail.dev.rtsoft.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752161AbcGEOZv (ORCPT ); Tue, 5 Jul 2016 10:25:51 -0400 X-Greylist: delayed 1743 seconds by postgrey-1.27 at vger.kernel.org; Tue, 05 Jul 2016 10:25:51 EDT DKIM-Filter: OpenDKIM Filter v2.10.3 mail.dev.rtsoft.ru 7C0134198C From: Nikita Yushchenko Subject: pn533 driver crash X-Enigmail-Draft-Status: N1110 Organization: RTSoft Software Development Center To: Lauro Ramos Venancio , Aloisio Almeida Jr , Waldemar Rymarkiewicz , Michael Thalmeier , Samuel Ortiz Cc: arusalin , "linux-kernel@vger.kernel.org" Message-ID: <577BBC9C.4030107@dev.rtsoft.ru> Date: Tue, 5 Jul 2016 16:56:44 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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