All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
       [not found] <CGME20220610070811epcas5p3c62ef9ad9c82092deac59ff9be896677@epcas5p3.samsung.com>
@ 2022-06-10  7:05   ` Alim Akhtar
  0 siblings, 0 replies; 8+ messages in thread
From: Alim Akhtar @ 2022-06-10  7:05 UTC (permalink / raw)
  To: linux-kernel, linux-phy
  Cc: krzysztof.kozlowski+dt, vkoul, chanho61.park, pankaj.dubey, Alim Akhtar

commit f86c1d0a58b1f63a ("phy: samsung: ufs: remove drvdata from struct
samsung_ufs_phy")

removes _drvdata_ initialization which resulting in NULL pointer
dereferencing in samsung_ufs_phy_wait_for_lock_acq(). Fix this by
initializing drvdata.

The said commit also duplicate "has_symbol_clk" both in drvdata struct
and in samsung_ufs_phy struct, let's go back and use only one
"has_symbol_clk".

Fixes: f86c1d0a58b1 phy: samsung: ufs: remove drvdata from struct samsung_ufs_phy
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
---
 drivers/phy/samsung/phy-samsung-ufs.c | 6 +++---
 drivers/phy/samsung/phy-samsung-ufs.h | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/samsung/phy-samsung-ufs.c b/drivers/phy/samsung/phy-samsung-ufs.c
index 206a79c69a6c..6708877b20d7 100644
--- a/drivers/phy/samsung/phy-samsung-ufs.c
+++ b/drivers/phy/samsung/phy-samsung-ufs.c
@@ -207,7 +207,7 @@ static int samsung_ufs_phy_init(struct phy *phy)
 	ss_phy->lane_cnt = phy->attrs.bus_width;
 	ss_phy->ufs_phy_state = CFG_PRE_INIT;
 
-	if (ss_phy->has_symbol_clk) {
+	if (ss_phy->drvdata->has_symbol_clk) {
 		ret = samsung_ufs_phy_symbol_clk_init(ss_phy);
 		if (ret)
 			dev_err(ss_phy->dev, "failed to set ufs phy symbol clocks\n");
@@ -259,7 +259,7 @@ static int samsung_ufs_phy_exit(struct phy *phy)
 
 	clk_disable_unprepare(ss_phy->ref_clk);
 
-	if (ss_phy->has_symbol_clk) {
+	if (ss_phy->drvdata->has_symbol_clk) {
 		clk_disable_unprepare(ss_phy->tx0_symbol_clk);
 		clk_disable_unprepare(ss_phy->rx0_symbol_clk);
 		clk_disable_unprepare(ss_phy->rx1_symbol_clk);
@@ -327,8 +327,8 @@ static int samsung_ufs_phy_probe(struct platform_device *pdev)
 
 	drvdata = match->data;
 	phy->dev = dev;
+	phy->drvdata = drvdata;
 	phy->cfgs = drvdata->cfgs;
-	phy->has_symbol_clk = drvdata->has_symbol_clk;
 	memcpy(&phy->isol, &drvdata->isol, sizeof(phy->isol));
 
 	if (!of_property_read_u32_index(dev->of_node, "samsung,pmu-syscon", 1,
diff --git a/drivers/phy/samsung/phy-samsung-ufs.h b/drivers/phy/samsung/phy-samsung-ufs.h
index 854b53bdf347..b9144586daf5 100644
--- a/drivers/phy/samsung/phy-samsung-ufs.h
+++ b/drivers/phy/samsung/phy-samsung-ufs.h
@@ -125,7 +125,6 @@ struct samsung_ufs_phy {
 	const struct samsung_ufs_phy_drvdata *drvdata;
 	const struct samsung_ufs_phy_cfg * const *cfgs;
 	struct samsung_ufs_phy_pmu_isol isol;
-	bool has_symbol_clk;
 	u8 lane_cnt;
 	int ufs_phy_state;
 	enum phy_mode mode;

base-commit: ff539ac73ea559a8c146d99ab14bfcaddd30547a
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
@ 2022-06-10  7:05   ` Alim Akhtar
  0 siblings, 0 replies; 8+ messages in thread
From: Alim Akhtar @ 2022-06-10  7:05 UTC (permalink / raw)
  To: linux-kernel, linux-phy
  Cc: krzysztof.kozlowski+dt, vkoul, chanho61.park, pankaj.dubey, Alim Akhtar

commit f86c1d0a58b1f63a ("phy: samsung: ufs: remove drvdata from struct
samsung_ufs_phy")

removes _drvdata_ initialization which resulting in NULL pointer
dereferencing in samsung_ufs_phy_wait_for_lock_acq(). Fix this by
initializing drvdata.

The said commit also duplicate "has_symbol_clk" both in drvdata struct
and in samsung_ufs_phy struct, let's go back and use only one
"has_symbol_clk".

Fixes: f86c1d0a58b1 phy: samsung: ufs: remove drvdata from struct samsung_ufs_phy
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
---
 drivers/phy/samsung/phy-samsung-ufs.c | 6 +++---
 drivers/phy/samsung/phy-samsung-ufs.h | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/samsung/phy-samsung-ufs.c b/drivers/phy/samsung/phy-samsung-ufs.c
index 206a79c69a6c..6708877b20d7 100644
--- a/drivers/phy/samsung/phy-samsung-ufs.c
+++ b/drivers/phy/samsung/phy-samsung-ufs.c
@@ -207,7 +207,7 @@ static int samsung_ufs_phy_init(struct phy *phy)
 	ss_phy->lane_cnt = phy->attrs.bus_width;
 	ss_phy->ufs_phy_state = CFG_PRE_INIT;
 
-	if (ss_phy->has_symbol_clk) {
+	if (ss_phy->drvdata->has_symbol_clk) {
 		ret = samsung_ufs_phy_symbol_clk_init(ss_phy);
 		if (ret)
 			dev_err(ss_phy->dev, "failed to set ufs phy symbol clocks\n");
@@ -259,7 +259,7 @@ static int samsung_ufs_phy_exit(struct phy *phy)
 
 	clk_disable_unprepare(ss_phy->ref_clk);
 
-	if (ss_phy->has_symbol_clk) {
+	if (ss_phy->drvdata->has_symbol_clk) {
 		clk_disable_unprepare(ss_phy->tx0_symbol_clk);
 		clk_disable_unprepare(ss_phy->rx0_symbol_clk);
 		clk_disable_unprepare(ss_phy->rx1_symbol_clk);
@@ -327,8 +327,8 @@ static int samsung_ufs_phy_probe(struct platform_device *pdev)
 
 	drvdata = match->data;
 	phy->dev = dev;
+	phy->drvdata = drvdata;
 	phy->cfgs = drvdata->cfgs;
-	phy->has_symbol_clk = drvdata->has_symbol_clk;
 	memcpy(&phy->isol, &drvdata->isol, sizeof(phy->isol));
 
 	if (!of_property_read_u32_index(dev->of_node, "samsung,pmu-syscon", 1,
diff --git a/drivers/phy/samsung/phy-samsung-ufs.h b/drivers/phy/samsung/phy-samsung-ufs.h
index 854b53bdf347..b9144586daf5 100644
--- a/drivers/phy/samsung/phy-samsung-ufs.h
+++ b/drivers/phy/samsung/phy-samsung-ufs.h
@@ -125,7 +125,6 @@ struct samsung_ufs_phy {
 	const struct samsung_ufs_phy_drvdata *drvdata;
 	const struct samsung_ufs_phy_cfg * const *cfgs;
 	struct samsung_ufs_phy_pmu_isol isol;
-	bool has_symbol_clk;
 	u8 lane_cnt;
 	int ufs_phy_state;
 	enum phy_mode mode;

base-commit: ff539ac73ea559a8c146d99ab14bfcaddd30547a
-- 
2.25.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
  2022-06-10  7:05   ` Alim Akhtar
@ 2022-06-10  8:15     ` Chanho Park
  -1 siblings, 0 replies; 8+ messages in thread
From: Chanho Park @ 2022-06-10  8:15 UTC (permalink / raw)
  To: 'Alim Akhtar', linux-kernel, linux-phy
  Cc: krzysztof.kozlowski+dt, vkoul, pankaj.dubey

> Subject: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
> 
> commit f86c1d0a58b1f63a ("phy: samsung: ufs: remove drvdata from struct
> samsung_ufs_phy")
> 
> removes _drvdata_ initialization which resulting in NULL pointer
> dereferencing in samsung_ufs_phy_wait_for_lock_acq(). Fix this by
> initializing drvdata.
> 
> The said commit also duplicate "has_symbol_clk" both in drvdata struct and
> in samsung_ufs_phy struct, let's go back and use only one "has_symbol_clk".
> 
> Fixes: f86c1d0a58b1 phy: samsung: ufs: remove drvdata from struct
> samsung_ufs_phy

This might be conflicted when you apply your patch.
https://lore.kernel.org/linux-phy/20220610072924.12362-3-alim.akhtar@samsung.com/T/#u

When I created my patch, it was not existing so my previous patch make sense.
If you get back drvdata for your patch, please drop this "fixes tag + patch" and put this in your patchset.

Best Regards,
Chanho Park


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
@ 2022-06-10  8:15     ` Chanho Park
  0 siblings, 0 replies; 8+ messages in thread
From: Chanho Park @ 2022-06-10  8:15 UTC (permalink / raw)
  To: 'Alim Akhtar', linux-kernel, linux-phy
  Cc: krzysztof.kozlowski+dt, vkoul, pankaj.dubey

> Subject: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
> 
> commit f86c1d0a58b1f63a ("phy: samsung: ufs: remove drvdata from struct
> samsung_ufs_phy")
> 
> removes _drvdata_ initialization which resulting in NULL pointer
> dereferencing in samsung_ufs_phy_wait_for_lock_acq(). Fix this by
> initializing drvdata.
> 
> The said commit also duplicate "has_symbol_clk" both in drvdata struct and
> in samsung_ufs_phy struct, let's go back and use only one "has_symbol_clk".
> 
> Fixes: f86c1d0a58b1 phy: samsung: ufs: remove drvdata from struct
> samsung_ufs_phy

This might be conflicted when you apply your patch.
https://lore.kernel.org/linux-phy/20220610072924.12362-3-alim.akhtar@samsung.com/T/#u

When I created my patch, it was not existing so my previous patch make sense.
If you get back drvdata for your patch, please drop this "fixes tag + patch" and put this in your patchset.

Best Regards,
Chanho Park


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
  2022-06-10  7:05   ` Alim Akhtar
@ 2022-06-10  9:15     ` Alim Akhtar
  -1 siblings, 0 replies; 8+ messages in thread
From: Alim Akhtar @ 2022-06-10  9:15 UTC (permalink / raw)
  To: linux-kernel, linux-phy
  Cc: krzysztof.kozlowski+dt, vkoul, chanho61.park, pankaj.dubey

Sorry for the noise.

Please ignore this patch

>-----Original Message-----
>From: Alim Akhtar [mailto:alim.akhtar@samsung.com]
>Sent: Friday, June 10, 2022 12:36 PM
>To: linux-kernel@vger.kernel.org; linux-phy@lists.infradead.org
>Cc: krzysztof.kozlowski+dt@linaro.org; vkoul@kernel.org;
>chanho61.park@samsung.com; pankaj.dubey@samsung.com; Alim Akhtar
><alim.akhtar@samsung.com>
>Subject: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
>
>commit f86c1d0a58b1f63a ("phy: samsung: ufs: remove drvdata from struct
>samsung_ufs_phy")
>
>removes _drvdata_ initialization which resulting in NULL pointer
>dereferencing in samsung_ufs_phy_wait_for_lock_acq(). Fix this by initializing
>drvdata.
>
>The said commit also duplicate "has_symbol_clk" both in drvdata struct and in
>samsung_ufs_phy struct, let's go back and use only one "has_symbol_clk".
>
>Fixes: f86c1d0a58b1 phy: samsung: ufs: remove drvdata from struct
>samsung_ufs_phy
>Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
>---
> drivers/phy/samsung/phy-samsung-ufs.c | 6 +++---
>drivers/phy/samsung/phy-samsung-ufs.h | 1 -
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/phy/samsung/phy-samsung-ufs.c
>b/drivers/phy/samsung/phy-samsung-ufs.c
>index 206a79c69a6c..6708877b20d7 100644
>--- a/drivers/phy/samsung/phy-samsung-ufs.c
>+++ b/drivers/phy/samsung/phy-samsung-ufs.c
>@@ -207,7 +207,7 @@ static int samsung_ufs_phy_init(struct phy *phy)
> 	ss_phy->lane_cnt = phy->attrs.bus_width;
> 	ss_phy->ufs_phy_state = CFG_PRE_INIT;
>
>-	if (ss_phy->has_symbol_clk) {
>+	if (ss_phy->drvdata->has_symbol_clk) {
> 		ret = samsung_ufs_phy_symbol_clk_init(ss_phy);
> 		if (ret)
> 			dev_err(ss_phy->dev, "failed to set ufs phy symbol
>clocks\n"); @@ -259,7 +259,7 @@ static int samsung_ufs_phy_exit(struct phy
>*phy)
>
> 	clk_disable_unprepare(ss_phy->ref_clk);
>
>-	if (ss_phy->has_symbol_clk) {
>+	if (ss_phy->drvdata->has_symbol_clk) {
> 		clk_disable_unprepare(ss_phy->tx0_symbol_clk);
> 		clk_disable_unprepare(ss_phy->rx0_symbol_clk);
> 		clk_disable_unprepare(ss_phy->rx1_symbol_clk);
>@@ -327,8 +327,8 @@ static int samsung_ufs_phy_probe(struct
>platform_device *pdev)
>
> 	drvdata = match->data;
> 	phy->dev = dev;
>+	phy->drvdata = drvdata;
> 	phy->cfgs = drvdata->cfgs;
>-	phy->has_symbol_clk = drvdata->has_symbol_clk;
> 	memcpy(&phy->isol, &drvdata->isol, sizeof(phy->isol));
>
> 	if (!of_property_read_u32_index(dev->of_node, "samsung,pmu-
>syscon", 1, diff --git a/drivers/phy/samsung/phy-samsung-ufs.h
>b/drivers/phy/samsung/phy-samsung-ufs.h
>index 854b53bdf347..b9144586daf5 100644
>--- a/drivers/phy/samsung/phy-samsung-ufs.h
>+++ b/drivers/phy/samsung/phy-samsung-ufs.h
>@@ -125,7 +125,6 @@ struct samsung_ufs_phy {
> 	const struct samsung_ufs_phy_drvdata *drvdata;
> 	const struct samsung_ufs_phy_cfg * const *cfgs;
> 	struct samsung_ufs_phy_pmu_isol isol;
>-	bool has_symbol_clk;
> 	u8 lane_cnt;
> 	int ufs_phy_state;
> 	enum phy_mode mode;
>
>base-commit: ff539ac73ea559a8c146d99ab14bfcaddd30547a
>--
>2.25.1



-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
@ 2022-06-10  9:15     ` Alim Akhtar
  0 siblings, 0 replies; 8+ messages in thread
From: Alim Akhtar @ 2022-06-10  9:15 UTC (permalink / raw)
  To: linux-kernel, linux-phy
  Cc: krzysztof.kozlowski+dt, vkoul, chanho61.park, pankaj.dubey

Sorry for the noise.

Please ignore this patch

>-----Original Message-----
>From: Alim Akhtar [mailto:alim.akhtar@samsung.com]
>Sent: Friday, June 10, 2022 12:36 PM
>To: linux-kernel@vger.kernel.org; linux-phy@lists.infradead.org
>Cc: krzysztof.kozlowski+dt@linaro.org; vkoul@kernel.org;
>chanho61.park@samsung.com; pankaj.dubey@samsung.com; Alim Akhtar
><alim.akhtar@samsung.com>
>Subject: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
>
>commit f86c1d0a58b1f63a ("phy: samsung: ufs: remove drvdata from struct
>samsung_ufs_phy")
>
>removes _drvdata_ initialization which resulting in NULL pointer
>dereferencing in samsung_ufs_phy_wait_for_lock_acq(). Fix this by initializing
>drvdata.
>
>The said commit also duplicate "has_symbol_clk" both in drvdata struct and in
>samsung_ufs_phy struct, let's go back and use only one "has_symbol_clk".
>
>Fixes: f86c1d0a58b1 phy: samsung: ufs: remove drvdata from struct
>samsung_ufs_phy
>Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
>---
> drivers/phy/samsung/phy-samsung-ufs.c | 6 +++---
>drivers/phy/samsung/phy-samsung-ufs.h | 1 -
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/phy/samsung/phy-samsung-ufs.c
>b/drivers/phy/samsung/phy-samsung-ufs.c
>index 206a79c69a6c..6708877b20d7 100644
>--- a/drivers/phy/samsung/phy-samsung-ufs.c
>+++ b/drivers/phy/samsung/phy-samsung-ufs.c
>@@ -207,7 +207,7 @@ static int samsung_ufs_phy_init(struct phy *phy)
> 	ss_phy->lane_cnt = phy->attrs.bus_width;
> 	ss_phy->ufs_phy_state = CFG_PRE_INIT;
>
>-	if (ss_phy->has_symbol_clk) {
>+	if (ss_phy->drvdata->has_symbol_clk) {
> 		ret = samsung_ufs_phy_symbol_clk_init(ss_phy);
> 		if (ret)
> 			dev_err(ss_phy->dev, "failed to set ufs phy symbol
>clocks\n"); @@ -259,7 +259,7 @@ static int samsung_ufs_phy_exit(struct phy
>*phy)
>
> 	clk_disable_unprepare(ss_phy->ref_clk);
>
>-	if (ss_phy->has_symbol_clk) {
>+	if (ss_phy->drvdata->has_symbol_clk) {
> 		clk_disable_unprepare(ss_phy->tx0_symbol_clk);
> 		clk_disable_unprepare(ss_phy->rx0_symbol_clk);
> 		clk_disable_unprepare(ss_phy->rx1_symbol_clk);
>@@ -327,8 +327,8 @@ static int samsung_ufs_phy_probe(struct
>platform_device *pdev)
>
> 	drvdata = match->data;
> 	phy->dev = dev;
>+	phy->drvdata = drvdata;
> 	phy->cfgs = drvdata->cfgs;
>-	phy->has_symbol_clk = drvdata->has_symbol_clk;
> 	memcpy(&phy->isol, &drvdata->isol, sizeof(phy->isol));
>
> 	if (!of_property_read_u32_index(dev->of_node, "samsung,pmu-
>syscon", 1, diff --git a/drivers/phy/samsung/phy-samsung-ufs.h
>b/drivers/phy/samsung/phy-samsung-ufs.h
>index 854b53bdf347..b9144586daf5 100644
>--- a/drivers/phy/samsung/phy-samsung-ufs.h
>+++ b/drivers/phy/samsung/phy-samsung-ufs.h
>@@ -125,7 +125,6 @@ struct samsung_ufs_phy {
> 	const struct samsung_ufs_phy_drvdata *drvdata;
> 	const struct samsung_ufs_phy_cfg * const *cfgs;
> 	struct samsung_ufs_phy_pmu_isol isol;
>-	bool has_symbol_clk;
> 	u8 lane_cnt;
> 	int ufs_phy_state;
> 	enum phy_mode mode;
>
>base-commit: ff539ac73ea559a8c146d99ab14bfcaddd30547a
>--
>2.25.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
  2022-06-10  8:15     ` Chanho Park
@ 2022-06-10  9:16       ` Alim Akhtar
  -1 siblings, 0 replies; 8+ messages in thread
From: Alim Akhtar @ 2022-06-10  9:16 UTC (permalink / raw)
  To: 'Chanho Park', linux-kernel, linux-phy
  Cc: krzysztof.kozlowski+dt, vkoul, pankaj.dubey



>-----Original Message-----
>From: Chanho Park [mailto:chanho61.park@samsung.com]
>Sent: Friday, June 10, 2022 1:45 PM
>To: 'Alim Akhtar' <alim.akhtar@samsung.com>; linux-kernel@vger.kernel.org;
>linux-phy@lists.infradead.org
>Cc: krzysztof.kozlowski+dt@linaro.org; vkoul@kernel.org;
>pankaj.dubey@samsung.com
>Subject: RE: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
>
>> Subject: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
>>
>> commit f86c1d0a58b1f63a ("phy: samsung: ufs: remove drvdata from
>> struct
>> samsung_ufs_phy")
>>
>> removes _drvdata_ initialization which resulting in NULL pointer
>> dereferencing in samsung_ufs_phy_wait_for_lock_acq(). Fix this by
>> initializing drvdata.
>>
>> The said commit also duplicate "has_symbol_clk" both in drvdata struct
>> and in samsung_ufs_phy struct, let's go back and use only one
>"has_symbol_clk".
>>
>> Fixes: f86c1d0a58b1 phy: samsung: ufs: remove drvdata from struct
>> samsung_ufs_phy
>
>This might be conflicted when you apply your patch.
>https://lore.kernel.org/linux-phy/20220610072924.12362-3-
>alim.akhtar@samsung.com/T/#u
>
>When I created my patch, it was not existing so my previous patch make
>sense.
>If you get back drvdata for your patch, please drop this "fixes tag + patch" and
>put this in your patchset.
>
Thanks Chanho
Because of the merged conflict this got messed up. Will correct it.

>Best Regards,
>Chanho Park



-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
@ 2022-06-10  9:16       ` Alim Akhtar
  0 siblings, 0 replies; 8+ messages in thread
From: Alim Akhtar @ 2022-06-10  9:16 UTC (permalink / raw)
  To: 'Chanho Park', linux-kernel, linux-phy
  Cc: krzysztof.kozlowski+dt, vkoul, pankaj.dubey



>-----Original Message-----
>From: Chanho Park [mailto:chanho61.park@samsung.com]
>Sent: Friday, June 10, 2022 1:45 PM
>To: 'Alim Akhtar' <alim.akhtar@samsung.com>; linux-kernel@vger.kernel.org;
>linux-phy@lists.infradead.org
>Cc: krzysztof.kozlowski+dt@linaro.org; vkoul@kernel.org;
>pankaj.dubey@samsung.com
>Subject: RE: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
>
>> Subject: [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference
>>
>> commit f86c1d0a58b1f63a ("phy: samsung: ufs: remove drvdata from
>> struct
>> samsung_ufs_phy")
>>
>> removes _drvdata_ initialization which resulting in NULL pointer
>> dereferencing in samsung_ufs_phy_wait_for_lock_acq(). Fix this by
>> initializing drvdata.
>>
>> The said commit also duplicate "has_symbol_clk" both in drvdata struct
>> and in samsung_ufs_phy struct, let's go back and use only one
>"has_symbol_clk".
>>
>> Fixes: f86c1d0a58b1 phy: samsung: ufs: remove drvdata from struct
>> samsung_ufs_phy
>
>This might be conflicted when you apply your patch.
>https://lore.kernel.org/linux-phy/20220610072924.12362-3-
>alim.akhtar@samsung.com/T/#u
>
>When I created my patch, it was not existing so my previous patch make
>sense.
>If you get back drvdata for your patch, please drop this "fixes tag + patch" and
>put this in your patchset.
>
Thanks Chanho
Because of the merged conflict this got messed up. Will correct it.

>Best Regards,
>Chanho Park



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-06-10  9:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20220610070811epcas5p3c62ef9ad9c82092deac59ff9be896677@epcas5p3.samsung.com>
2022-06-10  7:05 ` [PATCH -next] phy: samsung-ufs: fix NULL pointer dereference Alim Akhtar
2022-06-10  7:05   ` Alim Akhtar
2022-06-10  8:15   ` Chanho Park
2022-06-10  8:15     ` Chanho Park
2022-06-10  9:16     ` Alim Akhtar
2022-06-10  9:16       ` Alim Akhtar
2022-06-10  9:15   ` Alim Akhtar
2022-06-10  9:15     ` Alim Akhtar

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.