From: Greg Kroah-Hartman Date: Tue, 20 Nov 2012 00:17:50 +0000 (-0800) Subject: 3.0-stable patches X-Git-Tag: v3.0.53~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ba1d5d32da9a60fb1f6708fc2332d9ee0078f42b;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: m68k-fix-sigset_t-accessor-functions.patch memcg-oom-fix-totalpages-calculation-for-memory.swappiness-0.patch s390-gup-add-missing-task_size-check-to-get_user_pages_fast.patch usb-option-add-alcatel-x220-x500d-usb-ids.patch usb-option-add-novatel-e362-and-dell-wireless-5800-usb-ids.patch wireless-allow-40-mhz-on-world-roaming-channels-12-13.patch --- diff --git a/queue-3.0/m68k-fix-sigset_t-accessor-functions.patch b/queue-3.0/m68k-fix-sigset_t-accessor-functions.patch new file mode 100644 index 00000000000..7312549202a --- /dev/null +++ b/queue-3.0/m68k-fix-sigset_t-accessor-functions.patch @@ -0,0 +1,54 @@ +From 34fa78b59c52d1db3513db4c1a999db26b2e9ac2 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Sat, 17 Nov 2012 22:27:04 +0100 +Subject: m68k: fix sigset_t accessor functions + +From: Andreas Schwab + +commit 34fa78b59c52d1db3513db4c1a999db26b2e9ac2 upstream. + +The sigaddset/sigdelset/sigismember functions that are implemented with +bitfield insn cannot allow the sigset argument to be placed in a data +register since the sigset is wider than 32 bits. Remove the "d" +constraint from the asm statements. + +The effect of the bug is that sending RT signals does not work, the signal +number is truncated modulo 32. + +Signed-off-by: Andreas Schwab +Signed-off-by: Geert Uytterhoeven +Signed-off-by: Greg Kroah-Hartman + +--- + arch/m68k/include/asm/signal.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/m68k/include/asm/signal.h ++++ b/arch/m68k/include/asm/signal.h +@@ -156,7 +156,7 @@ typedef struct sigaltstack { + static inline void sigaddset(sigset_t *set, int _sig) + { + asm ("bfset %0{%1,#1}" +- : "+od" (*set) ++ : "+o" (*set) + : "id" ((_sig - 1) ^ 31) + : "cc"); + } +@@ -164,7 +164,7 @@ static inline void sigaddset(sigset_t *s + static inline void sigdelset(sigset_t *set, int _sig) + { + asm ("bfclr %0{%1,#1}" +- : "+od" (*set) ++ : "+o" (*set) + : "id" ((_sig - 1) ^ 31) + : "cc"); + } +@@ -180,7 +180,7 @@ static inline int __gen_sigismember(sigs + int ret; + asm ("bfextu %1{%2,#1},%0" + : "=d" (ret) +- : "od" (*set), "id" ((_sig-1) ^ 31) ++ : "o" (*set), "id" ((_sig-1) ^ 31) + : "cc"); + return ret; + } diff --git a/queue-3.0/memcg-oom-fix-totalpages-calculation-for-memory.swappiness-0.patch b/queue-3.0/memcg-oom-fix-totalpages-calculation-for-memory.swappiness-0.patch new file mode 100644 index 00000000000..dbe3ec9aa6d --- /dev/null +++ b/queue-3.0/memcg-oom-fix-totalpages-calculation-for-memory.swappiness-0.patch @@ -0,0 +1,88 @@ +From 9a5a8f19b43430752067ecaee62fc59e11e88fa6 Mon Sep 17 00:00:00 2001 +From: Michal Hocko +Date: Fri, 16 Nov 2012 14:14:49 -0800 +Subject: memcg: oom: fix totalpages calculation for memory.swappiness==0 + +From: Michal Hocko + +commit 9a5a8f19b43430752067ecaee62fc59e11e88fa6 upstream. + +oom_badness() takes a totalpages argument which says how many pages are +available and it uses it as a base for the score calculation. The value +is calculated by mem_cgroup_get_limit which considers both limit and +total_swap_pages (resp. memsw portion of it). + +This is usually correct but since fe35004fbf9e ("mm: avoid swapping out +with swappiness==0") we do not swap when swappiness is 0 which means +that we cannot really use up all the totalpages pages. This in turn +confuses oom score calculation if the memcg limit is much smaller than +the available swap because the used memory (capped by the limit) is +negligible comparing to totalpages so the resulting score is too small +if adj!=0 (typically task with CAP_SYS_ADMIN or non zero oom_score_adj). +A wrong process might be selected as result. + +The problem can be worked around by checking mem_cgroup_swappiness==0 +and not considering swap at all in such a case. + +Signed-off-by: Michal Hocko +Acked-by: David Rientjes +Acked-by: Johannes Weiner +Acked-by: KOSAKI Motohiro +Acked-by: KAMEZAWA Hiroyuki +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/cgroups/memory.txt | 4 ++++ + mm/memcontrol.c | 21 +++++++++++++++------ + 2 files changed, 19 insertions(+), 6 deletions(-) + +--- a/Documentation/cgroups/memory.txt ++++ b/Documentation/cgroups/memory.txt +@@ -441,6 +441,10 @@ Note: + 5.3 swappiness + + Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. ++Please note that unlike the global swappiness, memcg knob set to 0 ++really prevents from any swapping even if there is a swap storage ++available. This might lead to memcg OOM killer if there are no file ++pages to reclaim. + + Following cgroups' swappiness can't be changed. + - root cgroup (uses /proc/sys/vm/swappiness). +--- a/mm/memcontrol.c ++++ b/mm/memcontrol.c +@@ -1514,17 +1514,26 @@ static int mem_cgroup_count_children(str + u64 mem_cgroup_get_limit(struct mem_cgroup *memcg) + { + u64 limit; +- u64 memsw; + + limit = res_counter_read_u64(&memcg->res, RES_LIMIT); +- limit += total_swap_pages << PAGE_SHIFT; + +- memsw = res_counter_read_u64(&memcg->memsw, RES_LIMIT); + /* +- * If memsw is finite and limits the amount of swap space available +- * to this memcg, return that limit. ++ * Do not consider swap space if we cannot swap due to swappiness + */ +- return min(limit, memsw); ++ if (mem_cgroup_swappiness(memcg)) { ++ u64 memsw; ++ ++ limit += total_swap_pages << PAGE_SHIFT; ++ memsw = res_counter_read_u64(&memcg->memsw, RES_LIMIT); ++ ++ /* ++ * If memsw is finite and limits the amount of swap space ++ * available to this memcg, return that limit. ++ */ ++ limit = min(limit, memsw); ++ } ++ ++ return limit; + } + + /* diff --git a/queue-3.0/s390-gup-add-missing-task_size-check-to-get_user_pages_fast.patch b/queue-3.0/s390-gup-add-missing-task_size-check-to-get_user_pages_fast.patch new file mode 100644 index 00000000000..fabcfc76f25 --- /dev/null +++ b/queue-3.0/s390-gup-add-missing-task_size-check-to-get_user_pages_fast.patch @@ -0,0 +1,36 @@ +From d55c4c613fc4d4ad2ba0fc6fa2b57176d420f7e4 Mon Sep 17 00:00:00 2001 +From: Heiko Carstens +Date: Mon, 22 Oct 2012 15:49:02 +0200 +Subject: s390/gup: add missing TASK_SIZE check to get_user_pages_fast() + +From: Heiko Carstens + +commit d55c4c613fc4d4ad2ba0fc6fa2b57176d420f7e4 upstream. + +When walking page tables we need to make sure that everything +is within bounds of the ASCE limit of the task's address space. +Otherwise we might calculate e.g. a pud pointer which is not +within a pud and dereference it. +So check against TASK_SIZE (which is the ASCE limit) before +walking page tables. + +Reviewed-by: Gerald Schaefer +Signed-off-by: Heiko Carstens +Signed-off-by: Martin Schwidefsky +Signed-off-by: Greg Kroah-Hartman + +--- + arch/s390/mm/gup.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/s390/mm/gup.c ++++ b/arch/s390/mm/gup.c +@@ -183,7 +183,7 @@ int get_user_pages_fast(unsigned long st + addr = start; + len = (unsigned long) nr_pages << PAGE_SHIFT; + end = start + len; +- if (end < start) ++ if ((end < start) || (end > TASK_SIZE)) + goto slow_irqon; + + /* diff --git a/queue-3.0/series b/queue-3.0/series index bafcdf0469f..fdd325913b2 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -9,3 +9,9 @@ asoc-wm8978-pll-incorrectly-configured-when-codec-is-master.patch asoc-dapm-use-card_list-during-dapm-shutdown.patch ubifs-fix-mounting-problems-after-power-cuts.patch ubifs-introduce-categorized-lprops-counter.patch +s390-gup-add-missing-task_size-check-to-get_user_pages_fast.patch +usb-option-add-novatel-e362-and-dell-wireless-5800-usb-ids.patch +usb-option-add-alcatel-x220-x500d-usb-ids.patch +memcg-oom-fix-totalpages-calculation-for-memory.swappiness-0.patch +wireless-allow-40-mhz-on-world-roaming-channels-12-13.patch +m68k-fix-sigset_t-accessor-functions.patch diff --git a/queue-3.0/usb-option-add-alcatel-x220-x500d-usb-ids.patch b/queue-3.0/usb-option-add-alcatel-x220-x500d-usb-ids.patch new file mode 100644 index 00000000000..cfcefb8b246 --- /dev/null +++ b/queue-3.0/usb-option-add-alcatel-x220-x500d-usb-ids.patch @@ -0,0 +1,34 @@ +From c0bc3098871dd9b964f6b45ec1e4d70d87811744 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Thu, 8 Nov 2012 11:56:53 -0600 +Subject: USB: option: add Alcatel X220/X500D USB IDs + +From: Dan Williams + +commit c0bc3098871dd9b964f6b45ec1e4d70d87811744 upstream. + +Signed-off-by: Dan Williams +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -286,6 +286,7 @@ static void option_instat_callback(struc + /* ALCATEL PRODUCTS */ + #define ALCATEL_VENDOR_ID 0x1bbb + #define ALCATEL_PRODUCT_X060S_X200 0x0000 ++#define ALCATEL_PRODUCT_X220_X500D 0x0017 + + #define PIRELLI_VENDOR_ID 0x1266 + #define PIRELLI_PRODUCT_C100_1 0x1002 +@@ -1163,6 +1164,7 @@ static const struct usb_device_id option + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200), + .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist + }, ++ { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D) }, + { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, + { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, + { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), diff --git a/queue-3.0/usb-option-add-novatel-e362-and-dell-wireless-5800-usb-ids.patch b/queue-3.0/usb-option-add-novatel-e362-and-dell-wireless-5800-usb-ids.patch new file mode 100644 index 00000000000..eec21126477 --- /dev/null +++ b/queue-3.0/usb-option-add-novatel-e362-and-dell-wireless-5800-usb-ids.patch @@ -0,0 +1,55 @@ +From fcb21645f1bd86d2be29baf48aa1b298de52ccc7 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Thu, 8 Nov 2012 11:56:42 -0600 +Subject: USB: option: add Novatel E362 and Dell Wireless 5800 USB IDs + +From: Dan Williams + +commit fcb21645f1bd86d2be29baf48aa1b298de52ccc7 upstream. + +The Dell 5800 appears to be a simple rebrand of the Novatel E362. + +Signed-off-by: Dan Williams +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -157,6 +157,7 @@ static void option_instat_callback(struc + #define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED 0x8001 + #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0x9000 + #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001 ++#define NOVATELWIRELESS_PRODUCT_E362 0x9010 + #define NOVATELWIRELESS_PRODUCT_G1 0xA001 + #define NOVATELWIRELESS_PRODUCT_G1_M 0xA002 + #define NOVATELWIRELESS_PRODUCT_G2 0xA010 +@@ -192,6 +193,9 @@ static void option_instat_callback(struc + #define DELL_PRODUCT_5730_MINICARD_TELUS 0x8181 + #define DELL_PRODUCT_5730_MINICARD_VZW 0x8182 + ++#define DELL_PRODUCT_5800_MINICARD_VZW 0x8195 /* Novatel E362 */ ++#define DELL_PRODUCT_5800_V2_MINICARD_VZW 0x8196 /* Novatel E362 */ ++ + #define KYOCERA_VENDOR_ID 0x0c88 + #define KYOCERA_PRODUCT_KPC650 0x17da + #define KYOCERA_PRODUCT_KPC680 0x180a +@@ -705,6 +709,7 @@ static const struct usb_device_id option + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G2) }, + /* Novatel Ovation MC551 a.k.a. Verizon USB551L */ + { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E362, 0xff, 0xff, 0xff) }, + + { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, + { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, +@@ -727,6 +732,8 @@ static const struct usb_device_id option + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ ++ { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_MINICARD_VZW, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_V2_MINICARD_VZW, 0xff, 0xff, 0xff) }, + { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */ + { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, + { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) }, diff --git a/queue-3.0/wireless-allow-40-mhz-on-world-roaming-channels-12-13.patch b/queue-3.0/wireless-allow-40-mhz-on-world-roaming-channels-12-13.patch new file mode 100644 index 00000000000..08f0b2cb778 --- /dev/null +++ b/queue-3.0/wireless-allow-40-mhz-on-world-roaming-channels-12-13.patch @@ -0,0 +1,37 @@ +From 43c771a1963ab461a2f194e3c97fded1d5fe262f Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Mon, 12 Nov 2012 10:51:34 +0100 +Subject: wireless: allow 40 MHz on world roaming channels 12/13 + +From: Johannes Berg + +commit 43c771a1963ab461a2f194e3c97fded1d5fe262f upstream. + +When in world roaming mode, allow 40 MHz to be used +on channels 12 and 13 so that an AP that is, e.g., +using HT40+ on channel 9 (in the UK) can be used. + +Reported-by: Eddie Chapman +Tested-by: Eddie Chapman +Acked-by: Luis R. Rodriguez +Signed-off-by: Johannes Berg +Signed-off-by: Greg Kroah-Hartman + +--- + net/wireless/reg.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/net/wireless/reg.c ++++ b/net/wireless/reg.c +@@ -125,9 +125,8 @@ static const struct ieee80211_regdomain + .reg_rules = { + /* IEEE 802.11b/g, channels 1..11 */ + REG_RULE(2412-10, 2462+10, 40, 6, 20, 0), +- /* IEEE 802.11b/g, channels 12..13. No HT40 +- * channel fits here. */ +- REG_RULE(2467-10, 2472+10, 20, 6, 20, ++ /* IEEE 802.11b/g, channels 12..13. */ ++ REG_RULE(2467-10, 2472+10, 40, 6, 20, + NL80211_RRF_PASSIVE_SCAN | + NL80211_RRF_NO_IBSS), + /* IEEE 802.11 channel 14 - Only JP enables