id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
5c0a889df56c9f6c5a68ec7aa222082569b35fd9
Analyze and fix the following issue in the Linux kernel code: au1xmmc: codingstyle tidying.
Problem Details: Clean up the codebase, no functional changes. - merge the au1xmmc.h header contents into the driver file, - indentation, spelling and style fixes. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index 16b5640d826e..fcbaf40e3553 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -49,20 +49,104 @@ #include <asm/mach-au1x00/au1xxx_dbdma.h> #include <asm/mach-au1x00/au1100_mmc.h> -#include <au1xxx.h> -#include...
12bd257532708a4d5be4b8548ff121a45ff88f5d
Analyze and fix the following issue in the Linux kernel code: at91_mci: Fix byte mode transitions.
Problem Details: The byte mode support fails to clear the byte mode bit in the command register, possibly leaving byte mode enabled with the counters programmed in non-byte mode. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Pierre Ossman <drzeus@dr...
```diff diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index f8c3f7c330e3..16df235fcc2e 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c @@ -579,7 +579,7 @@ static void at91_mci_send_command(struct at91mci_host *host, struct mmc_command ier = AT91_MCI_CMDRDY; } els...
ee53ab5d73998e502801c024a08de2c39a92c52a
Analyze and fix the following issue in the Linux kernel code: sdhci: make workaround for timeout bug more general
Problem Details: Give the quirk for broken timeout handling a better chance of handling more controllers by simply classifying the system as broken and setting a fixed value. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 5094fe805764..856bb2b2837e 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -98,7 +98,7 @@ static const struct sdhci_pci_fixes sdhci_ene_714 = { static const struct sdhci_pci_fixes sdhci_cafe = { ....
3815a0ebab678c20d0d9c66af5ee9e68807b6681
Analyze and fix the following issue in the Linux kernel code: sdhci: remove forced dma quirks
Problem Details: Remove the quirk to force DMA on the Ricoh and TI controllers as it is no longer needed. The only bug they have is that they use an incorrect PCI interface value, and that is not respected anymore. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 2a3dd6cc7bf7..51798ec56446 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -44,8 +44,7 @@ static const struct pci_device_id pci_ids[] __devinitdata = { .device = PCI_DEVICE_ID_RICOH_R5C822, .sub...
d54191b85e294c46f05a2249b1f55ae54930bcc7
Analyze and fix the following issue in the Linux kernel code: Kprobe smoke test lockdep warning
Problem Details: On Mon, 2008-04-21 at 18:54 -0400, Masami Hiramatsu wrote: > Thank you for reporting. > > Actually, kprobes tries to fixup thread's flags in post_kprobe_handler > (which is called from kprobe_exceptions_notify) by > trace_hardirqs_fixup_flags(pt_regs->flags). However, even the irq flag > is set in pt_r...
```diff diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index b8c6743a13da..43c019f85f0d 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c @@ -860,7 +860,6 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs) resume_execution(cur, regs, kcb); regs->flags |= kcb...
d0236f8f8223ad841f461ea3a635d452d194806b
Analyze and fix the following issue in the Linux kernel code: iucv: fix memory leak in cpu hotplug error path.
Problem Details: Fix memory leak in error path in CPU_UP_PREPARE notifier. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 531a206ce7a6..d8e0635aace0 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -567,8 +567,11 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self, return NOTIFY_BAD; iucv_param[cpu] = kmalloc_node(sizeof(union iucv_param), G...
0b57664cf2393bc1eff594ff7e5ff26533843fe6
Analyze and fix the following issue in the Linux kernel code: wireless: fix warnings from QoS patch
Problem Details: When I removed the special "default" meaning from the QoS parameters, I forgot to update drivers and this lead to warnings because some drivers were checking for the special values and putting in defaults. This fixes that by removing the default special-casing completely. Signed-off-by: Johannes Berg ...
```diff diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 381dbd33dfc2..e78319aa47c1 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -3073,53 +3073,20 @@ static void b43_qos_params_upload(struct b43_wldev *dev, u16 shm_offset) { u16 para...
089be43e403a78cd6889cde2fba164fefe9dfd89
Analyze and fix the following issue in the Linux kernel code: Revert "SELinux: allow fstype unknown to policy to use xattrs if present"
Problem Details: This reverts commit 811f3799279e567aa354c649ce22688d949ac7a9. From Eric Paris: "Please drop this patch for now. It deadlocks on ntfs-3g. I need to rework it to handle fuse filesystems better. (casey was right)"
```diff diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 91200feb3f9c..63f131fc42e4 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -555,15 +555,13 @@ static int selinux_set_mnt_opts(struct super_block *sb, struct task_security_struct *tsec = current->security; struct s...
4f13f548cef5af1717cbbc341a1a3474f3e7466e
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix BUG - JUMP error in kernel (relocation truncated to fit: R_pcrel12_jump_s)
Problem Details: Use long jump Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
```diff diff --git a/arch/blackfin/kernel/cplb-nompu/cplbhdlr.S b/arch/blackfin/kernel/cplb-nompu/cplbhdlr.S index 2788532de72b..ecbabc0a1fed 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbhdlr.S +++ b/arch/blackfin/kernel/cplb-nompu/cplbhdlr.S @@ -125,6 +125,6 @@ ENTRY(__cplb_hdr) SP += -12; call _panic_cplb_err...
d3a8eab093aab9f309d2e8d06cd718a4cb20e626
Analyze and fix the following issue in the Linux kernel code: bluetooth/hci_bcsp: fix bitrev Kconfig
Problem Details: Fix bluetooth hci_bcsp Kconfig to avoid build errors: drivers/built-in.o: In function `bcsp_prepare_pkt': hci_bcsp.c:(.text+0x7e9ac): undefined reference to `bitrev16' drivers/built-in.o: In function `bcsp_recv': hci_bcsp.c:(.text+0x7f276): undefined reference to `bitrev16' hci_bcsp.c:(.text+0x7f293):...
```diff diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig index 71a58a4e1795..a235ca787465 100644 --- a/drivers/bluetooth/Kconfig +++ b/drivers/bluetooth/Kconfig @@ -71,7 +71,7 @@ config BT_HCIUART_H4 config BT_HCIUART_BCSP bool "BCSP protocol support" depends on BT_HCIUART - select CONFIG_BITREVE...
2d92865158d0e21ef4350703af64bc2a610d81d3
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Use MOD_STAT_CFG command to get minimal page size
Problem Details: There was a bug in some versions of the mlx4 driver in mlx4_alloc_fmr(), which hardcoded the minimum acceptable page_shift to be 12. However, new ConnectX firmware can support a minimum page_shift of 9 (log_pg_sz of 9 returned by QUERY_DEV_LIM) -- so with old drivers, ib_fmr_alloc() would fail for ULP...
```diff diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c index d82f2751d2c7..2b5006b9be67 100644 --- a/drivers/net/mlx4/fw.c +++ b/drivers/net/mlx4/fw.c @@ -101,6 +101,34 @@ static void dump_dev_cap_flags(struct mlx4_dev *dev, u32 flags) mlx4_dbg(dev, " %s\n", fname[i]); } +int mlx4_MOD_STAT_CFG(str...
4ab928f69208d240d3681336f34589e4b151824f
Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb3: Fixes for zero STag
Problem Details: Handling the zero STag in receive work request requires some extra logic in the driver: - Only set the QP_PRIV bit for kernel mode QPs. - Add a zero STag build function for recv wrs. The uP needs a PBL allocated and passed down in the recv WR so it can construct a HW PBL for the zero STag S/G en...
```diff diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c index 340e4181c761..f6d5747153a5 100644 --- a/drivers/infiniband/hw/cxgb3/cxio_hal.c +++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c @@ -278,7 +278,7 @@ int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain, if ...
96f15c03532282366364ecfd20f04e49b5d96f3a
Analyze and fix the following issue in the Linux kernel code: RDMA/core: Add local DMA L_Key support
Problem Details: - Change the IB_DEVICE_ZERO_STAG flag to the transport-neutral name IB_DEVICE_LOCAL_DMA_LKEY, which is used by iWARP RNICs to indicate 0 STag support and IB HCAs to indicate reserved L_Key support. - Add a u32 local_dma_lkey member to struct ib_device. Drivers fill this in with the appropriate ...
```diff diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c index b1441aeb60c2..dd05c4835642 100644 --- a/drivers/infiniband/hw/amso1100/c2_rnic.c +++ b/drivers/infiniband/hw/amso1100/c2_rnic.c @@ -454,7 +454,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev) (IB_DE...
aed012279d35e88e29fd55737d8821604433f50a
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Fix check of max_send_sge for special QPs
Problem Details: The MLX transport requires two extra gather entries for sends (one for the header and one for the checksum at the end, as the comment says). However the code checked that max_recv_sge was not too big, instead of checking max_send_sge as it should have. Fix the code to check the correct condition. Sig...
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 77b52b3adcc7..f5081bfde6db 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -1249,10 +1249,10 @@ static int mthca_set_qp_size(struct mthca_dev *dev, struct ib_qp_...
d0de13622d5ac658efe7c51521dbdbe0752aa3dd
Analyze and fix the following issue in the Linux kernel code: IPoIB: Only set Q_Key once: after joining broadcast group
Problem Details: The current code will set the Q_Key for any join of a non-sendonly multicast group. The operation involves a modify QP operation, which is fairly heavyweight, and is only really required after the join of the broadcast group. Fix this by adding a parameter to ipoib_mcast_attach() to control when the ...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index b8753222c870..7b46e2d7b3c2 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -485,7 +485,7 @@ void ipoib_path_iter_read(struct ipoib_path_iter *iter, #endif int ipoib_...
a7d834c4bc6be73e8f83eaa5072fac3c5549f7f2
Analyze and fix the following issue in the Linux kernel code: IPoIB/cm: Fix racy use of receive WR/SGL in ipoib_cm_post_receive_nonsrq()
Problem Details: For devices that don't support SRQs, ipoib_cm_post_receive_nonsrq() is called from both ipoib_cm_handle_rx_wc() and ipoib_cm_nonsrq_init_rx(), and these two callers are not synchronized against each other. However, ipoib_cm_post_receive_nonsrq() always reuses the same receive work request and scatter l...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 6223fc39af70..37bf67b2a26f 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -111,18 +111,20 @@ static int ipoib_cm_post_receive_srq(struct net_device *dev, in...
97d1cc8055c7b3fbd35bf693775d61102e65d174
Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb3: Fix up some ib_device_attr fields
Problem Details: - set fw_ver - set hw_ver - set max_qp_wr to something reasonable - set max_cqe to something reasonable Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.h b/drivers/infiniband/hw/cxgb3/cxio_hal.h index 25a880664e6b..a9ff32c36211 100644 --- a/drivers/infiniband/hw/cxgb3/cxio_hal.h +++ b/drivers/infiniband/hw/cxgb3/cxio_hal.h @@ -45,13 +45,14 @@ #define T3_CTRL_QP_SIZE_LOG2 8 #define T3_CTRL_CQ_ID 0 -/* TB...
7c27f358209a8ce7c57b584346d7b611e823f1b1
Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Remove extra code for RESET->ERR QP state transition
Problem Details: Commit 65adfa91 ("IB/mlx4: Fix RESET to RESET and RESET to ERROR transitions") added some extra code to handle a QP state transition from RESET to ERROR. However, the latest 1.2.1 version of the IB spec has clarified that this transition is actually not allowed, so we can remove this extra code again....
```diff diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 76054a72f71b..44bbd6c2e315 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -1132,23 +1132,6 @@ out: return err; } -static const struct ib_qp_attr mlx4_ib_qp_attr = { .port_num = 1 }; -...
d3809ad0972297fbc7ef0585049ef465d9d8d79d
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Remove extra code for RESET->ERR QP state transition
Problem Details: Commit b18aad71 ("IB/mthca: Fix RESET to ERROR transition") added some extra code to handle a QP state transition from RESET to ERROR. However, the latest 1.2.1 version of the IB spec has clarified that this transition is actually not allowed, so we can remove this extra code again. Signed-off-by: Rol...
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 3b1c5baf13b1..77b52b3adcc7 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -848,23 +848,6 @@ out: return err; } -static const struct ib_qp_attr dummy_init_a...
e5a5e7d59af5944a674b9cea420a1fedc60496f2
Analyze and fix the following issue in the Linux kernel code: IB/core: Reset to error QP state transition is not allowed
Problem Details: I was reviewing the QP state transition diagram in the IB 1.2.1 spec and the code for qp_state_table[], and noticed that the code allows a QP to be modified from IB_QPS_RESET to IB_QPS_ERR whereas the notes for figure 124 (pg 457) specifically says that this transition isn't allowed. This is a clarifi...
```diff diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index e0fbe5975866..a7da9be43e61 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -315,7 +315,6 @@ static const struct { } qp_state_table[IB_QPS_ERR + 1][IB_QPS_ERR + 1] = { [IB_QPS_RESET] = { ...
a9474917099e007c0f51d5474394b5890111614f
Analyze and fix the following issue in the Linux kernel code: RDMA: Fix license text
Problem Details: The license text for several files references a third software license that was inadvertently copied in. Update the license to what was intended. This update was based on a request from HP. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 781ea5950373..e4eb8be3bb0c 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -4,28 +4,33 @@ * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. * Copyright (c) 2005 In...
08d2cf0f74b3ee5e773bb906043a0efe96ded229
Analyze and fix the following issue in the Linux kernel code: tipc: Fix bug in scope checking for multicast messages
Problem Details: This patch ensures that TIPC's multicast message name lookup algorithm does individualized scope checking for each published name it examines. Previously, scope checking was only done for the first name in a name table publication list, which could result in incoming multicast messages being delivered...
```diff diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 096f7bd240a0..1e53b0c8e73d 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c @@ -710,9 +710,11 @@ int tipc_nametbl_mc_translate(u32 type, u32 lower, u32 upper, u32 limit, if (sseq->lower > upper) break; publ = sseq->cluster_...
585583d95c5660973bc0cf64add517b040acd8a4
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix pte_update for CONFIG_PTE_64BIT and !PTE_ATOMIC_UPDATES
Problem Details: Because the pte is now 64-bits the compiler was optimizing the update to always clear the upper 32-bits of the pte. We need to ensure the clr mask is treated as an unsigned long long to get the proper behavior. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Josh Boyer <jwboyer@linux....
```diff diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 11eede4a2906..73015f0139de 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h @@ -624,7 +624,7 @@ static inline unsigned long long pte_update(pte_t *p, : "cc" ); #else /* PTE_A...
2da59918e26837f305131cfac9c0f1b3b42bb8ae
Analyze and fix the following issue in the Linux kernel code: tipc: Fix race condition that could cause accept() to fail
Problem Details: This patch ensurs that accept() returns successfully even when the newly created socket is immediately disconnected by its peer. Previously, accept() would fail if it was unable to pass back the optional address info for the socket's peer before the socket became disconnected; TIPC now allows accept() ...
```diff diff --git a/net/tipc/socket.c b/net/tipc/socket.c index ddcb2a753aa6..1848693ebb82 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -63,6 +63,7 @@ struct tipc_sock { struct sock sk; struct tipc_port *p; + struct tipc_portid peer_name; }; #define tipc_sk(sk) ((struct tipc_sock *)(sk)) @@ -377,...
7ff86b0317bc40c665aab62f3b7669713ade07c5
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix a build problem on ppc32 with new DMA_ATTRs
Problem Details: The new dma_attrs support must only be enabled for 64 bits as it's not been implemented for 32 bits yet. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 5e2185432ad3..06b72771ae22 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -113,7 +113,7 @@ config PPC select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_LMB - select HAVE_DMA_ATTRS + select HAVE_DMA_ATTRS if PPC64 confi...
83aa2e964b9b04effa304aaf3c1090b46812a04b
Analyze and fix the following issue in the Linux kernel code: netlabel: return msg overflow error from netlbl_cipsov4_list faster
Problem Details: Currently, we are trying to place the information from the kernel to 1, 2, 3 and 4 pages sequentially. These pages are allocated via slab. Though, from the slab point of view steps 3 and 4 are equivalent on most architectures. So, lets skip 3 pages attempt. By the way, should we switch from .doit to ....
```diff diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c index 9080c61b71a5..0aec318bf0ef 100644 --- a/net/netlabel/netlabel_cipso_v4.c +++ b/net/netlabel/netlabel_cipso_v4.c @@ -591,7 +591,7 @@ list_retry: if (nlsze_mult < 4) { rcu_read_unlock(); kfree_skb(ans_skb); - nlsze_mul...
f271b2cc78f09c93ccd00a2056d3237134bf994c
Analyze and fix the following issue in the Linux kernel code: tun: Fix/rewrite packet filtering logic
Problem Details: Please see the following thread to get some context on this http://marc.info/?l=linux-netdev&m=121564433018903&w=2 Basically the issue is that current multi-cast filtering stuff in the TUN/TAP driver is seriously broken. Original patch went in without proper review and ACK. It was broken and confusin...
```diff diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 2693f883ecda..901551c8ca0e 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -18,15 +18,11 @@ /* * Changes: * - * Brian Braunstein <linuxkernel@bristyle.com> 2007/03/23 - * Fixed hw address handling. Now net_device.dev_addr is kept cons...
89146504cbfeb120dd08ec7f9f8314c4986189b8
Analyze and fix the following issue in the Linux kernel code: 8021q: Check return of dev_set_promiscuity/allmulti
Problem Details: dev_set_promiscuity/allmulti might overflow. Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened. Here, we check all positive increment for promiscuity and allmulti to get error return. Signed-off-by: Wang ...
```diff diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 8efa399823e3..9efd3c67c1db 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -518,19 +518,35 @@ static int vlan_dev_open(struct net_device *dev) if (compare_ether_addr(dev->dev_addr, real_dev->dev_addr)) { err = dev_unicast_add(re...
b89fb7da2f9a69dd34ff10d45f66baa40ff8c0e5
Analyze and fix the following issue in the Linux kernel code: macvlan: Check return of dev_set_allmulti
Problem Details: allmulti might overflow. Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened. Here, we check the positive increment for allmulti to get error return. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Acked...
```diff diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index c02ceaa4a216..980001c2cf96 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -189,12 +189,20 @@ static int macvlan_open(struct net_device *dev) err = dev_unicast_add(lowerdev, dev->dev_addr, ETH_ALEN); if (err < 0) - return ...
7dc00c82cbb0119cf4663f65bbaa2cc55f961db2
Analyze and fix the following issue in the Linux kernel code: ipv4: Fix ipmr unregister device oops
Problem Details: An oops happens during device unregister. The following oops happened when I add two tunnels, which use a same device, and then delete one tunnel. Obviously deleting tunnel "A" causes device unregister, which send a notification, and after receiving notification, ipmr do unregister again for tunnel "B...
```diff diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 2f4d8afd067c..c9ab47b966b5 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -184,6 +184,7 @@ struct net_device *ipmr_new_tunnel(struct vifctl *v) if (dev_open(dev)) goto failure; + dev_hold(dev); } } return dev; @@ -250,6 +251,8 @@ st...
d607032db0ccd7274bee348df3214f6f52b24816
Analyze and fix the following issue in the Linux kernel code: ipv4: Check return of dev_set_allmulti
Problem Details: allmulti might overflow. Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened. Here, we check the positive increment for allmulti to get error return. PS: For unwinding tunnel creating, we let ipip->ioctl() ...
```diff diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 438fab9c62a0..2f4d8afd067c 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -118,6 +118,31 @@ static struct timer_list ipmr_expire_timer; /* Service routines creating virtual interfaces: DVMRP tunnels and PIMREG */ +static void ipmr_del_tunnel(struc...
7af3db78a99f47b9ff40b8cb0bb08160ad6a3d6b
Analyze and fix the following issue in the Linux kernel code: ipv6: Fix using after dev_put()
Problem Details: Patrick McHardy pointed it out. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 2dd832592a31..0b41aa2675f5 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -443,6 +443,7 @@ static struct net_device *ip6mr_reg_vif(void) if (dev_open(dev)) goto failure; + dev_hold(dev); return dev; failure: @@ -616,6 +617,7 @@ static i...
5ae7b444137143a4e067b80354171ab128eb1b2b
Analyze and fix the following issue in the Linux kernel code: ipv6: Check return of dev_set_allmulti
Problem Details: allmulti might overflow. Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened. Here, we check the positive increment for allmulti to get error return. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Acked...
```diff diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index cfac26d674ed..2dd832592a31 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -595,6 +595,7 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock) int vifi = vifc->mif6c_mifi; struct mif_device *v = &vif6_table[vifi]; struct net_device *dev; +...
bc3f9076f671f128c82022428992c30be57f22d5
Analyze and fix the following issue in the Linux kernel code: bridge: Check return of dev_set_promiscuity
Problem Details: dev_set_promiscuity/allmulti might overflow. Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened. Here, we check the positive increment for promiscuity to get error return. Signed-off-by: Wang Chen <wangche...
```diff diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 497df086141a..a072ea5ca6f5 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -373,6 +373,10 @@ int br_add_if(struct net_bridge *br, struct net_device *dev) if (IS_ERR(p)) return PTR_ERR(p); + err = dev_set_promiscuity(dev, 1); + if (err...
7e1a1ac1fbaa88fe254400b7f30b775502932ad3
Analyze and fix the following issue in the Linux kernel code: bonding: Check return of dev_set_promiscuity/allmulti
Problem Details: dev_set_promiscuity/allmulti might overflow. Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened. In bond_alb and bond_main, we check all positive increment for promiscuity and allmulti to get error return. ...
```diff diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 5a673725471c..b211486a0ca3 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -419,8 +419,10 @@ static void rlb_teach_disabled_mac_on_primary(struct bonding *bond, u8 addr[]) } if (!bond->al...
2aeb0b88b3c7a0e3bef55e7ff0efffd5d971aa57
Analyze and fix the following issue in the Linux kernel code: af_packet: Check return of dev_set_promiscuity/allmulti
Problem Details: dev_set_promiscuity/allmulti might overflow. Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened. In af_packet, we check all positive increment for promiscuity and allmulti to get error return. Signed-off-...
```diff diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index beca6402f1cf..9f2269166687 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1173,7 +1173,8 @@ static int packet_getname(struct socket *sock, struct sockaddr *uaddr, return 0; } -static void packet_dev_mc(struct net_devic...
4d3702b62e004172f44870763cf56793d8de0cbf
Analyze and fix the following issue in the Linux kernel code: x86: Rename "ignore" macro in <asm/dwarf2.h> to avoid collision
Problem Details: Commit 70f1bba4 ("x86: use ignore macro instead of hash comment") breaks the 64-bit x86 build on toolchains that have CONFIG_AS_CFI undefined with: arch/x86/lib/csum-copy_64.S:48: Error: Macro `ignore' was already defined because <asm/dwarf2.h> now uses the ignore macro name itself. Fix this by ...
```diff diff --git a/include/asm-x86/dwarf2.h b/include/asm-x86/dwarf2.h index 0bfe250894f7..fd4a6a0393ac 100644 --- a/include/asm-x86/dwarf2.h +++ b/include/asm-x86/dwarf2.h @@ -38,23 +38,23 @@ /* Due to the structure of pre-exisiting code, don't use assembler line comment character # to ignore the arguments. I...
ad1f8bf073e1c1996bb37b669352e3d7b1eb2b1f
Analyze and fix the following issue in the Linux kernel code: Fix accidental reference to tg3 firmware
Problem Details: We're not updating the tg3 driver to use request_firmware() yet, but a reference to its firmware accidentally slipped in as part of commit c4667746 ("dabusb: use request_firmware()"). Remove it again. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Reported-by: Yinghai Lu <yhlu.kernel@gmail...
```diff diff --git a/firmware/Makefile b/firmware/Makefile index 809a52624bda..e4f2fb3d1917 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -34,8 +34,6 @@ fw-shipped-$(CONFIG_SND_SB16_CSP) += sb16/mulaw_main.csp sb16/alaw_main.csp \ sb16/ima_adpcm_capture.csp fw-shipped-$(CONFIG_SND_YMFPCI) += yama...
7c29217096d83f657e6ee70479af09b46f4275f6
Analyze and fix the following issue in the Linux kernel code: powerpc: fix giveup_vsx to save registers correctly
Problem Details: giveup_vsx didn't save the FPU and VMX regsiters. Change it to be like giveup_fpr/altivec which save these registers. Also update call sites where FPU and VMX are already saved to use the original giveup_vsx (renamed to __giveup_vsx). Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by:...
```diff diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index 31b9026cf1e3..4dd70cf7bb4e 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S @@ -508,12 +508,12 @@ _GLOBAL(giveup_altivec) #ifdef CONFIG_VSX /* - * giveup_vsx(tsk) - * Disable VSX for the task given...
c157dfa3e4aea5775389f2f4d53c040bc8813af1
Analyze and fix the following issue in the Linux kernel code: PCI PM: Fix pci_prepare_to_sleep
Problem Details: The recently introduced pci_prepare_to_sleep() needs the following fix, because there are systems which are not power manageable by ACPI (ie. ACPI doesn't provide methods to put the device into low power states and back), but require ACPI hooks to be executed for wake-up to work. Signed-off-by: Rafael...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e632a58ba5d0..ace518116cc5 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1152,7 +1152,6 @@ int pci_prepare_to_sleep(struct pci_dev *dev) break; default: target_state = state; - pci_enable_wake(dev, target_state, true); } } ...
beef3129b3afb74817acff72fda4a9d951e3973e
Analyze and fix the following issue in the Linux kernel code: x86/PCI: Fix PCI config space for domains > 0
Problem Details: John Keller reports that PCI config space access is broken on machines with more than one domain. conf1 accesses only work for domain 0, so make sure we check the domain number in the raw routines before trying conf1. Reported-by: John Keller <jpk@sgi.com> Signed-off-by: Matthew Wilcox <willy@linux.i...
```diff diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index d19fd07bafd6..86aff81a0829 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -32,7 +32,7 @@ struct pci_raw_ops *raw_pci_ext_ops; int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, ...
e75206517504461778c283b942440ef312e437d5
Analyze and fix the following issue in the Linux kernel code: configfs: call drop_link() to cleanup after create_link() failure
Problem Details: When allow_link() succeeds but create_link() fails, the subsystem is not informed of the failure. This patch fixes this by calling drop_link() on create_link() failures. Signed-off-by: Louis Rilling <Louis.Rilling@kerlabs.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
```diff diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c index faeb4417a10d..0004d18c40ac 100644 --- a/fs/configfs/symlink.c +++ b/fs/configfs/symlink.c @@ -140,8 +140,12 @@ int configfs_symlink(struct inode *dir, struct dentry *dentry, const char *symna goto out_put; ret = type->ct_item_ops->allow_lin...
6d8344baee99402de58b5fa5dfea197242955c15
Analyze and fix the following issue in the Linux kernel code: configfs: Fix failing mkdir() making racing rmdir() fail
Problem Details: When fixing the rename() vs rmdir() deadlock, we stopped locking default groups' inodes in configfs_detach_prep(), letting racing mkdir() in default groups proceed concurrently. This enables races like below happen, which leads to a failing mkdir() making rmdir() fail, despite the group to remove havin...
```diff diff --git a/fs/configfs/configfs_internal.h b/fs/configfs/configfs_internal.h index 5a33b58e66da..da015c12e3ea 100644 --- a/fs/configfs/configfs_internal.h +++ b/fs/configfs/configfs_internal.h @@ -48,6 +48,7 @@ struct configfs_dirent { #define CONFIGFS_USET_DIR 0x0040 #define CONFIGFS_USET_DEFAULT 0x0080 #...
b3e76af87441fc36eef3516d73ab2314e7b2d911
Analyze and fix the following issue in the Linux kernel code: configfs: Fix deadlock with racing rmdir() and rename()
Problem Details: This patch fixes the deadlock between racing sys_rename() and configfs_rmdir(). The idea is to avoid locking i_mutexes of default groups in configfs_detach_prep(), and rely instead on the new configfs_dirent_lock to protect against configfs_dirent's linkage mutations. To ensure that an mkdir() racing ...
```diff diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 918a332babfe..d5b5985716ba 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -43,6 +43,10 @@ DECLARE_RWSEM(configfs_rename_sem); * and configfs_dirent_lock locked, in that order. * This allows one to safely traverse configfs_dirent trees and s...
5301a77da2da1e4c22573e0e8d394a653b8ad9f9
Analyze and fix the following issue in the Linux kernel code: configfs: Protect configfs_dirent s_links list mutations
Problem Details: Symlinks to a config_item are listed under its configfs_dirent s_links, but the list mutations are not protected by any common lock. This patch uses the configfs_dirent_lock spinlock to add the necessary protection. Note: we should also protect the list_empty() test in configfs_detach_prep() but 1/ t...
```diff diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 2619f485bc3d..a08e5c2f25e8 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -37,10 +37,11 @@ DECLARE_RWSEM(configfs_rename_sem); /* * Protects mutations of configfs_dirent linkage together with proper i_mutex + * Also protects mutations of sy...
e407e39783a7206d20b3e9961aedf272de966e31
Analyze and fix the following issue in the Linux kernel code: ocfs2: Fix CONFIG_OCFS2_DEBUG_FS #ifdefs
Problem Details: A couple places use OCFS2_DEBUG_FS where they really mean CONFIG_OCFS2_DEBUG_FS. Reported-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Joel Becker <joel.becker@oracle.com>
```diff diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 9698338adc39..a8c19cb3cfdd 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -329,7 +329,7 @@ int ocfs2_extend_trans(handle_t *handle, int nblocks) mlog(0, "Trying to extend transaction by %d blocks\n", nblocks); -#ifdef OCFS2_DEBUG_FS +...
461c6a30eca6f25add1dadb9fd8a1d8e89a6e627
Analyze and fix the following issue in the Linux kernel code: ocfs2/net: Silence build warnings on sparc64
Problem Details: suseconds_t is type long on most arches except sparc64 where it is type int. This patch silences the following warnings that are generated when building on it. netdebug.c: In function 'nst_seq_show': netdebug.c:152: warning: format '%lu' expects type 'long unsigned int', but argument 13 has type 'suse...
```diff diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index 7bf3c0ea7bd9..d8bfa0eb41b2 100644 --- a/fs/ocfs2/cluster/netdebug.c +++ b/fs/ocfs2/cluster/netdebug.c @@ -146,8 +146,10 @@ static int nst_seq_show(struct seq_file *seq, void *v) nst->st_task->comm, nst->st_node, nst->st_s...
dd25e55ea133b14678cfaa9e205b082b24b26dbc
Analyze and fix the following issue in the Linux kernel code: ocfs2: fix printk format warnings with OCFS2_FS_STATS=n
Problem Details: Fix printk format warnings when OCFS2_FS_STATS=n: linux-next-20080528/fs/ocfs2/dlmglue.c: In function 'ocfs2_dlm_seq_show': linux-next-20080528/fs/ocfs2/dlmglue.c:2623: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'int' linux-next-20080528/fs/ocfs2/dlmglue.c:26...
```diff diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 80537b769e41..eae3d643a5e4 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -2592,12 +2592,12 @@ static int ocfs2_dlm_seq_show(struct seq_file *m, void *v) # define lock_max_exmode(_l) (_l)->l_lock_max_exmode # define lock_refresh(_l) (_l...
f09f71b24e77a2f2b4e5c98311c8804fc61ad8bc
Analyze and fix the following issue in the Linux kernel code: i2c-au1550: Fix PM support
Problem Details: Fix driver power management: - suspend the PSC while driver is idle. - move PSC init/deinit to separate functions, as PSC must be initialized/shutdown on resume/suspend. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c index cae9dc89d88c..66a04c2c660f 100644 --- a/drivers/i2c/busses/i2c-au1550.c +++ b/drivers/i2c/busses/i2c-au1550.c @@ -269,9 +269,13 @@ static int au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) { struct...
392a0408fdc4c9069c32a9a02b0088eae76c4618
Analyze and fix the following issue in the Linux kernel code: i2c-sibyte: SWARM I2C board initialization
Problem Details: The standard rtc-m41t80.c driver cannot be used with the SWARM as it is, because the board does not provide setup information for the I2C core. As a result the bus and the address to probe for the M41T80 chip is not known. Here is a set of changes that fix the problem: 1. swarm-i2c.c -- SWARM I2C ...
```diff diff --git a/arch/mips/sibyte/swarm/Makefile b/arch/mips/sibyte/swarm/Makefile index 1775755a2619..255d692bfa18 100644 --- a/arch/mips/sibyte/swarm/Makefile +++ b/arch/mips/sibyte/swarm/Makefile @@ -1,3 +1,4 @@ obj-y := setup.o rtc_xicor1241.o rtc_m41t81.o +obj-$(CONFIG_I2C_BOARDINFO) += swarm-i2c.o obj-...
cf898dc5e9dfd1487b28ca0176b68722f05d4d48
Analyze and fix the following issue in the Linux kernel code: i2c-i801: Fix handling of error conditions
Problem Details: Move the check of pre-transaction and post-transaction conditions to separate functions, and adjust them a bit. Having dedicated functions for that ensures that errors are handled in a consistent way. Bit HOST_BUSY of the status register is read-only, so writing to it is certainly not going to clear i...
```diff diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 73bd8552734c..46aa41f73fdd 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -4,7 +4,7 @@ Copyright (c) 1998 - 2002 Frodo Looijaard <frodol@dds.nl>, Philip Edelbrock <phil@netroedge.com>, ...
3b270804a9345e4a0c493889f98e838692f7bc9b
Analyze and fix the following issue in the Linux kernel code: i2c-cpm: Bugfixes
Problem Details: Bugfixes to the i2c-cpm driver - enable correct interrupts (I2CER_TXE instead of I2CER_BUSY) - replace forgotten iic with i2c - prefix debug-output on init with 0x and add frequency Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Jean De...
```diff diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index 1c955a82dcca..53af744a91c1 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c @@ -240,7 +240,7 @@ static void cpm_i2c_parse_message(struct i2c_adapter *adap, eieio(); setbits16(&tbdf->cbd_sc, BD_SC_REA...
7650da023eb05426812bbf8999b69dc93fee67ab
Analyze and fix the following issue in the Linux kernel code: i2c-pca-platform: Fix error code
Problem Details: Fix errorcode to be more descriptive when ioremap fails. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c index 9d75f51e8f0e..6bb15ad0a6b6 100644 --- a/drivers/i2c/busses/i2c-pca-platform.c +++ b/drivers/i2c/busses/i2c-pca-platform.c @@ -163,7 +163,7 @@ static int __devinit i2c_pca_pf_probe(struct platform_device *pdev) i...
c80ebe7987931ec4e80abc33ebf8aa2dad0d3763
Analyze and fix the following issue in the Linux kernel code: i2c-pca-algo: Fix error code
Problem Details: Give a more concrete error code, when the bus is not idle. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c index e954a20b97a6..d50b329a3c94 100644 --- a/drivers/i2c/algos/i2c-algo-pca.c +++ b/drivers/i2c/algos/i2c-algo-pca.c @@ -182,7 +182,7 @@ static int pca_xfer(struct i2c_adapter *i2c_adap, } if (state != 0xf8) { dev_dbg(&i2c_...
fa63cd56d2f09806169307d761e8f430e23bc09b
Analyze and fix the following issue in the Linux kernel code: i2c-piix4: Various cleanups and minor fixes
Problem Details: The i2c-piix4 driver was used recently as a model to write a new SMBus host controller driver and this made me realize that the code of this old driver wasn't exactly good. So, here are many cleanups and minor fixes to this driver, so that these minor mistakes aren't duplicated again: * Delete unused ...
```diff diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index dc76c0e2dc65..77aaa5fe5e38 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -42,13 +42,6 @@ #include <asm/io.h> -struct sd { - const unsigned short mfr; - const unsigned short dev; - const ...
6ea438ec8da4ec56bf415f5ea360e6b0cb59c6c3
Analyze and fix the following issue in the Linux kernel code: i2c: i2c_use_client() defends against NULL
Problem Details: Defend the i2c refcount calls against NULL pointers, as is important (and conventional) for such calls. Note that none of the current callers of i2c_use_client() use its return value. [JD: I hate this but apparently all the other subsystems do it so...] Signed-off-by: David Brownell <dbrownell@users...
```diff diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 527d51319f3c..b995502400b8 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -866,8 +866,9 @@ EXPORT_SYMBOL(i2c_detach_client); */ struct i2c_client *i2c_use_client(struct i2c_client *client) { - get_device(&client->dev); -...
5a0d5f5ffa5d294d895ef54fc220c6182db63998
Analyze and fix the following issue in the Linux kernel code: i2c-davinci: Fix signal handling bug
Problem Details: If wait_for_completion_interruptible_timeout exits due to a signal, the i2c bus was locking up. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Kevin Hilman <khilman@mvista.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index c56f8fe4efe5..160857296952 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -85,6 +85,7 @@ #define DAVINCI_I2C_MDR_MST (1 << 10) #define DAVINCI_I2C_MDR_TRX (1 << 9) #define DAVINCI_I...
0ab56e20674b41dd0203d16b602aac8d9d26a70a
Analyze and fix the following issue in the Linux kernel code: i2c-davinci: Remove useless IVR read
Problem Details: Interrupts are enabled at the point where the DAVINCI_I2C_IVR_REG is read, so unless an interrupt happened just at that moment, no interrupt would be pending. Even though documentation implies you should do this, I see no reason. If slave support is added, this read would cause a hard to reproduce bug....
```diff diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 85097fdc75e4..c56f8fe4efe5 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -240,7 +240,6 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop) struct davinc...
341c2c958ec7bdd9f54733a8b0b432fe76842a82
Analyze and fix the following issue in the Linux kernel code: libata: consistently use msecs for time durations
Problem Details: libata has been using mix of jiffies and msecs for time druations. This is getting confusing. As writing sub HZ values in jiffies is PITA and msecs_to_jiffies() can't be used as initializer, unify unit for all time durations to msecs. So, durations are in msecs and deadlines are in jiffies. ata_dead...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 303fc0d2b978..c5c3b1b516e1 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -54,7 +54,6 @@ #include <linux/completion.h> #include <linux/suspend.h> #include <linux/workqueue.h> -#include <linux/jiffies.h> #incl...
18c60c0a3b16fc7d6a55497a228602ad8509f838
Analyze and fix the following issue in the Linux kernel code: dlm: fix uninitialized variable for search_rsb_list callers
Problem Details: gcc 4.3.0 correctly emits the following warning. search_rsb_list does not *r_ret if no dlm_rsb is found and _search_rsb may pass the uninitialized value upstream on the error path when both calls to search_rsb_list return non-zero error. The fix sets *r_ret to NULL on search_rsb_list's not-found path....
```diff diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 7ba9586a0943..724ddac91538 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -363,6 +363,7 @@ static int search_rsb_list(struct list_head *head, char *name, int len, if (len == r->res_length && !memcmp(name, r->res_name, len)) goto found; } + *r_ret = NU...
329fc4c37212588091b64bdf09afaeb18642aae2
Analyze and fix the following issue in the Linux kernel code: dlm: fix basts for granted CW waiting PR/CW
Problem Details: The fix in commit 3650925893469ccb03dbcc6a440c5d363350f591 was addressing the case of a granted PR lock with waiting PR and CW locks. It's a special case that requires forcing a CW bast. However, that forced CW bast was incorrectly applying to a second condition where the granted lock was CW. So, th...
```diff diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 2d3d1027ce2b..7ba9586a0943 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -1782,7 +1782,8 @@ static void grant_pending_locks(struct dlm_rsb *r) list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) { if (lkb->lkb_bastfn && lock_requires_b...
3eb2011a67b044859069359948579b942993c416
Analyze and fix the following issue in the Linux kernel code: iwlwifi: make index unsigned int for iwl_send_led_cmd
Problem Details: This is a small fix to change the idx type from int to unsigned. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-led.h b/drivers/net/wireless/iwlwifi/iwl-3945-led.h index 6463e6e34aaa..47b7e0bac802 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-led.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.h @@ -54,7 +54,7 @@ struct iwl3945_led { int (*led_on) (struct iwl394...
9a9ad0cda72a651fc6b99fa9ec040a5d41005a88
Analyze and fix the following issue in the Linux kernel code: iwlwifi: Fix LEDs for 3945
Problem Details: The patch fixes LEDs problem for 3945. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-led.c b/drivers/net/wireless/iwlwifi/iwl-3945-led.c index 8b1528e52d43..6be1fe13fa57 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.c @@ -42,14 +42,11 @@ #include "iwl-3945.h" #include "iwl-helpers.h" ...
36da7d70e307f8650db1b1c7350d2161ca3829ef
Analyze and fix the following issue in the Linux kernel code: iwlwifi: send TXPOWER command after a new RXON command
Problem Details: The patch fixes the problem that TXPOWER command is not sent after we issue a new RXON command which requires a tune. Otherwise we won't be able to Tx any frames. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 55648a8c88a2..71f5da3fe5c4 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c @@ -328,16 +328,6 @@ static int iwl4965_commit_rxon(struct iwl_priv *...
0eee612731e133604023bfa8d20047e98160845e
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix LED stall
Problem Details: This patch fixes LED stall. last_blink_time was updated only if LED command was sent, causing wrong computation of the througput. Some code cleanup comes with this patch as well Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linvi...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 92a37664d453..bd06e0f87113 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h @@ -933,7 +933,7 @@ struct iwl_priv { #endif #ifdef CONFIG_IWLWIFI_LEDS - struct iwl4...
1ff50bda6eef4466366e197541508fc69af0f0c0
Analyze and fix the following issue in the Linux kernel code: iwlwifi: make iwl4965_mac_conf_tx in atomic context
Problem Details: This patch fixes iwl4965_mac_conf_tx. A mutex was taken in atomic context leading to Oops. This patch removes the mutex and extends the hold priv->lock. None of the field of QOS is accessed without priv->lock held. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Win...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index d877039e2d45..92754ee49e45 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h @@ -725,7 +725,7 @@ struct iwl4965_csa_notification { * transmissio...
6c5379077f47f6eff9c23caf8513751d2f582e72
Analyze and fix the following issue in the Linux kernel code: iwlwifi: rs always set lq_sta->priv
Problem Details: This patch fixes printk NULL pointer exceptions in rs code. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Guy Cohen <guy.cohen@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c index c7ebb3bf06f5..3ccb84aa5dbc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c @@ -2265,9 +2265,7 @@ static void rs_rate_init(void *priv_rate, void *pri...
a326a5d096f031af46c0073dd78eb80dea1f311a
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fixes RTS / CTS support
Problem Details: This patch fixes the RTS / CTS support in iwlwifi. 5000 will send CTS to self when allowed by spec, 4965 will send RTS or CTS to self according to mac80211 request. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu ...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 04365b39279c..e0e43bdb05e0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c @@ -642,6 +642,18 @@ static void iwl4965_gain_computation(struct iwl_priv *priv, da...
df70b4aca5ef8a154a32ecbdd3c322d6d41a0d33
Analyze and fix the following issue in the Linux kernel code: mac80211 hwsim: fix endianness bug
Problem Details: Radiotap is entirely little endian. Found with sparse. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 5d30c57e3969..913dc9fe08f9 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -126,7 +126,7 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw, (1...
f434b2d111d9ff84ebdd0f11a7ae42c761453259
Analyze and fix the following issue in the Linux kernel code: mac80211: fix struct ieee80211_tx_queue_params
Problem Details: Multiple issues: - there are no "default" values needed - cw_min/cw_max can be larger than documented - restructure to decrease size - use get_unaligned_le16 Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 1dbd49fc557e..24a69f6075c2 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -115,17 +115,17 @@ enum ieee80211_max_queues { * The information provided in this structure is required for QoS * transmit queue configuration. Cf...
f591fa5dbbbeaebd95c9c019b3a536a327fb79de
Analyze and fix the following issue in the Linux kernel code: mac80211: fix TX sequence numbers
Problem Details: This patch makes mac80211 assign proper sequence numbers to QoS-data frames. It also removes the old sequence number code because we noticed that only the driver or hardware can assign sequence numbers to non-QoS-data and especially management frames in a race-free manner because beacons aren't passed ...
```diff diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index bf6f6c1ed4cf..8d54502222a6 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c @@ -317,7 +317,8 @@ int b43_generate_txhdr(struct b43_wldev *dev, /* MAC control */ if (!(info->flags & IEEE80211...
1411f9b531f0a910cd1c85a337737c1e6ffbae6a
Analyze and fix the following issue in the Linux kernel code: mac80211: fix RX sequence number check
Problem Details: According to 802.11-2007, we are doing the wrong thing in the sequence number checks when receiving frames. This fixes it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index ba332c9dc19a..6d9ae67c27ca 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -334,13 +334,18 @@ static void ieee80211_parse_qos(struct ieee80211_rx_data *rx) else rx->flags &= ~IEEE80211_RX_AMSDU; } else { - if (unlikely(ieee80211_is_mgm...
2560b6e2e4b87df211ea39b3b02498959b70b4e8
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix ieee80211_rx_reorder_ampdu: ignore QoS null packets
Problem Details: This patch fixes the check at the entrance to ieee80211_rx_reorder_ampdu. This check has been broken by 'mac80211: rx.c use new helpers'. Letting QoS NULL packet in ieee80211_rx_reorder_ampdu led to packet loss in RX. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas...
```diff diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 244ee2d50a58..ba332c9dc19a 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2041,8 +2041,8 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local, tid_agg_rx = sta->ampdu_mlme.tid_rx[tid]; - /* null data frames are excluded ...
9c0c7a429a0cf02c2ac1998d5cf4c26f6be5c989
Analyze and fix the following issue in the Linux kernel code: ssb: Include dma-mapping.h
Problem Details: ssb.h implements DMA mapping functions, so it should include dma-mapping.h. This fixes compile failures on certain architectures. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 0fe5a0ded3ea..4bf8cade9dbc 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h @@ -7,6 +7,7 @@ #include <linux/spinlock.h> #include <linux/pci.h> #include <linux/mod_devicetable.h> +#include <linux/dma-mapping.h> #include ...
500c11973233437cbfd298b9d41ba942550aec76
Analyze and fix the following issue in the Linux kernel code: rtl8187: Fixed section mismatch in rtl8187_dev.c
Problem Details: When CONFIG_HOTPLUG=n the following error occures on vmlinux linkage: `.exit.text' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o 'rtl8187_disconnect' function marked as __devexit isn't compiled with no hotplug support. Added __dev...
```diff diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index 33527e58256f..bdea1d8ad8ef 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c @@ -1180,7 +1180,7 @@ static struct usb_driver rtl8187_driver = { .name = KBUILD_MODNAME, .id_table ...
9a613195123ab2c2400004c7aaee4d25f3b8ae52
Analyze and fix the following issue in the Linux kernel code: rt2x00: Fix NULL pointer error in adhoc/master mode
Problem Details: As soon as an interface is enabled, and that interface is in adhoc or master mode, the device will start raising beacondone interrupts. But before the first interrupt is raised, mac80211 will probably not have send any beacons to the device yet, which results in a NULL pointer error when the skb is bei...
```diff diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 3ddce538ef4a..ecf57f8f34b2 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c @@ -108,6 +108,9 @@ void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, ...
7d0db0a373195385a2e0b19d1f5e4b186fdcffac
Analyze and fix the following issue in the Linux kernel code: [Bluetooth] Use a more unique bus name for connections
Problem Details: When attaching Bluetooth low-level connections to the bus, the bus name is constructed from the remote address since at that time the connection handle is not assigned yet. This has worked so far, but also caused a lot of troubles. It is better to postpone the creation of the sysfs entry to the time wh...
```diff diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 0d4b8aeb8e09..ca8d05245ca0 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -245,8 +245,6 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) if (hdev->notify) hdev->notify(hdev, HCI_NO...
3fd44736db9a5bf33e4a216b9cd43c9cfd57c459
Analyze and fix the following issue in the Linux kernel code: powerpc/fsl: update crypto node definition and device tree instances
Problem Details: delete obsolete device-type property, delete model property (use compatible property instead), prepend "fsl," to Freescale specific properties. Add nodes to device trees that are missing them, and fix broken property values in other trees. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signe...
```diff diff --git a/Documentation/powerpc/dts-bindings/fsl/sec.txt b/Documentation/powerpc/dts-bindings/fsl/sec.txt new file mode 100644 index 000000000000..2b6f2d45c45a --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/sec.txt @@ -0,0 +1,68 @@ +Freescale SoC SEC Security Engines + +Required properties: + +- ...
b93eeba49efb30f88a83fc97ad22c255605654a1
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Minor fixes for 85xxds and 8536ds board.
Problem Details: Remove the "uninitialized use" compile warning and avoid potential runtime issue. Signed-off-by: Jason Jin <Jason.jin@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c index 71d7c038961f..6b846aa1ced9 100644 --- a/arch/powerpc/platforms/85xx/mpc8536_ds.c +++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c @@ -36,7 +36,7 @@ void __init mpc8536_ds_pic_init(void) struct resource r; st...
a712b65cd015d9bd05bce01f57a42cd6c73c4aa0
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: minor fixes for MPC85xx DS board port
Problem Details: These issues were reported by Stephen Rothwell for another 85xx board port and pointed out by Chen Gong as issues in the DS port. * mpic OF node reference counting was off * of_device_id struct should be marked as __initdata Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index b010dc9dec65..8b2d63d4264e 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -58,14 +58,13 @@ void __init mpc85xx_ds_pic_init(void) { struct mpic *mpic;...
deabeabf0bb8e6ad0b5917859893ac5af46d9b04
Analyze and fix the following issue in the Linux kernel code: powerpc/86xx: mpc8610_hpcd: fix interrupt trigger type for ULi IDE
Problem Details: i8259 PIC is disabled on MPC8610HPCD, and ULi IDE is configured to use PCI sideband interrupt that is specified in the device tree. Current HPCD's device tree specify that IDE interrupt is low to high sensitive, but in practice ULi IDE throws active-high interrupts (not active-low as all normal PCI de...
```diff diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts index 65a5f64b2339..981941e5d7a5 100644 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts @@ -363,7 +363,7 @@ 0xe000 0 0 4 &mpic 1 1 /* IDSEL 0x1f */ - 0xf800 0 0 1 &m...
6c1160991283a12537b136a71d10d271997fd64c
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix pq2fads irq handling with PREEMPT_RT
Problem Details: Fix interrupt threading issue on pq2fads when running with CONFIG_PREEMPT_RT Signed-off-by: Rune Torgersen <runet@innovsys.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c index a8013816125c..9876d7e072f4 100644 --- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c @@ -109,7 +109,7 @@ static int pci_pic_host_map(struct irq_host *...
491a7a436cc90e97d666cfc025e141ca3186f86c
Analyze and fix the following issue in the Linux kernel code: cpm_uart: Fix cpm uart corruption with PREEMPT_RT
Problem Details: Fix CPM serial port corruption when running with CONFIG_PREEMPT_RT. Userland usage of console, and kernel printf's were stepping on each others toes. Also only take lock if not in an oops. Signed-off-by: Rune Torgersen <runet@innovsys.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c old mode 100644 new mode 100755 index 43f58dc69fc9..d389a76b4afb --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c @@ -969,6 +969,14 @@ static void cpm_uart_console_write(stru...
0fe9b1ea60bc209c8c87afcbb1c2ec0b28835aa4
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Fix KSI8560 .dts
Problem Details: Rename MPIC label to mpic to match all other 85xx .dts and to fix compile issue introduced by addition of the DMA node. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/boot/dts/ksi8560.dts b/arch/powerpc/boot/dts/ksi8560.dts index fd5804398417..49737589ffc8 100644 --- a/arch/powerpc/boot/dts/ksi8560.dts +++ b/arch/powerpc/boot/dts/ksi8560.dts @@ -59,7 +59,7 @@ memory-controller@2000 { compatible = "fsl,8540-memory-controller"; reg = <0x200...
1e8afea124added6409d5209f90d9949f5a13b32
Analyze and fix the following issue in the Linux kernel code: firewire: warn on unfinished transactions during card removal
Problem Details: After card->done and card->work are completed, any remaining pending request would be a bug. We cannot safely complete a transaction at that point anymore. IOW card users must not drop their last fw_card reference (usually indirect references through fw_device references) before their last outbound t...
```diff diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c index da873d795aad..bbd73a406e53 100644 --- a/drivers/firewire/fw-card.c +++ b/drivers/firewire/fw-card.c @@ -539,7 +539,7 @@ fw_core_remove_card(struct fw_card *card) wait_for_completion(&card->done); cancel_delayed_work_sync(&card->wor...
792a61021c6043f6c2b24b1cdd42be5753b3e54c
Analyze and fix the following issue in the Linux kernel code: firewire: fix race of bus reset with request transmission
Problem Details: Reported by Jay Fenlason: A bus reset tasklet may call fw_flush_transactions and touch transactions (call their callback which will free them) while the context which submitted the transaction is still inserting it into the transmission queue. A simple solution to this problem is to _not_ "flush" the...
```diff diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c index 213b0ff8f3d6..c1b81077c4a8 100644 --- a/drivers/firewire/fw-topology.c +++ b/drivers/firewire/fw-topology.c @@ -510,8 +510,6 @@ fw_core_handle_bus_reset(struct fw_card *card, struct fw_node *local_node; unsigned long flags; ...
a7ea67823af4a7e442e92064b0fab46603a588f6
Analyze and fix the following issue in the Linux kernel code: firewire: don't respond to broadcast write requests
Problem Details: Contrary to a comment in the source, request->ack of a broadcast write request can be ACK_PENDING. Hence the existing check is insufficient. Debug dmesg before: AR spd 0 tl 00, ffc0 -> ffff, ack_pending , QW req, fffff0000234 = ffffffff AT spd 0 tl 00, ffff -> ffc0, ack_complete, W resp And the reque...
```diff diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index 2f11ed1acf01..40db80752272 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c @@ -55,6 +55,9 @@ #define HEADER_GET_DATA_LENGTH(q) (((q) >> 16) & 0xffff) #define HEADER_GET_EXTENDED_TCOD...
435f972697fcd4c424db941f0ea8f2e38eda2b39
Analyze and fix the following issue in the Linux kernel code: ieee1394: dump mmapped iso buffers in core files
Problem Details: Currently, core files do not contain the mmapped memory of the video1394 or dv1394 devices, which contain the actual video input, making it impossible to analyse the cause of abnormal program termination for image analysis or (de)compression software. Fix that. Signed-off-by: Philippe De Muyter <phdm...
```diff diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c index 73685e7dc7e4..1aba8c13fe8f 100644 --- a/drivers/ieee1394/dma.c +++ b/drivers/ieee1394/dma.c @@ -274,7 +274,7 @@ int dma_region_mmap(struct dma_region *dma, struct file *file, vma->vm_ops = &dma_region_vm_ops; vma->vm_private_data = dma; vm...
3719122a520af2957031859317e74858ab4d3f4b
Analyze and fix the following issue in the Linux kernel code: ieee1394: sbp2: fix spindown for PL-3507 and TSB42AA9 firmwares
Problem Details: Reported by Tino Keitel: PL-3507 with firmware from Prolific does not spin down the disk on START STOP UNIT with power condition = 0 and start = 0. It does however work with power condition = 2 or 3. Also found while investigating this: DViCO Momobay CX-1 and FX-3A (TI TSB42AA9/A based) become unre...
```diff diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index a5ceff287a28..219164da2818 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -186,6 +186,11 @@ MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " * - delay inquiry * Wait extra SBP2_INQUIRY_DELAY seco...
ffcaade3109c3a4c0a2c601cf2a44d55b4c3af37
Analyze and fix the following issue in the Linux kernel code: firewire: fw-sbp2: fix spindown for PL-3507 and TSB42AA9 firmwares
Problem Details: Reported by Tino Keitel: PL-3507 with firmware from Prolific does not spin down the disk on START STOP UNIT with power condition = 0 and start = 0. It does however work with power condition = 2 or 3. Also found while investigating this: DViCO Momobay CX-1 and FX-3A (TI TSB42AA9/A based) become unre...
```diff diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 227d2e036cd8..bb8830fb0b7c 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c @@ -86,6 +86,11 @@ MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " * - delay inquiry * Wait extra SBP2_INQUIRY_...
d12c1a37925a8ec386994169605fe99217295199
Analyze and fix the following issue in the Linux kernel code: lockdep: fix kernel/fork.c warning
Problem Details: fix: [ 0.184011] ------------[ cut here ]------------ [ 0.188011] WARNING: at kernel/fork.c:918 copy_process+0x1c0/0x1084() [ 0.192011] Pid: 0, comm: swapper Not tainted 2.6.26-tip-00351-g01d4a50-dirty #14521 [ 0.196011] [<c0135d48>] warn_on_slowpath+0x3c/0x60 [ 0.200012] [<c016f805>]...
```diff diff --git a/kernel/fork.c b/kernel/fork.c index 19908b26cf80..cdb1f82d3bd2 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -909,7 +909,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, rt_mutex_init_task(p); -#ifdef CONFIG_TRACE_IRQFLAGS +#ifdef CONFIG_PROVE_LOCKING DEBUG_LOCKS_...
68e2fc78e5055740126df8eab0d31005495756c9
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix bug - Kernel does not boot if re-program clocks
Problem Details: Don't write conflicting data to EBIU_SDBCTL after the SDRAM is configured. This can cause data corruption, since we might change SDRAM row and column addressing modes. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
```diff diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index b87634e75f20..d0f7ff3dc088 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -315,20 +315,6 @@ config MEM_SIZE depends on BFIN_KERNEL_CLOCK default 64 -config MEM_ADD_WIDTH - int "Memory Address Width" - depends on BFIN_KERNE...
260d5d3517c67c5b68b4e28c5d3e1e3b73976a90
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix bug - do not overflow the buffer given to us which tends to happen when CONFIG_L1_MAX_PIECE is increased past its default
Problem Details: Singed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
```diff diff --git a/arch/blackfin/mm/blackfin_sram.c b/arch/blackfin/mm/blackfin_sram.c index 3246f91c7baa..8f6fdc245330 100644 --- a/arch/blackfin/mm/blackfin_sram.c +++ b/arch/blackfin/mm/blackfin_sram.c @@ -549,13 +549,16 @@ EXPORT_SYMBOL(sram_alloc_with_lsl); /* Once we get a real allocator, we'll throw all of th...
992860e991f2015fb8c8df65aa32afa0dcbb4430
Analyze and fix the following issue in the Linux kernel code: lockdep: fix ftrace irq tracing false positive
Problem Details: fix this false positive: [ 0.020000] ------------[ cut here ]------------ [ 0.020000] WARNING: at kernel/lockdep.c:2718 check_flags+0x14a/0x170() [ 0.020000] Modules linked in: [ 0.020000] Pid: 0, comm: swapper Not tainted 2.6.26-tip-00343-gd7e5521-dirty #14486 [ 0.020000] [<c01312e4>]...
```diff diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 7553a28b99cd..fc5d5aabd77a 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -2688,7 +2688,8 @@ __lock_release(struct lockdep_map *lock, int nested, unsigned long ip) */ static void check_flags(unsigned long flags) { -#if defined(CONFIG_DEBUG_LOCK...
1f2d18690f4390ac4cf75648a5bc18fc07b3aef6
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix Bug - GPIO interrupts not disabled; edge sensitive interrupt hang system.
Problem Details: - Implement irq_chip.enable and irq_chip.disable Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
```diff diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index f5fd768022ea..64d746114e4b 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c @@ -459,6 +459,8 @@ static struct irq_chip bfin_gpio_irqchip = { .mask = bf...
5e34599fc8ba1e8889095bd56a71fd9802ed5a51
Analyze and fix the following issue in the Linux kernel code: [S390] sclp_tty: Fix scheduling while atomic bug.
Problem Details: Finally fixes a possible scheduling while in atomic context bug. The driver used to wait on a waitqueue if no empty buffer was available. This could lead to a deadlock if the driver was called from non-schedulable context. So fix this. The write operation may fail now. It returns the number of characte...
```diff diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c index bcf691af5336..434ba04b1309 100644 --- a/drivers/s390/char/sclp_tty.c +++ b/drivers/s390/char/sclp_tty.c @@ -13,7 +13,6 @@ #include <linux/tty.h> #include <linux/tty_driver.h> #include <linux/tty_flip.h> -#include <linux/wait.h> #...
21b21fc4f4b03361ceec0c7eb6b7b0557d4ffe86
Analyze and fix the following issue in the Linux kernel code: [S390] Cleanup s390 debug feature print messages.
Problem Details: Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
```diff diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index c93d1296cc0a..d80fcd4a7fe1 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -1079,7 +1079,6 @@ __init debug_init(void) s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table); mutex_lock(&debug_mutex); d...
ef60cd13ecee0ccf2439d63013cbfc798aea2bb9
Analyze and fix the following issue in the Linux kernel code: [S390] cio: fix double unregistering of subchannels
Problem Details: In some cases where the channel subsystem decides to drop a subchannel device device_unregister may be called twice, which results in an oops. The patch prevents this by only unregistering registered devices. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Heiko Carstens <heiko...
```diff diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 4e2f2bbf4ba5..46c021d880dc 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -164,7 +164,8 @@ static int css_sch_device_register(struct subchannel *sch) void css_sch_device_unregister(struct subchannel *sch) { mutex_lock(&s...
9789db08c020193ae18826c3aa48bd24296f7848
Analyze and fix the following issue in the Linux kernel code: [S390] Add sched.h include to asm-s390/pgtable.h.
Problem Details: Some macros in pgtable.h access members from struct task_struct. Currently always works since sched.h seems always to be included before asm/pgtable.h. Unfortunately that is not anymore true with Jeremy Fitzhardinge's ptep_modify_prot transaction abstraction patch. So fix this. Signed-off-by: Heiko Ca...
```diff diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index bd0ea191dfa9..0bdb704ae051 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h @@ -29,6 +29,7 @@ * the S390 page table tree. */ #ifndef __ASSEMBLY__ +#include <linux/sched.h> #include <linux/mm_types.h> #inclu...
ad211790c040fae3459e9c4c8cbd681ae126d2b8
Analyze and fix the following issue in the Linux kernel code: [S390] sclp: simplify vt220 cleanup logic
Problem Details: Fix a number of sclp_vt220 cleanup problems: * fix list_empty check after list_del() * mark init-only flag as __initdata * remove implicit dependency between slab_available() and num_pages * straighten multiple init handling (use init count) Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.i...
```diff diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 3e577f655b18..baea4d548523 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c @@ -82,8 +82,8 @@ static struct sclp_vt220_request *sclp_vt220_current_request; /* Number of characters in current reque...