Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1078484lqb; Wed, 29 May 2024 22:23:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXHUUagBbF+w+LDtnYYbUFtZF0fbvHy0BLTvokP91jSV9ogk6gum1l7oKUNZSsHakJn7ZPv2EHYBL7vIWewVkFooMc/RREfdGVpxMsEkw== X-Google-Smtp-Source: AGHT+IEFweTSJJ1dTcxfqftUEN8Lc1B+unq22XioYTt/BNRqWuDDjb9D1vBNzBbA6qhVTBGAUZ3U X-Received: by 2002:ac8:598f:0:b0:43a:cfc5:9cdf with SMTP id d75a77b69052e-43fe92cccf7mr16176311cf.32.1717046617601; Wed, 29 May 2024 22:23:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717046617; cv=pass; d=google.com; s=arc-20160816; b=OycByjRL5BfhY/3QMw7HAjwf2tBHk+e/Isg85tlcx2TPkdeOxPAACTKeZ7QNjDFY9T 0Xft0wzGr0Om8kvTlozYg1WoD+0pQjSY/u1WP/F1NeZfYu/xUvPLlAeMinK6kJQi98L+ XEs6Orw8/S6Z0WP6zbcaVOWrJLAYS05Cclt9Q9BOqGSFtPBcbN5sAyPwUHNLPx9Z/tol KyvQ2hPpms8px4B/PudNDqzIp6gBz/jw7HL3aUxeyQxHjn9wKlZNQor4Hq/jDTdfhElg n3MBnm82r1TeqZKfxaZxlXPHlDacK6jyA7nT90pTxWCGuNhxbedu1DdZO80qQwA1cDrE QE6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=2iZM41/7mDcxSquoq9LoXz/QTVE6+9mFjNqtqD1bGyU=; fh=jeJ4bqHBnt9T5Mft2j9uGiS/SVLQcxLLyVQv78di4VM=; b=F9xTpe9VuYQS8RvXIIODG+IH1gDHRFQ9PvBPVU1ZzJAC1RRF2n9HCu0PtVwLlai4D6 KAh2mtNsjQfvRPcNKPk/WqXMl6QuXWEh5C+gy+1OMkS7hhpAJlRNCd6T8DPGw1yxjImW JkfIlsVmzjq+rmrQWv9e2jq36AIQXmicr4Ylb+ex7NjTmHT93jkHVlhLo7IdtZ7VaiCD t8ywEy8SDa1PhRWC5OpTaQ4J41E1YVvL7oEWE5JPv1LVSM05MSGaCKSdXF5B8fLzzFVF hHgEy9LpPHIoBWCby/Aa9Ehd7FDbUXY2dl6EN2j0sm4g/4HpMzOxNIR6OTr0hn+K3G5T ooSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z5ecP7pU; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-194947-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194947-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18b2d49si17956721cf.402.2024.05.29.22.23.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 22:23:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194947-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=@linaro.org header.s=google header.b=z5ecP7pU; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-194947-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194947-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 5820B1C218D9 for ; Thu, 30 May 2024 05:23:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92433143C52; Thu, 30 May 2024 05:23:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="z5ecP7pU" Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16DCC143C45 for ; Thu, 30 May 2024 05:23:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717046610; cv=none; b=tgftHXOsTaLUeFTdfnQqMOCe/1HwQ+V6xeXlyjKt+7O7Dl1wVtr1nuJGaqgv7ppdAHia9f7CJVaI0W1yRAgtfMlPqV9Y98rSSy+fWHrGpEzY/wsAp5w2qCxbByvvYNng3pfXfBWC0RcLzqWEMVY1OF0rw08ptH7XIpS4roABZpk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717046610; c=relaxed/simple; bh=TwgH/gtp7ud9+239CluIrGaOMiwBf3gKb2ExJUd3xZI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UwPTeZIhHagGmzvgZxErMAHGn9p8um18jo1+feUkneLAt5GpUIpllQLWAsE+0270fR1pK6Ccs+GxnU2eAzegMHds9oCXIZ5XGY02kziSYG5849XQFbwcIlQMUyp2ZRz1zR+HU3qBwlWMjaLTeOplnKP/OwMtGeN4dfS6iLi4sgU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=z5ecP7pU; arc=none smtp.client-ip=209.85.208.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-579fa270e53so598707a12.3 for ; Wed, 29 May 2024 22:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717046607; x=1717651407; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2iZM41/7mDcxSquoq9LoXz/QTVE6+9mFjNqtqD1bGyU=; b=z5ecP7pUet8Rr5WmXPgJweB86JyLIUr1s1fduu59LwQ34njQGmHLc902a1FX10vocM pHzFe+rITXMnN7CsO1qcn8+5KvPSDUBanGpwEvScTC917icqNJMgC5ToIswNIQgbzd+B oQ705lR1d0bXV0fNZ+tgtSvUAGi72DP5UHbQ4hSkByrmGqplXNkEwa2M1KjXI6HsuFJ3 k6nsfuSmVBzKkm4d/VCv5dFbVzXxnd/SsDMjGfrK8MBFAFyfY4+78YIg10jVJURd6/5u 6Rfo2tUl9wnoVikfuqbSkJhKXRCtFj8oFWNb8L/9MqAVkHLc4YZkK8JZED6FfuH598IS +Nog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717046607; x=1717651407; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2iZM41/7mDcxSquoq9LoXz/QTVE6+9mFjNqtqD1bGyU=; b=W979VlCXxyTQVx2/i/Oq0hRD5XmbShf+RVfIQnvEvBOI2I+hFWAQ79petVdprDXQAB D8jaBmjPQBifiQeKAubUEvGQbB0C60n8NSRGSLo7zsPDiu2gAMZKLNSJqlQKunzteMzU StB3x4dwfAyE2BYyQMU0LvOApXRlzr26wx3syivbsYuBKpNruS7lJN9NWOrmqE12e4m2 0gVbfc9wKUXZOETDl2ejS/+U7vpWl8A5TJXcnbVeRXmoQ3lonq58n4Ku7qL6B+8ALUZ+ ltp0Cgg84JbgSFWNQh99uPMWyv2gPzeYu+U4FZHn4GQn+6XrXzSUbPjuo0qBHzgaQcyS zSuA== X-Forwarded-Encrypted: i=1; AJvYcCVGWml6s3YVNGAcf2AFN26q/jhZOtklsoYDsDaoObpVa5i7FntvKieoCer3xl+NrxFlj799vmHRn15ZkDUQbtyKWeOCC4Har16Vux04 X-Gm-Message-State: AOJu0YxES+fmuBHfgShbNkPZvjUw+pttNeGBtrb+aWlHtDYZpf8OjLX+ 6Vw/hJfXW/m7IjzDXKXc+i6E1lYFnbDB1DriCXATWE6DvOe2k6RGXGtbsMiox4c= X-Received: by 2002:a17:906:1319:b0:a5a:5b23:c150 with SMTP id a640c23a62f3a-a65e8e7a77cmr111535866b.41.1717046607193; Wed, 29 May 2024 22:23:27 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626cc4ff24sm788862066b.130.2024.05.29.22.23.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 22:23:26 -0700 (PDT) Date: Thu, 30 May 2024 08:23:23 +0300 From: Dan Carpenter To: Duoming Zhou Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hams@vger.kernel.org, pabeni@redhat.com, kuba@kernel.org, edumazet@google.com, jreuter@yaina.de, davem@davemloft.net Subject: Re: [PATCH net] ax25: Replace kfree() in ax25_dev_free() with ax25_dev_put() Message-ID: <69dee6e9-05c6-4d1e-9c69-a9b60125d7ab@moroto.mountain> References: <20240530051733.11416-1-duoming@zju.edu.cn> 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: <20240530051733.11416-1-duoming@zju.edu.cn> On Thu, May 30, 2024 at 01:17:33PM +0800, Duoming Zhou wrote: > The object "ax25_dev" is managed by reference counting. Thus it should > not be directly released by kfree(), replace with ax25_dev_put(). > > Fixes: d01ffb9eee4a ("ax25: add refcount in ax25_dev to avoid UAF bugs") > Suggested-by: Dan Carpenter > Signed-off-by: Duoming Zhou Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter