Re: [PATCH 24/29] drivers: convert iblock_req.pending from atomic_t to refcount_t

2017-03-21 Thread Nicholas A. Bellinger
Hi Elena, On Mon, 2017-03-06 at 16:21 +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free >

Re: [PATCH] usb: gadget: Correct usb EP argument for BOT status request

2017-03-21 Thread Nicholas A. Bellinger
Hi Manish, (Added target-devel CC') On Mon, 2017-03-20 at 15:05 +0530, Manish Narani wrote: > This patch corrects the argument in usb_ep_free_request as it is > mistakenly set to ep_out. It should be ep_in for status request. > > Signed-off-by: Manish Narani > --- >

Re: [PATCH 24/29] drivers: convert iblock_req.pending from atomic_t to refcount_t

2017-03-07 Thread Nicholas A. Bellinger
ers/target/target_core_iblock.c | 12 ++-- > drivers/target/target_core_iblock.h | 3 ++- > 2 files changed, 8 insertions(+), 7 deletions(-) For the target_core_iblock part: Acked-by: Nicholas Bellinger <n...@linux-iscsi.org> -- To unsubscribe from this list:

Re: [PATCH net-next v2 08/12] iscsi: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-02-07 Thread Nicholas A. Bellinger
on] > > Add linux/module.h to iscsi_target_login.c. > > Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> > Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> > --- Acked-by: Nicholas Bellinger <n...@linux-iscsi.org> -- To unsubscribe from this l

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, > >>

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" <n...@linux-iscsi.org> writes: > > [ text/plain ] > > Hi Felipe + usb-gadget folks, > > > > On Wed, 2016-03-02 at 13:55 +0200, Felipe Balbi wrote: >

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: > > >

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

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 >

Re: [PATCH] configfs: switch ->default groups to a linked list

2016-02-27 Thread Nicholas A. Bellinger
| 11 +- > include/target/target_core_base.h | 3 - > 17 files changed, 284 insertions(+), 632 deletions(-) > This is a very nice simplification to drop the long-standing fixed size ->default_groups[] usage tree-wide for configfs consumers. For the target parts: A

Re: [PATCHv5 00/18] Equivalent of tcm_usb_gadget with configfs

2015-12-20 Thread Nicholas A. Bellinger
Hi Andrzej & Co, On Fri, 2015-12-11 at 16:06 +0100, Andrzej Pietrasiewicz wrote: > Dear All, > > This series adds support to tcm usb gadget for composing it with configfs. > > @Felipe: The v4 series was rebased onto Nicholas' tree (target-pending). > Consequently, the recent fixing patches were

Re: [PATCHv3 00/14] Equivalent of tcm_usb_gadget with configfs

2015-11-28 Thread Nicholas A. Bellinger
Hi Andrzej & Co, On Mon, 2015-11-23 at 09:22 +0100, Andrzej Pietrasiewicz wrote: > W dniu 15.11.2015 o 00:27, Nicholas A. Bellinger pisze: > > Hi Andrzej & Co, > > > > > > >> > > > > Ok, I've added both series into target-pending/queue-next

Re: [PATCHv3 00/14] Equivalent of tcm_usb_gadget with configfs

2015-11-14 Thread Nicholas A. Bellinger
Hi Andrzej & Co, Apologies for the delayed follow up on this series. On Tue, 2015-10-27 at 10:39 +0100, Andrzej Pietrasiewicz wrote: > Dear All, > > This series adds support to tcm usb gadget for composing it with configfs. > > @target-devel folks: You might be wondering why add configfs for

Re: simplify configfs attributes V2

2015-10-13 Thread Nicholas A. Bellinger
Hi Christoph & Co, On Sat, 2015-10-03 at 15:32 +0200, Christoph Hellwig wrote: > This series consolidates the code to implement configfs attributes > by providing the ->show and ->store method in common code and using > container_of in the methods to access the containing structure. > > This

Re: [PATCH 01/23] configfs: add show and store methods to struct configfs_attribute

2015-09-26 Thread Nicholas A. Bellinger
ly and write-only attributes with a single line of code. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- > fs/configfs/file.c | 17 - > include/linux/configfs.h | 27 +++ > 2 files changed, 39 insertions(+), 5 deletions(-)

Re: [PATCH 19/23] target: use per-attribute show and store methods

2015-09-26 Thread Nicholas A. Bellinger
) > delete mode 100644 include/target/configfs_macros.h > delete mode 100644 include/target/target_core_fabric_configfs.h > I'm totally crazy for this patch. Very nice work to drop this much boilerplate macro-fu in target-core + fabric driver code. Reviewed-by: Nicholas Bellinger <n...@linux-iscsi.

Re: simplify configfs attributes

2015-09-26 Thread Nicholas A. Bellinger
On Fri, 2015-09-25 at 06:49 -0700, Christoph Hellwig wrote: > This series consolidates the code to implement configfs attributes > by providing the ->show and ->store method in common code and using > container_of in the methods to access the containing structure. > > This reduces source and

[PATCH 1/2] tcm_usb_gadget: Don't strip off nexus WWPN prefix

2015-09-26 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Avoid stripping off the 'naa.' I_T nexus prefix from configfs attribute store input, so that user-space will get back what it originaly wrote into ../usb_gadget/$WWPN/$TPGT/nexus. Note the SCSI initiator WWPN is purely symbolic for UAS + B

[PATCH 2/2] tcm_usb_gadget: Fix nexus leak + enabled attribute failure

2015-09-26 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch adds the missing tcm_usbg_drop_nexus() to properly release tcm_usbg_nexus memory during typical ->fabric_drop_tpg() callback shutdown. Also, fix up tcm_usbg_tpg_store_enable() return value to propigate usbg_attach() failure u

Re: [RFC][PATCH] fs: configfs: programmatically create config groups

2012-11-27 Thread Nicholas A. Bellinger
Hi Sebastian Co, On Tue, 2012-11-27 at 16:20 +0100, Sebastian Andrzej Siewior wrote: On 11/26/2012 06:54 PM, Michal Nazarewicz wrote: On Mon, Nov 26 2012, Sebastian Andrzej Siewior wrote: Wouldn't say that. It may adds complexity on another level. The target subsystem has the same problem

Re: [patch 2/2] target: strlen() doesn't count the terminator

2012-10-02 Thread Nicholas A. Bellinger
On Tue, 2012-10-02 at 11:27 +0300, Dan Carpenter wrote: We need to take the terminator into consideration here or the last character gets silently truncated away later. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/usb/gadget/tcm_usb_gadget.c