Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2025515rwl; Fri, 31 Mar 2023 23:37:54 -0700 (PDT) X-Google-Smtp-Source: AKy350Z1q5eiEI1jYUbdwcVLT+2/sJwvDrGiIqRUZIcefDsv2EjmbQ0hsPNXa+G7aWCNNolaZL0I X-Received: by 2002:a17:90a:788f:b0:23d:2b53:1ae2 with SMTP id x15-20020a17090a788f00b0023d2b531ae2mr7569785pjk.3.1680331074288; Fri, 31 Mar 2023 23:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680331074; cv=none; d=google.com; s=arc-20160816; b=m7WOJj+iOHF9eNHrR49Yr+lHpsiJ+bB86uTOJ0ffmz23TSJZ/TGcPdmvmFWiWwJZTq wDCWp4hjZ5ra2j1KEaUHtlQWGdNszX+bqQSRYf8TZ6A574RzrTot/ztGIGAKPc5tTRwi YwfnbTfP0yyXLWDRqvia+tAcU8QI4ztu91OCXzyniZBR0sbNyijgfkeDnAE/nAGRSg37 Aa5Lq4DIn0VN25N/lL6UzDdtylXZxbiqa3FOdlp8y+/o7WRPPEXhYKv52cf3/fC+HbqO vnoIhka8WQVulb5kc3ThlgM0M+cEnYc1vb7gbbtUREYwfDfHVL7+JpoZaa/Kxy7XdN0j Ee5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HIEEQGKZiFRugTl+LIdtQ8XXnhmNQWThLtfNmSvwiZk=; b=Af9sonqSkM6MUkyzGnGQ8nQgQOxjZ8KnnvsmZLUOlDa+34uCmlalqH8+P7Z8EDmnzb Df+AY7D3CdcLIKlitvKlkF2njpzMQ8WYx5uE4RsNUyMkj75PTwGjAQUf+sXBvn1Mfs1G UVlL2mjLyoe4xQpM00b2aNGvpWV1tT/P8titQcFzuKeLjZ4xhJe2/oDL6+SUGkbxu2zB 1EuOcp9YnjsW5B0AqLx10b2ixJrMggnITfksWz/hSDpPcktgFo9+h9n+UqiQwqWHG7Hx pi2Mdytr1QckayHg8vMZbmk7GZHAMhBQh8QMp5ApJYAhGS1yVa2AdIPYYBHMezTWlTVv w4RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LMLZ6EUp; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b20-20020a170902d89400b001a1966c2c33si4058863plz.275.2023.03.31.23.37.43; Fri, 31 Mar 2023 23:37:54 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=LMLZ6EUp; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231667AbjDAG2P (ORCPT + 99 others); Sat, 1 Apr 2023 02:28:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbjDAG2O (ORCPT ); Sat, 1 Apr 2023 02:28:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55DA91A474; Fri, 31 Mar 2023 23:28:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E9FBCB83377; Sat, 1 Apr 2023 06:28:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C5D9C433D2; Sat, 1 Apr 2023 06:28:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680330490; bh=xatQZvTKR+6MYzldJT4t1KTnJ8Rt57yUO7iWzD7aoXI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LMLZ6EUpJUlprrJ92k1qJlGkhKVNz0V0GAQEwB+A8+k7hmzeMNiqB4K92+y5HiOu4 wlfk/kigArkH8zUukN0Z3pZhyIppU3QnOMm9uqj/Bw5pvJi73vyp9TBRNSXMbMhmPv ZtnAZdb2W5LCIT6uK67oO4n1arvi1cxiKcf4XuHA= Date: Sat, 1 Apr 2023 08:28:07 +0200 From: Greg KH To: Mirsad Goran Todorovac Cc: LKML , Thorsten Leemhuis , Maxim Levitsky , Alex Dubov , Ulf Hansson , Jens Axboe , Christophe JAILLET , Hannes Reinecke , Jiasheng Jiang , ye xingchen , linux-mmc@vger.kernel.org Subject: Re: BUG FIX: [PATCH RFC v3] memstick_check() memleak in kernel 6.1.0+ introduced pre 4.17 Message-ID: References: <7d873dd3-9bab-175b-8158-c458b61a7122@alu.unizg.hr> <2023033124-causing-cassette-4d96@gregkh> <4d80549f-e59d-6319-07fd-1fbed75d7a1c@alu.unizg.hr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4d80549f-e59d-6319-07fd-1fbed75d7a1c@alu.unizg.hr> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 On Sat, Apr 01, 2023 at 08:23:26AM +0200, Mirsad Goran Todorovac wrote: > > This patch is implying that anyone who calls "dev_set_name()" also has > > to do this hack, which shouldn't be the case at all. > > > > thanks, > > > > greg k-h > > This is my best guess. Unless there is dev_free_name() or kobject_free_name(), I don't > see a more sensible way to patch this up. In sleeping on this, I think this has to move to the driver core. I don't understand why we haven't seen this before, except maybe no one has really noticed before (i.e. we haven't had good leak detection tools that run with removable devices?) Anyway, let me see if I can come up with something this weekend, give me a chance... thanks, greg k-h