summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorRoy Li <rongqing.li@windriver.com>2014-02-27 11:23:28 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-28 14:01:12 +0000
commit172d1500aba6888e0be733bff80a38f12377e21c (patch)
treef24e0cab437018b01a4bf543a4e3f3f38446e952 /meta/recipes-core
parent4259e6eb647464e5587066ad44a90facd4582aa2 (diff)
downloadpoky-172d1500aba6888e0be733bff80a38f12377e21c.tar.gz
dbus: proper error handler should be given after send_negotiate_unix_fd failed
Once send_negotiate_unix_fd failed, this failure will happen, since auth->guid_from_server has been set to some value before send_negotiate_unix_fd. send_negotiate_unix_fd failure will lead to this auth be handled by process_ok again, but this auth->guid_from_server is not zero. (From OE-Core rev: 6e844594e7dd901eb4742730ab010030c04e1c55) Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/dbus/dbus-ptest_1.6.18.bb1
-rw-r--r--meta/recipes-core/dbus/dbus.inc1
-rw-r--r--meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch104
3 files changed, 106 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus-ptest_1.6.18.bb b/meta/recipes-core/dbus/dbus-ptest_1.6.18.bb
index 30e8223482..bc260defe0 100644
--- a/meta/recipes-core/dbus/dbus-ptest_1.6.18.bb
+++ b/meta/recipes-core/dbus/dbus-ptest_1.6.18.bb
@@ -16,6 +16,7 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
16 file://dbus-1.init \ 16 file://dbus-1.init \
17 file://run-ptest \ 17 file://run-ptest \
18 file://python-config.patch \ 18 file://python-config.patch \
19 file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
19 " 20 "
20 21
21SRC_URI[md5sum] = "b02e9c95027a416987b81f9893831061" 22SRC_URI[md5sum] = "b02e9c95027a416987b81f9893831061"
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index db47ede0be..677ff78146 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -14,6 +14,7 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
14 file://tmpdir.patch \ 14 file://tmpdir.patch \
15 file://dbus-1.init \ 15 file://dbus-1.init \
16 file://os-test.patch \ 16 file://os-test.patch \
17 file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
17" 18"
18 19
19inherit useradd autotools pkgconfig gettext update-rc.d 20inherit useradd autotools pkgconfig gettext update-rc.d
diff --git a/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch b/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch
new file mode 100644
index 0000000000..6bb6d9c82e
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch
@@ -0,0 +1,104 @@
1From b8f84bd39485d3977625c9a8b8e8cff5d23be56f Mon Sep 17 00:00:00 2001
2From: Roy Li <rongqing.li@windriver.com>
3Date: Thu, 27 Feb 2014 09:05:02 +0800
4Subject: [PATCH] dbus: clear guid_from_server if send_negotiate_unix_fd
5 failed
6
7Upstream-Status: Submitted
8
9bus-test dispatch test failed with below information:
10 ./bus/bus-test: Running message dispatch test
11 Activating service name='org.freedesktop.DBus.TestSuiteEchoService'
12 Successfully activated service 'org.freedesktop.DBus.TestSuiteEchoService'
13 6363: assertion failed "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0" file "dbus-auth.c" line 1545 function process_ok
14 ./bus/bus-test(_dbus_print_backtrace+0x29) [0x80cb969]
15 ./bus/bus-test(_dbus_abort+0x14) [0x80cfb44]
16 ./bus/bus-test(_dbus_real_assert+0x53) [0x80b52c3]
17 ./bus/bus-test() [0x80e24da]
18 ./bus/bus-test(_dbus_auth_do_work+0x388) [0x80e3848]
19 ./bus/bus-test() [0x80aea49]
20 ./bus/bus-test() [0x80affde]
21 ./bus/bus-test(_dbus_transport_handle_watch+0xb1) [0x80ad841]
22 ./bus/bus-test(_dbus_connection_handle_watch+0x104) [0x8089174]
23 ./bus/bus-test(dbus_watch_handle+0xd8) [0x80b15e8]
24 ./bus/bus-test(_dbus_loop_iterate+0x4a9) [0x80d1509]
25 ./bus/bus-test(bus_test_run_clients_loop+0x5d) [0x808129d]
26 ./bus/bus-test() [0x806cab0]
27 ./bus/bus-test() [0x806e0ca]
28 ./bus/bus-test() [0x806da6f]
29 ./bus/bus-test(_dbus_test_oom_handling+0x18c) [0x80b5c8c]
30 ./bus/bus-test() [0x806f723]
31 ./bus/bus-test(bus_dispatch_test+0x3c) [0x8071aac]
32 ./bus/bus-test(main+0x1b7) [0x805acc7]
33 /lib/libc.so.6(__libc_start_main+0xf3) [0x45f919b3]
34 ./bus/bus-test() [0x805ae39]
35
36The stack is below:
37 #0 0xffffe425 in __kernel_vsyscall ()
38 #1 0x45fa62d6 in raise () from /lib/libc.so.6
39 #2 0x45fa9653 in abort () from /lib/libc.so.6
40 #3 0x080cfb65 in _dbus_abort () at dbus-sysdeps.c:94
41 #4 0x080b52c3 in _dbus_real_assert (condition=0,
42 condition_text=condition_text@entry=0x8117a38 "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0",
43 file=file@entry=0x8117273 "dbus-auth.c", line=line@entry=1545,
44 func=func@entry=0x8117f8e <__FUNCTION__.3492> "process_ok")
45 data=0x8157290) at dbus-connection.c:1515
46 #0 0x00000033fee353e9 in raise () from /lib64/libc.so.6
47 #1 0x00000033fee38508 in abort () from /lib64/libc.so.6
48 #2 0x000000000047d585 in _dbus_abort () at dbus-sysdeps.c:94
49 #3 0x0000000000466486 in _dbus_real_assert (condition=<optimized out>,
50 condition_text=condition_text@entry=0x4c2988 "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0",
51 file=file@entry=0x4c21a5 "dbus-auth.c", line=line@entry=1546,
52 func=func@entry=0x4c2fce <__FUNCTION__.3845> "process_ok")
53 at dbus-internals.c:931
54 #4 0x000000000048d424 in process_ok (args_from_ok=0x7fffffffe480,
55 auth=0x6ff340) at dbus-auth.c:1546
56 #5 handle_client_state_waiting_for_data (auth=0x6ff340,
57 command=<optimized out>, args=0x7fffffffe480) at dbus-auth.c:1996
58 #6 0x000000000048e789 in process_command (auth=0x6ff340) at dbus-auth.c:2208
59 #7 _dbus_auth_do_work (auth=0x6ff340) at dbus-auth.c:2458
60 #8 0x000000000046091d in do_authentication (
61 transport=transport@entry=0x6ffaa0, do_reading=do_reading@entry=1,
62 do_writing=do_writing@entry=0,
63 auth_completed=auth_completed@entry=0x7fffffffe55c)
64 at dbus-transport-socket.c:442
65 #9 0x0000000000461d08 in socket_handle_watch (transport=0x6ffaa0,
66 watch=0x6f4190, flags=1) at dbus-transport-socket.c:921
67 #10 0x000000000045fa3a in _dbus_transport_handle_watch (transport=0x6ffaa0,
68
69Once send_negotiate_unix_fd failed, this failure will happen, since
70auth->guid_from_server has been set to some value before
71send_negotiate_unix_fd. send_negotiate_unix_fd failure will lead to
72this auth be handled by process_ok again, but this auth->guid_from_server
73is not zero.
74
75So we should clear auth->guid_from_server if send_negotiate_unix_fd failed
76
77Signed-off-by: Roy Li <rongqing.li@windriver.com>
78---
79 dbus/dbus-auth.c | 9 +++++++--
80 1 file changed, 7 insertions(+), 2 deletions(-)
81
82diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c
83index d2c37a7..37b45c6 100644
84--- a/dbus/dbus-auth.c
85+++ b/dbus/dbus-auth.c
86@@ -1571,8 +1571,13 @@ process_ok(DBusAuth *auth,
87 _dbus_verbose ("Got GUID '%s' from the server\n",
88 _dbus_string_get_const_data (& DBUS_AUTH_CLIENT (auth)->guid_from_server));
89
90- if (auth->unix_fd_possible)
91- return send_negotiate_unix_fd(auth);
92+ if (auth->unix_fd_possible) {
93+ if (!send_negotiate_unix_fd(auth)) {
94+ _dbus_string_set_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server, 0);
95+ return FALSE;
96+ }
97+ return TRUE;
98+ }
99
100 _dbus_verbose("Not negotiating unix fd passing, since not possible\n");
101 return send_begin (auth);
102--
1031.7.10.4
104