id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
970b13bacba14a8cef6f642861947df1d175b0b3
Analyze and fix the following issue in the Linux kernel code: sched: Consolidate select_task_rq() callers
Problem Details: Small cleanup. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> [ v2: build fix ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 68db5a2e6545..01fd131b47a4 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2323,6 +2323,14 @@ void task_oncpu_function_call(struct task_struct *p, preempt_enable(); } +#ifdef CONFIG_SMP +static inline +int select_task_rq(struct task_struct *p, int sd_...
6b314d0e11924c803bf8cd944e87fd58cdb5088c
Analyze and fix the following issue in the Linux kernel code: sched: Remove sysctl.sched_features
Problem Details: Since we've had a much saner debugfs interface to this, remove the sysctl one. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> [ v2: build fix ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/include/linux/sched.h b/include/linux/sched.h index 9b2402725088..ca72ed42ac34 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1905,7 +1905,6 @@ extern unsigned int sysctl_sched_shares_ratelimit; extern unsigned int sysctl_sched_shares_thresh; extern unsigned int sysctl_sched_c...
f58e1f53de52a70391b6478617311207c7203363
Analyze and fix the following issue in the Linux kernel code: arch/x86/kernel/microcode*: Use pr_fmt() and remove duplicated KERN_ERR prefix
Problem Details: - Use #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - Remove "microcode: " prefix from each pr_<level> - Fix duplicated KERN_ERR prefix - Coalesce pr_<level> format strings - Add a space after an exclamation point No other change in output. Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcrof...
```diff diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 63123d902103..37542b67c57e 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c @@ -13,6 +13,9 @@ * Licensed under the terms of the GNU General Public * License version 2. See file COPYING fo...
e090aa80321b64c3b793f3b047e31ecf1af9538d
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix usage of 64-bit instruction in 32-bit altivec code
Problem Details: e821ea70f3b4873b50056a1e0f74befed1014c09 introduced a bug by copying some 64-bit originated code as-is to be used by both 32 and 64-bit but this code contains a 64-bit ony "cmpdi" instruction. This changes it to cmpwi, which is fine since VRSAVE can only contains a 32-bit value anyway. Signed-off-by:...
```diff diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S index 67b6916f0e94..fe460482fa68 100644 --- a/arch/powerpc/kernel/vector.S +++ b/arch/powerpc/kernel/vector.S @@ -58,7 +58,7 @@ _GLOBAL(load_up_altivec) * all 1's */ mfspr r4,SPRN_VRSAVE - cmpdi 0,r4,0 + cmpwi 0,r4,0 bne+ 1f li...
ca6f2d7fafd2d48b2f6943f5c6787beaec2014d0
Analyze and fix the following issue in the Linux kernel code: sh: pfc: Fixup type mismatch in debug printks.
Problem Details: !!value works out to an int while we were still using %ld, so fix this up and shut gcc up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/sh/pfc.c b/drivers/sh/pfc.c index 841ed5030c8f..082604edc4c2 100644 --- a/drivers/sh/pfc.c +++ b/drivers/sh/pfc.c @@ -71,7 +71,7 @@ static void gpio_write_bit(struct pinmux_data_reg *dr, pos = dr->reg_width - (in_pos + 1); - pr_debug("write_bit addr = %lx, value = %ld, pos = %ld, " + ...
17f88fcd667a914b6f4dca146c9a09492fcd57b8
Analyze and fix the following issue in the Linux kernel code: perf probe: Remove event suffix number _0
Problem Details: Remove event suffix number _0 if it is the first. The first event has no suffix, and from the second, each event has suffix number counted from _1. This reduces typing cost :-). Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Jim Keniston <jkenisto@us...
```diff diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 2c4d3017441b..31beedcf61c1 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -466,7 +466,16 @@ static void get_new_event_name(char *buf, size_t len, const char *base, struct strlist *namel...
d1bde3f755e8652faad59e264c466c4baab68fa8
Analyze and fix the following issue in the Linux kernel code: perf probe: Fix add-probe command syntax without --add option
Problem Details: Fix add-probe command syntax without --add option. perf-probe supports add-probe command without --add option. But it treats each argument as an event definition. e.g. perf probe func arg1 arg2 is interpreted as perf probe --add func --add arg1 --add arg2 But it may be useless in many cases. This...
```diff diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 8993a1f4e1c3..1347fdf5337e 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -79,6 +79,25 @@ static void parse_probe_event(const char *str) pr_debug("%d arguments\n", pp->nr_args); } +static void parse_prob...
1496e89ae2a0962748e55165a590fa3209c6f158
Analyze and fix the following issue in the Linux kernel code: powerpc/therm_adt746x: Record pwm invert bit at module load time]
Problem Details: In commit 0512a9a8e277a9de2820211eef964473b714ae65, we unilaterally zero the "pwm invert" bit in the fan behavior configuration register. On my PowerBook G4, this results in the fans going to full speed at low temperature and shutting off at high temperature because the pwm invert bit is supposed to b...
```diff diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 95b676a19be7..5ff47ba7f2d0 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c @@ -79,6 +79,7 @@ struct thermostat { u8 limits[3]; int last_speed[2]; int last_var[2]; + int p...
0a753d58f901913e3e6416baeac437ee83eda90d
Analyze and fix the following issue in the Linux kernel code: sh: intc: Fixup compile breakage.
Problem Details: The resume from hibernation patch introduced build failure, fix it up.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c index 88f5aaf62fdb..d5d7f23c19a5 100644 --- a/drivers/sh/intc.c +++ b/drivers/sh/intc.c @@ -807,7 +807,7 @@ static int intc_suspend(struct sys_device *dev, pm_message_t state) break; for_each_irq_desc(irq, desc) { if (desc->handle_irq == intc_redirec...
e0188829cb724e7d12a2d4e343b368ff1d6e1471
Analyze and fix the following issue in the Linux kernel code: b44 WOL setup: one-bit-off stack corruption kernel panic fix
Problem Details: About 50% of shutdowns of b44 Ethernet adapter ends by kernel panic with kernels compiled with stack-protector. Checking b44_magic_pattern() return values, one call of b44_magic_pattern() returns 127. It means, that set_bit(128, pmask) was called on line 1509. It means that bit 0 of 17th byte of pmask...
```diff diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 2a9132343b66..4869adb69586 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -1505,8 +1505,7 @@ static int b44_magic_pattern(u8 *macaddr, u8 *ppattern, u8 *pmask, int offset) for (k = 0; k< ethaddr_bytes; k++) { ppattern[offset + magicsync ...
77722b177a1606669c0b95dde03347e37d13b8fe
Analyze and fix the following issue in the Linux kernel code: tcp: fix retrans_stamp advancing in error cases
Problem Details: It can happen, that tcp_retransmit_skb fails due to some error. In such cases we might end up into a state where tp->retrans_out is zero but that's only because we removed the TCPCB_SACKED_RETRANS bit from a segment but couldn't retransmit it because of the error that happened. Therefore some assumptio...
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 57ae96a04220..12cab7d74dba 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2717,6 +2717,35 @@ static void tcp_try_undo_dsack(struct sock *sk) } } +/* We can clear retrans_stamp when there are no retransmissions in the + * windo...
07f29bc5bbae4e53e982ab956fed7207990a7786
Analyze and fix the following issue in the Linux kernel code: tcp: Stalling connections: Fix timeout calculation routine
Problem Details: This patch fixes a problem in the TCP connection timeout calculation. Currently, timeout decisions are made on the basis of the current tcp_time_stamp and retrans_stamp, which is usually set at the first retransmission. However, if the retransmission fails in tcp_retransmit_skb(), retrans_stamp is not ...
```diff diff --git a/include/net/tcp.h b/include/net/tcp.h index e2d2ca2509be..e54bd85d9d40 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1265,14 +1265,20 @@ static inline struct sk_buff *tcp_write_queue_prev(struct sock *sk, struct sk_bu * TCP connection after "boundary" unsucessful, exponentially backe...
cb19054697e92a793f336380fd72c588521178ff
Analyze and fix the following issue in the Linux kernel code: atl1c:use common_task instead of reset_task and link_chg_task
Problem Details: use common_task instead of reset_task and link_chg_task, so it fix "call cancel_work_sync from the work itself". Signed-off-by: Jie Yang <jie.yang@atheros.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/atl1c/atl1c.h b/drivers/net/atl1c/atl1c.h index 7e09084f75a9..efe5435bc3d3 100644 --- a/drivers/net/atl1c/atl1c.h +++ b/drivers/net/atl1c/atl1c.h @@ -555,6 +555,9 @@ struct atl1c_adapter { #define __AT_TESTING 0x0001 #define __AT_RESETTING 0x0002 #define __AT_DOWN ...
634d7df89a93a52561f598bf9512f4cf72946954
Analyze and fix the following issue in the Linux kernel code: netxen: fix firmware type check
Problem Details: Unified firmware image may not contain MN type of firmware. Driver should fall back to NOMN firmware type instead of going to flash. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 80a667460514..02f8d4b4db63 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c @@ -619,17 +619,20 @@ nx_set_product_offs(struct netxen_adapter *adapter) uint32_t i; __le32 ...
f2251f668e9527b87c9ba7256e7497cb49abbc20
Analyze and fix the following issue in the Linux kernel code: netxen:fix napi intr enable check
Problem Details: o netif_running() check for enabling interrupt at end of napi poll is not enough to cover firmwar recovery. Instead test __NX_DEV_UP bit. o Avoid re-entry into to netxen_nic_down() with __NX_DEV_UP bit check. Acked-by: Dhananjay Phadke <dhananjay.phadke@qlogic.com> Signed-off-by: Amit Kumar Salecha ...
```diff diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 8ffb30bc798f..f4996846a234 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -1011,8 +1011,10 @@ __netxen_nic_down(struct netxen_adapter *adapter, struct net_device *netde...
6f7714196b4e01d7462df31d705c3ca53ecbdfc1
Analyze and fix the following issue in the Linux kernel code: netxen: protect device reset by rtnl_lock
Problem Details: o To prevent race conditions with other reset events. During suspend/resume and firmware recovery, acquire rtnl_lock, while changing interface state. Acked-by: Dhananjay Phadke <dhananjay.phadke@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller ...
```diff diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index e5d187fce51b..8ffb30bc798f 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -946,8 +946,9 @@ netxen_nic_init_coalesce_defaults(struct netxen_adapter *adapter) NETXEN_D...
1e4e0767ecb1cf53a43343518c0e09ad7ee5e23a
Analyze and fix the following issue in the Linux kernel code: net/mpc5200: Fix locking on fec_mpc52xx driver
Problem Details: Fix the locking scheme on the fec_mpc52xx driver. This device can receive IRQs from three sources; the FEC itself, the tx DMA, and the rx DMA. Mutual exclusion was handled by taking a spin_lock() in the critical regions, but because the handlers are run with IRQs enabled, spin_lock() is insufficient ...
```diff diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 6407672b28e9..848e8407ea8f 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c @@ -85,11 +85,15 @@ MODULE_PARM_DESC(debug, "debugging messages level"); static void mpc52xx_fec_tx_timeout(struct net_device *dev) { + s...
eb0445887a45a3705522aac6c2d8367e90358792
Analyze and fix the following issue in the Linux kernel code: atm: [lec] initialize .netdev_ops before calling register_netdev()
Problem Details: fix oops when initializing lane interfaces. lec should probably be changed to use alloc_netdev() instead. Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/atm/lec.c b/net/atm/lec.c index b2d644560323..42749b7b917c 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -62,7 +62,6 @@ static int lec_open(struct net_device *dev); static netdev_tx_t lec_start_xmit(struct sk_buff *skb, struct net_device *dev); static int lec_close(struct net_devic...
3cdaedae635b17ce23c738ce7d364b442310cdec
Analyze and fix the following issue in the Linux kernel code: tcp: Fix a connect() race with timewait sockets
Problem Details: When we find a timewait connection in __inet_hash_connect() and reuse it for a new connection request, we have a race window, releasing bind list lock and reacquiring it in __inet_twsk_kill() to remove timewait socket from list. Another thread might find the timewait socket we already chose, leading t...
```diff diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index b801ade2295e..79f67eae8a7e 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h @@ -201,6 +201,9 @@ extern void inet_twsk_put(struct inet_timewait_sock *tw); extern int inet_twsk_unhash(stru...
9327f7053e3993c125944fdb137a0618319ef2a0
Analyze and fix the following issue in the Linux kernel code: tcp: Fix a connect() race with timewait sockets
Problem Details: First patch changes __inet_hash_nolisten() and __inet6_hash() to get a timewait parameter to be able to unhash it from ehash at same time the new socket is inserted in hash. This makes sure timewait socket wont be found by a concurrent writer in __inet_check_established() Reported-by: kapil dakhane <...
```diff diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index 92838d3a1ab7..e46674d5daea 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h @@ -53,7 +53,7 @@ static inline int inet6_sk_ehashfn(const struct sock *sk) return inet6_ehashfn(net, laddr, lport, fad...
60d51134281fbeb352013d782a440fb338d31f01
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix TX stats accounting
Problem Details: Here is an updated version, because ixgbe_get_ethtool_stats() needs to call dev_get_stats() or "ethtool -S" wont give correct tx_bytes/tx_packets values. Several cpus can update netdev->stats.tx_bytes & netdev->stats.tx_packets in parallel. In this case, TX stats are under estimated and false sharing ...
```diff diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 06a9d18bbdbc..0bd49d3b9f65 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c @@ -990,6 +990,7 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, char *p = NULL; ixgb...
b25b9758466bb8bc837f1863389015820f7cb11d
Analyze and fix the following issue in the Linux kernel code: sh: NUMA lmb fixes
Problem Details: This patch updates the NUMA version of setup_memory() with UMA code changes and also modifies the last argument to lmb_alloc_base() to use an address instead of pfn. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c index b44e83526673..422e92721878 100644 --- a/arch/sh/mm/numa.c +++ b/arch/sh/mm/numa.c @@ -37,6 +37,15 @@ void __init setup_memory(void) (PFN_PHYS(free_pfn) + PAGE_SIZE - 1) - (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET)); + /* + * Reserve physi...
f3a4c00ad35a9f21db82516fdc600cb1be301c23
Analyze and fix the following issue in the Linux kernel code: sh: fix size calculation for NUMA node 0
Problem Details: Fix the NUMA size calculation for node 0. Do the same as the UMA version of setup_memory() and use address instead of pfn when calculating the size. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c index 6c524446c0f6..b44e83526673 100644 --- a/arch/sh/mm/numa.c +++ b/arch/sh/mm/numa.c @@ -28,7 +28,7 @@ void __init setup_memory(void) { unsigned long free_pfn = PFN_UP(__pa(_end)); u64 base = min_low_pfn << PAGE_SHIFT; - u64 size = (max_low_pfn << PAGE_...
87a705dde49d0c482fa818f0923af59ed0954d5d
Analyze and fix the following issue in the Linux kernel code: sh: intc: Fixed resume from hibernation
Problem Details: This patch fixes the resume from hibernation in the intc sysdev device when it manages 'redirect' irq Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c index a7e5c2e9986c..88f5aaf62fdb 100644 --- a/drivers/sh/intc.c +++ b/drivers/sh/intc.c @@ -806,6 +806,8 @@ static int intc_suspend(struct sys_device *dev, pm_message_t state) if (d->state.event != PM_EVENT_FREEZE) break; for_each_irq_desc(irq, desc) ...
390d0bbe88b3ef00c28086076d791533407f298e
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: connector fixes
Problem Details: - Don't add dac load detection property to DVI-D - Make sure i2c info is valid before adding DP aux chan bus - Don't create scaling_mode_property twice - fix typo that prevented coherent and load detection from working - add coherent prop to DP (for dp->dvi adapters) Signed-off-by: Alex Deucher <alexd...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index cfa2ebb259fe..5eece186e03c 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -1103,10 +1103,12 @@ radeon_add_atom_connector(struct drm_device *dev,...
ec42a6e7dcfc2e9a92fad1c132bc9e110fafeb3f
Analyze and fix the following issue in the Linux kernel code: drm/ttm: fix memory leak noticed by kmemleak.
Problem Details: If we don't need the zone we need to free it. Acked-By: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index 8bfde5f40841..f5245c02b8fd 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm/ttm/ttm_memory.c @@ -323,8 +323,10 @@ static int ttm_mem_init_dma32_zone(struct ttm_mem_global *glob, * No special dma32 zone n...
41df70d9ac2d0d36b23a0ec4866f67e540f366ff
Analyze and fix the following issue in the Linux kernel code: spi: fix spidev compilation failure when VERBOSE is defined
Problem Details: When VERBOSE is defined in the spidev module, the compilation will throw an error on 'spi' not being defined: CC [M] drivers/spi/spidev.o drivers/spi/spidev.c: In function 'spidev_message': drivers/spi/spidev.c:266: error: 'spi' undeclared (first use in this function) drivers/spi/spidev.c:266: error:...
```diff diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 5d23983f02fc..f8279e783617 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -267,15 +267,15 @@ static int spidev_message(struct spidev_data *spidev, k_tmp->delay_usecs = u_tmp->delay_usecs; k_tmp->speed_hz = u_tmp->speed_hz; #i...
04ba24b34ac8ea4885295a7f7f78f719bc8c859b
Analyze and fix the following issue in the Linux kernel code: spi/au1550_spi: fix setupxfer not to override cfg with zeros
Problem Details: fix setupxfer() not to override generic configuration of speed_hz and bits_per_word with zeros Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c index 76cbc1a66598..cfd5ff9508fa 100644 --- a/drivers/spi/au1550_spi.c +++ b/drivers/spi/au1550_spi.c @@ -237,8 +237,14 @@ static int au1550_spi_setupxfer(struct spi_device *spi, struct spi_transfer *t) unsigned bpw, hz; u32 cfg, stat; - bpw...
bbd050af0e2b7d77bfc959cf76219eb71c3b982a
Analyze and fix the following issue in the Linux kernel code: spi/i.MX: fix broken error handling for gpio_request
Problem Details: i.MX35-provided chipselects are represented using negative numbers. If gpio_request() fails and the previous chipselect was a negative number, the while loop is endless (i is never decremented). Also, the error loop would never call gpio_free on chipselect[0]. And finally, the error message was missi...
```diff diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 1b17f443dee7..8ffa48ce570c 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -516,11 +516,12 @@ static int __init spi_imx_probe(struct platform_device *pdev) continue; ret = gpio_request(spi_imx->chipselect[i], DRIVER_NAME);...
ce1807b2e527979bd77d8a1a1768a6365f3febb5
Analyze and fix the following issue in the Linux kernel code: spi/i.mx: drain MXC SPI transfer buffer when probing device
Problem Details: On the MX31litekit, the bootloader seems to communicate with the MC13783 PMIC chip before booting Linux. However, it does not flush all the buffers properly after that, which makes the imx-spi driver read bogus data when probing the MC13783. Fix that by draining the SPI receive buffer on startup. Sig...
```diff diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 89c22efedfb0..1b17f443dee7 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -44,6 +44,9 @@ #define MXC_CSPIINT 0x0c #define MXC_RESET 0x1c +#define MX3_CSPISTAT 0x14 +#define MX3_CSPISTAT_RR (1 << 3) + /* generic defines ...
920712af498a3081a9ac8256951d1c7eae109c50
Analyze and fix the following issue in the Linux kernel code: spi/xilinx_spi: fix incorrect casting
Problem Details: This patch fixes the error exposed by the following build warning: drivers/spi/xilinx_spi.c: In function 'xilinx_spi_init': drivers/spi/xilinx_spi.c:411: warning: cast from pointer to integer of different size Fixed by change %x to %p in the format string. Signed-off-by: Grant Likely <grant.likely@s...
```diff diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c index b927812822c1..9f386379c169 100644 --- a/drivers/spi/xilinx_spi.c +++ b/drivers/spi/xilinx_spi.c @@ -408,8 +408,8 @@ struct spi_master *xilinx_spi_init(struct device *dev, struct resource *mem, goto free_irq; } - dev_info(dev, "at 0x%0...
4a495b1c43ed2e1495dad19987100ccd6c1575d7
Analyze and fix the following issue in the Linux kernel code: mpc52xx_spi: fix clearing status register
Problem Details: Before reading status register to check MODF failure, we have to clear it first since the MODF flag will be set after initializing the spi master, if the hardware comes up with a low SS. The processor datasheet reads: Mode Fault flag -- bit sets if SS input goes low while SPI is configured as a master....
```diff diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c index ef8379b2c172..232225088bc1 100644 --- a/drivers/spi/mpc52xx_spi.c +++ b/drivers/spi/mpc52xx_spi.c @@ -391,6 +391,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, struct mpc52xx_spi *ms; void __iomem *regs; int rc; + ...
ce6eb574a1d9bbde72998ed9c95e9bf35c8f4131
Analyze and fix the following issue in the Linux kernel code: i2c-designware: Tx abort cleanups
Problem Details: * ABRT_MASTER_DIS: Fix a typo. * i2c_dw_handle_tx_abort: Return an appropriate error number depending on abort_source. * i2c_dw_xfer: Add a missing abort_source initialization. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index e6b1e6ece5d7..887aed6601fb 100644 --- a/drivers/i2c/busses/i2c-designware.c +++ b/drivers/i2c/busses/i2c-designware.c @@ -123,9 +123,27 @@ #define ABRT_SBYTE_ACKDET 7 #define ABRT_SBYTE_NORSTRT 9 #define ABRT_10B_RD_...
8f588e40c788e63756ca1028c253f9f663d7d1c5
Analyze and fix the following issue in the Linux kernel code: i2c-designware: i2c_dw_xfer_msg: Fix error handling procedures
Problem Details: Current error handling procedures are not good in two respects: * Forgot to mark dev->cmd_complete as "completed" on errors Once an I2C transaction is initiated, wait_for_completion_ interruptible_timeout() waits for dev->cmd_complete to be completed. We have to take care of it whenever an erro...
```diff diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index 6acbe846e9c6..cb83671ff5fc 100644 --- a/drivers/i2c/busses/i2c-designware.c +++ b/drivers/i2c/busses/i2c-designware.c @@ -380,14 +380,18 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev) * reprogram the target address in t...
c70c5cd37413c3fa3503212d26ffdf6df535c9de
Analyze and fix the following issue in the Linux kernel code: i2c-designware: i2c_dw_xfer_msg: Fix i2c_msg search bug
Problem Details: In case a work-in-progress i2c_msg has more bytes to be written, we need to set STATUS_WRITE_IN_PROGRESS and exit from the msg_write_idx- searching loop. Otherwise, we will overtake the current msg_write_idx without waiting for its transmission to be processed. Signed-off-by: Shinya Kuribayashi <shin...
```diff diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index cdfd94e41ccc..bfb42f0f87a6 100644 --- a/drivers/i2c/busses/i2c-designware.c +++ b/drivers/i2c/busses/i2c-designware.c @@ -338,6 +338,8 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev) u32 addr = msgs[dev->msg_write_idx].add...
27a338a69ed9a8a672cd620f5fd7fa450209313c
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix cut/paste detritus from unistd.h
Problem Details: Build warning: <stdin>:1523:2: warning: #warning syscall recvmmsg not implemented Because when recvmmesg was added, the previous syscall define was cut&pasted, and a spurious "rt_" left in the name of the define. Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h index 9c72e36c5281..10a8f21ca9e3 100644 --- a/arch/ia64/include/asm/unistd.h +++ b/arch/ia64/include/asm/unistd.h @@ -311,7 +311,7 @@ #define __NR_preadv 1319 #define __NR_pwritev 1320 #define __NR_rt_tgsigqueueinfo 1321 -#defi...
a252e749f1ae17e43ccc5824f7b1b5854417c98b
Analyze and fix the following issue in the Linux kernel code: sctp: fix compile error due to sysctl mismerge
Problem Details: I messed up the merge in d7fc02c7bae7b1cf69269992cf880a43a350cdaa, where the conflict in question wasn't just about CTL_UNNUMBERED being removed, but the 'strategy' field is too (sysctl handling is now done through the /proc interface, with no duplicate protocols for reading the data). Reported-by: La...
```diff diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c index 419e1e962c55..832590bbe0c0 100644 --- a/net/sctp/sysctl.c +++ b/net/sctp/sysctl.c @@ -248,7 +248,6 @@ static ctl_table sctp_table[] = { .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_dointvec_minmax, - .strategy = &sysctl_intvec, ...
5c0e9f28da84c68ce0ae68b7a75faaf862e156e2
Analyze and fix the following issue in the Linux kernel code: x86, mce: fix confusion between bank attributes and mce attributes
Problem Details: Commit cebe182033f156b430952370fb0f9dbe6e89b081 had an unnecessary, wrong change: &mce_banks[i].attr is equivalent to the former bank_attrs[i], not to mce_attrs[i]. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Acked-by: Andi Kleen <andi@firstfloor.org> LKML-Reference: <4B1E05CC.404070...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index a96e5cd256a9..a8aacd4b513c 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -1929,7 +1929,7 @@ error2: sysdev_remove_file(&per_cpu(mce_dev, cpu), &mce_banks[j].attr); error: while ...
dd7cdb883b1000cb2be537c44612ade3c9c39a7b
Analyze and fix the following issue in the Linux kernel code: ALSA: radio/sound/miro: fix build, cleanup depends/selects
Problem Details: miropcm20 uses ALSA (snd_) interfaces from the SND_MIRO driver, so it should depend on SND. (selecting SND_MIRO when CONFIG_SND is not enabled is a problem.) drivers/built-in.o: In function `vidioc_s_ctrl': radio-miropcm20.c:(.text+0x227499): undefined reference to `snd_aci_cmd' drivers/built-in.o: In...
```diff diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index b134553eb3b5..dcc7af2f3319 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -197,7 +197,8 @@ config RADIO_MAESTRO config RADIO_MIROPCM20 tristate "miroSOUND PCM20 radio" - depends on ISA && VIDEO_V4L2 ...
88069f77e1ac580a495762ce7a631c251c52cb90
Analyze and fix the following issue in the Linux kernel code: NFSv41: Fix a potential state leakage when restarting nfs4_close_prepare
Problem Details: Currently, if the call to nfs4_setup_sequence() in nfs4_close_prepare fails, any later retries will fail to launch an RPC call, due to the fact that the &state->flags will have been cleared. Ditto if nfs4_close_done() triggers a call to the NFSv4.1 version of nfs_restart_rpc(). We therefore move the a...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index cdf17d628450..9f5f11ecfd93 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -761,13 +761,16 @@ static int can_open_cached(struct nfs4_state *state, fmode_t mode, int open_mode goto out; switch (mode & (FMODE_READ|FMODE_WRITE)) { case FMOD...
18ba54ac1286b4fdb0e61d49fa3ad9363e7cd032
Analyze and fix the following issue in the Linux kernel code: amd64_edac: fix use-uninitialised bug
Problem Details: drivers/edac/amd64_edac.c: In function 'amd64_edac_init': drivers/edac/amd64_edac.c:2840: warning: 'ret' may be used uninitialized in this function Cc: Doug Thompson <dougthompson@xmission.com> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Sign...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 533f5ff2ec33..5fdd6daa40ea 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -2837,7 +2837,7 @@ static int amd64_init_2nd_stage(struct amd64_pvt *pvt) { int node_id = pvt->mc_node_id; struct mem_ctl_info *mci; ...
bdc30a0c8c7427a1c1d2e4d149d372d4d77781ee
Analyze and fix the following issue in the Linux kernel code: amd64_edac: correct sys address to chip select mapping
Problem Details: The routine does the reverse mapping of the error address of a CECC back to the node id, DRAM controller and chip select of the DIMM which caused the error. We should lookup the channel using the syndromes _only_ when the DCTs are ganged so fix that. Also, add an early exit when there's an error while...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 0969a404f84f..533f5ff2ec33 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -1645,10 +1645,11 @@ static int f10_translate_sysaddr_to_cs(struct amd64_pvt *pvt, u64 sys_addr, } /* - * This the F10h reference code...
b38882f5c066dc681679e90f1903eda323e605b1
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix return code in check_leaf
Problem Details: Return the PTR_ERR of the correct pointer. This fixes the debugging code. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
```diff diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index dbc093afd946..8a771c59ac3e 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -2014,7 +2014,7 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr, inum = key_inum_flash(c, &dent->key); fscki1 = read_add_inode(c, priv, inum); ...
d11f74c62fb4a1fefd39085570fb6dfa7b9ab2bb
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Exclude unusable ADCs for ALC88x
Problem Details: On Realtek codecs, a digital mic pin is connected often only to a single ADC. But the parser tries to set up all ADCs no matter whether the digital mic is available, and results in non-selectable input source. This patch adds a check of input-source availability of each ADC, and excludes ones that do...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0fbcbeef1418..2a96bc78964d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10021,10 +10021,12 @@ static int patch_alc882(struct hda_codec *codec) spec->init_amp = ALC_INIT_DEFAULT; /* always in...
1672af1164d3d50ba8908014fd34cc0b58afdc1e
Analyze and fix the following issue in the Linux kernel code: intel-iommu: ignore page table validation in pass through mode
Problem Details: We are seeing a bug when booting w/ iommu=pt with current upstream (bisect blames 19943b0e30b05d42e494ae6fef78156ebc8c637e "intel-iommu: Unify hardware and software passthrough support). The issue is specific to this loop during identity map initialization of each device: domain_context_mapping_one(s...
```diff diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index e3e84cac0e98..466079535330 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -1530,12 +1530,15 @@ static int domain_context_mapping_one(struct dmar_domain *domain, int segment, /* Skip top levels of page tables...
44cd613c0e4cd93079ea2a93aa06649d8ca0830a
Analyze and fix the following issue in the Linux kernel code: intel-iommu: Fix oops with intel_iommu=igfx_off
Problem Details: The hotplug notifier will call find_domain() to see if the device in question has been assigned an IOMMU domain. However, this should never be called for devices with a "dummy" domain, such as graphics devices when intel_iommu=igfx_off is set and the corresponding IOMMU isn't even initialised. If you d...
```diff diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 83cabdc118db..e3e84cac0e98 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -3247,6 +3247,9 @@ static int device_notifier(struct notifier_block *nb, struct pci_dev *pdev = to_pci_dev(dev); struct dmar_domain *d...
5595b528b49a702c0428c0762bab60999648254c
Analyze and fix the following issue in the Linux kernel code: intel-iommu: Check for an RMRR which ends before it starts.
Problem Details: Some HP BIOSes report an RMRR region (a region which needs a 1:1 mapping in the IOMMU for a given device) which has an end address lower than its start address. Detect that and warn, rather than triggering the BUG() in dma_pte_clear_range(). Cc: stable@kernel.org Signed-off-by: David Woodhouse <David....
```diff diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index cb5cae3e0205..83cabdc118db 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -2000,6 +2000,16 @@ static int iommu_prepare_identity_map(struct pci_dev *pdev, "IOMMU: Setting identity map for device %s [0x%Lx...
6ab8886326a1b9a3a8d164d8174e3c20703a03a2
Analyze and fix the following issue in the Linux kernel code: perf: hw_breakpoints: Fix percpu namespace clash
Problem Details: Today's linux-next build failed with: kernel/hw_breakpoint.c:86: error: 'task_bp_pinned' redeclared as different kind of symbol ... Caused by commit dd17c8f72993f9461e9c19250e3f155d6d99df22 ("percpu: remove per_cpu__ prefix") from the percpu tree interacting with commit 56053170ea2a2c0dc17420e9b9...
```diff diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c index 02b492504a5a..03a0773ac2b2 100644 --- a/kernel/hw_breakpoint.c +++ b/kernel/hw_breakpoint.c @@ -52,7 +52,7 @@ static DEFINE_PER_CPU(unsigned int, nr_cpu_bp_pinned); /* Number of pinned task breakpoints in a cpu */ -static DEFINE_PER_CPU(unsi...
d28513bc7f675d28b479db666d572e078ecf182d
Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Fix pgtable cache cleanup with CONFIG_PPC_SUBPAGE_PROT
Problem Details: Commit a0668cdc154e54bf0c85182e0535eea237d53146 cleans up the handling of kmem_caches for allocating various levels of pagetables. Unfortunately, it conflicts badly with CONFIG_PPC_SUBPAGE_PROT, due to the latter's cleverly hidden technique of adding some extra allocation space to the top level page di...
```diff diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h index 7514ec2f8540..2102b214a87c 100644 --- a/arch/powerpc/include/asm/mmu-hash64.h +++ b/arch/powerpc/include/asm/mmu-hash64.h @@ -373,6 +373,38 @@ extern void slb_set_size(u16 size); #ifndef __ASSEMBLY__ +#ifdef CO...
85438592f179c126ad4cb9a280046d4f0a501e6d
Analyze and fix the following issue in the Linux kernel code: percpu: remove compile warnings caused by __verify_pcpu_ptr()
Problem Details: If percpu pointer is const, __verify_pcpu_ptr() triggers warnings like the following. drivers/net/loopback.c: In function 'loopback_get_stats': drivers/net/loopback.c:109: warning: initialization discards qualifiers from pointer target type Fix it by adding const to the verification target pointer ...
```diff diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index 1fa36eb54b6a..68567c0b3a5d 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h @@ -24,7 +24,7 @@ * input parameter is a percpu pointer. */ #define __verify_pcpu_ptr(ptr) do { \ - void __percpu *__vpp_ver...
b0a007dc27d8d3ff3db07b3ea997323d9330f770
Analyze and fix the following issue in the Linux kernel code: drm/kms: fix fb cmap allocation to use modeset->crtc not crtc
Problem Details: crtc may be undefined at this point. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 515b838006d2..9a0aac0f7b79 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -908,7 +908,7 @@ int drm_fb_helper_single_fb_probe(struct drm_device *dev, if (new_fb) { info->var.pixclock...
9fa05c98d69eb77c82e59b5e434ca63bba230ba0
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix DP detect
Problem Details: only return connected if there is actually a monitor connected. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index e1cbd5049f86..75977a46ba1c 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c @@ -440,7 +440,7 @@ u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector) di...
e8696330e2a95e1b5872550dcf3ed04aecaf96b3
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: drop unused array to fix warning.
Problem Details: Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index 28741d40bf66..e1cbd5049f86 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c @@ -42,9 +42,6 @@ static char *voltage_names[] = { static char *pre_emph_names[] = { "0...
5fbfce7fc906c4a9e3d5e0872e5d6affaca54761
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: make displayport work by reorganising vsemph setup.
Problem Details: This fix reorganises the initial DP link training slightly, and actually makes DP work under kms here. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index 65c82395c8e0..28741d40bf66 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c @@ -627,11 +627,12 @@ void dp_link_train(struct drm_encoder *encoder, /* set initial vs/emph ...
54d9cb47dd6a754e434e5adeccb3a1e2835594fd
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms/dp: fix return in dpcd retrival.
Problem Details: Not returning here caused us to get a display port version of 0 for everything this caused power up to not get sent which ends up in a black screen. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index ebaf3f8cd602..65c82395c8e0 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c @@ -459,6 +459,7 @@ void radeon_dp_getdpcd(struct radeon_connector *radeon_connector) printk...
6a93cb250a60af1bb7b4070949f8546a2fdc52ef
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: i2c reorg
Problem Details: - keep the atom i2c id in the i2c rec - fix gpio regs for GPIO and MDGPIO on pre-avivo chips - track whether the i2c line is hw capable - track whether the i2c line uses the multimedia i2c block Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index d1c144be9734..fc5a2df4544b 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c @@ -52,7 +52,7 @@ bool radeon_process_aux_ch(struct radeon_i2c_chan *chan, u8 *req_bytes, args....
1a66c95a64c9ae0bc8382254f544b24b23f498ec
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: DP fixes and cleanup from the ddx
Problem Details: - dpcp -> dpcd - fix up dig encoder routing - aux transaction table takes delay in 10 usec units Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index a4bc80113385..d1c144be9734 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c @@ -34,7 +34,7 @@ #define DP_LINK_STATUS_SIZE 6 bool radeon_process_aux_ch(struct radeon_i2c_...
447aeb907e417e0e837b4a4026d5081c88b6e8ca
Analyze and fix the following issue in the Linux kernel code: drm/ttm: fix unreachable code.
Problem Details: None of the in-tree drivers use user objects yet so this wasn't hitting us. Stanse found unreachable code in ttm_bo_add_ttm: http://decibel.fi.muni.cz/~xslaby/stanse/error.cgi?db=32&id=714#l238 Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 87c06252d464..e13fd23f3334 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -275,9 +275,10 @@ static int ttm_bo_add_ttm(struct ttm_buffer_object *bo, bool zero_alloc) bo->ttm = ttm_tt_create(bdev, bo...
22dd50133ab7548adb23e86c302d6e8b75817e8c
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix vram setup on rs600/rs690/rs740
Problem Details: Don't remap vram to 0 on IGP chips. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c index 8d12b8a1ff13..eda6d757b5c4 100644 --- a/drivers/gpu/drm/radeon/rs400.c +++ b/drivers/gpu/drm/radeon/rs400.c @@ -352,7 +352,7 @@ static int rs400_mc_init(struct radeon_device *rdev) u32 tmp; /* Setup GPU memory space */ - tm...
2a008d0ccde4ce59a2714e132d5f86a0771e6422
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: more r4xx lvds fixes
Problem Details: Grab pll ref div from regs at driver init. r4xx seems very picky about the dividers for the pll driving lvds. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 89ac43881be9..fba3c96b915b 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -457,9 +457,8 @@ void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_...
6b02af1c1f35550ce1a9873841fe9c50b1613591
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms/legacy: set overscan regs on modeset
Problem Details: These can end up with garbage otherwise. fixes rh bug 537140 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c index 4a5f2d36efe6..1058ed0d373f 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c @@ -30,6 +30,18 @@ #include "radeon.h" #include "atom.h" +static ...
f0e5d2c959d5f14dd3bc879c8f9390aa2c049423
Analyze and fix the following issue in the Linux kernel code: ARM: dove: fix the mm mmu flags of the pj4 procinfo
Problem Details: ... to be the same as proc-v6 Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Nicolas Pitre <nico@marvell.com>
```diff diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 5485c821101c..395cc90c6613 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S @@ -254,10 +254,9 @@ __pj4_v6_proc_info: .long 0x560f5810 .long 0xff0ffff0 .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE |...
a589296a3592c8879cef8fd13518fed18c5fa5a3
Analyze and fix the following issue in the Linux kernel code: orinoco: remove spare KERN_DEBUG
Problem Details: A KERN_DEBUG didn't get removed when transitioning from printk to pr_debug Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/orinoco/hermes_dld.c b/drivers/net/wireless/orinoco/hermes_dld.c index a3eefe109df4..6d5660defd87 100644 --- a/drivers/net/wireless/orinoco/hermes_dld.c +++ b/drivers/net/wireless/orinoco/hermes_dld.c @@ -427,7 +427,7 @@ int hermesi_program_init(hermes_t *hw, u32 offset) if (...
70d57139f932b9ca21026253d02af71cf53d764a
Analyze and fix the following issue in the Linux kernel code: rtl8187: Fix wrong rfkill switch mask for some models
Problem Details: There are different bits used to convey the setting of the rfkill switch to the driver. The current driver only supports one of these possibilities. These changes were derived from the latest version of the vendor driver. This patch fixes the regression noted in kernel Bugzilla #14743. Signed-off-by:...
```diff diff --git a/drivers/net/wireless/rtl818x/rtl8187.h b/drivers/net/wireless/rtl818x/rtl8187.h index abb4907cf296..b1a24de0b7b0 100644 --- a/drivers/net/wireless/rtl818x/rtl8187.h +++ b/drivers/net/wireless/rtl818x/rtl8187.h @@ -23,6 +23,7 @@ #define RTL8187_EEPROM_TXPWR_CHAN_1 0x16 /* 3 channels */ #define RTL...
815833e7ecf0b9a017315cae6aef4d7cd9517681
Analyze and fix the following issue in the Linux kernel code: ath9k: fix tx status reporting
Problem Details: This patch fixes a bug in ath9k's tx status check, which caused mac80211 to consider regularly transmitted unicast frames as un-acked. When checking the ts_status field for errors, it needs to be masked with ATH9K_TXERR_FILT, because this field also contains other fields like ATH9K_TX_ACKED. Without th...
```diff diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 564c6cb1c2b4..2a11cc57ceea 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -2078,7 +2078,7 @@ static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) ...
1814077fd12a9cdf478c10076e9c42094e9d9250
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix bug in computing crc over dynamic IEs in beacon
Problem Details: On a 32-bit machine, BIT() macro does not give the required bit value if the bit is mroe than 31. In ieee802_11_parse_elems_crc(), BIT() is suppossed to get the bit value more than 31 (42 (id of ERP_INFO_IE), 37 (CHANNEL_SWITCH_IE), (42), 32 (POWER_CONSTRAINT_IE), 45 (HT_CAP_IE), 61 (HT_INFO_IE)). As w...
```diff diff --git a/net/mac80211/util.c b/net/mac80211/util.c index d09f78bb2442..78a6e924c7e1 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -579,7 +579,7 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len, if (elen > left) break; - if (calc_crc && id < 64 && (filter & BIT(id))) + if (c...
02f7f1793023bd8e5e277ad349f6f43f8c284fb0
Analyze and fix the following issue in the Linux kernel code: net/rfkill/core.c: work around gcc-4.0.2 silliness
Problem Details: net/rfkill/core.c: In function 'rfkill_type_show': net/rfkill/core.c:610: warning: control may reach end of non-void function 'rfkill_get_type_str' being inlined A gcc bug, but simple enough to squish. Cc: John W. Linville <linville@tuxdriver.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Dav...
```diff diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 448e5a0fcc2e..c218e07e5caf 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c @@ -579,6 +579,8 @@ static ssize_t rfkill_name_show(struct device *dev, static const char *rfkill_get_type_str(enum rfkill_type type) { + BUILD_BUG_ON(NUM_RFKILL_TYPES !...
89b872e2e476833cde8aaac658c75817f67e8f81
Analyze and fix the following issue in the Linux kernel code: mwl8k: increase firmware loading timeouts
Problem Details: The time between loading the helper image and starting to upload the main firmware image should be at least 5 ms or so. We were doing an msleep(1) before, and 1 ms appears to not be enough in almost all cases, but building with HZ=100 has always masked this so far. Bumping the msleep argument to 5 fi...
```diff diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index a16255810d15..e59a92618807 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -571,7 +571,7 @@ static int mwl8k_load_firmware(struct ieee80211_hw *hw) "helper image\n", pci_name(priv->pdev)); ...
ca00930153c14b323c31b97623ac5c4f7855ed6a
Analyze and fix the following issue in the Linux kernel code: mwl8k: fix addr4 zeroing and payload overwrite on DMA header creation
Problem Details: When inserting a DMA header into a packet for transmission, mwl8k_add_dma_header() would blindly zero the addr4 field, which is not a good idea if the packet being transmitted is actually a 4-address packet. Also, if the transmitted packet was a 4-address with QoS packet, the memmove() to do the neede...
```diff diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 6b12d81ba94b..c1cb20fceaff 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -728,35 +728,36 @@ static inline void mwl8k_remove_dma_header(struct sk_buff *skb, __le16 qos) static inline void mwl8k_add_d...
20f09c3df7a8a623c290f62596c1a6b0da088030
Analyze and fix the following issue in the Linux kernel code: mwl8k: prevent corruption of QoS field on receive
Problem Details: Packets exchanged between the mwl8k driver and the firmware always have a 4-address header without QoS field. For QoS packets, the QoS field is passed to/from the firmware via the tx/rx descriptors. We were handling this correctly on transmit, but not on receive -- if a QoS packet was received, we wo...
```diff diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 0251b6144f57..6b12d81ba94b 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -84,7 +84,8 @@ struct rxd_ops { int rxd_size; void (*rxd_init)(void *rxd, dma_addr_t next_dma_addr); void (*rxd_refill)(...
140eb5e2c1978622d7cd979d59a1c0586fe3bbdb
Analyze and fix the following issue in the Linux kernel code: mwl8k: fix UPDATE_STADB command struct legacy_rates array length
Problem Details: There exist 12 802.11b/g rates, but mwl8k supports two additional (non-standard) rates, and includes those rates in rate bitmasks and in its internal rate table that hardware rate indices index. Commit "mwl8k: report rate and other information for received frames" added one of the nonstandard rates to...
```diff diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index f93eddda9c0f..0251b6144f57 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -184,7 +184,7 @@ struct mwl8k_priv { /* PHY parameters */ struct ieee80211_supported_band band; struct ieee80211_channel...
0b5351a8e86292dfac1ca1451deaadb416a33cb8
Analyze and fix the following issue in the Linux kernel code: mwl8k: fix MCS bitmap size in SET_RATE command
Problem Details: The MCS bitmaps in the SET_RATE command structure were of the wrong size, due to use of the wrong define for the array length. Just hardcode the lengths as 16, and do the same for the MCS bitmaps in other command structures. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W...
```diff diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 0cb5ecc822a8..f93eddda9c0f 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -634,7 +634,6 @@ struct ewc_ht_info { #define MWL8K_PEER_TYPE_ACCESSPOINT 2 #define MWL8K_IEEE_LEGACY_DATA_RATES 13 -#defi...
7c3f4bbedc241ddcd3abe1f419c356e625231da1
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix dynamic power save for scanning.
Problem Details: Not only ps_sdata but also IEEE80211_CONF_PS is to be considered before restoring PS in scan_ps_disable(). For instance, when ps_sdata is set but CONF_PS is not set just because the dynamic timer is still running, a sw scan leads to setting of CONF_PS in scan_ps_disable instead of restarting the dynami...
```diff diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 419f186cfcf0..91dc8636d644 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -746,6 +746,7 @@ struct ieee80211_local { unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */ bool pspolling; + ...
bc83b6819289c031c439a5aa18ba0fd539d14f3e
Analyze and fix the following issue in the Linux kernel code: mac80211: recalculate idle later in MLME
Problem Details: hwsim testing has revealed that when the MLME recalculates the idle state of the device, it sometimes does so before sending the final deauthentication or disassociation frame. This patch changes the place where the idle state is recalculated, but of course driver transmit is typically asynchronous whi...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 6dc7b5ad9a41..d8d50fb5e823 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1083,8 +1083,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, ieee80211_set_wmm_default(sdata); - ieee80211_recalc_idle(local);...
de8df1ea489d80106ea82d4a6323e83d376913fb
Analyze and fix the following issue in the Linux kernel code: wl1251: fix bssid handling
Problem Details: bssid needs to be copied first in wl1251_op_bss_info_changed(), otherwise templates will have incorrect bssid and power save will not work correctly. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c index 8353139d85df..50d17fc00785 100644 --- a/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/drivers/net/wireless/wl12xx/wl1251_main.c @@ -1110,6 +1110,21 @@ static void wl1251_op_bss_info_changed(struct ieee8021...
9b1cb21c36b39057ec28a8b551f301449e5c51bb
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix warning from ieee80211_stop_tx_ba_cb_irqsafe argument change
Problem Details: CC [M] drivers/net/wireless/iwlwifi/iwl-tx.o drivers/net/wireless/iwlwifi/iwl-tx.c: In function ‘iwl_tx_agg_stop’: drivers/net/wireless/iwlwifi/iwl-tx.c:1356: warning: passing argument 1 of ‘ieee80211_stop_tx_ba_cb_irqsafe’ from incompatible pointer type include/net/mac80211.h:2128: note: expected ‘st...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 58b132f9cf28..00da5e152d46 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c @@ -1353,7 +1353,7 @@ int iwl_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid) if...
107f517b8f2a9d5858e640bc046606b1cff14bb5
Analyze and fix the following issue in the Linux kernel code: agp/intel: Fix product names and #defines
Problem Details: IGD* isn't a useful name. Replace with the codenames, as sourced from pci.ids. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
```diff diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 4068467ce7b9..37cb4e2b2328 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c @@ -36,10 +36,10 @@ #define PCI_DEVICE_ID_INTEL_82965GME_IG 0x2A12 #define PCI_DEVICE_ID_INTEL_82945GME_HB 0x27AC #def...
85364905f9ae12d19cb34099257d493e5d9a0c4e
Analyze and fix the following issue in the Linux kernel code: drm/i915: warn if Pineview CxSR can't be enabled
Problem Details: If we don't detect a supported memory configuration, we can't enable CxSR. Warn the user in this case so they can file a bug.
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 22dcd0851637..6b9dd672dd59 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4740,6 +4740,13 @@ void intel_modeset_init(struct drm_device *dev) (unsigned long)dev)...
22fd0fab3b512b5fcb4fd0b0668deeaa701511f9
Analyze and fix the following issue in the Linux kernel code: drm/i915: pageflip fixes
Problem Details: This patch brings the tree up to date with some fixes that were in a more recent version of the page flipping patch you applied. It fixes pre-965 flip support, removes a leftover hack that forced alignment, and initializes the pipe & plane CRTC mappings. Signed-off-by: Jesse Barnes <jbarnes@virtuousg...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 65b76fffd9e3..22dcd0851637 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1213,7 +1213,6 @@ intel_pin_and_fence_fb_obj(struct drm_device *dev, struct drm_gem_object *o...
878eaddd05d251cefa9632c2b8046833c5eead66
Analyze and fix the following issue in the Linux kernel code: cfq-iosched: Do not access cfqq after freeing it
Problem Details: Fix a crash during boot reported by Jeff Moyer. Fix the issue of accessing cfqq after freeing it. Reported-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <axboe@carl.(none)>
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 3815f9789b6a..cfb0b2f5f63d 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -2368,7 +2368,7 @@ static int cfq_dispatch_requests(struct request_queue *q, int force) static void cfq_put_queue(struct cfq_queue *cfqq) { struct cfq_data *c...
239642fe19adc19ba0a69e96f3b1904dfd6a3b9f
Analyze and fix the following issue in the Linux kernel code: edac: add memory types strings for debugging
Problem Details: Instead of using deeply-nested conditionals for dumping the DIMM type in debug mode, add a strings array of the supported DIMM types. This is useful in cases where an edac driver supports multiple DRAM types and is only defined in debug builds. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index c403af2e0081..708d065efc95 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -1024,10 +1024,7 @@ static enum mem_type amd64_determine_memory_type(struct amd64_pvt *pvt) type = (pvt->dclr0 & BIT(18)) ? MEM_DDR : M...
8566c4df1690f3862ae338a4c533f4bb5a863f9a
Analyze and fix the following issue in the Linux kernel code: amd64_edac: dump DIMM sizes on K8 too
Problem Details: Extend f10_debug_display_dimm_sizes to dump the logical DIMMs configuration on K8 revF too. Remove the ganged arg since we print the DCT operating mode (ganged vs unganged) earlier. Also, DCT csrow configuration is relevant therefore dump it as KERN_DEBUG instead of only on debug builds. Remove mislea...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index c65ad2d57e06..c6d1aed2943f 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -822,8 +822,7 @@ static enum edac_type amd64_determine_edac_cap(struct amd64_pvt *pvt) } -static void f10_debug_display_dimm_sizes(in...
68798e176012750fe8487bcfa0aa66fee21eae3c
Analyze and fix the following issue in the Linux kernel code: amd64_edac: cleanup DRAM cfg low debug output
Problem Details: Carve out the register-specific debug statements into a separate function, clarify meanings of the single bitfields in the register, remove irrelevant output and macros. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 3e5ece6e7c95..cdda8d469cad 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -825,31 +825,42 @@ static enum edac_type amd64_determine_edac_cap(struct amd64_pvt *pvt) static void f10_debug_display_dimm_sizes(int ctr...
6ba5dcdc44624677bba0bef1dcb93a524f88f8c1
Analyze and fix the following issue in the Linux kernel code: amd64_edac: wrap-up pci config read error handling
Problem Details: Add a pci config read wrapper for signaling pci config space access errors instead of them being visible only on a debug build. This is important on amd64_edac since it uses all those pci config register values to access the DRAM/DIMM configuration of the nodes. In addition, the wrapper makes a _lot_ ...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 70c7d5f5ba5e..3e5ece6e7c95 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -164,11 +164,9 @@ static int amd64_get_scrub_rate(struct mem_ctl_info *mci, u32 *bw) { struct amd64_pvt *pvt = mci->pvt_info; u32 scr...
e97f8bb8ce5611a855c5a0dba949706ec37d4155
Analyze and fix the following issue in the Linux kernel code: amd64_edac: make DRAM regions output more human-readable
Problem Details: Do not shift the TOP_MEM and TOP_MEM2 values by 23 but rather save the whole 64-bit value read from the MSR. Although the TOP_MEM/TOP_MEM2 bits are only a subset of the 64bit register, the values are correct since the remaining bits are Read-As-Zero and no shifting is needed. Also, cleanup DRAM base/l...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 0252a61f3d26..3408b94b1181 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -2399,16 +2399,14 @@ static void amd64_read_mc_registers(struct amd64_pvt *pvt) * Retrieve TOP_MEM and TOP_MEM2; no masking off of rese...
72381bd55e4ce2aaed8660551e8f56a2c959c11f
Analyze and fix the following issue in the Linux kernel code: amd64_edac: clarify DRAM CTL debug reporting
Problem Details: Make debug info formulations about the DRAM and DCT configuration of the machine more human readable. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index a38831c82649..0252a61f3d26 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -1402,27 +1402,36 @@ static void f10_read_dram_ctl_register(struct amd64_pvt *pvt) err = pci_read_config_dword(pvt->dram_f2_ctl, F10_DCT...
d3a2dbf844d81b4b9c9ad6044563c294e7a48cac
Analyze and fix the following issue in the Linux kernel code: perf probe: Use pr_debug for debug message
Problem Details: Use pr_debug() for "missing vmlinux" debugging message. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: systemtap <systemtap@sources.redhat.com> Cc: DLE <dle-develop@lists.sourceforge.net> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederi...
```diff diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index a58e11b7ea80..8993a1f4e1c3 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -194,8 +194,8 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) if (session.need_dwarf) die("Could not o...
849884508ecbe2d220131840e4cc7c32ca24ebe3
Analyze and fix the following issue in the Linux kernel code: perf probe: Check e_snprintf() format string
Problem Details: Check e_snprintf() format string by gcc, and fix a bug of e_snprintf() caller. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: systemtap <systemtap@sources.redhat.com> Cc: DLE <dle-develop@lists.sourceforge.net> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@...
```diff diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index de0d91385c91..88e180449933 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -47,6 +47,9 @@ #define semantic_error(msg ...) die("Semantic error :" msg) /* If there is no space to write, returns -...
e1d2017b24fb31602f1128e6a8b2afc54c9283cd
Analyze and fix the following issue in the Linux kernel code: perf probe: Fix event namelist to duplicate string
Problem Details: Fix event namelist to duplicate string. Without duplicating, adding multiple probes causes stack overwrite bug, because it reuses a buffer on stack while the buffer is already added in the namelist. String duplication solves this bug because only contents of the buffer is copied to the namelist. Signe...
```diff diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index cd7fbda5e2a5..de0d91385c91 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -413,12 +413,13 @@ static struct strlist *get_perf_event_names(int fd) rawlist = get_trace_kprobe_event_rawlist(fd); ...
d56728b8d7fb3e1e5e5f97b88fdf6b43a35b4f5e
Analyze and fix the following issue in the Linux kernel code: perf probe: Fix strtailcmp() to compare s1and s2[0]
Problem Details: Fix strtailcmp() to compare s1[0] and s2[0]. strtailcmp() returns 0 if "a" and "b" or "a" and "ab", it's a wrong behavior. This patch fixes it. Signed-off-by: "Juha Leppanen" <juha_motorsportcom@luukku.com> Acked-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: systemtap <systemtap@sources.redhat.com> C...
```diff diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 293cdfc1b8ca..4585f1d86792 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -106,7 +106,7 @@ static int strtailcmp(const char *s1, const char *s2) { int i1 = strlen(s1); int i2 = strlen(s2)...
1b52f2a41c41052d2a7c78af0bd9b8b11d70f49a
Analyze and fix the following issue in the Linux kernel code: Revert "pata_sis: Implement MWDMA for the UDMA 133 capable chips"
Problem Details: This reverts commit f20941f334d8fdb6b598658979709b4e94cd034b. Sergei Shtylyov notes "You call min() on uncomparables [in mwdma_clip_to_pio()], i.e. mwdma_to_pio[] contains XFER_PIO_* and adev->pio_mode - XFER_PIO_0 yields you a mode number. Thus the second argument will always "win" as a minimal one"...
```diff diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index 8af0dc88fd98..5c30d56dec84 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c @@ -252,25 +252,24 @@ static void sis_100_set_piomode (struct ata_port *ap, struct ata_device *adev) } /** - * sis_133_do_piomode - Initialize host c...
f8ec9d6837241865cf99bed97bb99f4399fd5a03
Analyze and fix the following issue in the Linux kernel code: ext4: Add new tracepoints to debug delayed allocation space functions
Problem Details: Add tracepoints for ext4_da_reserve_space(), ext4_da_update_reserve_space(), and ext4_da_release_space(). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 3e8afd969236..1a3d7b232cd7 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1061,6 +1061,7 @@ void ext4_da_update_reserve_space(struct inode *inode, int mdb_free = 0, allocated_meta_blocks = 0; spin_lock(&ei->i_block_reservation_lock); + trace_ext...
1f2acb6017d8528135ec3b01ab7cd2be6ea0630b
Analyze and fix the following issue in the Linux kernel code: ext4: Add block validity check when truncating indirect block mapped inodes
Problem Details: Add checks to ext4_free_branches() to make sure a block number found in an indirect block are valid before trying to free it. If a bad block number is found, stop freeing the indirect block immediately, since the file system is corrupt and we will need to run fsck anyway. This also avoids spamming the...
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 602d5ad6f5e7..307ecd13a762 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -377,6 +377,7 @@ struct ext4_new_group_data { */ #define EXT4_FREE_BLOCKS_METADATA 0x0001 #define EXT4_FREE_BLOCKS_FORGET 0x0002 +#define EXT4_FREE_BLOCKS_VALIDATED 0x0004 /*...
15121c18a22ae483279f76dc9e554334b800d0f7
Analyze and fix the following issue in the Linux kernel code: ext4: Fix optional-arg mount options
Problem Details: We have 2 mount options, "barrier" and "auto_da_alloc" which may or may not take a 1/0 argument. This causes the ext4 superblock mount code to subtract uninitialized pointers and pass the result to kmalloc, which results in very noisy failures. Per Ted's suggestion, initialize the args struct so that...
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 735c20d5fd56..68a55dffb360 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1229,6 +1229,11 @@ static int parse_options(char *options, struct super_block *sb, if (!*p) continue; + /* + * Initialize args struct so we know whether arg was + ...
a1de02dccf906faba2ee2d99cac56799bda3b96a
Analyze and fix the following issue in the Linux kernel code: ext4: fix async i/o writes beyond 4GB to a sparse file
Problem Details: The "offset" member in ext4_io_end holds bytes, not blocks, so ext4_lblk_t is wrong - and too small (u32). This caused the async i/o writes to sparse files beyond 4GB to fail when they wrapped around to 0. Also fix up the type of arguments to ext4_convert_unwritten_extents(), it gets ssize_t from ext...
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 874d169a193e..602d5ad6f5e7 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -139,8 +139,8 @@ typedef struct ext4_io_end { struct inode *inode; /* file being written to */ unsigned int flag; /* unwritten or not */ int error; /* I/O error code */ ...
0110ee152b69f8cbde19d8bc1dd59e197e419d76
Analyze and fix the following issue in the Linux kernel code: NFS: Fix up the declaration of nfs4_restart_rpc when NFSv4 not configured
Problem Details: Also rename it: it is used in generic code, and so should not have a 'nfs4' prefix. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index b1a020c11724..29e464d23b32 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -197,7 +197,6 @@ extern const u32 nfs41_maxwrite_overhead; #endif /* nfs4proc.c */ -extern void nfs4_restart_rpc(struct rpc_task *, const struct nfs_client *); #ifde...
a946d8f11f0da9cfc714248036fcfd3a794d1e27
Analyze and fix the following issue in the Linux kernel code: x86: Fix bogus warning in apic_noop.apic_write()
Problem Details: apic_noop is used to provide dummy apic functions. It's installed when the CPU has no APIC or when the APIC is disabled on the kernel command line. The apic_noop implementation of apic_write() warns when the CPU has an APIC or when the APIC is not disabled. That's bogus. The warning should only happe...
```diff diff --git a/arch/x86/kernel/apic/apic_noop.c b/arch/x86/kernel/apic/apic_noop.c index d9acc3bee0f4..e31b9ffe25f5 100644 --- a/arch/x86/kernel/apic/apic_noop.c +++ b/arch/x86/kernel/apic/apic_noop.c @@ -127,7 +127,7 @@ static u32 noop_apic_read(u32 reg) static void noop_apic_write(u32 reg, u32 v) { - WARN_O...
bd119ee29b447c521d66f6a5095fd3533d845da7
Analyze and fix the following issue in the Linux kernel code: [S390] etr/stp: put correct per cpu variable
Problem Details: Fix this compile error in linux-next: arch/s390/kernel/time.c: In function 'get_sync_clock': arch/s390/kernel/time.c:337: error: 'clock_sync_sync' undeclared (first use in this function) Gets exposed because the new per cpu code references the variable passed to put_cpu_var. This was not a real bug. ...
```diff diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 34162a0b2caa..75cdc0d02415 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -334,7 +334,7 @@ int get_sync_clock(unsigned long long *clock) sw0 = atomic_read(sw_ptr); *clock = get_clock(); sw1 = atomic_read(sw_ptr); -...
1b52fff059d660d4bf83d97c389dd80f1e6aad9a
Analyze and fix the following issue in the Linux kernel code: [S390] tape: fix tape remove function
Problem Details: Fix a bug introduced with git commit dff59b64af94dc58: - if (cdev->dev.driver_data != NULL) { + if (!dev_get_drvdata(&cdev->dev)) { These two are not equivalent. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 27503a778fcb..6311018e6543 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c @@ -665,7 +665,7 @@ tape_generic_remove(struct ccw_device *cdev) tape_cleanup_device(device); } - if (!dev_get_drvdat...
626350b63ef2cd447023d3dc2a34eaa7ca01bfff
Analyze and fix the following issue in the Linux kernel code: [S390] dasd: enable prefix independent of pav support
Problem Details: The DASD device driver needs to explicitly enable the prefix command on the storage server, before it can be used. Originally we enabled this command along with others only if we wanted to support PAV. However, today we require this command for other features like High Performance FICON as well, so we ...
```diff diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 5b909e6ad978..abb2ec836ee8 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -1012,9 +1012,9 @@ static struct dasd_ccw_req *dasd_eckd_build_psf_ssc(struct dasd_device *device, } psf_ssc_data ...