diff -Nru tgt-1.0.43/debian/changelog tgt-1.0.43/debian/changelog --- tgt-1.0.43/debian/changelog 2015-09-30 16:41:52.000000000 +0000 +++ tgt-1.0.43/debian/changelog 2016-05-11 17:34:58.000000000 +0000 @@ -1,3 +1,12 @@ +tgt (1:1.0.43-0ubuntu4.1~14.04.3) trusty; urgency=low + + * debian/patches/tgtd_allow_oom_adjust_failures_for_non_root.patch, + debian/patches/tgtd_dont_fail_on_eacces.patch: + - Fix non-root and root-under-user-ns errors when attempting + oom_score_adj (LP: #1518440) + + -- Ryan Harper Wed, 09 Dec 2015 11:26:01 -0600 + tgt (1:1.0.43-0ubuntu4.1~14.04.2) trusty; urgency=high * debian/patches/fix-read-response-buffer.patch : Fix bug to read diff -Nru tgt-1.0.43/debian/patches/series tgt-1.0.43/debian/patches/series --- tgt-1.0.43/debian/patches/series 2015-09-30 16:41:50.000000000 +0000 +++ tgt-1.0.43/debian/patches/series 2016-05-11 17:32:27.000000000 +0000 @@ -4,3 +4,5 @@ fix_leak_of_task_in_scsi_flag.patch add-iser-discovery-support.patch fix-read-response-buffer.patch +tgtd_allow_oom_adjust_failures_for_non_root.patch +tgtd_dont_fail_on_eacces.patch diff -Nru tgt-1.0.43/debian/patches/tgtd_allow_oom_adjust_failures_for_non_root.patch tgt-1.0.43/debian/patches/tgtd_allow_oom_adjust_failures_for_non_root.patch --- tgt-1.0.43/debian/patches/tgtd_allow_oom_adjust_failures_for_non_root.patch 1970-01-01 00:00:00.000000000 +0000 +++ tgt-1.0.43/debian/patches/tgtd_allow_oom_adjust_failures_for_non_root.patch 2016-05-11 17:32:06.000000000 +0000 @@ -0,0 +1,17 @@ +Description: tgtd.c: allow oom adjust failures for non-root users +Author: Ronnie Sahlberg +Origin: https://github.com/fujita/tgt/commit/556410556f6c471982d6106209b61b15d823c065 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/tgt/+bug/1518440 +Last-Update: 20151209 + +--- a/usr/tgtd.c ++++ b/usr/tgtd.c +@@ -604,7 +604,7 @@ + } + + err = oom_adjust(); +- if (err) ++ if (err && getuid() == 0) + exit(1); + + err = nr_file_adjust(); diff -Nru tgt-1.0.43/debian/patches/tgtd_dont_fail_on_eacces.patch tgt-1.0.43/debian/patches/tgtd_dont_fail_on_eacces.patch --- tgt-1.0.43/debian/patches/tgtd_dont_fail_on_eacces.patch 1970-01-01 00:00:00.000000000 +0000 +++ tgt-1.0.43/debian/patches/tgtd_dont_fail_on_eacces.patch 2016-05-11 17:32:06.000000000 +0000 @@ -0,0 +1,17 @@ +Description: tgtd.c: don't fail oom_adjust on EACCESS + Under user-namespace, uid=0 only has user privs and + fails to adjust oom score; this is non-fatal. +Author: Ryan Harper +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/tgt/+bug/1518440 +Last-Update: 20151209 +--- a/usr/tgtd.c ++++ b/usr/tgtd.c +@@ -604,7 +604,7 @@ + } + + err = oom_adjust(); +- if (err && getuid() == 0) ++ if (err && (errno != EACCES) && getuid() == 0) + exit(1); + + err = nr_file_adjust();