Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp956479imj; Thu, 7 Feb 2019 14:50:33 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib5cda+htGAOS0LnXIz3HC+dMdmVCW8iZqWEOcxgMmroAHkAMd8+NaJBDES+/voH4bvbbh/ X-Received: by 2002:a17:902:1022:: with SMTP id b31mr18931010pla.141.1549579833180; Thu, 07 Feb 2019 14:50:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549579833; cv=none; d=google.com; s=arc-20160816; b=z51xt7z7y1HJTHTdivUrtLEibRomd1ymLvFsItXck1yj7I1Mh5wbE/1ynUv9OT3dTQ CSIJxl2GDfEDZgBcc6c0ZSqaSY7kjLPjp//UOxRcY2jAGEnTTDmYMs0NHOUBCBefVqD7 eAF7bvn9VCeM09Rn7Oq7UHdrIdbOCI962x4FisfBDSLu9ruF49mXhvBVOuyt3TLCNXGJ D9m2702W8/4rTIgfjWQb39U/JB255TRhSrhThKnBVTRT2SDOoxeFlq+6nYq9GGzS0muS IdFAphKjPEXvny4aBTTOlTvLHDH3Ap/x0/nl1jLf3NUPJzicy3wmMO7CZesYghbc+Uhw eETQ== 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=jzQzslJ11C0UlZoMvWBLrEA9sQ73JX0eKPxZpsC99rg=; b=FpjkAn8NMCEWi6oR3DB2kWzAfR+igechfnopOjcq94B59eNloYM4FsyiXpaG02Z0qp vl8p050c++vDi3d9xqOW8kJJvhLbWoCzdx4kLw+P08ZUFQjYhaJ1Gzc3dJCpclsgABnZ OqvFAmbCTZc5EU7JjHM7JNuEa0P1p1BjH58/TDiqoYIYqu31OomNSFkEkDxIrhCAQIkU z2Vd0CxPiEYa+USKTIJL82TklNmsJuuxa2h/lw6AquvIEGxSIVE8f2wBq+sDdu29Xs8p rjq+QC9FdEUdW3cbXUifMN3mipQ0Dgl6ZayLtfTqKn82bra1Ufg986gRAiYvvNLRFRWD FEgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kwIYtvH7; 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 m198si282520pga.98.2019.02.07.14.50.16; Thu, 07 Feb 2019 14:50:33 -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=kwIYtvH7; 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 S1727003AbfBGWsw (ORCPT + 99 others); Thu, 7 Feb 2019 17:48:52 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:51991 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726650AbfBGWsv (ORCPT ); Thu, 7 Feb 2019 17:48:51 -0500 Received: by mail-it1-f195.google.com with SMTP id w18so4285838ite.1 for ; Thu, 07 Feb 2019 14:48:51 -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=jzQzslJ11C0UlZoMvWBLrEA9sQ73JX0eKPxZpsC99rg=; b=kwIYtvH7qYzh2T2OOlLp1pjmK4TUAfz88JPIp+W+deQ2XdXeyLthomf2m6vweGw3T4 TGp9My8VK0+jF8NFdKgxEExheM/IfJXexm+Q8dqqtkm976hMdnp70G5yqwI7OnQ+OxTJ gHlqG2Ph+/H3GylK4EwOXRxQTAtVzduWk0Oo4UdgL35FfhTQxLdS1YB6W5pyCYJP7+Bd PaJkqRJVJKHUWAXD+25G/0A3bX3pAx+A/MGIIHbXAJyL8FSUPAzE+Th9Xro/ns+l74jx 6WToCEqCbYGQoaYkhGR05CXxoxkmiyKi3hH5cNVcbJo4s660VEphtYdS0m1FZhCKVlSn 9Yzg== 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=jzQzslJ11C0UlZoMvWBLrEA9sQ73JX0eKPxZpsC99rg=; b=d3IT8mR41Wo6Ezs0BHnSn8E0xRbINU9kOsL01JUIHRMAqpc/TILVbCFHhSY+wH4uM9 V3pbmPfLUPll+tpxFHXZ25yJvAtqwT2JVuHQQxsg0SfwSXFx9GG13K/lMhpXXAb07i7v 7Pd30HGkKa6mkVUc94o4shS5yTjoFGaAXv16V9nt3suyzAlYggn1Cwk2mQxr8jhZ34Un K5DTuGEEY4QktzGu9Jbc8vq2ydQ0VqZWj9zHfB8tUhqkSKDdAECqTcuEzvtLgFWVNLpf IYEJTNTekoDjZ3mp3HdTTmVSxryfqWyMU3/sw6TbKv10h0oTYeFohONwdedhBJ19vqiU OqSQ== X-Gm-Message-State: AHQUAubq6Ec2PNvRP6cqJerwyV4JK+et+D/b0TT88zlsmuPEYuv+RI2N S32R0OO2Se4XhukIg2m1/QJ7Mqu5PqzxvguQ6ITDLw== X-Received: by 2002:a24:d1c4:: with SMTP id w187mr6359655itg.141.1549579730721; Thu, 07 Feb 2019 14:48:50 -0800 (PST) MIME-Version: 1.0 References: <20190204220952.30761-1-TheSven73@googlemail.com> In-Reply-To: From: Dmitry Torokhov Date: Thu, 7 Feb 2019 14:48:39 -0800 Message-ID: Subject: Re: [RFC v1 0/3] Address potential user-after-free on module unload To: Sven Van Asbroeck Cc: 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 2:32 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. Yes, I just sent out the patch as it was in fact a bug: we could have missed work that is scheduled but not queued. -- Dmitry