Merge lp:~tj/ubuntu/trusty/alsa-utils/lp1269731 into lp:ubuntu/trusty/alsa-utils

Proposed by TJ
Status: Rejected
Rejected by: Luke Yelavich
Proposed branch: lp:~tj/ubuntu/trusty/alsa-utils/lp1269731
Merge into: lp:ubuntu/trusty/alsa-utils
Diff against target: 195 lines (+113/-3)
10 files modified
.pc/applied-patches (+1/-0)
.pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-restore.upstart (+18/-0)
.pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-state.upstart (+22/-0)
.pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-store.upstart (+18/-0)
debian/alsa-restore.upstart (+1/-1)
debian/alsa-state.upstart (+1/-1)
debian/alsa-store.upstart (+1/-1)
debian/changelog (+7/-0)
debian/patches/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff (+43/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~tj/ubuntu/trusty/alsa-utils/lp1269731
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+202014@code.launchpad.net

Description of the change

Critical fix for kernel panic in upstart init deamon caused by incorrect shell constructions in upstart conf files

To post a comment you must log in.
Revision history for this message
Luke Yelavich (themuso) :
Revision history for this message
Luke Yelavich (themuso) wrote :

Thanks for your work, however ou don't patch files in the debian directory. You edit them directly.

Secondly, as per the bug, the original shell code is syntactically correct, and I forgot to add an env declaration to the ALSACTLHOME variable, whichi I already have a fix for, and am about to upload.

Thanks again.

Revision history for this message
TJ (tj) wrote :

On 16/01/14 23:52, Luke Yelavich wrote:
> Thanks for your work, however ou don't patch files in the debian directory. You edit them directly.

Seems obviously now after a full nights sleep - when I identified the work-around I just wanted to tie it off and get some sleep and it looks like my brain had stopped working!
>
> Secondly, as per the bug, the original shell code is syntactically correct, and I forgot to add an env declaration to the ALSACTLHOME variable, whichi I already have a fix for, and am about to upload.
>
Right - we used a process of elimination and comparison to identify the syntax issue and the "if test..." construct wasn't being used in that form in any other init script.

Of course the prime cause is the lack of a guard around the pointer dereference in the upstart code, but that needs someone familiar with that code-base to deal with since there are other issues
around not failing-safe when it doesn't accept the syntax.

Unmerged revisions

95. By TJ

Fix kernel panic in init caused by incorrect shell constructs in upstart jobs

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.pc/applied-patches'
--- .pc/applied-patches 2013-07-26 10:56:44 +0000
+++ .pc/applied-patches 2014-01-16 22:58:26 +0000
@@ -3,3 +3,4 @@
3unset_pulse_internal.patch3unset_pulse_internal.patch
4add_extra_volume_defaults.patch4add_extra_volume_defaults.patch
5vmware_audio_volume.patch5vmware_audio_volume.patch
6lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff
67
=== added directory '.pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff'
=== added file '.pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/.timestamp'
=== added directory '.pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian'
=== added file '.pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-restore.upstart'
--- .pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-restore.upstart 1970-01-01 00:00:00 +0000
+++ .pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-restore.upstart 2014-01-16 22:58:26 +0000
@@ -0,0 +1,18 @@
1# alsa-restore - restore sound card(s') mixer state(s)
2#
3# This task restores the sound card(s') mixer state(s) to
4# /var/lib/alsa/asound.state on startup
5
6description "Restore Sound Card State"
7
8start on runlevel [2345]
9
10task
11
12pre-start script
13 if test -f /var/lib/alsa/state-daemon.conf ; then
14 stop; exit 0
15 fi
16end script
17
18exec /usr/sbin/alsactl restore
019
=== added file '.pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-state.upstart'
--- .pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-state.upstart 1970-01-01 00:00:00 +0000
+++ .pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-state.upstart 2014-01-16 22:58:26 +0000
@@ -0,0 +1,22 @@
1# alsa-state - Manage Sound Card State (restore and store)
2#
3# This task launches the alsactl daemon to manage sound
4# card state (restore and store).
5
6description "Restore Sound Card State"
7
8start on runlevel [2345]
9
10expect fork
11
12pre-start script
13 if ! test -f /var/lib/alsa/state-daemon.conf ; then
14 stop; exit 0
15 fi
16end script
17
18exec /usr/sbin/alsactl -s -n 19 -b -c rdaemon
19
20pre-stop script
21 /usr/sbin/alsactl -s kill save_and_quit
22end script
023
=== added file '.pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-store.upstart'
--- .pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-store.upstart 1970-01-01 00:00:00 +0000
+++ .pc/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff/debian/alsa-store.upstart 2014-01-16 22:58:26 +0000
@@ -0,0 +1,18 @@
1# alsa-store - Store sound card state
2#
3# This task saves the sound card(s') mixer state(s) to
4# /var/lib/alsa/asound.state on reboot or shutdown
5
6description "Store Sound Card State"
7
8start on runlevel [!2345]
9
10task
11
12pre-start script
13 if test -f /var/lib/alsa/state-daemon.conf ; then
14 stop; exit 0
15 fi
16end script
17
18exec /usr/sbin/alsactl store
019
=== modified file 'debian/alsa-restore.upstart'
--- debian/alsa-restore.upstart 2013-07-26 10:56:44 +0000
+++ debian/alsa-restore.upstart 2014-01-16 22:58:26 +0000
@@ -10,7 +10,7 @@
10task10task
1111
12pre-start script12pre-start script
13 if test -f /var/lib/alsa/state-daemon.conf ; then13 if [ -f /var/lib/alsa/state-daemon.conf ]; then
14 stop; exit 014 stop; exit 0
15 fi15 fi
16end script16end script
1717
=== modified file 'debian/alsa-state.upstart'
--- debian/alsa-state.upstart 2013-07-26 10:56:44 +0000
+++ debian/alsa-state.upstart 2014-01-16 22:58:26 +0000
@@ -10,7 +10,7 @@
10expect fork10expect fork
1111
12pre-start script12pre-start script
13 if ! test -f /var/lib/alsa/state-daemon.conf ; then13 if [ ! -f /var/lib/alsa/state-daemon.conf ]; then
14 stop; exit 014 stop; exit 0
15 fi15 fi
16end script16end script
1717
=== modified file 'debian/alsa-store.upstart'
--- debian/alsa-store.upstart 2013-07-26 10:56:44 +0000
+++ debian/alsa-store.upstart 2014-01-16 22:58:26 +0000
@@ -10,7 +10,7 @@
10task10task
1111
12pre-start script12pre-start script
13 if test -f /var/lib/alsa/state-daemon.conf ; then13 if [ -f /var/lib/alsa/state-daemon.conf ]; then
14 stop; exit 014 stop; exit 0
15 fi15 fi
16end script16end script
1717
=== modified file 'debian/changelog'
--- debian/changelog 2013-07-26 10:56:44 +0000
+++ debian/changelog 2014-01-16 22:58:26 +0000
@@ -1,3 +1,10 @@
1alsa-utils (1.0.27.1-1ubuntu2) UNRELEASED; urgency=high
2
3 * Fix kernel panic in init caused by incorrect shell constructs in upstart
4 jobs (LP: #1269731)
5
6 -- TJ <ubuntu@iam.tj> Thu, 16 Jan 2014 22:35:05 +0000
7
1alsa-utils (1.0.27.1-1ubuntu1) saucy; urgency=low8alsa-utils (1.0.27.1-1ubuntu1) saucy; urgency=low
29
3 * Merge from debian unstable. Remaining changes:10 * Merge from debian unstable. Remaining changes:
411
=== added file 'debian/patches/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff'
--- debian/patches/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff 1970-01-01 00:00:00 +0000
+++ debian/patches/lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff 2014-01-16 22:58:26 +0000
@@ -0,0 +1,43 @@
1Description: Fix kernel panic in init caused by incorrect shell constructs in upstart jobs
2Author: TJ <ubuntu@iam.tj>
3Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+bug/1269731
4Last-Update: 2014-01-16
5Index: alsa-utils/debian/alsa-restore.upstart
6===================================================================
7--- alsa-utils.orig/debian/alsa-restore.upstart 2014-01-16 22:16:29.926882000 +0000
8+++ alsa-utils/debian/alsa-restore.upstart 2014-01-16 22:31:40.592706849 +0000
9@@ -10,7 +10,7 @@
10 task
11
12 pre-start script
13- if test -f /var/lib/alsa/state-daemon.conf ; then
14+ if [ -f /var/lib/alsa/state-daemon.conf ]; then
15 stop; exit 0
16 fi
17 end script
18Index: alsa-utils/debian/alsa-state.upstart
19===================================================================
20--- alsa-utils.orig/debian/alsa-state.upstart 2014-01-16 22:16:29.926882000 +0000
21+++ alsa-utils/debian/alsa-state.upstart 2014-01-16 22:32:25.080927426 +0000
22@@ -10,7 +10,7 @@
23 expect fork
24
25 pre-start script
26- if ! test -f /var/lib/alsa/state-daemon.conf ; then
27+ if [ ! -f /var/lib/alsa/state-daemon.conf ]; then
28 stop; exit 0
29 fi
30 end script
31Index: alsa-utils/debian/alsa-store.upstart
32===================================================================
33--- alsa-utils.orig/debian/alsa-store.upstart 2014-01-16 22:16:29.926882000 +0000
34+++ alsa-utils/debian/alsa-store.upstart 2014-01-16 22:31:59.216799043 +0000
35@@ -10,7 +10,7 @@
36 task
37
38 pre-start script
39- if test -f /var/lib/alsa/state-daemon.conf ; then
40+ if [ -f /var/lib/alsa/state-daemon.conf ]; then
41 stop; exit 0
42 fi
43 end script
044
=== modified file 'debian/patches/series'
--- debian/patches/series 2013-07-26 10:56:44 +0000
+++ debian/patches/series 2014-01-16 22:58:26 +0000
@@ -3,3 +3,4 @@
3unset_pulse_internal.patch3unset_pulse_internal.patch
4add_extra_volume_defaults.patch4add_extra_volume_defaults.patch
5vmware_audio_volume.patch5vmware_audio_volume.patch
6lp1269731_incorrect_shell_constructions_cause_upstart_kernel_panic.diff

Subscribers

People subscribed via source and target branches

to all changes: