Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1222762imj; Thu, 7 Feb 2019 20:31:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IaXINIdSPvHDPGypYy0UO6FF8y57JIw96g/MCWcha6G7W69nZi1gRp2PslMbmXcAb2rM1tk X-Received: by 2002:a62:44d8:: with SMTP id m85mr20350348pfi.164.1549600287768; Thu, 07 Feb 2019 20:31:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549600287; cv=none; d=google.com; s=arc-20160816; b=suYnqyzkEyTvKJbA0/mkn+CNqlxobTNqNqZPUUuRJI4ROpeO9mA7vYZxx8h7xD2SNy AOVGemyscg5yerhcO729pw1bo9r3w54KltTQUcNhCAAaRjgyggOljrpXPyuLe1rTurny 6M5nn3LkTeJRNJVXCdXMup4nlDJU++E+Mus7HzUZ9cXUzhEkRoulZAn0VSuFKfdl8Yf5 IaVna/UUGFQxw0B9c6aDBGruYAD7b6YAC5WVNxVO6hkF/YpUUvKwSv4kRoI9fiXdWdYd /IYjvM4R7bCMUnO5Ty6avkFeCtMgLa3ZW0YCygBIdRGiT0S+W9RXK6S+vvp4ca5fmgCZ zZQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=AQlvXhGfIkRC4TrgLnc6anTwFoSxifqTWXGE0OJN5TE=; b=w57xQoD9g2+oOVvCeCVOGW15RY7fa/62jV9Zs88pKLkZu+KmG9MOg10CctlDV0ygoS dvKUoJ2PT7nZqkV9Gdl/Yb69AKXP8Y5UuGgbeC7Xbs9GzW5Vig/whIQrFBYU0oaW/V29 /drZqlabvQcKbA08KE5dVX+iWyS2EFl96nltXojuIu8FnmIs3GY3//9Ajo2VzHYg2rfG NTWFRrIitpVvgXUhZrjYj6WB6vaNEwyIXETyOMAqjLcq+Mnhv6ikNWCB6FbQ8kGjb9fk pNolm69R9fp/JcxOEsUxlIs2+w3uVmmQukLfqAjGKHfoeMhZnmO5yeuhZXR2KEdNyMAN Q3dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ce9xvy4Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32si1097625pgh.276.2019.02.07.20.31.10; Thu, 07 Feb 2019 20:31:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ce9xvy4Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbfBHEac (ORCPT + 99 others); Thu, 7 Feb 2019 23:30:32 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:43239 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726793AbfBHEab (ORCPT ); Thu, 7 Feb 2019 23:30:31 -0500 Received: by mail-lj1-f193.google.com with SMTP id q2-v6so1815396lji.10 for ; Thu, 07 Feb 2019 20:30:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AQlvXhGfIkRC4TrgLnc6anTwFoSxifqTWXGE0OJN5TE=; b=ce9xvy4YlXHnUUUJ9XoNxrmZPs49Va18Z/7f5w/V6fXGwSDoliHSfe9i5MXWOkDiGo 2VGlUpZMxO9wf2qpnvx5TlQ8mtyjMVa2FVleN+X34NaANM+ZTzSq62cWJ0LMIJs3NW/y /Kn2XFQdq0TdGFUP5cb0F8/wMW6jXS91Hi1TWpx1/Fbsc1drCHU15+apcxiDWPgQtsed M8ldYaiYjr8D2U/XocMEGYxB6qC5DfXBEXXX+XBUsyTOlMgr3TzBKvv9dJIhs6nAB5O1 jJ3Uf1PX5q4pdKiHqM9LCYCCGQ/pNpLrUK1jJX49+eBfKaWsRgdcpArS4+x3ChB7iaLl /O0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AQlvXhGfIkRC4TrgLnc6anTwFoSxifqTWXGE0OJN5TE=; b=r+8l8KdURYUvG0I18aKInw4byDFSkVadiGyy7hzIswWGkixY1EOI3jLj8S4u8mfSig j/6V6xLYrSCBSwcBgfu+h2NKcKSWisndmJVSHS62E3oHjX1so0gayVr9UYinuNlb7Q53 4JBsFWBZLKfLoxjD9wBwG9XWYUAObjY43B0pYv1GxST3/DnOlvvR6ZrkaWb9AMsSLfu3 WRjgawXQ8ZyXS06XDCFhnYyipXRbt/hBEtmqurROFAyCneabQRRVWQcJzqlBVVbKb3CU 9Lrsfb3rXCb0IYlR2YTlNZa8wthI4/DMpVkqL0f7pYGvnDndQCOqUeVmrscEHbvHbCsF JvZA== X-Gm-Message-State: AHQUAuYd2ynPTZhbUOeQSXKs27IcHz5I7YXTG143BRywhpWeIgM2Poox SpzllkSSkcWIqMf6qQiQ31x7l9xOqRaEjGod0x0= X-Received: by 2002:a2e:9681:: with SMTP id q1-v6mr12056316lji.182.1549600229559; Thu, 07 Feb 2019 20:30:29 -0800 (PST) MIME-Version: 1.0 References: <20190204220952.30761-1-TheSven73@googlemail.com> In-Reply-To: From: Miguel Ojeda Date: Fri, 8 Feb 2019 05:30:18 +0100 Message-ID: Subject: Re: [RFC v1 0/3] Address potential user-after-free on module unload To: Sven Van Asbroeck Cc: Dmitry Torokhov , Kees Cook , Tejun Heo , Lai Jiangshan , LKML , Sebastian Reichel , Greg KH Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 7, 2019 at 11:33 PM Sven Van Asbroeck wrote: > > On Thu, Feb 7, 2019 at 5:21 PM Dmitry Torokhov > wrote: > > > > > ./drivers//input/keyboard/matrix_keypad.c:512:1-18: missing clean-up > > > of INIT_WORK/INIT_DELAYED_WORK initialized here > > > > This is not as simple. > > > > PS If you change > flush_work(&keypad->work.work); > to > flush_delayed_work(&keypad->work); > > then the Coccinelle script works correctly, and does not flag > this driver. Similarly, in drivers/auxdisplay/ht16k33.c, the cancel_delayed_work() is there, instead of cancel_delayed_work_sync(). Having the script suggest this change would be useful, too (i.e. instead of the devm_ change, assuming the cancel_delayed_work() is already there). Thanks! Miguel