From patchwork Tue Apr 12 10:56:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duoming Zhou X-Patchwork-Id: 12810642 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62479C4167B for ; Tue, 12 Apr 2022 12:03:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348413AbiDLMFc (ORCPT ); Tue, 12 Apr 2022 08:05:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344015AbiDLMCK (ORCPT ); Tue, 12 Apr 2022 08:02:10 -0400 Received: from zju.edu.cn (spam.zju.edu.cn [61.164.42.155]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 70CE4673D2; Tue, 12 Apr 2022 03:57:09 -0700 (PDT) Received: from ubuntu.localdomain (unknown [10.15.192.164]) by mail-app2 (Coremail) with SMTP id by_KCgBn3hX1WlVixrabAQ--.10506S2; Tue, 12 Apr 2022 18:56:57 +0800 (CST) From: Duoming Zhou To: krzk@kernel.org, linux-kernel@vger.kernel.org Cc: davem@davemloft.net, gregkh@linuxfoundation.org, alexander.deucher@amd.com, broonie@kernel.org, akpm@linux-foundation.org, netdev@vger.kernel.org, pabeni@redhat.com, Duoming Zhou Subject: [PATCH 0/2] Fix double free bugs in nfcmrvl module Date: Tue, 12 Apr 2022 18:56:51 +0800 Message-Id: X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: by_KCgBn3hX1WlVixrabAQ--.10506S2 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYT7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628v n2kIc2xKxwCF04k20xvY0x0EwIxGrwCF04k20xvE74AGY7Cv6cx26r4fKr1UJr1l4I8I3I 0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWU GVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI 0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0 rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r 4UJbIYCTnIWIevJa73UjIFyTuYvjfUoOJ5UUUUU X-CM-SenderInfo: qssqjiasttq6lmxovvfxof0/1tbiAgwSAVZdtZJwywADsJ Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We add lock and check in fw_dnld_over() in order to synchronize among different threads that call fw_dnld_over(). The first patch fixes double free bugs caused by fw_dnld_over() and the second patch fixes double free bug in nfc_fw_download_done(). Duoming Zhou (2): drivers: nfc: nfcmrvl: fix double free bugs caused by fw_dnld_over() drivers: nfc: nfcmrvl: fix double free bug in nfc_fw_download_done() drivers/nfc/nfcmrvl/fw_dnld.c | 8 +++++++- drivers/nfc/nfcmrvl/fw_dnld.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-)