Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread Petko Manolov
On 17-02-07 14:14:30, David Laight wrote: > From: Petko Manolov > > Sent: 07 February 2017 13:21 > ... > > > > Would you consider what David proposed (usb_control_msg_with_malloc()) > > > > for 4.11, > > > > for example? I for one will use something like that in all my drivers. > > > > > > Sure,

RE: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread David Laight
From: Petko Manolov > Sent: 07 February 2017 13:21 ... > > > Would you consider what David proposed (usb_control_msg_with_malloc()) > > > for 4.11, > > > for example? I for one will use something like that in all my drivers. > > > > Sure, but you might want to make it a bit smaller of a function

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread Petko Manolov
On 17-02-07 14:01:02, Greg KH wrote: > On Tue, Feb 07, 2017 at 02:53:24PM +0200, Petko Manolov wrote: > > On 17-02-07 11:51:31, Greg KH wrote: > > > On Tue, Feb 07, 2017 at 12:34:52PM +0200, Petko Manolov wrote: > > > > On 17-02-06 16:25:20, Ben Hutchings wrote: > > > > > On Mon, Feb 06, 2017 at

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread Greg KH
On Tue, Feb 07, 2017 at 02:53:24PM +0200, Petko Manolov wrote: > On 17-02-07 11:51:31, Greg KH wrote: > > On Tue, Feb 07, 2017 at 12:34:52PM +0200, Petko Manolov wrote: > > > On 17-02-06 16:25:20, Ben Hutchings wrote: > > > > On Mon, Feb 06, 2017 at 04:09:18PM +, David Laight wrote: > > > > >

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread Petko Manolov
On 17-02-07 11:51:31, Greg KH wrote: > On Tue, Feb 07, 2017 at 12:34:52PM +0200, Petko Manolov wrote: > > On 17-02-06 16:25:20, Ben Hutchings wrote: > > > On Mon, Feb 06, 2017 at 04:09:18PM +, David Laight wrote: > > > > From: Ben Hutchings > > > [...] > > > > > + ret =

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread 'Greg KH'
On Tue, Feb 07, 2017 at 11:56:51AM +, David Laight wrote: > From: Greg KH > > Sent: 07 February 2017 10:52 > > To: Petko Manolov > > Cc: Ben Hutchings; David Laight; net...@vger.kernel.org; > > linux-usb@vger.kernel.org > > Subject: Re: [PATCH net 2/4]

RE: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread David Laight
From: Greg KH > Sent: 07 February 2017 10:52 > To: Petko Manolov > Cc: Ben Hutchings; David Laight; net...@vger.kernel.org; > linux-usb@vger.kernel.org > Subject: Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access > > On Tue, Feb 07, 2017 at 12:34:52PM

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread Greg KH
On Tue, Feb 07, 2017 at 12:34:52PM +0200, Petko Manolov wrote: > On 17-02-06 16:25:20, Ben Hutchings wrote: > > On Mon, Feb 06, 2017 at 04:09:18PM +, David Laight wrote: > > > From: Ben Hutchings > > [...] > > > > + ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), > > > >

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread Petko Manolov
On 17-02-06 16:25:20, Ben Hutchings wrote: > On Mon, Feb 06, 2017 at 04:09:18PM +, David Laight wrote: > > From: Ben Hutchings > [...] > > > + ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), > > > + RTL8150_REQ_GET_REGS, RTL8150_REQT_READ, > > > +

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-06 Thread Ben Hutchings
On Mon, Feb 06, 2017 at 04:09:18PM +, David Laight wrote: > From: Ben Hutchings [...] > > + ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), > > + RTL8150_REQ_GET_REGS, RTL8150_REQT_READ, > > + indx, 0, buf, size, 500); > > +

RE: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-06 Thread David Laight
From: Ben Hutchings > Sent: 04 February 2017 16:57 > Allocating USB buffers on the stack is not portable, and no longer > works on x86_64 (with VMAP_STACK enabled as per default). > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Ben Hutchings > --- >

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-06 Thread Petko Manolov
On 17-02-04 16:56:32, Ben Hutchings wrote: > Allocating USB buffers on the stack is not portable, and no longer > works on x86_64 (with VMAP_STACK enabled as per default). > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Ben Hutchings > --- >

[PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-04 Thread Ben Hutchings
Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ben Hutchings --- drivers/net/usb/rtl8150.c | 34 +++--- 1 file