From patchwork Tue Nov 8 16:33:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Aur=C3=A9lien_Aptel?= X-Patchwork-Id: 9417741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B110160512 for ; Tue, 8 Nov 2016 16:34:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A250728F66 for ; Tue, 8 Nov 2016 16:34:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9599629025; Tue, 8 Nov 2016 16:34:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0310228F66 for ; Tue, 8 Nov 2016 16:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752636AbcKHQeX (ORCPT ); Tue, 8 Nov 2016 11:34:23 -0500 Received: from smtp.nue.novell.com ([195.135.221.5]:35629 "EHLO smtp.nue.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752014AbcKHQeW (ORCPT ); Tue, 8 Nov 2016 11:34:22 -0500 Received: from nwb-ext-pat.microfocus.com ([10.120.13.103]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Tue, 08 Nov 2016 17:34:21 +0100 Received: from localhost (nwb-a10-snat.microfocus.com [10.120.13.201]) by nwb-ext-pat.microfocus.com with ESMTP (TLS encrypted); Tue, 08 Nov 2016 16:33:54 +0000 From: Aurelien Aptel To: linux-cifs@vger.kernel.org Cc: Aurelien Aptel Subject: [PATCH v1 3/6] fs/cifs: always use ipc for DFS resolving ioctls Date: Tue, 8 Nov 2016 17:33:23 +0100 Message-Id: <1478622806-19636-4-git-send-email-aaptel@suse.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1478622806-19636-1-git-send-email-aaptel@suse.com> References: <1478622806-19636-1-git-send-email-aaptel@suse.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP since we cannot access the ipc tcon object, force the use of the ipc tid when crafting DFS resolving ioctl. Signed-off-by: Aurelien Aptel --- fs/cifs/smb2pdu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 5ca5ea46..6d5b8db 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -1645,6 +1645,10 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, if (rc) return rc; + /* XXX: how can we access the tcon of the IPC of the host? */ + if (opcode == FSCTL_DFS_GET_REFERRALS) { + req->hdr.TreeId = ses->ipc_tid; + } req->CtlCode = cpu_to_le32(opcode); req->PersistentFileId = persistent_fid; req->VolatileFileId = volatile_fid;