2017-05-07 21:42:00

by Ian W MORRISON

[permalink] [raw]
Subject: [PATCH v3] staging: rtl8723bs: remove re-positioned call to kfree in os_dep/ioctl_cfg80211.c

A kernel cloned from git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and built with the latest RTL8723BS driver included (CONFIG_RTL8723BS=m) fails when booting on an Intel Atom device with the RTL8723BS wifi chipset due to an error in drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c.

The kernel when booted with Ubuntu 17.04 results in an unusable system however with the following patch booting is successful and the system is usable. The patch and kernel builds have been tested against on an Intel Compute Stick (STCK1A32WFC model).

This version of the patch (version 3) has tabs rather than spaces and no wrap around. The patch has received one review:

Patch looks good to me:
Reviewed-by: Hans de Goede <[email protected]>

Regards,
Ian

From: Ian W Morrison <[email protected]>
Date: Fri, 28 Apr 2017 02:20:38 +1000
Subject: [PATCH] staging: rtl8723bs: remove a call to kfree in
os_dep/ioctl_cfg80211.c

Signed-off-by: Ian W Morrison <[email protected]>
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index f17f4fb..2ee9df5 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -3527,7 +3527,6 @@ int rtw_wdev_alloc(struct adapter *padapter, struct device *dev)
pwdev_priv->power_mgmt = true;
else
pwdev_priv->power_mgmt = false;
- kfree((u8 *)wdev);

return ret;

--
1.9.1


2017-05-07 22:19:19

by Ian W MORRISON

[permalink] [raw]
Subject: [PATCH v5] staging: rtl8723bs: remove re-positioned call to kfree in os_dep/ioctl_cfg80211.c

A kernel cloned from
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and
built with the latest RTL8723BS driver included (CONFIG_RTL8723BS=m)
fails when booting on an Intel Atom device with the RTL8723BS wifi
chipset due to an error in
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c.

The kernel when booted with Ubuntu 17.04 results in an unusable system
however with the following patch booting is successful and the system
is usable. The patch and kernel builds have been tested against on an
Intel Compute Stick (STCK1A32WFC model).

This version of the patch (version 5) has tabs rather than spaces, no
wrap around, a changelog and a sign-off email.

Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Ian W Morrison <[email protected]>
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index f17f4fb..2ee9df5 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -3527,7 +3527,6 @@ int rtw_wdev_alloc(struct adapter *padapter, struct device *dev)
pwdev_priv->power_mgmt = true;
else
pwdev_priv->power_mgmt = false;
- kfree((u8 *)wdev);

return ret;

--
1.9.1

2017-05-08 13:40:42

by Ian W MORRISON

[permalink] [raw]
Subject: [PATCH v6] staging: rtl8723bs: remove re-positioned call to kfree in os_dep/ioctl_cfg80211.c

A re-positioned call to kfree() in
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
causes a segmentation error. This patch removed the kfree() call.

Fixes 6557ddfec348 ("staging: rtl8723bs: Fix various errors in os_dep/ioctl_cfg80211.c")
Signed-off-by: Ian W Morrison <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
---
This version of the patch (version 6) fixes errors in the patch submission.
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index f17f4fb..2ee9df5 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -3527,7 +3527,6 @@ int rtw_wdev_alloc(struct adapter *padapter, struct device *dev)
pwdev_priv->power_mgmt = true;
else
pwdev_priv->power_mgmt = false;
- kfree((u8 *)wdev);

return ret;

--
1.9.1

2017-05-08 15:06:17

by Ian W MORRISON

[permalink] [raw]
Subject: Re: [PATCH v5] staging: rtl8723bs: remove re-positioned call to kfree in os_dep/ioctl_cfg80211.c

On 9 May 2017 at 00:42, Andy Shevchenko <[email protected]> wrote:
> On Sun, May 7, 2017 at 1:04 PM, Ian W MORRISON <[email protected]> wrote:

<snip>

>
> What are you trying to achieve by posting this patch over and over so often?
>
> Version 5 look pretty good to me. Just stop posting it again and wait
> when Greg takes it.
>

I made a series of errors in the patch submission due to inexperience
in submitting my very first patch. The visibility of my minor mistakes
in certainly not what I would have liked and I can only apologize for
the annoyance caused. I believe I have finally corrected the patch to
meet the exacting standards required and having learnt from the
experience I hope never to repeat them.

> FWIW (version 5!):
> Reviewed-by: Andy Shevchenko <[email protected]>
>
> --
> With Best Regards,
> Andy Shevchenko

Thank you for your review,
Ian

2017-05-07 21:52:24

by Ian W MORRISON

[permalink] [raw]
Subject: [PATCH v4] staging: rtl8723bs: remove re-positioned call to kfree in os_dep/ioctl_cfg80211.c

A kernel cloned from
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and
built with the latest RTL8723BS driver included (CONFIG_RTL8723BS=m)
fails when booting on an Intel Atom device with the RTL8723BS wifi
chipset due to an error in
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c.

The kernel when booted with Ubuntu 17.04 results in an unusable system
however with the following patch booting is successful and the system
is usable. The patch and kernel builds have been tested against on an
Intel Compute Stick (STCK1A32WFC model).

This version of the patch (version 4) has tabs rather than spaces, no
wrap around and a changelog. The patch has received one review:

Patch looks good to me:
Reviewed-by: Hans de Goede <[email protected]>

Signed-off-by: Ian W Morrison <[email protected]>
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index f17f4fb..2ee9df5 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -3527,7 +3527,6 @@ int rtw_wdev_alloc(struct adapter *padapter, struct device *dev)
pwdev_priv->power_mgmt = true;
else
pwdev_priv->power_mgmt = false;
- kfree((u8 *)wdev);

return ret;

--
1.9.1

2017-05-08 14:42:08

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v5] staging: rtl8723bs: remove re-positioned call to kfree in os_dep/ioctl_cfg80211.c

On Sun, May 7, 2017 at 1:04 PM, Ian W MORRISON <[email protected]> wrote:
> A kernel cloned from
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and
> built with the latest RTL8723BS driver included (CONFIG_RTL8723BS=m)
> fails when booting on an Intel Atom device with the RTL8723BS wifi
> chipset due to an error in
> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c.
>
> The kernel when booted with Ubuntu 17.04 results in an unusable system
> however with the following patch booting is successful and the system
> is usable. The patch and kernel builds have been tested against on an
> Intel Compute Stick (STCK1A32WFC model).
>
> This version of the patch (version 5) has tabs rather than spaces, no
> wrap around, a changelog and a sign-off email.

What are you trying to achieve by posting this patch over and over so often?

Version 5 look pretty good to me. Just stop posting it again and wait
when Greg takes it.

FWIW (version 5!):
Reviewed-by: Andy Shevchenko <[email protected]>

--
With Best Regards,
Andy Shevchenko