From ab1abc27cc964fac3b2e5f4523ce78a5230d9f66 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 6 Mar 2016 01:38:45 +0000 Subject: [PATCH] Fix/ignore module ABI changes in 4.4.4 as appropriate --- debian/changelog | 1 + debian/config/defines | 9 +++ .../debian/ipv4-fix-abi-change-in-4.4.4.patch | 22 ++++++ .../debian/ipv6-fix-abi-change-in-4.4.4.patch | 43 ++++++++++ ...ake-sure-a-parent-css-isn-t-offlined.patch | 79 +++++++++++++++++++ .../thermal-fix-abi-change-in-4.4.4.patch | 45 +++++++++++ debian/patches/series | 4 + 7 files changed, 203 insertions(+) create mode 100644 debian/patches/debian/ipv4-fix-abi-change-in-4.4.4.patch create mode 100644 debian/patches/debian/ipv6-fix-abi-change-in-4.4.4.patch create mode 100644 debian/patches/debian/revert-cgroup-make-sure-a-parent-css-isn-t-offlined.patch create mode 100644 debian/patches/debian/thermal-fix-abi-change-in-4.4.4.patch diff --git a/debian/changelog b/debian/changelog index b8469795f..722f88b12 100644 --- a/debian/changelog +++ b/debian/changelog @@ -442,6 +442,7 @@ linux (4.4.4-1) UNRELEASED; urgency=medium - mmc-modules: Depends on usb-modules - usb-modules: Include USB PHY drivers by default * uas: Fix high-order alloc + * Fix/ignore module ABI changes in 4.4.4 as appropriate [ Ian Campbell ] * [armhf] dts: Add DTB for Novena, patches from Vagrant Cascadian diff --git a/debian/config/defines b/debian/config/defines index bad6b6548..c9eb92218 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -6,6 +6,15 @@ ignore-changes: __scm_send scm_detach_fds scm_fp_dup + efivar_validate + get_thermal_instance + inet_csk_reqsk_queue_add + tcp_req_err + module:drivers/gpu/drm/drm_kms_helper + module:drivers/hv/hv_vmbus + module:drivers/md/dm-snapshot + module:drivers/mmc/host/sdhci + module:net/ceph/libceph [base] arches: diff --git a/debian/patches/debian/ipv4-fix-abi-change-in-4.4.4.patch b/debian/patches/debian/ipv4-fix-abi-change-in-4.4.4.patch new file mode 100644 index 000000000..22c4e56e6 --- /dev/null +++ b/debian/patches/debian/ipv4-fix-abi-change-in-4.4.4.patch @@ -0,0 +1,22 @@ +From: Ben Hutchings +Date: Sun, 06 Mar 2016 01:14:29 +0000 +Subject: ipv4: Fix ABI change in 4.4.4 +Forwarded: not-needed + +struct fib_nh_exception is always allocated and used in the ipv4 core, +which is built-in. As the new field is at the end of the structure, +all we need to do is hide it from genksyms. + +--- +--- a/include/net/ip_fib.h ++++ b/include/net/ip_fib.h +@@ -61,7 +61,9 @@ struct fib_nh_exception { + struct rtable __rcu *fnhe_rth_input; + struct rtable __rcu *fnhe_rth_output; + unsigned long fnhe_stamp; ++#ifndef __GENKSYMS__ + struct rcu_head rcu; ++#endif + }; + + struct fnhe_hash_bucket { diff --git a/debian/patches/debian/ipv6-fix-abi-change-in-4.4.4.patch b/debian/patches/debian/ipv6-fix-abi-change-in-4.4.4.patch new file mode 100644 index 000000000..549de8345 --- /dev/null +++ b/debian/patches/debian/ipv6-fix-abi-change-in-4.4.4.patch @@ -0,0 +1,43 @@ +From: Ben Hutchings +Date: Sun, 06 Mar 2016 01:31:13 +0000 +Subject: ipv6: Fix ABI change in 4.4.4 +Forwarded: not-needed + +Change ip6_route_output() back from a static inline wrapper to a proper +extern and exported function. + +--- +--- a/include/net/ip6_route.h ++++ b/include/net/ip6_route.h +@@ -66,13 +66,8 @@ void ip6_route_input(struct sk_buff *skb + + struct dst_entry *ip6_route_output_flags(struct net *net, const struct sock *sk, + struct flowi6 *fl6, int flags); +- +-static inline struct dst_entry *ip6_route_output(struct net *net, +- const struct sock *sk, +- struct flowi6 *fl6) +-{ +- return ip6_route_output_flags(net, sk, fl6, 0); +-} ++struct dst_entry *ip6_route_output(struct net *net, const struct sock *sk, ++ struct flowi6 *fl6); + + struct dst_entry *ip6_route_lookup(struct net *net, struct flowi6 *fl6, + int flags); +--- a/net/ipv6/route.c ++++ b/net/ipv6/route.c +@@ -1200,6 +1200,13 @@ struct dst_entry *ip6_route_output_flags + } + EXPORT_SYMBOL_GPL(ip6_route_output_flags); + ++struct dst_entry *ip6_route_output(struct net *net, const struct sock *sk, ++ struct flowi6 *fl6) ++{ ++ return ip6_route_output_flags(net, sk, fl6, 0); ++} ++EXPORT_SYMBOL(ip6_route_output); ++ + struct dst_entry *ip6_blackhole_route(struct net *net, struct dst_entry *dst_orig) + { + struct rt6_info *rt, *ort = (struct rt6_info *) dst_orig; diff --git a/debian/patches/debian/revert-cgroup-make-sure-a-parent-css-isn-t-offlined.patch b/debian/patches/debian/revert-cgroup-make-sure-a-parent-css-isn-t-offlined.patch new file mode 100644 index 000000000..8e58bf66c --- /dev/null +++ b/debian/patches/debian/revert-cgroup-make-sure-a-parent-css-isn-t-offlined.patch @@ -0,0 +1,79 @@ +From: Ben Hutchings +Date: Sat, 05 Mar 2016 23:22:10 +0000 +Subject: Revert "cgroup: make sure a parent css isn't offlined before its children" +Forwarded: not-needed + +This reverts commit 4cbd196324c05809338c7f118b6f374d3c2db7a0, which +was commit aa226ff4a1ce79f229c6b7a4c0a14e17fececd01 upstream. It +seems to be a good fix but causes an unfixable ABI change as it +extends a structure that's embedded in other structures. + +--- +--- a/include/linux/cgroup-defs.h ++++ b/include/linux/cgroup-defs.h +@@ -133,12 +133,6 @@ struct cgroup_subsys_state { + */ + u64 serial_nr; + +- /* +- * Incremented by online self and children. Used to guarantee that +- * parents are not offlined before their children. +- */ +- atomic_t online_cnt; +- + /* percpu_ref killing and RCU release */ + struct rcu_head rcu_head; + struct work_struct destroy_work; +--- a/kernel/cgroup.c ++++ b/kernel/cgroup.c +@@ -4784,7 +4784,6 @@ static void init_and_link_css(struct cgr + INIT_LIST_HEAD(&css->sibling); + INIT_LIST_HEAD(&css->children); + css->serial_nr = css_serial_nr_next++; +- atomic_set(&css->online_cnt, 0); + + if (cgroup_parent(cgrp)) { + css->parent = cgroup_css(cgroup_parent(cgrp), ss); +@@ -4807,10 +4806,6 @@ static int online_css(struct cgroup_subs + if (!ret) { + css->flags |= CSS_ONLINE; + rcu_assign_pointer(css->cgroup->subsys[ss->id], css); +- +- atomic_inc(&css->online_cnt); +- if (css->parent) +- atomic_inc(&css->parent->online_cnt); + } + return ret; + } +@@ -5042,15 +5037,10 @@ static void css_killed_work_fn(struct wo + container_of(work, struct cgroup_subsys_state, destroy_work); + + mutex_lock(&cgroup_mutex); +- +- do { +- offline_css(css); +- css_put(css); +- /* @css can't go away while we're holding cgroup_mutex */ +- css = css->parent; +- } while (css && atomic_dec_and_test(&css->online_cnt)); +- ++ offline_css(css); + mutex_unlock(&cgroup_mutex); ++ ++ css_put(css); + } + + /* css kill confirmation processing requires process context, bounce */ +@@ -5059,10 +5049,8 @@ static void css_killed_ref_fn(struct per + struct cgroup_subsys_state *css = + container_of(ref, struct cgroup_subsys_state, refcnt); + +- if (atomic_dec_and_test(&css->online_cnt)) { +- INIT_WORK(&css->destroy_work, css_killed_work_fn); +- queue_work(cgroup_destroy_wq, &css->destroy_work); +- } ++ INIT_WORK(&css->destroy_work, css_killed_work_fn); ++ queue_work(cgroup_destroy_wq, &css->destroy_work); + } + + /** diff --git a/debian/patches/debian/thermal-fix-abi-change-in-4.4.4.patch b/debian/patches/debian/thermal-fix-abi-change-in-4.4.4.patch new file mode 100644 index 000000000..6d4740fb9 --- /dev/null +++ b/debian/patches/debian/thermal-fix-abi-change-in-4.4.4.patch @@ -0,0 +1,45 @@ +From: Ben Hutchings +Date: Sun, 06 Mar 2016 00:40:31 +0000 +Subject: thermal: Fix ABI change in 4.4.4 +Forwarded: not-needed + +struct thermal_zone_device is always allocated in thermal_core and the +new field is only used there. So we can safely move it to the end of the +structure and hide it from genksyms. + +Also hide the new #include, as if it could make an actual difference, +stupid genksyms... + +--- +--- a/include/linux/thermal.h ++++ b/include/linux/thermal.h +@@ -198,7 +198,6 @@ struct thermal_zone_device { + int emul_temperature; + int passive; + unsigned int forced_passive; +- atomic_t need_update; + struct thermal_zone_device_ops *ops; + struct thermal_zone_params *tzp; + struct thermal_governor *governor; +@@ -208,6 +207,9 @@ struct thermal_zone_device { + struct mutex lock; + struct list_head node; + struct delayed_work poll_queue; ++#ifndef __GENKSYMS__ ++ atomic_t need_update; ++#endif + }; + + /** +--- a/drivers/thermal/thermal_core.c ++++ b/drivers/thermal/thermal_core.c +@@ -37,7 +37,9 @@ + #include + #include + #include ++#ifndef __GENKSYMS__ + #include ++#endif + + #define CREATE_TRACE_POINTS + #include diff --git a/debian/patches/series b/debian/patches/series index e8a2d17f6..1ee0445c8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -128,3 +128,7 @@ bugfix/arm/net-mv643xx_eth-fix-packet-corruption-with-tso-and-t.patch bugfix/x86/x86-efi-bgrt-fix-kernel-panic-when-mapping-bgrt-data.patch bugfix/x86/x86-efi-bgrt-replace-early_memremap-with-memremap.patch bugfix/all/uas-fix-high-order-alloc.patch +debian/revert-cgroup-make-sure-a-parent-css-isn-t-offlined.patch +debian/thermal-fix-abi-change-in-4.4.4.patch +debian/ipv4-fix-abi-change-in-4.4.4.patch +debian/ipv6-fix-abi-change-in-4.4.4.patch