Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1162474imj; Thu, 14 Feb 2019 02:12:43 -0800 (PST) X-Google-Smtp-Source: AHgI3IZQQ3oJzX8kYbk7/osfuitjZxXpcT/MDPgyX7xIyEG8hNQ68cDXcJBqse48WP9G77slRmXS X-Received: by 2002:a65:40c5:: with SMTP id u5mr2991190pgp.46.1550139163608; Thu, 14 Feb 2019 02:12:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550139163; cv=none; d=google.com; s=arc-20160816; b=le3VknErpWjqN8oyNf1KntUhMHTWgVGK1SYL9CfPtgCiLhWxVfvqJL8bgZdjzyfKvh E9Jk6L81i35TAvoJSyvP9MAECrH/Rlfj5R1hFO/lY4Cv7vAMN/wWOuMmfchY4EloXwDw Sj1bJWCrjllRZylI/C/zNfWzCRcD+/gcFQ7K69MQ+KG1/8/KEA0+6R2/MSd79c8Dg5UD vnhtYnGTJ4mpS+XN+V8opwJNz4QgR5qEvZnhbdN2Bwcu845ffvIAlQgbzVgYQYgs7AO4 GetxkZQ5HdJPTku0FTomL9b9rRfezXhTvmbey7V3ayF56alpLwvmI1iatn3HHDgn9lJp fuag== 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=EuTUjqS+23Xv41CJf9KZ9MXusUyMQt6T6CNLaiAiQzU=; b=cF9mcQ0Nr5y0VGKOenoYJRLu7gPde26Dh/wI3wIcuXuFvAX7N3lVeSkG8JyGa437I7 7aEjg1PMcP4aoCHY6R1PLk5eigbHZxhHvn+/W7jnMlkigXACiQm3bXhhMbobMCQ5PCmD UVGWeIwf6ZRcRRa1tNbpRU3qBf4wQFz5w2H4A9XcnR460U/UeBeAef76WzxYNmBpLa4L x2yUObBKUQa8y06bBBeR9lnlpxjArX/on1QLm0KBAupNuNlgHpEWJ3O2D7BjiQdtvmGu g6AgA4JVTjsTJJgkn7dZ0lZ2vU/myLLQll484AzNs0K+2awYbtSCxXIM4Wa3owt/OebU j4fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y0EhPMje; 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 z6si2045807plk.133.2019.02.14.02.12.27; Thu, 14 Feb 2019 02:12:43 -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=Y0EhPMje; 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 S1728224AbfBNBLW (ORCPT + 99 others); Wed, 13 Feb 2019 20:11:22 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:42015 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbfBNBLW (ORCPT ); Wed, 13 Feb 2019 20:11:22 -0500 Received: by mail-lf1-f66.google.com with SMTP id l10so3258992lfh.9 for ; Wed, 13 Feb 2019 17:11:21 -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=EuTUjqS+23Xv41CJf9KZ9MXusUyMQt6T6CNLaiAiQzU=; b=Y0EhPMjerV7GyDW8g0Zj204ppoDEMi4gwMlJ/CWrY07TiiVuEyWbkig0G4sz23hhj0 RkPYnGgxnSS2FSV0p86EPKSyWUKhVFDP3ypHT7ZL46ADlBPzEpvcutyWYVjWgERdN237 wF7K71Vfhn05A3rIMCDlrdDdQF84hWV4LSwZojEPqzp79i1Ne4ZU+biLMUYR7h+gyD8L wSlkGxQ2yKWT/k9WzWxvqJhGJ4UI8Yra5DNABYo3cQZl41MNalI/F/SSpKJrEc/bEbiO kftKbpvoEI4urt6oHr23tTiDiTT6yVA/rUkm87Rreeo6c4AzHY8hJ9ef/FXFEwgcsxu3 JXfQ== 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=EuTUjqS+23Xv41CJf9KZ9MXusUyMQt6T6CNLaiAiQzU=; b=myNQvkvJNauZh0S2TZzgq7n2yGqpb+lnvPDr0jOJBM033fw73yJdubPBA+4vCn/3Gm vLFTaplmDvxVvdcppv6ybya705sa5oD16UExK1h9HkHoTMunbPAp8GMmN7shW5GkLA3r 4kxlpcBp+IDij0SGsyKDEDvIloo4lPIZAPJ0wxFlcoBx3V2I0qN4TpAj+Us6gL+Oni8P KKkAl0mx7htsMOvAN21EZ/+DtOOf7OfE1OvBgEr70/4ENyBr/BbJzFbUt6zjbUsHT+lU gc9nZjzYxrjdbimza4x1T4nYFDFr7BxLzAg7FSWqttULdHWrvK3k8UoLQaKXPLv9lYgL IYvg== X-Gm-Message-State: AHQUAuZoPwr9bFcG34IetHYR70SagTzFYmDmDOcKcZ4l/hbqpcBwUa3s rqWIkCIS80owa7Z9vDXJFKyyyKE3infWJz35ONE= X-Received: by 2002:a19:24d5:: with SMTP id k204mr585386lfk.88.1550106680112; Wed, 13 Feb 2019 17:11:20 -0800 (PST) MIME-Version: 1.0 References: <20190204220952.30761-1-TheSven73@googlemail.com> In-Reply-To: From: Miguel Ojeda Date: Thu, 14 Feb 2019 02:11:09 +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 Hi Sven, On Sun, Feb 10, 2019 at 7:05 PM Sven Van Asbroeck wrote: > > For relatively straightforward problems, I'd say yes. > > However, the problems flagged by this script are not trivial at all. > In many cases, the missing _sync is just a symptom of general > synchronization issues on disconnect(), and simply adding it > will not fix the problem. Sometimes, it's just a false positive. Indeed! Note that I didn't mean to say they are trivial issues or that the solution is simply to replace cancel_delayed_work() with the _sync() version in all cases -- only that it might be a good idea to suggest its existence (instead of only suggesting devm_, because in cases like drivers/auxdisplay/ht16k33.c it may be the simplest fix). Cheers, Miguel