Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-25 Thread Himadri Pandya
On Thu, Sep 24, 2020 at 5:06 PM Oliver Neukum wrote: > > Am Mittwoch, den 23.09.2020, 20:02 +0530 schrieb Himadri Pandya: > > > I meant that it was stupid to change it without properly understanding > > the significance of GFP_NOIO in this context. > > > > So now, do we re-write the wrapper

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-24 Thread Greg KH
On Thu, Sep 24, 2020 at 06:40:26PM +0300, Petko Manolov wrote: > On 20-09-24 13:09:05, Oliver Neukum wrote: > > Am Mittwoch, den 23.09.2020, 17:48 +0300 schrieb Petko Manolov: > > > > > One possible fix is to add yet another argument to > > > usb_control_msg_recv(), > > > which would be the

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-24 Thread Petko Manolov
On 20-09-24 13:09:05, Oliver Neukum wrote: > Am Mittwoch, den 23.09.2020, 17:48 +0300 schrieb Petko Manolov: > > > One possible fix is to add yet another argument to usb_control_msg_recv(), > > which would be the GFP_XYZ flag to pass on to kmemdup(). Up to Greg, of > > course. > > submitted.

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-24 Thread Oliver Neukum
Am Mittwoch, den 23.09.2020, 20:02 +0530 schrieb Himadri Pandya: > I meant that it was stupid to change it without properly understanding > the significance of GFP_NOIO in this context. > > So now, do we re-write the wrapper functions with flag passed as a parameter? Hi, I hope I set you in CC

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-24 Thread Oliver Neukum
Am Mittwoch, den 23.09.2020, 17:48 +0300 schrieb Petko Manolov: > > This internally uses kmemdup() with GFP_KERNEL. > > You cannot make this change. The API does not support it. > > I am afraid we will have to change the API first, before more > > such changes are done. > > One possible fix is

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-23 Thread Petko Manolov
On 20-09-23 12:22:37, Oliver Neukum wrote: > Am Mittwoch, den 23.09.2020, 14:35 +0530 schrieb Himadri Pandya: > > Hi, > > > Many usage of usb_control_msg() do not have proper error check on return > > value leaving scope for bugs on short reads. New usb_control_msg_recv() > > and

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-23 Thread Himadri Pandya
On Wed, Sep 23, 2020 at 7:51 PM Oliver Neukum wrote: > > Am Mittwoch, den 23.09.2020, 19:36 +0530 schrieb Himadri Pandya: > > On Wed, Sep 23, 2020 at 3:52 PM Oliver Neukum wrote: > > > > > > Am Mittwoch, den 23.09.2020, 14:35 +0530 schrieb Himadri Pandya: > > > > GFP_NOIO is used here for a

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-23 Thread Oliver Neukum
Am Mittwoch, den 23.09.2020, 19:36 +0530 schrieb Himadri Pandya: > On Wed, Sep 23, 2020 at 3:52 PM Oliver Neukum wrote: > > > > Am Mittwoch, den 23.09.2020, 14:35 +0530 schrieb Himadri Pandya: > > GFP_NOIO is used here for a reason. You need to use this helper > > while in contexts of error

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-23 Thread Himadri Pandya
On Wed, Sep 23, 2020 at 3:52 PM Oliver Neukum wrote: > > Am Mittwoch, den 23.09.2020, 14:35 +0530 schrieb Himadri Pandya: > > Hi, > > > Many usage of usb_control_msg() do not have proper error check on return > > value leaving scope for bugs on short reads. New usb_control_msg_recv() > > and

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-23 Thread Oliver Neukum
Am Mittwoch, den 23.09.2020, 14:35 +0530 schrieb Himadri Pandya: Hi, > Many usage of usb_control_msg() do not have proper error check on return > value leaving scope for bugs on short reads. New usb_control_msg_recv() > and usb_control_msg_send() nicely wraps usb_control_msg() with proper >

[PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-23 Thread Himadri Pandya
Many usage of usb_control_msg() do not have proper error check on return value leaving scope for bugs on short reads. New usb_control_msg_recv() and usb_control_msg_send() nicely wraps usb_control_msg() with proper error check. Hence use the wrappers instead of calling usb_control_msg() directly.