Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp841339pxm; Fri, 25 Feb 2022 22:19:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3+DK4hVWz2Gi7OhjwXMhQwpgO81vJcts99FRC+cmyVDAIhxIur6kF7+fnA/5kqGMl/w7q X-Received: by 2002:a17:906:9445:b0:6cf:7421:576c with SMTP id z5-20020a170906944500b006cf7421576cmr8484424ejx.538.1645856382484; Fri, 25 Feb 2022 22:19:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645856382; cv=none; d=google.com; s=arc-20160816; b=vdxrQmpzCjbXIwWSyysTEdvJI2HeNG0px7A/XvPPJpAUHhaLwUx8v+beVy0Kmcv5Y5 yftvJHCGdXsobXc5Uz/P4xIAXw/2gjzaO4zGnJ2Ljzu8Z+JLaw3+hdtrrjAudvhqSH5j AgszgdQfRjN+aVbXD2Mw/7piDnt8hjq8yuY+f4k53jNuZcsndUggwz0H3HxM5ViatRqB Msp3RvFdeEgvpZlisVBJEL1fJcP8bxAKyK2SjpNJhZvPpnyattwLa9oUOQWymmzQhOqH y4d6+GdTUlFXO6yR8vCuyaEW0BrdZPv0h0pmbYiGvHsUmIhcot4FdOavZTLtqgvN0ct1 ZjBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=B1iyIZxykdfFaUxBAPXSJr+OEff3IvbWqJkmpppNQ2A=; b=qPz2j60Z7IgDYiVKXiI7bzd1VI66CMqu+igb77/pFf0+yh0VP6Wi6fSvF8OclA+HTb AmrUWUR1MXtqhVyk4wX41aQghoCFfSIRhHZHd1OgipcGn7iK3feqoXJulDA4T/flFeJD 6cjjX6d3z8iGbDBxRr2TAJmmSabe7y5i1zMP4eof4h/nMkmi/7y8+RpW3HYVagIppN/T 0k2OZ7osDXdrPSPRuGFiNzJfzRALppEHkIkG7omJE0w1px+GazcugKcqH6LCWsH7vLTK 78se2AwBUTsd48n0wHFysQkAe47ZFgZcg7f1fF56K9RxanUquUtOI5iqk2S5n7E5b/Ee rAIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cqQxtTdw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q21-20020a056402033500b00410d5cf7eb0si2879339edw.645.2022.02.25.22.19.19; Fri, 25 Feb 2022 22:19:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cqQxtTdw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229954AbiBZE4D (ORCPT + 99 others); Fri, 25 Feb 2022 23:56:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbiBZE4B (ORCPT ); Fri, 25 Feb 2022 23:56:01 -0500 Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E65CF1AA048 for ; Fri, 25 Feb 2022 20:55:27 -0800 (PST) Received: by mail-oo1-xc2f.google.com with SMTP id d134-20020a4a528c000000b00319244f4b04so9594077oob.8 for ; Fri, 25 Feb 2022 20:55:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=B1iyIZxykdfFaUxBAPXSJr+OEff3IvbWqJkmpppNQ2A=; b=cqQxtTdwgeqkVD8mIAABpM3Lb+uPsK+Ljq/J96oufbg3NqlWmx9uB/n87dKiJqYJcY Cnhr/mwuTdRzlORa1RmggOoW0nfVUjgXK7g2uAggAAX7GRcuNxfBUf6X/TZYAg4Bv6s/ v9kH5cgSrGPg91jM7qG5NS+t0NEPQ6uoXN4KQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=B1iyIZxykdfFaUxBAPXSJr+OEff3IvbWqJkmpppNQ2A=; b=ESAn4GzOv1aCV6sNysF/T97PM36PJlQOHjs+eeuhO8MThaolIhkKCbwmkjchlYFc47 5KhWThYoTwsLk2V1crOnnKOgWez3m5UeOT5D7UCpnCMIXadPN2PswTpZ5Pu9CISr/kH3 dqq9XCSW9ehBny+hfpHsHeNZN1NXmkR3IqJo0bW3jyxgEk/dTqbtGZNgnlJ6NXmFriKy 6a3aBKUTeo4ImBQw5hnNJMy/31x/r5qDyPscJWukrmzgzYUunAM3fHPIfUSOkJsa2NSJ 8DUpnIxqzt4ul3GesyAewkVtfEkd7X7lhHtNee404oTlunkjLmpZH2Hsr4DxQ/B0CJBS lMqA== X-Gm-Message-State: AOAM533gp4HW/kHEK5lZrcb4lWCsCCSMK+bn1rkMnWA3hNa0uEhLRvwj yKdGQ5ndvrn5fgVcGcLBbaQBzkLN8nx1pnlfa0DyvA== X-Received: by 2002:a05:6870:631a:b0:d1:7d97:806 with SMTP id s26-20020a056870631a00b000d17d970806mr2928982oao.8.1645851327275; Fri, 25 Feb 2022 20:55:27 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 25 Feb 2022 20:55:26 -0800 MIME-Version: 1.0 In-Reply-To: References: From: Stephen Boyd User-Agent: alot/0.10 Date: Fri, 25 Feb 2022 20:55:26 -0800 Message-ID: Subject: Re: [PATCH] HID: vivaldi: fix sysfs attributes leak To: Benjamin Tissoires , Dmitry Torokhov , Jiri Kosina Cc: "Sean O'Brien" , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Dmitry Torokhov (2022-02-25 17:18:58) > The driver creates the top row map sysfs attribute in input_configured() > method; unfortunately we do not have a callback that is executed when HID > interface is unbound, thus we are leaking these sysfs attributes, for > example when device is disconnected. > > To fix it let's switch to managed version of adding sysfs attributes which > will ensure that they are destroyed when the driver is unbound. > > Fixes: 14c9c014babe ("HID: add vivaldi HID driver") > Signed-off-by: Dmitry Torokhov > --- Makes sense Tested-by: Stephen Boyd Reviewed-by: Stephen Boyd will you make a similar change for the hid-google-hammer driver?