From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) (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 ACADF4398EB for ; Fri, 14 Aug 2026 09:08:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786698489; cv=none; b=KUyEDKXHA42DhlSnvWX8AWyAxR0gd4mEO0ZDa27ewyTrKEc04GLzMWBwpJre4qkTFbaA+/l2GqfWRk2cawTEheCCPsosMetRZd62RKv/4riMPfuY9rCUktss8Z5xKRTXT/S/big3ThAHSPTPN8Csgwmt2HSvfAjbilp/yMZUoFY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786698489; c=relaxed/simple; bh=pH6jzKgwrH1zv2mw2pomaAmWb6Kxr53NPHaNTX/EXng=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Unw1gR1XiGW0tn5u9KLBzjo3/bAoLKxFgQEQyY4qC3RmBESMN4MLT82UoljiMwew9GILxj19aN0zyxplsnF9vzHLXAIv/FOkb2DTpOekZC9LDSK3GuIlgsx4LQZGSX/VHgzWrLeuSKv4w8NHpMfpTTwriV3J47pKS/IotL/MHrg= 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=XXIJWXF9; arc=none smtp.client-ip=209.85.128.169 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="XXIJWXF9" Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-836c43641baso12201677b3.0 for ; Fri, 14 Aug 2026 02:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786698487; x=1787303287; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=vvJK/3OxQwOhIHM8EH6WtO8ZWdbRyYbnysOx2i6lxyA=; b=XXIJWXF96D1Oo3Aw/iZbct9PeGvAkQ1uLjZmetM6BCCUgqzAxSrejMtrMyfAxrPRk1 rGMAJKVsr3pbeQHU4EyTA2HoEFprFsgzYlkis9SQMSYJr+PZe7SlgEhMEvYhBJ2xwYRQ djMMZeN9EUofJryXCXroEkZ9fbKnfTp5biGQRHaTcVf1LticYuhqSQIodawc/6QyHe5m Ib66FjATr73vUJ6ew3SkStGYg9wbbjwwtmgkZn/aH34aa59mxsw/4pR4e9XKM80BjL+C r9IG/vkeK4NNxc+Ol3/qTZ13BFg42JLrIBrELcJz/WGS9zBzV6pk334JB5TdEYL1sYvR DJDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786698487; x=1787303287; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=vvJK/3OxQwOhIHM8EH6WtO8ZWdbRyYbnysOx2i6lxyA=; b=mPVPuS8gcPqUJg+4vCeeWJHnVfZfcVykg+bwZOm/S7ZKi26RUwLJ8V6KB2u363Rzpg 9ifVrb+gBDxG//lJjlvhDmkF/SiSYJGThOloQjNWWqJreRqxfEbp9JjDEmvCNHxv5cK8 EcELhH1Ig+SyDPkZRUfFgMa2qxT97OP9s2lcpeOegRUl4uAhoS+duuYbWue7B0JnMJk0 YCe895It5830PPDGYCfRwmquYaXVViE0g5cdv1KiCWSHueUWgmoNIJS7YCIzLpMIKXw8 Zc/YPYdiFk9PKQAecyDGN2W0CiP7+LdsCyGJbhqEO0j2ANu2uzRBPwzG7otLqaEy2fNA IIcA== X-Forwarded-Encrypted: i=1; AHgh+RqmZxCL2R7M0DMBZLb1Bi0x+gfZfsL2pqxGtULKKbCWWVZhKATpLeF3bm2K2Qcy0iiTUq10VKNIPrR4mOI=@vger.kernel.org X-Gm-Message-State: AOJu0YwwOVjuOwU1C6jCHw5Y+8iYZWPOtxWTRL+1uTxjYAPUPeyHbHiK hPc7jrFMFAQzLwurjEWD/2ij7pv8nrGA9Nw+v5w1hhVhHVXv1DLhMr0= X-Gm-Gg: AR+sD10i0wdXr5yIfkX9QDg9e1O6VG6fCteyDw4flzop2InEMthn5mhwcYAeeyr+I4U 9QyMAdJSc1iUJLc+PR0nVopPyXgyGKk/VP/JqznLptc4MfQj+BKfyFGI2ZU/MpedxUFx7kbgru+ RlHR/r4XBxFjYWI98AIqzMo7lY28ybgxHm6pQLZZ/M8NKJTDd5Z21wy4qf6F8CCy+Type3xUhph 3oDvvbD82uJ/4iNrrMtA7ueoa0CdUu7HzsdAnLnWG/HSXwl1okwUs8mXUYF3siarUQ2xohQxJ5W E0jYJzP9tjM71Sd73RFElOM+gKx7DaPaLizSmPK+4PGmCsO9AL/ownx0n9WPvKDHBlYDLOQO0u9 CWZiAshUPVnqyCKGoB5ccLaY0n+MHwRtE3ej043bJwMm8bpn0zNJ5LUqS1vA/L+m2sEhwqbCvJE 7hMSIXsrppHiM4BZHK7zTGBQLBS14rjhMeGIxIeR9EnYZDGpAw2NVk5eF+xsSjRa6ZmDnQsg+k+ bn2L2O+SyF4qSTTmIw= X-Received: by 2002:a05:690c:605:b0:826:8d41:897a with SMTP id 00721157ae682-8370e5946ffmr20523157b3.13.1786698486682; Fri, 14 Aug 2026 02:08:06 -0700 (PDT) Received: from daffodil.tailc06997.ts.net ([163.152.162.75]) by smtp.gmail.com with ESMTPSA id 00721157ae682-836bb3ecef9sm10801267b3.4.2026.08.14.02.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2026 02:08:05 -0700 (PDT) From: Arka Mondal To: nuno.sa@analog.com, Michael.Hennerich@analog.com, jic23@kernel.org Cc: dlechner@baylibre.com, andy@kernel.org, venkat.prashanth2498@gmail.com, rohitsarkar5398@gmail.com, linux@analog.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Arka Mondal Subject: [PATCH 3/3] iio: gyro: adis16136: fix unprotected debugfs reads Date: Fri, 14 Aug 2026 18:07:28 +0900 Message-ID: <20260814090728.965922-3-arkamondalofficial@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260814090728.965922-1-arkamondalofficial@gmail.com> References: <20260814090728.965922-1-arkamondalofficial@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The serial_number file operations are open coded and never call debugfs_file_get(), which debugfs_create_file_unsafe() requires. debugfs_remove_recursive() therefore does not wait for a read in progress, and unbind frees the iio_dev underneath it. Use debugfs_create_file() instead. Fixes: 9aaea09b4cbd ("gyro:adis16136: fix debugfs_simple_attr.cocci warnings") Signed-off-by: Arka Mondal --- Compile tested only; no relevant hardware available. drivers/iio/gyro/adis16136.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/gyro/adis16136.c b/drivers/iio/gyro/adis16136.c index 369c7428e1ef..adcf54b67a28 100644 --- a/drivers/iio/gyro/adis16136.c +++ b/drivers/iio/gyro/adis16136.c @@ -145,7 +145,7 @@ static int adis16136_debugfs_init(struct iio_dev *indio_dev) struct adis16136 *adis16136 = iio_priv(indio_dev); struct dentry *d = iio_get_debugfs_dentry(indio_dev); - debugfs_create_file_unsafe("serial_number", 0400, + debugfs_create_file("serial_number", 0400, d, adis16136, &adis16136_serial_fops); debugfs_create_file_unsafe("product_id", 0400, d, adis16136, &adis16136_product_id_fops); -- 2.55.0