Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1304273
| From | "Nicholas A. Bellinger" <nab@linux-iscsi.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl |
| Date | 2016-01-08 09:50 +0100 |
| Message-ID | <qOAUb-4eB-23@gated-at.bofh.it> (permalink) |
| References | <qOzv3-3m3-11@gated-at.bofh.it> <qOzv3-3m3-13@gated-at.bofh.it> <qOAr7-413-1@gated-at.bofh.it> <qOAKt-4aR-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 2016-01-08 at 09:31 +0100, Bart Van Assche wrote: > On 01/08/2016 09:14 AM, Christoph Hellwig wrote: > >> mutex_lock(&tpg->acl_node_mutex); > >> acl = __core_tpg_get_initiator_node_acl(tpg, initiatorname); > >> + /* > >> + * Obtain the acl_kref now, which will be dropped upon the > >> + * release of se_sess memory within transport_free_session(). > >> + */ > >> + if (acl) > >> + kref_get(&acl->acl_kref); > > > > І think the comment is highly confusing as it's about one of the > > callers, while the function has many. > > > > I'd suggest you move it to core_tpg_check_initiator_node_acl instead. > > > > Also I think iscsit_build_sendtargets_response will need a put on > > the nacl, otherwise you'll leak references. > > Indeed. All error paths in all target drivers will have to be modified > to avoid that an acl reference leak is triggered if > transport_init_session() fails after core_tpg_check_initiator_node_acl() > succeeded. > Actually no, they do not. That's the way that everything outside of tcm_fc + ib_srpt driver code has already worked for a long time.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] target: Close se_node_acl lookup race "Nicholas A. Bellinger" <nab@daterainc.com> - 2016-01-08 08:20 +0100
[PATCH 1/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl "Nicholas A. Bellinger" <nab@daterainc.com> - 2016-01-08 08:20 +0100
Re: [PATCH 1/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl Christoph Hellwig <hch@lst.de> - 2016-01-08 09:20 +0100
Re: [PATCH 1/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl Christoph Hellwig <hch@lst.de> - 2016-01-08 09:40 +0100
Re: [PATCH 1/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl "Nicholas A. Bellinger" <nab@linux-iscsi.org> - 2016-01-08 09:50 +0100
Re: [PATCH 1/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl Christoph Hellwig <hch@lst.de> - 2016-01-08 10:10 +0100
Re: [PATCH 1/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl Christoph Hellwig <hch@lst.de> - 2016-01-08 10:40 +0100
[PATCH 2/4] target: Remove useless set_initiator_node_queue_depth acl lookup "Nicholas A. Bellinger" <nab@daterainc.com> - 2016-01-08 08:20 +0100
Re: [PATCH 2/4] target: Remove useless set_initiator_node_queue_depth acl lookup Christoph Hellwig <hch@lst.de> - 2016-01-08 09:20 +0100
csiph-web