Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp114533rdb; Wed, 20 Dec 2023 07:38:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFL4VwFLABht0nXCpvSljfgjkT0zef+XCu7AQdWgOcYg4SJv6DLSPSP2yBMUfCK1Kt4USx5 X-Received: by 2002:a67:c090:0:b0:464:9c8f:d942 with SMTP id x16-20020a67c090000000b004649c8fd942mr14010898vsi.33.1703086701781; Wed, 20 Dec 2023 07:38:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703086701; cv=none; d=google.com; s=arc-20160816; b=EWT0YruEm8kfdka6IuP5bA/fC7Rh5OorMzrETZjM0441vUzD8pMNIFn6pjX5yG5dMk vz5HS2B4R6NhxkZQQ7trhJKxNPADyGW9+/+j33fj6XOslZi4uyroy6ZD+h6Uvt7VwJkf PHRM3kW7IIAq5MrcpHxEMvKdaLJ9G8Lr+bS1SbJC8Jbyak5ogTEXyJcyB05t+Lq9wiBB vLPei5qQdw4sWrTuasnalpJ9/wAd8Z4H6UyeukW9fwNOMiVjlrHkK86df9yYS1me4QZ9 rzczMoTHQMx8twW9s4DaJE+qYN7kDVUs6MDj++LgvliMW1+dQETeWDZuPxhyzXuGsClT kyAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=hi7b18c0mwcP/cl9uG1tw7XOIWN5U8VLDnvzKjs7wwQ=; fh=oWFj1HPwiu9zJJ1lym9G4qUj25jFSQwP9xY3cFZv6o8=; b=KeXY/MlwpIkZBzwGpiyzAdgdYoygSl7Gg9lCoiT8LiCCxUELP3R14vAfWbXy81ILOF aIlgQ4jfA+tW1vZmtUslppa70aOjRDoUNVPPixlL+kDG251cCjLPf871y+M8eje8ojoP g+MV5nhlSLvrwQX35yfaT4Jv1rcLqUZlbN1oIsOKpMWez/vk7AK+qKHr+tuNv+WhvXXH HHbVK9D2HfvDZG+hZv46A7dIUspkl2NgUS3fwO63NkK95WPRjtIesFp88j4aCAoRvcnP hDO+A81pMa953HsjoNUX8nl7gvbLZUToweDxhrGxwZOHj3j8fy8lZqyzTXCsSc+GcTqO 5Lng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EZLXs8Ju; spf=pass (google.com: domain of linux-kernel+bounces-7177-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7177-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w13-20020a67e24d000000b0046695a53429si1217799vse.486.2023.12.20.07.38.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:38:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7177-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EZLXs8Ju; spf=pass (google.com: domain of linux-kernel+bounces-7177-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7177-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 829AE1C237C6 for ; Wed, 20 Dec 2023 15:38:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6616405CB; Wed, 20 Dec 2023 15:38:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EZLXs8Ju" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 994F040BE4; Wed, 20 Dec 2023 15:38:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703086693; x=1734622693; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=PiO+CR8tWKkwiGbcqyZpcpnZcE8du2LJsaUDrngJ0RQ=; b=EZLXs8JuThxS0M6FP4Cem8mgcmHnl5Ka1XSZm9JcUkhKjWVdA9ysbLiG c658+cVWuNrDJqAA/vZGa2NYmzYgoL+t6RHNOacIMdmifvkdqQlbDzuN9 5fKciAgZ0kngDeTr/7gJ4VAfRL+3DYmJu8rDyD4nAXxv7fMpV/EskTj1x jCkt8XMGmC8ZWKnL5XGCyL8XIqVRKKYvtNDNTqP8ZvuAZG76OiaJnxqQL VBtwj483N5ffRVqBtGayZXLRQ02a/Q0WYcN1MuzQPZlkOsAgKDHj/5Qgh VVkkDZoMjPiSbQpHcTkAxZG/oYxqwW/F+uBiQ+jm1xSx7/Pqbs2nna45h A==; X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="462280503" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="462280503" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 07:38:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="805302614" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="805302614" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 07:38:09 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rFye6-00000007abX-0HKe; Wed, 20 Dec 2023 17:38:06 +0200 Date: Wed, 20 Dec 2023 17:38:05 +0200 From: Andy Shevchenko To: Hugo Villeneuve Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org, jringle@gridpoint.com, kubakici@wp.pl, phil@raspberrypi.org, bo.svangard@embeddedart.se, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Hugo Villeneuve , stable@vger.kernel.org Subject: Re: [PATCH 01/18] serial: sc16is7xx: fix segfault when removing driver Message-ID: References: <20231219171903.3530985-1-hugo@hugovil.com> <20231219171903.3530985-2-hugo@hugovil.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, Dec 20, 2023 at 05:34:29PM +0200, Andy Shevchenko wrote: > On Tue, Dec 19, 2023 at 12:18:45PM -0500, Hugo Villeneuve wrote: > > From: Hugo Villeneuve ... > > + dev_set_drvdata(dev, NULL); > > I believe this is wrong approach to fix the issue as this one is prone > to be cleaned up in the future as we don't do this call explicitly for > the past ~15 years. On top of that the ->remove() is not the only uart_remove_one_port() call. It has a lot of other stuff to go with. It seems that ->remove() doesn't check the bit in &sc16is7xx_lines, that might be the proper fix for the issue you have. -- With Best Regards, Andy Shevchenko