diff options
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.patch | 49 |
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 @@ | |||
1 | From 39565f288e6b2270679f089aae07d579bbf8a156 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stefan Metzmacher <metze@samba.org> | ||
3 | Date: Fri, 4 May 2012 00:19:28 +0200 | ||
4 | Subject: [PATCH 132/165] fs/cifs: fix parsing of dfs referrals | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | commit d8f2799b105a24bb0bbd3380a0d56e6348484058 upstream. | ||
10 | |||
11 | The problem was that the first referral was parsed more than once | ||
12 | and so the caller tried the same referrals multiple times. | ||
13 | |||
14 | The problem was introduced partly by commit | ||
15 | 066ce6899484d9026acd6ba3a8dbbedb33d7ae1b, | ||
16 | where 'ref += le16_to_cpu(ref->Size);' got lost, | ||
17 | but that was also wrong... | ||
18 | |||
19 | Signed-off-by: Stefan Metzmacher <metze@samba.org> | ||
20 | Tested-by: Björn Jacke <bj@sernet.de> | ||
21 | Reviewed-by: Jeff Layton <jlayton@redhat.com> | ||
22 | Signed-off-by: Steve French <sfrench@us.ibm.com> | ||
23 | [bwh: Backport to 3.2: adjust context] | ||
24 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
25 | --- | ||
26 | fs/cifs/cifssmb.c | 6 +++++- | ||
27 | 1 files changed, 5 insertions(+), 1 deletions(-) | ||
28 | |||
29 | diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c | ||
30 | index 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 | -- | ||
48 | 1.7.7.6 | ||
49 | |||