* [PATCH 0/4] Do not DMA on the stack
@ 2015-10-04 20:13 Ksenija Stanojevic
2015-10-04 20:14 ` [PATCH 1/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E() Ksenija Stanojevic
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Ksenija Stanojevic @ 2015-10-04 20:13 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Ksenija Stanojevic
Fix error "doing DMA on the stack" by using kzalloc for buffer
allocation in rtl8192u/r8192U_core.c in the following functions:
write_nic_byte_E()
write_nic_byte()
write_nic_word()
write_nic_dword()
Issue found by smatch.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Ksenija Stanojevic (4):
Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E()
Staging: rtl8192u: Do not DMA on the stack in write_nic_byte()
Staging: rtl8192u: Do not DMA on the stack in write_nic_word()
Staging: rtl8192u: Do not DMA on the stack in write_nic_dword()
drivers/staging/rtl8192u/r8192U_core.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
--
1.9.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E()
2015-10-04 20:13 [PATCH 0/4] Do not DMA on the stack Ksenija Stanojevic
@ 2015-10-04 20:14 ` Ksenija Stanojevic
2015-10-05 3:17 ` [Outreachy kernel] " Greg KH
2015-10-04 20:14 ` [PATCH 2/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte() Ksenija Stanojevic
` (3 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Ksenija Stanojevic @ 2015-10-04 20:14 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Ksenija Stanojevic
Fix error "doing DMA on the stack" by using kzalloc for buffer
allocation.
Issue found by smatch.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 28b54ba..287e2ce 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -259,10 +259,15 @@ void write_nic_byte_E(struct net_device *dev, int indx, u8 data)
int status;
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
struct usb_device *udev = priv->udev;
+ u8 *pdata = kzalloc(sizeof(data), GFP_KERNEL);
+
+ if (!pdata)
+ return;
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
indx | 0xfe00, 0, &data, 1, HZ / 2);
+ kfree(pdata);
if (status < 0)
netdev_err(dev, "write_nic_byte_E TimeOut! status: %d\n",
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte()
2015-10-04 20:13 [PATCH 0/4] Do not DMA on the stack Ksenija Stanojevic
2015-10-04 20:14 ` [PATCH 1/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E() Ksenija Stanojevic
@ 2015-10-04 20:14 ` Ksenija Stanojevic
2015-10-04 20:14 ` [PATCH 3/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_word() Ksenija Stanojevic
` (2 subsequent siblings)
4 siblings, 0 replies; 14+ messages in thread
From: Ksenija Stanojevic @ 2015-10-04 20:14 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Ksenija Stanojevic
Fix error "doing DMA on the stack" by using kzalloc for buffer
allocation.
Issue found by smatch.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 287e2ce..94e3610 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -298,11 +298,16 @@ void write_nic_byte(struct net_device *dev, int indx, u8 data)
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
struct usb_device *udev = priv->udev;
+ u8 *pdata = kzalloc(sizeof(data), GFP_KERNEL);
+
+ if (!pdata)
+ return;
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
&data, 1, HZ / 2);
+ kfree(pdata);
if (status < 0)
netdev_err(dev, "write_nic_byte TimeOut! status: %d\n", status);
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_word()
2015-10-04 20:13 [PATCH 0/4] Do not DMA on the stack Ksenija Stanojevic
2015-10-04 20:14 ` [PATCH 1/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E() Ksenija Stanojevic
2015-10-04 20:14 ` [PATCH 2/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte() Ksenija Stanojevic
@ 2015-10-04 20:14 ` Ksenija Stanojevic
2015-10-04 20:15 ` [PATCH 4/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_dword() Ksenija Stanojevic
2015-10-04 20:39 ` [Outreachy kernel] [PATCH 0/4] Do not DMA on the stack Arnd Bergmann
4 siblings, 0 replies; 14+ messages in thread
From: Ksenija Stanojevic @ 2015-10-04 20:14 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Ksenija Stanojevic
Fix error "doing DMA on the stack" by using kzalloc for buffer
allocation.
Issue found by smatch.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 94e3610..6d0127f 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -323,11 +323,16 @@ void write_nic_word(struct net_device *dev, int indx, u16 data)
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
struct usb_device *udev = priv->udev;
+ u16 *pdata = kzalloc(sizeof(data), GFP_KERNEL);
+
+ if (!pdata)
+ return;
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
&data, 2, HZ / 2);
+ kfree(pdata);
if (status < 0)
netdev_err(dev, "write_nic_word TimeOut! status: %d\n", status);
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_dword()
2015-10-04 20:13 [PATCH 0/4] Do not DMA on the stack Ksenija Stanojevic
` (2 preceding siblings ...)
2015-10-04 20:14 ` [PATCH 3/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_word() Ksenija Stanojevic
@ 2015-10-04 20:15 ` Ksenija Stanojevic
2015-10-05 3:27 ` Ksenija Stanojević
2015-10-04 20:39 ` [Outreachy kernel] [PATCH 0/4] Do not DMA on the stack Arnd Bergmann
4 siblings, 1 reply; 14+ messages in thread
From: Ksenija Stanojevic @ 2015-10-04 20:15 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Ksenija Stanojevic
Fix error "doing DMA on the stack" by using kzalloc for buffer
allocation.
Issue found by smatch.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 6d0127f..a5bf8b4 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -347,11 +347,16 @@ void write_nic_dword(struct net_device *dev, int indx, u32 data)
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
struct usb_device *udev = priv->udev;
+ u32 *pdata = kzalloc(sizeof(data), GFP_KERNEL);
+
+ if (!pdata)
+ return;
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
&data, 4, HZ / 2);
+ kfree(pdata);
if (status < 0)
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/4] Do not DMA on the stack
2015-10-04 20:13 [PATCH 0/4] Do not DMA on the stack Ksenija Stanojevic
` (3 preceding siblings ...)
2015-10-04 20:15 ` [PATCH 4/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_dword() Ksenija Stanojevic
@ 2015-10-04 20:39 ` Arnd Bergmann
2015-10-05 5:28 ` Ksenija Stanojević
4 siblings, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2015-10-04 20:39 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Ksenija Stanojevic
On Sunday 04 October 2015 22:13:02 Ksenija Stanojevic wrote:
> Fix error "doing DMA on the stack" by using kzalloc for buffer
> allocation in rtl8192u/r8192U_core.c in the following functions:
> write_nic_byte_E()
> write_nic_byte()
> write_nic_word()
> write_nic_dword()
> Issue found by smatch.
>
> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
>
> Ksenija Stanojevic (4):
> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E()
> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte()
> Staging: rtl8192u: Do not DMA on the stack in write_nic_word()
> Staging: rtl8192u: Do not DMA on the stack in write_nic_dword()
>
The changes all look wrong to me, can you guess what the problem is
when you read them again?
Also, these are four instances of the same code, in the same file,
so it would be reasonable to do a single patch, and then you can
do the other five instances in the same file as well.
Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH 1/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E()
2015-10-04 20:14 ` [PATCH 1/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E() Ksenija Stanojevic
@ 2015-10-05 3:17 ` Greg KH
2015-10-05 3:27 ` Ksenija Stanojević
0 siblings, 1 reply; 14+ messages in thread
From: Greg KH @ 2015-10-05 3:17 UTC (permalink / raw)
To: Ksenija Stanojevic; +Cc: outreachy-kernel
On Sun, Oct 04, 2015 at 10:14:00PM +0200, Ksenija Stanojevic wrote:
> Fix error "doing DMA on the stack" by using kzalloc for buffer
> allocation.
> Issue found by smatch.
What does smatch say after you made your changes and you run it on the
code again?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_dword()
2015-10-04 20:15 ` [PATCH 4/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_dword() Ksenija Stanojevic
@ 2015-10-05 3:27 ` Ksenija Stanojević
0 siblings, 0 replies; 14+ messages in thread
From: Ksenija Stanojević @ 2015-10-05 3:27 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Ksenija Stanojevic
On Sun, Oct 4, 2015 at 10:15 PM, Ksenija Stanojevic
<ksenija.stanojevic@gmail.com> wrote:
> Fix error "doing DMA on the stack" by using kzalloc for buffer
> allocation.
> Issue found by smatch.
>
> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> ---
> drivers/staging/rtl8192u/r8192U_core.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index 6d0127f..a5bf8b4 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -347,11 +347,16 @@ void write_nic_dword(struct net_device *dev, int indx, u32 data)
>
> struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
> struct usb_device *udev = priv->udev;
> + u32 *pdata = kzalloc(sizeof(data), GFP_KERNEL);
> +
> + if (!pdata)
> + return;
>
> status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
> RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
> (indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
> &data, 4, HZ / 2);
I made a mistake i should have replace &data with pdata.
> + kfree(pdata);
>
>
> if (status < 0)
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH 1/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E()
2015-10-05 3:17 ` [Outreachy kernel] " Greg KH
@ 2015-10-05 3:27 ` Ksenija Stanojević
0 siblings, 0 replies; 14+ messages in thread
From: Ksenija Stanojević @ 2015-10-05 3:27 UTC (permalink / raw)
To: Greg KH; +Cc: outreachy-kernel
On Mon, Oct 5, 2015 at 5:17 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Sun, Oct 04, 2015 at 10:14:00PM +0200, Ksenija Stanojevic wrote:
>> Fix error "doing DMA on the stack" by using kzalloc for buffer
>> allocation.
>> Issue found by smatch.
>
> What does smatch say after you made your changes and you run it on the
> code again?
I made a mistake i should have replace &data with pdata.
> thanks,
>
> greg k-h
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151005031746.GD27303%40kroah.com.
> For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/4] Do not DMA on the stack
2015-10-04 20:39 ` [Outreachy kernel] [PATCH 0/4] Do not DMA on the stack Arnd Bergmann
@ 2015-10-05 5:28 ` Ksenija Stanojević
2015-10-05 6:40 ` Ksenija Stanojević
0 siblings, 1 reply; 14+ messages in thread
From: Ksenija Stanojević @ 2015-10-05 5:28 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: outreachy-kernel
On Sun, Oct 4, 2015 at 10:39 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Sunday 04 October 2015 22:13:02 Ksenija Stanojevic wrote:
>> Fix error "doing DMA on the stack" by using kzalloc for buffer
>> allocation in rtl8192u/r8192U_core.c in the following functions:
>> write_nic_byte_E()
>> write_nic_byte()
>> write_nic_word()
>> write_nic_dword()
>> Issue found by smatch.
>>
>> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
>>
>> Ksenija Stanojevic (4):
>> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E()
>> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte()
>> Staging: rtl8192u: Do not DMA on the stack in write_nic_word()
>> Staging: rtl8192u: Do not DMA on the stack in write_nic_dword()
>>
>
> The changes all look wrong to me, can you guess what the problem is
> when you read them again?
I forgot to replace &data with pdata in usb_control_msg()
>
> Also, these are four instances of the same code, in the same file,
> so it would be reasonable to do a single patch, and then you can
> do the other five instances in the same file as well.
>
> Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/4] Do not DMA on the stack
2015-10-05 5:28 ` Ksenija Stanojević
@ 2015-10-05 6:40 ` Ksenija Stanojević
2015-10-05 6:44 ` Ksenija Stanojević
0 siblings, 1 reply; 14+ messages in thread
From: Ksenija Stanojević @ 2015-10-05 6:40 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: outreachy-kernel
On Mon, Oct 5, 2015 at 7:28 AM, Ksenija Stanojević
<ksenija.stanojevic@gmail.com> wrote:
> On Sun, Oct 4, 2015 at 10:39 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Sunday 04 October 2015 22:13:02 Ksenija Stanojevic wrote:
>>> Fix error "doing DMA on the stack" by using kzalloc for buffer
>>> allocation in rtl8192u/r8192U_core.c in the following functions:
>>> write_nic_byte_E()
>>> write_nic_byte()
>>> write_nic_word()
>>> write_nic_dword()
>>> Issue found by smatch.
>>>
>>> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
>>>
>>> Ksenija Stanojevic (4):
>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E()
>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte()
>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_word()
>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_dword()
>>>
>>
>> The changes all look wrong to me, can you guess what the problem is
>> when you read them again?
>
> I forgot to replace &data with pdata in usb_control_msg()
And also assign pdata to point to data
pdata = &data;
>>
>> Also, these are four instances of the same code, in the same file,
>> so it would be reasonable to do a single patch, and then you can
>> do the other five instances in the same file as well.
>>
>> Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/4] Do not DMA on the stack
2015-10-05 6:40 ` Ksenija Stanojević
@ 2015-10-05 6:44 ` Ksenija Stanojević
2015-10-05 6:50 ` Ksenija Stanojević
0 siblings, 1 reply; 14+ messages in thread
From: Ksenija Stanojević @ 2015-10-05 6:44 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: outreachy-kernel
On Mon, Oct 5, 2015 at 8:40 AM, Ksenija Stanojević
<ksenija.stanojevic@gmail.com> wrote:
> On Mon, Oct 5, 2015 at 7:28 AM, Ksenija Stanojević
> <ksenija.stanojevic@gmail.com> wrote:
>> On Sun, Oct 4, 2015 at 10:39 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>>> On Sunday 04 October 2015 22:13:02 Ksenija Stanojevic wrote:
>>>> Fix error "doing DMA on the stack" by using kzalloc for buffer
>>>> allocation in rtl8192u/r8192U_core.c in the following functions:
>>>> write_nic_byte_E()
>>>> write_nic_byte()
>>>> write_nic_word()
>>>> write_nic_dword()
>>>> Issue found by smatch.
>>>>
>>>> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
>>>>
>>>> Ksenija Stanojevic (4):
>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E()
>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte()
>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_word()
>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_dword()
>>>>
>>>
>>> The changes all look wrong to me, can you guess what the problem is
>>> when you read them again?
>>
Please ignore this.
> And also assign pdata to point to data
> pdata = &data;
thanks,
Ksenija
>>>
>>> Also, these are four instances of the same code, in the same file,
>>> so it would be reasonable to do a single patch, and then you can
>>> do the other five instances in the same file as well.
>>>
>>> Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/4] Do not DMA on the stack
2015-10-05 6:44 ` Ksenija Stanojević
@ 2015-10-05 6:50 ` Ksenija Stanojević
2015-10-05 8:11 ` Arnd Bergmann
0 siblings, 1 reply; 14+ messages in thread
From: Ksenija Stanojević @ 2015-10-05 6:50 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: outreachy-kernel
On Mon, Oct 5, 2015 at 8:44 AM, Ksenija Stanojević
<ksenija.stanojevic@gmail.com> wrote:
> On Mon, Oct 5, 2015 at 8:40 AM, Ksenija Stanojević
> <ksenija.stanojevic@gmail.com> wrote:
>> On Mon, Oct 5, 2015 at 7:28 AM, Ksenija Stanojević
>> <ksenija.stanojevic@gmail.com> wrote:
>>> On Sun, Oct 4, 2015 at 10:39 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>>>> On Sunday 04 October 2015 22:13:02 Ksenija Stanojevic wrote:
>>>>> Fix error "doing DMA on the stack" by using kzalloc for buffer
>>>>> allocation in rtl8192u/r8192U_core.c in the following functions:
>>>>> write_nic_byte_E()
>>>>> write_nic_byte()
>>>>> write_nic_word()
>>>>> write_nic_dword()
>>>>> Issue found by smatch.
>>>>>
>>>>> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
>>>>>
>>>>> Ksenija Stanojevic (4):
>>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E()
>>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte()
>>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_word()
>>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_dword()
>>>>>
>>>>
>>>> The changes all look wrong to me, can you guess what the problem is
>>>> when you read them again?
>>>
> Please ignore this.
>> And also assign pdata to point to data
>> pdata = &data;
I meant *pdata = data.
> thanks,
> Ksenija
>>>>
>>>> Also, these are four instances of the same code, in the same file,
>>>> so it would be reasonable to do a single patch, and then you can
>>>> do the other five instances in the same file as well.
>>>>
>>>> Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/4] Do not DMA on the stack
2015-10-05 6:50 ` Ksenija Stanojević
@ 2015-10-05 8:11 ` Arnd Bergmann
0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2015-10-05 8:11 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Ksenija Stanojević
On Monday 05 October 2015 08:50:09 Ksenija Stanojević wrote:
> On Mon, Oct 5, 2015 at 8:44 AM, Ksenija Stanojević
> <ksenija.stanojevic@gmail.com> wrote:
> > On Mon, Oct 5, 2015 at 8:40 AM, Ksenija Stanojević
> > <ksenija.stanojevic@gmail.com> wrote:
> >> On Mon, Oct 5, 2015 at 7:28 AM, Ksenija Stanojević
> >> <ksenija.stanojevic@gmail.com> wrote:
> >>> On Sun, Oct 4, 2015 at 10:39 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> >>>> On Sunday 04 October 2015 22:13:02 Ksenija Stanojevic wrote:
> >>>>> Fix error "doing DMA on the stack" by using kzalloc for buffer
> >>>>> allocation in rtl8192u/r8192U_core.c in the following functions:
> >>>>> write_nic_byte_E()
> >>>>> write_nic_byte()
> >>>>> write_nic_word()
> >>>>> write_nic_dword()
> >>>>> Issue found by smatch.
> >>>>>
> >>>>> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> >>>>>
> >>>>> Ksenija Stanojevic (4):
> >>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E()
> >>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_byte()
> >>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_word()
> >>>>> Staging: rtl8192u: Do not DMA on the stack in write_nic_dword()
> >>>>>
> >>>>
> >>>> The changes all look wrong to me, can you guess what the problem is
> >>>> when you read them again?
> >>>
> > Please ignore this.
> >> And also assign pdata to point to data
> >> pdata = &data;
>
> I meant *pdata = data.
Right. Once you change that, it should be fine.
Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-10-05 8:11 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-04 20:13 [PATCH 0/4] Do not DMA on the stack Ksenija Stanojevic
2015-10-04 20:14 ` [PATCH 1/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte_E() Ksenija Stanojevic
2015-10-05 3:17 ` [Outreachy kernel] " Greg KH
2015-10-05 3:27 ` Ksenija Stanojević
2015-10-04 20:14 ` [PATCH 2/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_byte() Ksenija Stanojevic
2015-10-04 20:14 ` [PATCH 3/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_word() Ksenija Stanojevic
2015-10-04 20:15 ` [PATCH 4/4] Staging: rtl8192u: Do not DMA on the stack in write_nic_dword() Ksenija Stanojevic
2015-10-05 3:27 ` Ksenija Stanojević
2015-10-04 20:39 ` [Outreachy kernel] [PATCH 0/4] Do not DMA on the stack Arnd Bergmann
2015-10-05 5:28 ` Ksenija Stanojević
2015-10-05 6:40 ` Ksenija Stanojević
2015-10-05 6:44 ` Ksenija Stanojević
2015-10-05 6:50 ` Ksenija Stanojević
2015-10-05 8:11 ` Arnd Bergmann
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.