From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f45.google.com (mail-yx1-f45.google.com [74.125.224.45]) (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 C40F52D3EF2 for ; Sat, 15 Aug 2026 18:27:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786818469; cv=none; b=JA/0GwYWUBKdhtiqCUBJNl2onpchweeoPTKp9HT+ao7Fb7jzDK6q23McnJoNU2P03bQwc8scDg/jHf54wA2NqTFbKzqzEIIc1MgFsDJY+L98VF3Kz304qR6WRy201lN//JyyuUq9f0OWCbryqEX9c5OMwNDMyMPp8vhizneXe0M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786818469; c=relaxed/simple; bh=e7aY8RoBsrWBG6a9U6OMT5zRTLoJdj0QhzWlYzdSrq4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XbzqK7Ns/wnhOBcjCWNk+QhDPRGhbi2M/u5oLKzV+pa61Zf875s5SQLBk1TCn+jow0Oab9O3g216ZAdFnzJfN+YtoA3jy03YD7yX7oJ2H4sCBCpB7BEvvZrkmvq2lUNf98nLHKY2TRxf0+ydb/NnzEnhNHQzfOn/U7pbfb08eZ4= 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=L2sX9d3u; arc=none smtp.client-ip=74.125.224.45 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="L2sX9d3u" Received: by mail-yx1-f45.google.com with SMTP id 956f58d0204a3-66bd7857841so1550977d50.3 for ; Sat, 15 Aug 2026 11:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786818467; x=1787423267; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=T/buIIFnv6/D7oLvzCykrE1/BtlNbe9gyY08m7xmYoo=; b=L2sX9d3uy8/pryu9/EWshe0KvjkonBpWZ3ak6im/VNhIIsofz72WoeUYszHw4zg0oR XsD8Nr5+35h9EItaYtQns9n6Lm7R34JYNqf0/53rJtH89BPiaDMgr2ABdd1ujlETjdId P3VbA7OgPottaeOHgfwVDlt3YU9+g/PeHizlN8DXo9oJSiopbgRvoShJz9R9oK74FZGf v0nTZ5xIPcWUpnozLa/tXZuNR04q9lhw4aVisYbp/DUAsnhlmrzOWtGvo7Cx7YmT4Ocl 4E/522802COKFg+20xway4npz7x5Qnd1O1WALI/4U2HO0516Ms7Q/ftoMVuy6/jLeXzi N1dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786818467; x=1787423267; h=content-transfer-encoding:mime-version: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=T/buIIFnv6/D7oLvzCykrE1/BtlNbe9gyY08m7xmYoo=; b=OVixGRe2+FrYdjXBeFA+tY+oAi0+zKJzT8PtDvlyu+dUxpvJcMi4ZKbAuX5GytgZMS 97oGQEVNkz/huRPVZNku1foSs3YanUjomCkLkfjzJea7mO2SKM+O0VgELj0k8eY6OeeB njp761Zm7jb02p91h5uDbJMM1NNcRurmXExE/XD3ygf9Qu2SLxoAEfwVMe2G3KJPJ5Dj vowqqil8Eau8znhaqzFReVgClU1FB7aGozeoBu8gZA2C8U68Sc9uPNF/vCXnvSAYcAyJ Q+zwI1e05Gng3oYSZ2Kd7hEdlwLNcVxIcmK0hYfd/u43/x+awXwW6IPEFnW71iZXtmWG Wg6A== X-Forwarded-Encrypted: i=1; AHgh+RpitM32Got2wOGe/yhSO5GXCB4CSk9H14rrKJW9i0J5evGIQS37w5cLzSzkoR4UVVF7IxQMw5Rismjv6jE=@vger.kernel.org X-Gm-Message-State: AOJu0YzB1bONZ9uMZB6fvYXVHXKhBzHxfWMQFJ3n5a/VsEykoOG/wYuo 9ZNgwe+ehVugjiV7QkRGTJpE/Vd16e/0nBp4TOz12LyiQSIeOmVtRdM= X-Gm-Gg: AR+sD11iJfWljQbgPqRVsRjlUPSB6VnWneNrs8y2eK3+++Yl+AFtHIEDdgnT/y4Pjrz kqhk5fmFZm6EjICfp5UN4KIxUMkyQzlmp2VaH0808zJXbNCR6XROPoUC4rs+92aCW9I/Lys5CgW mZQ0Kmwgy+9Xg5SDisg3YhuIV/t9hg+YdYvmJXjcYYzig0S0Ofq3+k2gnNFmICogbi4yDEZewI/ y982HL4VGm7b3Ph2PjCJJmZjWhLNwwLipChbSA5BwiTBP1KGcwrugwT0s8nHLtq5AnDyMHQBcL8 chGH94IbXZD2rQnSoCwxcvz6Dl/B9jhoeR0E6FDTeqvLCF0JT4jceWUXpeyukaUW7jpcfWTFNu8 Sx32UFKS6fSVEt9NxrnRnc3k4YFSYm+4uS2WOVOLIi32T0Fn+tmlp7LxLkxV62YNL9d3A0xuH0A oPsHD83KN4VH/AI4+Y31oGlkSL6s5oHuwBcfD5swJ+K7eO/V39NuJfXrRmJS8zY5phjPUAf5mVM kUs/Qwo0dAgSsfhs1h+5R3mooEgFA== X-Received: by 2002:a05:690e:150e:b0:66c:484c:867f with SMTP id 956f58d0204a3-66c72d2c9d0mr4859747d50.45.1786818466646; Sat, 15 Aug 2026 11:27:46 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Aug 2026 11:27:45 -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 0/3] iio: adis: fix unprotected debugfs reads Date: Sun, 16 Aug 2026 03:27:23 +0900 Message-ID: <20260815182726.11796-1-arkamondalofficial@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Four open coded file operations in three ADIS drivers are passed to debugfs_create_file_unsafe(). None of them call debugfs_file_get(), so debugfs_remove_recursive() does not wait for a read in progress and unbind frees the iio_dev underneath it. Andy Shevchenko asked on v1 whether these could use DEFINE_DEBUGFS_ATTRIBUTE() instead. They cannot, as it formats a single u64, and these handlers print up to four registers, e.g. "%.4x%.4x%.4x-%.4x" in adis16136. Converting them would change what the files return. adis16475 and adis16550 already split this way, using debugfs_create_file() for their open coded firmware files and debugfs_create_file_unsafe() only for the DEFINE_DEBUGFS_ATTRIBUTE ones. This does the same for adis16480, adis16400 and adis16136. Compile tested only; no ADIS hardware available. Changes since v1: 1. patch 2: changelog rewritten to explain why serial_number cannot use DEFINE_DEBUGFS_ATTRIBUTE(). Code unchanged. 2. patches 1 and 3: unchanged, Reviewed-by added. Link to v1: https://lore.kernel.org/r/20260814090728.965922-1-arkamondalofficial@gmail.com Arka Mondal (3): iio: imu: adis16480: fix unprotected debugfs reads iio: imu: adis16400: fix unprotected debugfs reads iio: gyro: adis16136: fix unprotected debugfs reads drivers/iio/gyro/adis16136.c | 2 +- drivers/iio/imu/adis16400.c | 2 +- drivers/iio/imu/adis16480.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) base-commit: 3d6d817622b0a9721e3cc404df3469171582be13 -- 2.55.0