From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) (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 BA380189BB6 for ; Mon, 5 Jan 2026 00:29:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767572979; cv=none; b=sDXGB53iqw07E1qZO9Wn/fuP+W/PMC3mILnLN1urVm85egyL6ZXuZzb5Iupj4aeyZWPHoG/XWDPnbJMrD8s5ofwvzpJal/qU62h5IyocuNNXD6fG0hjBOR0Qdn9jNqXfZXVwlAxpGBqYPiBgdj5SapFlmAkPPT3Q9oiTPPF6js0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767572979; c=relaxed/simple; bh=R7k14VC3vVWz5wUwTkk93NrVOWEgkpo5zchT4ujK+c4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NxFJfZJDU13UHuPJzz+phfdH+45PaxkIeFmi+Rc09udMndQkRaGiorCeYePyLAxh89Zu2VP6cZBCe2bXcfjgh4aBGwZUgUHoZJQN1JmdWm7LXynhJC4AVgN9ZhrmtIBoxjBoUW5Jk4+11529aizqd34ItUzo7Hex1VbMZhc1JnU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kfOPCdJg; arc=none smtp.client-ip=209.85.215.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kfOPCdJg" Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-c075ec1a58aso7747406a12.0 for ; Sun, 04 Jan 2026 16:29:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767572977; x=1768177777; 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=uO23YZhHNP6Na8oKr9lYMioRYmvDQ+E4qMSAXH4O1T4=; b=kfOPCdJgdjwRZ2sm/cLo+9rzdZQKGq0EtAfZ4j51CSoNDUhT+vg9QHlzfIYg7BXh5h Kknm1Ge360FVsE9ybdxovMZ5V6iN8dqSYJ+pMD2Vvc9ZQVJkCUy59GpeYVFrB+oh2L/E PmFQAg68rReXvYIWLbrfXl0MyllKYgRUnsmubAdLgS5hvd6bqHijhBKBDioDXaED9rPY t/tRKF77bJz66GY0QF136vRDAABPIzYpVU8T0uYe8JleDc/kCE9pW5JaMkzblHhvOwb0 lLFOp6w5qdX8Fcs85SQPw9ZlwGnDoK6oDZt6cAD6LbrzdmPbld1OQTpJcp3R4nUBVykI 07jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767572977; x=1768177777; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uO23YZhHNP6Na8oKr9lYMioRYmvDQ+E4qMSAXH4O1T4=; b=OhxLpQ54tswEcBETaWJ0/QkgwzLXHxfC6Ep/sOpozEDlZ+qjKuKQMQLHm7BffQTWaL PRLgZAWcpRESIqz7fgniDvQNufD5/Jh+w7E+tPWziSNcO+m2P0hvFK+URGg3HFqA2rih bsGY9O0FZ0QivtFra9u+aujswfwDUdsYUiu+rqLCXqq5cooML/93vTOQtiDD9ddMjwF7 ga/zmkwiEFPRlh1Pb/keCOOJ5n/1IBfkc6r+qO4SYh4e508bkVVWJxofAbr1bnB/B0bQ WPvm2gF+YXWVWTodJGNWmOOQ0BG3YybKxMr58pZtYBhUMva2qNkBIDa9rYwv7qhjfiOG zUFw== X-Forwarded-Encrypted: i=1; AJvYcCVwddQumDGIx0SS7x31a41ll8KtBPB233H/fzjQVVacO9vWW9S9oRd/X1vjwd03jq6JKSuM3chrtJTQl1A=@vger.kernel.org X-Gm-Message-State: AOJu0YyosvFJ7c2m5UBnNxy6hBbXRq/K7utax7bPECfZ06m985uSXh2o +2+fW0Y60wBDoXK7u81N1ZCXnOcCoDZ7CXcndhbNpJQy01pKPn2rRQNQ X-Gm-Gg: AY/fxX7W042VGvjvw7oluWzz3X/m0VqCvv1uaGFGF3Fff+j9WhU7xDBbgC2DgorFcer iSAdiMwgd6nQYc6jYDKpkR6fidYq0M5KWhN91kXsUO+V9CB5tD/4oRokDPntPNBvQWsx+JJelq9 +EncU9ZJJ4hmkMSDx/ZSNKp6jDq+g+DzJflZtOspxzV97UgEej2gdNyTIhqvnZGUWQxWUTywny3 JDdk1RaOGrwFk+NcqVSLwr39r61JTYfzCuPKSSS+O3oSzFrRxd39ZjKAD5s2RfwU1w2uVjxcnQ7 y2VLQbHSfMAg8St88VqojSRt62xDJDh/NXnY+kaXC/mMKLt+7K3Nt0ssbkjoJfsScoPyuNmbkIM qpKTcd/jWKkLOXBluXNokYqyvn9oTYPQTHy6qg7wgpDUWjtybPNMFwyQi0KzEv4IyVOAPEJpNtb w9ZPwsyME/Fw== X-Google-Smtp-Source: AGHT+IEFj/onAwnN6q7XitBIyXARl7Pt43J0EpL/HG5gSDcAd1q+FPGbMbIICB6wr8OHnl12SpH5kA== X-Received: by 2002:a05:7300:d208:b0:2a4:5005:7ee1 with SMTP id 5a478bee46e88-2b05ecabd4emr35873438eec.37.1767572976876; Sun, 04 Jan 2026 16:29:36 -0800 (PST) Received: from archlinux ([2804:7f1:ebc2:1ca0:12e1:8eff:fe46:88b8]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b140c42e7esm9441947eec.22.2026.01.04.16.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jan 2026 16:29:36 -0800 (PST) Date: Mon, 5 Jan 2026 00:29:29 +0000 From: Andre Carvalho To: Breno Leitao , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Simon Horman Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH net-next v9 5/6] netconsole: resume previously deactivated target Message-ID: References: <20260104-netcons-retrigger-v9-0-38aa643d2283@gmail.com> <20260104-netcons-retrigger-v9-5-38aa643d2283@gmail.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: <20260104-netcons-retrigger-v9-5-38aa643d2283@gmail.com> On Sun, Jan 04, 2026 at 06:41:15PM +0000, Andre Carvalho wrote: > +static void process_resume_target(struct work_struct *work) > +{ > + struct netconsole_target *nt = > + container_of(work, struct netconsole_target, resume_wq); > + unsigned long flags; > + > + mutex_lock(&dynamic_netconsole_mutex); This ended up causing build failures in CI as it needs to be guarded by ifdef for CONFIG_NETCONSOLE_DYNAMIC. Unfortunately, this was always set on my local tests - will fix that as well. Sorry for the noise in the CI. Will fix this in v10. > @@ -1945,6 +2022,7 @@ static struct netconsole_target *alloc_param_target(char *target_config, > /* Cleanup netpoll for given target (from boot/module param) and free it */ > static void free_param_target(struct netconsole_target *nt) > { > + cancel_work_sync(&nt->resume_wq); > netpoll_cleanup(&nt->np); Will also address the AI Review[1], which seems to indicate a potential use-after-free when a dynamic target gets removes (and disabled) while resume_wq has some pending work. I think this might be a true positive and I'll see if also canceling the work on netconsole_target_release() makes sense. [1] https://netdev-ai.bots.linux.dev/ai-review.html?id=ca5cba91-a1a6-4240-bf10-e4da9c5bc58a -- Andre Carvalho