All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Xiangyu Chen <xiangyu.chen@eng.windriver.com>,
	Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1 2/2] fpga: manager: add owner module and take its refcount
Date: Mon, 25 Nov 2024 10:20:39 -0500	[thread overview]
Message-ID: <20241125101254-d0692ef1c2bf7efc@stable.kernel.org> (raw)
In-Reply-To: <20241125053816.1914594-3-xiangyu.chen@eng.windriver.com>

[ Sasha's backport helper bot ]

Hi,

The upstream commit SHA1 provided is correct: 4d4d2d4346857bf778fafaa97d6f76bb1663e3c9

WARNING: Author mismatch between patch and upstream commit:
Backport author: Xiangyu Chen <xiangyu.chen@eng.windriver.com>
Commit author: Marco Pagani <marpagan@redhat.com>


Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.11.y | Present (exact SHA1)
6.6.y | Present (different SHA1: 2da62a139a62)
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
--- -	2024-11-25 10:08:25.352634693 -0500
+++ /tmp/tmp.mxHKcERVgS	2024-11-25 10:08:25.345028939 -0500
@@ -1,3 +1,5 @@
+[ Upstream commit 4d4d2d4346857bf778fafaa97d6f76bb1663e3c9 ]
+
 The current implementation of the fpga manager assumes that the low-level
 module registers a driver for the parent device and uses its owner pointer
 to take the module's refcount. This approach is problematic since it can
@@ -26,6 +28,8 @@
 Acked-by: Xu Yilun <yilun.xu@intel.com>
 Link: https://lore.kernel.org/r/20240305192926.84886-1-marpagan@redhat.com
 Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
 ---
  Documentation/driver-api/fpga/fpga-mgr.rst | 34 +++++----
  drivers/fpga/fpga-mgr.c                    | 82 +++++++++++++---------
@@ -33,7 +37,7 @@
  3 files changed, 89 insertions(+), 53 deletions(-)
 
 diff --git a/Documentation/driver-api/fpga/fpga-mgr.rst b/Documentation/driver-api/fpga/fpga-mgr.rst
-index 49c0a95126532..8d2b79f696c1f 100644
+index 49c0a9512653..8d2b79f696c1 100644
 --- a/Documentation/driver-api/fpga/fpga-mgr.rst
 +++ b/Documentation/driver-api/fpga/fpga-mgr.rst
 @@ -24,7 +24,8 @@ How to support a new FPGA device
@@ -109,7 +113,7 @@
  .. kernel-doc:: drivers/fpga/fpga-mgr.c
     :functions: fpga_mgr_unregister
 diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
-index 06651389c5926..0f4035b089a2e 100644
+index 8efa67620e21..0c71d91ba7f6 100644
 --- a/drivers/fpga/fpga-mgr.c
 +++ b/drivers/fpga/fpga-mgr.c
 @@ -664,20 +664,16 @@ static struct attribute *fpga_mgr_attrs[] = {
@@ -141,12 +145,12 @@
   */
  struct fpga_manager *fpga_mgr_get(struct device *dev)
  {
--	struct device *mgr_dev = class_find_device(&fpga_mgr_class, NULL, dev,
+-	struct device *mgr_dev = class_find_device(fpga_mgr_class, NULL, dev,
 -						   fpga_mgr_dev_match);
 +	struct fpga_manager *mgr;
 +	struct device *mgr_dev;
 +
-+	mgr_dev = class_find_device(&fpga_mgr_class, NULL, dev, fpga_mgr_dev_match);
++	mgr_dev = class_find_device(fpga_mgr_class, NULL, dev, fpga_mgr_dev_match);
  	if (!mgr_dev)
  		return ERR_PTR(-ENODEV);
  
@@ -167,9 +171,9 @@
 +	struct fpga_manager *mgr;
 +	struct device *mgr_dev;
  
--	dev = class_find_device_by_of_node(&fpga_mgr_class, node);
+-	dev = class_find_device_by_of_node(fpga_mgr_class, node);
 -	if (!dev)
-+	mgr_dev = class_find_device_by_of_node(&fpga_mgr_class, node);
++	mgr_dev = class_find_device_by_of_node(fpga_mgr_class, node);
 +	if (!mgr_dev)
  		return ERR_PTR(-ENODEV);
  
@@ -337,7 +341,7 @@
  static void fpga_mgr_dev_release(struct device *dev)
  {
 diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
-index 54f63459efd6e..0d4fe068f3d8a 100644
+index 54f63459efd6..0d4fe068f3d8 100644
 --- a/include/linux/fpga/fpga-mgr.h
 +++ b/include/linux/fpga/fpga-mgr.h
 @@ -201,6 +201,7 @@ struct fpga_manager_ops {
@@ -393,3 +397,6 @@
 +			 struct module *owner);
  
  #endif /*_LINUX_FPGA_MGR_H */
+-- 
+2.43.0
+
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |

      reply	other threads:[~2024-11-25 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25  5:38 [PATCH 6.1 0/2] Backport to fix CVE-2024-37021 and CVE-2024-36479 Xiangyu Chen
2024-11-25  5:38 ` [PATCH 6.1 1/2] fpga: bridge: add owner module and take its refcount Xiangyu Chen
2024-11-25 15:20   ` Sasha Levin
2024-11-25  5:38 ` [PATCH 6.1 2/2] fpga: manager: " Xiangyu Chen
2024-11-25 15:20   ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241125101254-d0692ef1c2bf7efc@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=xiangyu.chen@eng.windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.