From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) (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 83A972D3EF2 for ; Sat, 15 Aug 2026 18:27:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786818476; cv=none; b=F/7dfnZeIEf/rIUMpo7Yc5Ipc1DZVS6PQlkKzgTfKZCuBngCiOKkUweVeBjQnRXQf74tqj2kLtNkYEHiB3LtV4mfbOSozoVOfphJ/VaQgFxxbq3PkqKe4/HOtwVEcQDdCqFEe8jZE5hdLVumXCwQLrHtDC/apG7MMrUnjHzYK/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786818476; c=relaxed/simple; bh=EZYpRtCk/IWXuA1hpLjgUkksiqsRpGfb+L16mV3/6WQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j5YrW/Q3bcKV7QrRjPSrMjlbgpYtykOlIJSHd0EtgPDr6Pmyhhj1jz76Diixp3r/FTptQ6vxTD0tzuEHheHKfyBnS5XTeA6vEeGKRIf971zmRzMpAYzTj1vMsSzUpfR+PtNGmLfSiiBgurZf0NHQ61bktnMKYJWmwSjgC0LAHqc= 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=Nuta2BrH; arc=none smtp.client-ip=209.85.128.172 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="Nuta2BrH" Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-80bb41f7f3cso17602677b3.2 for ; Sat, 15 Aug 2026 11:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786818474; x=1787423274; 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=NPNqM78QIlfa21ZWXnecQfff0vtz8768AVWjbj/1skw=; b=Nuta2BrHOp8fdwnS9HE1H/S3zeegZbPD6H2uKaApyQ0ZRl/ZbLSfPOaq70QiHgYkar o0DlSeqfxYvUhMhuTTXc31VeuR1NVyaLI3KGC1S/OTMlSaQi1ShBcp6kbJOfdAJ8GTJC DTd6kvarg7P8FIqPRDHi7W0oeOT2dO1mEw+g7DmuUrdx48aPOsvqWo3P0oYY2llklMUs amOc5yLcJiXvYJKzT22dSTIoCROHcYGYjCFvN6Fe3jl2KaKgBR5U4ot8jMi/MrMM3t3W ImWmG8M0B+1Q0QVtC31nOXW5x2rKcH3A2ZsckS6MJWwsunBndyegxr2o26TcaxAQfM+a t3Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786818474; x=1787423274; 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=NPNqM78QIlfa21ZWXnecQfff0vtz8768AVWjbj/1skw=; b=ROLImQ8ypx1dLl0bK0Lug0UTRLCnV++luV5z2EUnbal95MxkNOPkiKOIXSAuADDtZB Ht3uUtQaMOHaW+MclVXeoanFX+Mwdv9XsJqgLMhMBdbMZAizxOFr8kKWw3vg57vKWM22 aDelChzq2UXsfOTXQuvtDND6efaeFSHXS3tS6KdTbwoL5A8WRm+lu3yU+NxtCEE2nYtv 8N/xOUpviedenJHVAApsjNo/mQuvWAlUfBrTqzWKNOTennQ52+WPXPyy7B5TDqbuLO9P TXuviEiflmLW7HzAvA+htPv7Yry5nP5xbJfpK7LfFCvSV+C7As6NfN8CYUD+KcPdsOoE /TMA== X-Forwarded-Encrypted: i=1; AHgh+RoKOOW3t9mNiVSg0jJdu0lA+PQADDSI7XPL/kXcJDEQEhpcoOPwQUsj3Obp5nSgGkuKoUZuR+AjbVX97ww=@vger.kernel.org X-Gm-Message-State: AOJu0Yy9SzZpt/5ps7c8AENbV7Yu8QYF7wkmJFsoZMiAHk3dtTW0Xuen Wv9AT75Y4IVOE52Hb0r9R5c8iaGybXB2fEYmncWqULL/4b1NtnPPSwM= X-Gm-Gg: AR+sD134QxNabPWgCz8sAhaNG5YqQQZyvN68TBbTlvSDFJYp4rqdqFsxzaKsgOE2gAv UG1kqoLip97blUagwGB0AgCn/88zEmqZPyiNUi74IIaEdHiVcNVc5/HyHfRS223JfeAABy/xeov w1BVY3bOBKz1dAienaXwRCT1ftRt3iN8G39AA+pT2eFSa+EmSkFWdro+VOszNRnV7ENShyIZXrV PqM93eC5WUFY4lNAxKvmWxb0eNgdl2aj06sp95iIcA98F9vCZh0Vib9HsQ1UVm398vaejzp7AWE ERg5UOm97Aa1zi1TMnFe3ObwBkFw62pgj0qa5BOw20SUb9Dgb+D3kHYwHLhl3s3/+hUSIFalVZf eVHOKj0pCGyvcSH/+mLfx80aFS18EgPmpR1jGUhble/QMOa/rjjUj0X6csPxfEEhkEF1xYgT2PE OrIwuoa6nMDdPct7T2anXtYyIG9cpQB9dFNRaC3FYLhjC/cHk6m0xPMnAyX/oF/I3jXfUXt4PXt AGwT09a9GiGyisBjLQ= X-Received: by 2002:a53:ee12:0:b0:66c:707b:60eb with SMTP id 956f58d0204a3-66c72be077dmr3191221d50.23.1786818474512; Sat, 15 Aug 2026 11:27:54 -0700 (PDT) Received: from daffodil.tailc06997.ts.net ([163.152.162.75]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-66c75c5dd24sm2598154d50.6.2026.08.15.11.27.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Aug 2026 11:27:53 -0700 (PDT) From: Arka Mondal To: jic23@kernel.org, Michael.Hennerich@analog.com, nuno.sa@analog.com Cc: andy@kernel.org, andriy.shevchenko@intel.com, dlechner@baylibre.com, rohitsarkar5398@gmail.com, venkat.prashanth2498@gmail.com, linux@analog.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Arka Mondal Subject: [PATCH v2 1/3] iio: imu: adis16480: fix unprotected debugfs reads Date: Sun, 16 Aug 2026 03:27:24 +0900 Message-ID: <20260815182726.11796-2-arkamondalofficial@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260815182726.11796-1-arkamondalofficial@gmail.com> References: <20260815182726.11796-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 firmware_revision and firmware_date 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: 9bf94f836e32 ("imu:adis16480: fix debugfs_simple_attr.cocci warnings") Signed-off-by: Arka Mondal Reviewed-by: Andy Shevchenko --- Notes: Compile tested only; no relevant hardware available. drivers/iio/imu/adis16480.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c index e009f3824768..254b7ff25b66 100644 --- a/drivers/iio/imu/adis16480.c +++ b/drivers/iio/imu/adis16480.c @@ -309,9 +309,9 @@ static void adis16480_debugfs_init(struct iio_dev *indio_dev) if (!IS_ENABLED(CONFIG_DEBUG_FS)) return; - debugfs_create_file_unsafe("firmware_revision", 0400, + debugfs_create_file("firmware_revision", 0400, d, adis16480, &adis16480_firmware_revision_fops); - debugfs_create_file_unsafe("firmware_date", 0400, + debugfs_create_file("firmware_date", 0400, d, adis16480, &adis16480_firmware_date_fops); debugfs_create_file_unsafe("serial_number", 0400, d, adis16480, &adis16480_serial_number_fops); -- 2.55.0