Re: [patch -target tree] usb: gadget: f_tcm: use after free

2016-03-10 Thread Nicholas A. Bellinger
On Thu, 2016-03-10 at 09:34 +0100, Andrzej Pietrasiewicz wrote: > Hi Nicholas, > > W dniu 10.03.2016 o 06:19, Nicholas A. Bellinger pisze: > > Hi Andrzej, > > > > On Wed, 2016-03-09 at 13:53 +0100, Andrzej Pietrasiewicz wrote: > >> Hi Nicholas, > >> > > > > Mmmm, usbg_get_cmd() was missing an e

Re: [patch -target tree] usb: gadget: f_tcm: use after free

2016-03-10 Thread Andrzej Pietrasiewicz
Hi Nicholas, W dniu 10.03.2016 o 06:19, Nicholas A. Bellinger pisze: Hi Andrzej, On Wed, 2016-03-09 at 13:53 +0100, Andrzej Pietrasiewicz wrote: Hi Nicholas, Applying the following patch to re-add the missing assingment as a proper alloc_session callback. diff --git a/drivers/usb/gadge

Re: [patch -target tree] usb: gadget: f_tcm: use after free

2016-03-09 Thread Nicholas A. Bellinger
On Wed, 2016-03-09 at 13:38 +0200, Felipe Balbi wrote: > Hi, > > "Nicholas A. Bellinger" writes: > > [ text/plain ] > > Hi Felipe + usb-gadget folks, > > > > On Wed, 2016-03-02 at 13:55 +0200, Felipe Balbi wrote: > >> Dan Carpenter writes: > >> > We need to move the kfree() down a line so we don

Re: [patch -target tree] usb: gadget: f_tcm: use after free

2016-03-09 Thread Nicholas A. Bellinger
Hi Andrzej, On Wed, 2016-03-09 at 13:53 +0100, Andrzej Pietrasiewicz wrote: > Hi Nicholas, > > W dniu 05.03.2016 o 08:26, Nicholas A. Bellinger pisze: > > Hi Felipe + usb-gadget folks, > > > > On Wed, 2016-03-02 at 13:55 +0200, Felipe Balbi wrote: > > > > > > > usb-gadget/tcm: Conversion to pe

Re: [patch -target tree] usb: gadget: f_tcm: use after free

2016-03-09 Thread Andrzej Pietrasiewicz
Hi Nicholas, W dniu 05.03.2016 o 08:26, Nicholas A. Bellinger pisze: Hi Felipe + usb-gadget folks, On Wed, 2016-03-02 at 13:55 +0200, Felipe Balbi wrote: usb-gadget/tcm: Conversion to percpu_ida tag pre-allocation http://www.spinics.net/lists/target-devel/msg11777.html usb-gadget/tcm: Co

Re: [patch -target tree] usb: gadget: f_tcm: use after free

2016-03-09 Thread Felipe Balbi
Hi, "Nicholas A. Bellinger" writes: > [ text/plain ] > Hi Felipe + usb-gadget folks, > > On Wed, 2016-03-02 at 13:55 +0200, Felipe Balbi wrote: >> Dan Carpenter writes: >> > We need to move the kfree() down a line so we don't dereference a freed >> > variable. >> > >> > Fixes: 1b418a8fcbc0 ('ta

Re: [patch -target tree] usb: gadget: f_tcm: use after free

2016-03-04 Thread Nicholas A. Bellinger
Hi Felipe + usb-gadget folks, On Wed, 2016-03-02 at 13:55 +0200, Felipe Balbi wrote: > Dan Carpenter writes: > > We need to move the kfree() down a line so we don't dereference a freed > > variable. > > > > Fixes: 1b418a8fcbc0 ('target: Convert demo-mode only drivers to > > target_alloc_session'

Re: [patch -target tree] usb: gadget: f_tcm: use after free

2016-03-04 Thread Nicholas A. Bellinger
On Wed, 2016-03-02 at 13:08 +0300, Dan Carpenter wrote: > We need to move the kfree() down a line so we don't dereference a freed > variable. > > Fixes: 1b418a8fcbc0 ('target: Convert demo-mode only drivers to > target_alloc_session') > Signed-off-by: Dan Carpenter > > diff --git a/drivers/usb/

Re: [patch -target tree] usb: gadget: f_tcm: use after free

2016-03-02 Thread Felipe Balbi
Dan Carpenter writes: > We need to move the kfree() down a line so we don't dereference a freed > variable. > > Fixes: 1b418a8fcbc0 ('target: Convert demo-mode only drivers to > target_alloc_session') > Signed-off-by: Dan Carpenter It's okay to take this via target: Signed-off-by: Felipe Balbi

[patch -target tree] usb: gadget: f_tcm: use after free

2016-03-02 Thread Dan Carpenter
We need to move the kfree() down a line so we don't dereference a freed variable. Fixes: 1b418a8fcbc0 ('target: Convert demo-mode only drivers to target_alloc_session') Signed-off-by: Dan Carpenter diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c index 727