From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Aur=C3=A9lien?= Aptel Subject: Re: [PATCH v2 3/6] CIFS: implement get_dfs_refer for SMB2+ Date: Fri, 24 Feb 2017 16:25:36 +0100 Message-ID: References: <20170223144334.22320-1-aaptel@suse.com> <20170223144334.22320-4-aaptel@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Cc: linux-cifs To: Pavel Shilovsky Return-path: In-Reply-To: Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Hi Pavel, Pavel Shilovsky writes: > Accessing the tcon_list should be protected by spin_locks and also a > reference to the tcon should be acquired before using it safely. I've noticed we have the cifs_tcp_ses_lock but also a per-session session_mutex. I'm guessing we want cifs_tcp_ses_lock here. By acquiring a reference you mean incrementing/decrementing tc_count. Do we need to protect this inc/dec operation with cifs_tcp_ses_lock too? > Also you can extend SMB2_ioctl argument list to allow passing ipc_tid. > In this case SMB2_ioctl() can choose what to use - ipc_tid or tcon; if > tcon is passed -use it, otherwise - use ipc_tid. > > In this case you can fallback to ipc_tid if no tcon is found in the list. > SMB2_ioctl() uses the tcon for many things. I don't see how we can just use ipc_tid number if we don't pass a tcon. Or do you mean: add a use_ipc bool to SMB2_ioctl arg list and use the tcon as usual except overwrite the Tid field with ses->ipc_tid before sending? Thanks, -- Aurélien Aptel / SUSE Labs Samba Team GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)