summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch
new file mode 100644
index 00000000..d39f6d8e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0132-fs-cifs-fix-parsing-of-dfs-referrals.patch
@@ -0,0 +1,49 @@
1From 39565f288e6b2270679f089aae07d579bbf8a156 Mon Sep 17 00:00:00 2001
2From: Stefan Metzmacher <metze@samba.org>
3Date: Fri, 4 May 2012 00:19:28 +0200
4Subject: [PATCH 132/165] fs/cifs: fix parsing of dfs referrals
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit d8f2799b105a24bb0bbd3380a0d56e6348484058 upstream.
10
11The problem was that the first referral was parsed more than once
12and so the caller tried the same referrals multiple times.
13
14The problem was introduced partly by commit
15066ce6899484d9026acd6ba3a8dbbedb33d7ae1b,
16where 'ref += le16_to_cpu(ref->Size);' got lost,
17but that was also wrong...
18
19Signed-off-by: Stefan Metzmacher <metze@samba.org>
20Tested-by: Björn Jacke <bj@sernet.de>
21Reviewed-by: Jeff Layton <jlayton@redhat.com>
22Signed-off-by: Steve French <sfrench@us.ibm.com>
23[bwh: Backport to 3.2: adjust context]
24Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
25---
26 fs/cifs/cifssmb.c | 6 +++++-
27 1 files changed, 5 insertions(+), 1 deletions(-)
28
29diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
30index 0e6adac..e89803b 100644
31--- a/fs/cifs/cifssmb.c
32+++ b/fs/cifs/cifssmb.c
33@@ -4826,8 +4826,12 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
34 max_len = data_end - temp;
35 node->node_name = cifs_strndup_from_ucs(temp, max_len,
36 is_unicode, nls_codepage);
37- if (!node->node_name)
38+ if (!node->node_name) {
39 rc = -ENOMEM;
40+ goto parse_DFS_referrals_exit;
41+ }
42+
43+ ref++;
44 }
45
46 parse_DFS_referrals_exit:
47--
481.7.7.6
49