id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
d21a7713464c7d35b2cce1fe7f7d87928d6a047e
Analyze and fix the following issue in the Linux kernel code: MIPS: BCM63XX: Properly handle mac address octet overflow
Problem Details: While calculating the mac address the pointer for the current octet was never reset back to the least significant one after being decremented because of an octet overflow. This resulted in the code continuing to increment at the current octet, potentially generating duplicate or invalid mac addresses. ...
```diff diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c index ea4ea77c6297..442ba96d4004 100644 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c @@ -720,7 +720,7 @@ const char *board_get_name(void) */ static int board_g...
f5ff4e1e62408327d27fb1e1ab00e96a52b7cd46
Analyze and fix the following issue in the Linux kernel code: HID: multitouch: add support for GeneralTouch multi-touchscreen
Problem Details: Fix the touch-up no response problem on GeneralTouch twofingers touchscreen and modify the driver for new GeneralTouch PWT touchscreen. Signed-off-by: Xianhan Yu <aroundight77@gmail.com> Reviewed-by Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 5f68149c2f7e..54e15c47b405 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -309,6 +309,7 @@ #define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc #define USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS 0x0003 +#define USB_DEVICE_ID_GENERAL_...
33766368f6532313571534f9112b1796d6651bbe
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix FC masking in BIP AAD generation
Problem Details: The bits used in the mask were off-by-one and ended up masking PwrMgt, MoreData, Protected fields instead of Retry, PwrMgt, MoreData. Fix this and to mask the correct fields. While doing so, convert the code to mask the full FC using IEEE80211_FCTL_* defines similarly to how CCMP AAD is built. Since B...
```diff diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index bdb53aba888e..e58bf3fe3ed9 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c @@ -545,14 +545,19 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx) static void bip_aad(struct sk_buff *skb, u8 *aad) { + __le16 mask_fc; + struct ieee...
b0e181d0944e858ae0cacf808752e791894c5651
Analyze and fix the following issue in the Linux kernel code: pinctrl: clarify idle vs sleep states
Problem Details: This pure documentation fix tries to align the "idle" and "sleep" pin states to the idle and suspend states from runtime PM. Cc: Patrice Chotard <patrice.chotard@st.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/include/linux/pinctrl/pinctrl-state.h b/include/linux/pinctrl/pinctrl-state.h index 634608dc6c89..b5919f8e6d1a 100644 --- a/include/linux/pinctrl/pinctrl-state.h +++ b/include/linux/pinctrl/pinctrl-state.h @@ -6,13 +6,18 @@ * @PINCTRL_STATE_DEFAULT: the state the pinctrl handle shall be put * i...
0973c687e05a802a757664722678d2b5016f1c1c
Analyze and fix the following issue in the Linux kernel code: m68k: always set stack frame format for ColdFire on thread start
Problem Details: The stack frame "format" field needs to be explicitly set on thread creation on ColdFire. For a normal long word aligned user stack pointer the frame format is 0x4. We were doing this for non-MMU ColdFire, but not for the case with MMU enabled. So fix it so we always do it if targeting ColdFire. The ...
```diff diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h index f17c42aff7ff..9b4c82c1ef47 100644 --- a/arch/m68k/include/asm/processor.h +++ b/arch/m68k/include/asm/processor.h @@ -100,6 +100,16 @@ struct thread_struct { .fs = __KERNEL_DS, \ } +/* + * ColdFire stack format sb...
9b796d06d5d1b1e85ae2316a283ea11dd739ef96
Analyze and fix the following issue in the Linux kernel code: IB/srp: Fix use-after-free in srp_reset_req()
Problem Details: srp_free_req() uses the scsi_cmnd structure contents to unmap buffers, so we must invoke srp_free_req() before we release ownership of that structure. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: David Dillow <dillowda@ornl.gov> Cc: <stable@vger.kernel.org> Signed-off-by: Roland Dreie...
```diff diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 1b5b0c730054..ac66e6b43ee2 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -638,9 +638,9 @@ static void srp_reset_req(struct srp_target_port *target, struct srp_request *re ...
bca1935ccdecf2354a55d9edab4c022a995ee490
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix compilation error when nes_debug is enabled
Problem Details: Removing old variables caused a compile error from nes_debug(). Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
```diff diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index d42c9f435b1b..78e936dde773 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c @@ -3577,10 +3577,10 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, tcp_state = (aeq_...
fc4ba7291b3dc7ace34794f51c47f041949c7a92
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix for crash when TX checksum offload is off
Problem Details: When TX checksum offload is disabled for an iWarp connection, skb->ip_summed needs to be set to CHECKSUM_NONE. Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
```diff diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 49a9383137db..cfaacaf6bf5f 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -430,6 +430,8 @@ static void form_cm_frame(struct sk_buff *skb, buf += sizeof(*tcph); skb->ip_su...
6ad1be814b106e182d9b12898280d0c115541b72
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix for incorrect MSS when TSO is on
Problem Details: In TSO handling code, skb_shared_info() is used to get the MSS instead of the bool function skb_is_gso() (which always returns 1). Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
```diff diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index f3a3ecf8d09e..1c02ba787536 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c @@ -390,10 +390,10 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev) tcph...
ef3d0c4a5e8c7ad3429b9f9ef66cf5a7563cd513
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix incorrect resolving of the loopback MAC address
Problem Details: Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
```diff diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 020e95c4c4b9..49a9383137db 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -1356,7 +1356,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi ...
f3d4c89ee4a8c993cc334a67f84a3fb724a1dd35
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem
Problem Details: On an SR-IOV master device, __mlx4_init_one() calls mlx4_init_hca() before mlx4_multi_func_init(). However, for unlucky configurations, mlx4_init_hca() might call mlx4_SENSE_PORT() (via mlx4_dev_cap()), and that calls mlx4_cmd_imm() with MLX4_CMD_WRAPPED set. However, on a multifunction device with M...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c index 90774b7e47a4..3d1899ff1076 100644 --- a/drivers/net/ethernet/mellanox/mlx4/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c @@ -395,7 +395,8 @@ static int mlx4_slave_cmd(struct mlx4_dev *dev, u64 in_param,...
69612b9ff44ddc305b727a1f78de2248f9d70bf0
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Trivial readability fix: "0X30" -> "0x30"
Problem Details: Signed-off-by: Roland Dreier <roland@purestorage.com>
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index e2ed36e2fb29..419914bf4834 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c @@ -183,7 +183,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, ...
992e8e6e8781b71fd475bd1fd0555da7dba59966
Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Miscellaneous adjustments for SR-IOV IB support
Problem Details: 1. Allow only master to change node description. 2. Prevent AH leakage in send mads. 3. Take device part number from PCI structure, so that guests see the VF part number (and not the PF part number). 4. Place the device revision ID into caps structure at startup. 5. SET_PORT in update_gids_task need...
```diff diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c index b689dbd6d8f6..b91b4865d635 100644 --- a/drivers/infiniband/hw/mlx4/mad.c +++ b/drivers/infiniband/hw/mlx4/mad.c @@ -709,7 +709,9 @@ static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, if (!out_mad...
a084feebd24764fab9657a586ea65484ddbd79cf
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Remove annoying debug message in the resource tracker
Problem Details: This innocent print makes it very hard to actually use the mlx4_core debug messages -- for example, the module load sequence of a device with two VFs yielded 3200 debug prints, with 2800 of them being this one. Let's just remove it. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Rol...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c index 293c9e820c49..362b25e1f2e7 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c @@ -360,8 +360,6 @@ static in...
426dd00d76ad7c96250f5b5f871847d545fef33c
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Fix wrong offset in parsing query device caps response
Problem Details: The wrong offset was used when parsing the number of XRCs in mlx4_QUERY_DEV_CAP(). Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index c69648487321..7cf8ec5f3827 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c @@ -559,7 +559,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap ...
bea1e22df494a729978e7f2c54f7bda328f74bc3
Analyze and fix the following issue in the Linux kernel code: IPoIB: Fix use-after-free of multicast object
Problem Details: Fix a crash in ipoib_mcast_join_task(). (with help from Or Gerlitz) Commit c8c2afe360b7 ("IPoIB: Use rtnl lock/unlock when changing device flags") added a call to rtnl_lock() in ipoib_mcast_join_task(), which is run from the ipoib_workqueue, and hence the workqueue can't be flushed from the context o...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 1e19b5ae7c47..ea0dfc77a7f4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -150,7 +150,7 @@ static int ipoib_stop(struct net_device *dev) netif_s...
c079c28714e4d1a0b7cad120f84217e0fcde09a6
Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb4: Fix error handling in create_qp()
Problem Details: The variable ret is assigned return values in a couple of places, but its value is never returned. This patch makes use of the ret variable so that the caller get correct error codes returned. The following changes are also introduced: - The alloc_oc_sq function can return -ENOSYS or -ENOMEM so we w...
```diff diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 45aedf1d9338..e2bf9c68cfc8 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -137,19 +137,25 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, return -ENOMEM; wq->r...
2a22fb8c69275903b8be4c6203aa08bfac374844
Analyze and fix the following issue in the Linux kernel code: RDMA/cma: Use consistent component mask for IPoIB port space multicast joins
Problem Details: CMA multicast joins for the IPoIB port space need to use the same component mask used by the ipoib driver. Otherwise, it's possible for the CMA to create a group to which a join made by ipoib will fail, or vise-versa. Some of the component mask fields set by ipoib weren't set by the CMA, fix that. S...
```diff diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 7172559ce0c1..26b37603dcf1 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -3058,7 +3058,10 @@ static int cma_join_ib_multicast(struct rdma_id_private *id_priv, if (id_priv->id.ps == RDMA_PS_IP...
041bbb6d369811e948ae01f3d00414264076be35
Analyze and fix the following issue in the Linux kernel code: ext4: fix mtime update in nodelalloc mode
Problem Details: Commits 5e8830dc85d0 and 41c4d25f78c0 introduced a regression into v3.6-rc1 for ext4 in nodealloc mode, such that mtime updates would not take place for files modified via mmap if the page was already in the page cache. This would also affect ext3 file systems mounted using the ext4 file system driver...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 9f6d2e41281d..1fe3968357a9 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2318,12 +2318,6 @@ int __block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, loff_t size; int ret; - /* - * Update file times before taking page lock. We may end up fail...
6f2080e64487b9963f9c6ff8a252e1abce98f2d4
Analyze and fix the following issue in the Linux kernel code: ext4: fix ext_remove_space for punch_hole case
Problem Details: Inode is allowed to have empty leaf only if it this is blockless inode. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 5920e75fc05f..c1fcf489e056 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -2589,7 +2589,7 @@ static int ext4_ext_remove_space(struct inode *inode, ext4_lblk_t start, struct ext4_ext_path *path = NULL; ext4_fsblk_t partial_cluster = 0; han...
55f5c3c55b5a682c4bb37628979c5909f9de7b30
Analyze and fix the following issue in the Linux kernel code: be2net: fix wrong handling of be_setup() failure in be_probe()
Problem Details: Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index fa1743036a88..b712091bc218 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -3889,7 +3889,7 @@ static int __devinit be_probe(struct pci_dev *p...
8110e16d42d587997bcaee0c864179e6d93603fe
Analyze and fix the following issue in the Linux kernel code: vfs: dcache: fix deadlock in tree traversal
Problem Details: IBM reported a deadlock in select_parent(). This was found to be caused by taking rename_lock when already locked when restarting the tree traversal. There are two cases when the traversal needs to be restarted: 1) concurrent d_move(); this can only happen when not already locked, since taking ...
```diff diff --git a/fs/dcache.c b/fs/dcache.c index 0364af2311f4..693f95bf1cae 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1134,6 +1134,8 @@ positive: return 1; rename_retry: + if (locked) + goto again; locked = 1; write_seqlock(&rename_lock); goto again; @@ -1236,6 +1238,8 @@ out: rename_retry: if (...
0578a97098dab967ece4b025fe5eb4984c4c86c0
Analyze and fix the following issue in the Linux kernel code: uprobes: Fix UPROBE_SKIP_SSTEP checks in handle_swbp()
Problem Details: If handle_swbp()->add_utask() fails but UPROBE_SKIP_SSTEP is set, cleanup_ret: path do not restart the insn, this is wrong. Remove this check and add the additional label for can_skip_sstep() = T case. Note also that UPROBE_SKIP_SSTEP can be false positive, we simply can not trust it unless arch_uprob...
```diff diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 41f048c91425..d2392968d4e6 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -1389,10 +1389,11 @@ bool uprobe_deny_signal(void) */ static bool can_skip_sstep(struct uprobe *uprobe, struct pt_regs *regs) { - if (arch_upr...
2223af389032425e3d1a70f9cb3a63feaa654ced
Analyze and fix the following issue in the Linux kernel code: efi: Fix the ACPI BGRT driver for images located in EFI boot services memory
Problem Details: The ACPI BGRT driver accesses the BIOS logo image when it initializes. However, ACPI 5.0 (which introduces the BGRT) recommends putting the logo image in EFI boot services memory, so that the OS can reclaim that memory. Production systems follow this recommendation, breaking the ACPI BGRT driver. Mov...
```diff diff --git a/arch/x86/platform/efi/Makefile b/arch/x86/platform/efi/Makefile index 73b8be0f3675..6db1cc4c7534 100644 --- a/arch/x86/platform/efi/Makefile +++ b/arch/x86/platform/efi/Makefile @@ -1 +1,2 @@ obj-$(CONFIG_EFI) += efi.o efi_$(BITS).o efi_stub_$(BITS).o +obj-$(CONFIG_ACPI_BGRT) += efi-bgrt.o diff ...
2caf87a49eb53fac266b1271ebd6c1d1daa0d0d0
Analyze and fix the following issue in the Linux kernel code: mtd: fsl_ifc_nand: fix sparse warnings
Problem Details: drivers/mtd/nand/fsl_ifc_nand.c:196:34: warning: cast removes address space of expression [sparse] drivers/mtd/nand/fsl_ifc_nand.c:196:34: warning: incorrect type in initializer (different address spaces) [sparse] drivers/mtd/nand/fsl_ifc_nand.c:196:34: expected unsigned int [noderef] [usertype] <as...
```diff diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index e92d223e5e1a..1be83dcc730a 100644 --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c @@ -193,7 +193,7 @@ static int is_blank(struct mtd_info *mtd, unsigned int bufnum) struct nand_chip *chip = mtd->pr...
bb0a13a13411c4ce24c48c8ff3cdf7b48d237240
Analyze and fix the following issue in the Linux kernel code: mtd: nandsim: bugfix: fail if overridesize is too big
Problem Details: If override size is too big, the module was actually loaded instead of failing, because retval was not set. This lead to memory corruption with the use of the freed structs nandsim and nand_chip. Cc: stable@vger.kernel.org Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Artem ...
```diff diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 21e64b5d352b..a932c485eb04 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -2317,6 +2317,7 @@ static int __init ns_init_module(void) uint64_t new_size = (uint64_t)nsmtd->erasesize << overridesize; if (ne...
c092b43906098a6879d0fa9f74e5141516b9b856
Analyze and fix the following issue in the Linux kernel code: mtd: mtd_nandecctest: support injecting bit error for ecc code
Problem Details: Currently inject_single_bit_error() is used to inject single bit error into randomly selected bit position of the 256 or 512 bytes data block. Later change will add tests which inject bit errors into the ecc code. Unfortunately, inject_single_bit_error() doesn't work for the ecc code which is not a mu...
```diff diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c index d3e8873ad38a..d90daf879c46 100644 --- a/drivers/mtd/tests/mtd_nandecctest.c +++ b/drivers/mtd/tests/mtd_nandecctest.c @@ -9,11 +9,25 @@ #if defined(CONFIG_MTD_NAND) || defined(CONFIG_MTD_NAND_MODULE) +/* + * The re...
1749c00ffc909db4ebf1b2f17fd52cdb6e7b149c
Analyze and fix the following issue in the Linux kernel code: mtd: mtd_nandecctest: ensure alignment requirement for bitops
Problem Details: Currently the data blocks which is used to test single bit error correction is allocated statically and injecting single bit error is implemented by using __change_bit() which must operate on the memory aligned to the size of an "unsigned long". But there is no such guarantee for statically allocated ...
```diff diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c index 2b2d1a90417b..d3e8873ad38a 100644 --- a/drivers/mtd/tests/mtd_nandecctest.c +++ b/drivers/mtd/tests/mtd_nandecctest.c @@ -4,6 +4,7 @@ #include <linux/random.h> #include <linux/string.h> #include <linux/bitops.h> +#in...
c5b8384abc11fd566a3633b7bd7d476ff04c31af
Analyze and fix the following issue in the Linux kernel code: mtd: mtd_nandecctest: improve message output
Problem Details: This includes the message related changes: - Use pr_* instead of printk - Print hexdump of ECC code if test fails - Change log level for hexdump of data from KERN_DEBUG to KERN_INFO - Factor out the hexdump code into a separate function Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-...
```diff diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c index 128547c5bd55..2b2d1a90417b 100644 --- a/drivers/mtd/tests/mtd_nandecctest.c +++ b/drivers/mtd/tests/mtd_nandecctest.c @@ -15,41 +15,51 @@ static void inject_single_bit_error(void *data, size_t size) __change_bit(offse...
9e0606fc4ea27fb275f6987751224c60ee055ef1
Analyze and fix the following issue in the Linux kernel code: mtd: cmdlinepart: revise error handling
Problem Details: This patch revises and fixes error handling in the command line mtd partitions parser. Namely: 1. we ignored return code of 'mtdpart_setup_real()'. 2. instead of returning 0 for failure and 1 for success, teach 'mtdpart_setup_real()' to return real error codes. Signed-off-by: Artem Bityutskiy <arte...
```diff diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index b4faca25cf31..58dd0d0d7383 100644 --- a/drivers/mtd/cmdlinepart.c +++ b/drivers/mtd/cmdlinepart.c @@ -39,11 +39,10 @@ #include <linux/kernel.h> #include <linux/slab.h> - #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> -#...
4d3d688da8e7016f15483e9319b41311e1db9515
Analyze and fix the following issue in the Linux kernel code: mtd: omap2: fix module loading
Problem Details: Unloading the omap2 nand driver missed to release the memory region which will result in not being able to request it again if one want to load the driver later on. This patch fixes following error when loading omap2 module after unloading: ---8<--- ~ $ rmmod omap2 ~ $ modprobe omap2 [ 37.420928] om...
```diff diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index e604a458c8a6..9142005c3029 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1364,6 +1364,7 @@ static int omap_nand_remove(struct platform_device *pdev) /* Release NAND device, its internal structures and partitions ...
7d9b110269253b1d5858cfa57d68dfc7bf50dd77
Analyze and fix the following issue in the Linux kernel code: mtd: omap2: fix omap_nand_remove segfault
Problem Details: Do not kfree() the mtd_info; it is handled in the mtd subsystem and already freed by nand_release(). Instead kfree() the struct omap_nand_info allocated in omap_nand_probe which was not freed before. This patch fixes following error when unloading the omap2 module: ---8<--- ~ $ rmmod omap2 ----------...
```diff diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index f47c422c7dfd..e604a458c8a6 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1364,7 +1364,7 @@ static int omap_nand_remove(struct platform_device *pdev) /* Release NAND device, its internal structures and partitions ...
7be1f6b9a1ae3476a424380b52aad7c14c3273ab
Analyze and fix the following issue in the Linux kernel code: mtd: cfi_cmdset_0001: Fix problem with unlocking timeout
Problem Details: Unlocking may take up to 1.4 seconds on some Intel flashes. So lets use a max. of 1.5 seconds (1500ms) as timeout. See "Clear Block Lock-Bits Time" on page 40 in "3 Volt Intel StrataFlash Memory" 28F128J3,28F640J3,28F320J3 manual from February 2003 This patch also fixes some other problems with this ...
```diff diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index dbbd2edfb812..77514430f1fe 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -2043,7 +2043,7 @@ static int __xipram do_xxlock_oneblock(struct map_info *map, struct flchip *chi...
d159c4e5fb7b755b9f254768293da7737790ac5b
Analyze and fix the following issue in the Linux kernel code: mtd: nand: nand_bbt: export nand_update_bbt
Problem Details: When building MTD_NAND_GPMI_NAND as module, the following error shows up: ERROR: "nand_update_bbt" [drivers/mtd/nand/gpmi-nand/gpmi_nand.ko] undefined! Export nand_update_bbt to fix it. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux...
```diff diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index 24b0a4c3c39f..2f744dd90740 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -4,7 +4,7 @@ * Overview: * Bad block table support for the NAND driver * - * Copyright (C) 2004 Thomas Gleixner (tglx@li...
19da4158d33053c6e91e95ee0663d625b2d32a77
Analyze and fix the following issue in the Linux kernel code: mtd: s3c2410: Fix compiler warnings
Problem Details: Fixes the following warnings: ‘s3c2410_nand_correct_data’ defined but not used [-Wunused-function] ‘s3c2410_nand_enable_hwecc’ defined but not used [-Wunused-function] ‘s3c2412_nand_enable_hwecc’ defined but not used [-Wunused-function] ‘s3c2440_nand_enable_hwecc’ defined but not used [-Wunused-functio...
```diff diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 90a630a6f0b9..792cee846221 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -442,6 +442,7 @@ static int s3c2412_nand_devready(struct mtd_info *mtd) /* ECC handling functions */ +#ifdef CONFIG_MTD_NAND_S3C2...
25806d3cd2d3214225a86ade366364d4d9a911eb
Analyze and fix the following issue in the Linux kernel code: mtd: fix kernel-doc warning in include/linux/mtd/nand.h
Problem Details: Fix kernel-doc warning in <linux/mtd/nand.h>: Warning(include/linux/mtd/nand.h:659): No description found for parameter 'read_byte' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com...
```diff diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 1d90e4f82bcf..6bdad331cee4 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -630,6 +630,7 @@ struct platform_device; * ALE/CLE/nCE. Also used to write command and address * @write_buf: platform specific function...
c51803ddba10d80d9f246066802c6e359cf1d44c
Analyze and fix the following issue in the Linux kernel code: mtd: mtdpart: break it as soon as we parse out the partitions
Problem Details: We may cause a memory leak when the @types has more then one parser. Take the `default_mtd_part_types` for example. The default_mtd_part_types has two parsers now: `cmdlinepart` and `ofpart`. Assume the following case: The kernel command line sets the partitions like: #gpmi-nand:20m(boot),20m(kernel...
```diff diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index d518e4db8a0b..f8c08ec65feb 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -711,6 +711,8 @@ static const char *default_mtd_part_types[] = { * partition parsers, specified in @types. However, if @types is %NULL, then * the def...
513d57e1db53870cdc11e60df77c57c8b3897fdf
Analyze and fix the following issue in the Linux kernel code: mtd: gpmi: fix the compiler warnings
Problem Details: Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c index 6bb0998dcb40..2289cf8dc35b 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c @@ -26,7 +26,7 @@ #include "gpmi-regs.h" #include "bch-regs.h" -struct timing_threshod ti...
a445f784ae5558a3da680aa6b39ed53c95a551c1
Analyze and fix the following issue in the Linux kernel code: JFFS2: fix unmount regression
Problem Details: This patch fixes regression introduced by "8bdc81c jffs2: get rid of jffs2_sync_super". We submit a delayed work in order to make sure the write-buffer is synchronized at some point. But we do not flush it when we unmount, which causes an oops when we unmount the file-system and then the delayed work i...
```diff diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 61ea41389f90..1224d6b48e7e 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c @@ -100,6 +100,10 @@ static int jffs2_sync_fs(struct super_block *sb, int wait) { struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); +#ifdef CONFIG_JFFS2_FS_WRITEBUFFER + cancel_...
08a3c4bc23e2b71191ed95d4fd3177c23660e34f
Analyze and fix the following issue in the Linux kernel code: mtd: fix wrong usage of ioremap_nocache() in uclinux.c map driver
Problem Details: The uclinux.c mapping driver uses ioremap_nocache() to map its physical mapping address to a system virtual address. Problem is that the region it is mapping is not device memory. It is ordinary system RAM. On most non-MMU systems this doesn't matter, and the mapping is always a 1:1 translation of the ...
```diff diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c index c3bb304eca07..299bf88a6f41 100644 --- a/drivers/mtd/maps/uclinux.c +++ b/drivers/mtd/maps/uclinux.c @@ -67,10 +67,16 @@ static int __init uclinux_mtd_init(void) printk("uclinux[mtd]: RAM probe address=0x%x size=0x%x\n", (int)...
f938bc563b4ca04013d02961dd423be10eee418a
Analyze and fix the following issue in the Linux kernel code: mtd: s3c2410: Fix line over 80 characters warning
Problem Details: Fixes the following checkpatch warnings: WARNING: line over 80 characters Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index e82c679abe48..e71f7a951bf0 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -540,7 +540,8 @@ static void s3c2412_nand_enable_hwecc(struct mtd_info *mtd, int mode) unsigned long ctrl; ctrl = readl(info->re...
54cd0208c6be19d6944f40a083fe97dd56de3489
Analyze and fix the following issue in the Linux kernel code: mtd: s3c2410: Fix checkpatch warnings and errors related to whitespaces
Problem Details: Fixes checkpatch warnings and errors related to whitespaces. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 38cecc9620e4..e82c679abe48 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -218,7 +218,7 @@ static int s3c_nand_calc_rate(int wanted, unsigned long clk, int max) return result; } -#define to_ns(ticks,clk)...
a68c5ec85685a8eb7a93a0577f91c5e0952df39e
Analyze and fix the following issue in the Linux kernel code: mtd: s3c2410: Do not initialise statics to 0 or NULL
Problem Details: Fixes the following checkpatch errors: ERROR: do not initialise statics to 0 or NULL +static int hardware_ecc = 0; ERROR: do not initialise statics to 0 or NULL +static const int clock_stop = 0; Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@li...
```diff diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index f9bbf55f4b0f..38cecc9620e4 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -49,19 +49,6 @@ #include <plat/regs-nand.h> #include <plat/nand.h> -#ifdef CONFIG_MTD_NAND_S3C2410_HWECC -static int hardware_ecc ...
d2a89be8e7cedbc7aba7f0265459e75e6627614c
Analyze and fix the following issue in the Linux kernel code: mtd: s3c2410: Use <linux/io.h> instead of <asm/io.h>
Problem Details: Fixes the following checkpatch warning: WARNING: Use #include <linux/io.h> instead of <asm/io.h> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 3021b174761f..f9bbf55f4b0f 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -32,6 +32,7 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/string.h> +#include <linux/io.h> #include <linux/...
d1f55c680e5d021e7066f4461dd678d42af18898
Analyze and fix the following issue in the Linux kernel code: mtd: autcpu12-nvram: Fix compile breakage
Problem Details: Update driver autcpu12-nvram.c so it compiles; map_read32/map_write32 no longer exist in the kernel so the driver is totally broken. Additionally, map_info name passed to simple_map_init is incorrect. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: stable...
```diff diff --git a/drivers/mtd/maps/autcpu12-nvram.c b/drivers/mtd/maps/autcpu12-nvram.c index e5bfd0e093bb..0598d52eaf9f 100644 --- a/drivers/mtd/maps/autcpu12-nvram.c +++ b/drivers/mtd/maps/autcpu12-nvram.c @@ -43,7 +43,8 @@ struct map_info autcpu12_sram_map = { static int __init init_autcpu12_sram (void) { - i...
4cacbe226f39061f3e6730a08e3323e04a0de03f
Analyze and fix the following issue in the Linux kernel code: mtd: omap2: fix some typos in comments
Problem Details: Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index ac4fd756eda3..1ede9fb43430 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -347,7 +347,7 @@ static void omap_nand_dma_callback(void *data) } /* - * omap_nand_dma_transfer: configer and start dma transfer + * omap_...
bf7a01bf7987b63b121d572b240c132ec44129c4
Analyze and fix the following issue in the Linux kernel code: mtd: nand: allow NAND_NO_SUBPAGE_WRITE to be set from driver
Problem Details: The NAND_CHIPOPTIONS_MSK has limited utility and is causing real bugs. It silently masks off at least one flag that might be set by the driver (NAND_NO_SUBPAGE_WRITE). This breaks the GPMI NAND driver and possibly others. Really, as long as driver writers exercise a small amount of care with NAND_* op...
```diff diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index ead301a455ee..996cc4836885 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2909,8 +2909,6 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, if (le16_to_cpu(p->featur...
28446acb1f8268cda4b2076f72519534f84d6a36
Analyze and fix the following issue in the Linux kernel code: mtd: atmel nand: fix gpio missing request
Problem Details: without this the gpio will not be muxed as a gpio by the current custom pinmux or later by the pinctrl Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 647275524e09..914455783302 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -1399,7 +1399,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev) if (pdev->dev.of_node) { res = at...
aa6d01fa435a6f701128829f8d9d04208fd53176
Analyze and fix the following issue in the Linux kernel code: mtd: docg4: fix oob reads
Problem Details: This patch does two closely related things: (1) Currently the ecc.read_page() method does not fill the nand->oob_poi buffer with the oob data, but instead reads oob into a local buffer. Fix this by filling the oob_poi buffer instead of a local buffer. The 'oob_required' argument is quietly ignored; ...
```diff diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c index 0f2ffd7b6c82..793921e56f8e 100644 --- a/drivers/mtd/nand/docg4.c +++ b/drivers/mtd/nand/docg4.c @@ -378,9 +378,9 @@ static int correct_data(struct mtd_info *mtd, uint8_t *buf, int page) * bit flips(s) are not reported in stats. */ ...
036a1ac1f4ac8cdfed4574738c63aba2e81a13e4
Analyze and fix the following issue in the Linux kernel code: mtd: spear_smi: fix compilation warning
Problem Details: drivers/mtd/devices/spear_smi.c: In function 'spear_smi_probe': drivers/mtd/devices/spear_smi.c:984:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel...
```diff diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index 7c10466766c7..421bc65ae829 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c @@ -981,7 +981,7 @@ static int __devinit spear_smi_probe(struct platform_device *pdev) dev->pdev = pdev; dev->clk...
8bb8b85f6732ed579222a465d0749f66a3cace4d
Analyze and fix the following issue in the Linux kernel code: mtd: m25p80: Fix the Spansion chip detection
Problem Details: Due to the implementation of the following loop at the end of jedec_probe(): 776 for (tmp = 0; tmp < ARRAY_SIZE(m25p_ids) - 1; tmp++) { 777 info = (void *)m25p_ids[tmp].driver_data; 778 if (info->jedec_id == jedec) { 779 if (info->ext_id ...
```diff diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index a3f4832cf54e..d16f75ce16e9 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -665,12 +665,7 @@ static const struct spi_device_id m25p_ids[] = { /* Spansion -- single (large) sector size only, at least ...
dffa3f985047979ace185e253da89cabda3f7b31
Analyze and fix the following issue in the Linux kernel code: mm/slab: Fix kmem_cache_alloc_node_trace() declaration
Problem Details: This bug was introduced in commit 4052147 ("mm, slab: Match SLAB and SLUB kmem_cache_alloc_xxx_trace() prototype"). Cc: David Rientjes <rientjes@google.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Pekka Enberg <penberg@ke...
```diff diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index e98caebdd0bc..cc290f0bdb34 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h @@ -159,16 +159,16 @@ extern void *__kmalloc_node(size_t size, gfp_t flags, int node); extern void *kmem_cache_alloc_node(struct kmem_cache *, g...
c0b24b5100cb96cba71666953a8619a616684967
Analyze and fix the following issue in the Linux kernel code: Revert "mm/slab: Fix kmem_cache_alloc_node_trace() declaration"
Problem Details: This reverts commit 1e5965bf1f018cc30a4659fa3f1a40146e4276f6. Ezequiel Garcia has a better fix.
```diff diff --git a/mm/slab.c b/mm/slab.c index 3409eada242d..ca3849fe0584 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3862,10 +3862,10 @@ void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid) EXPORT_SYMBOL(kmem_cache_alloc_node); #ifdef CONFIG_TRACING -void *kmem_cache_alloc_node_trace(si...
28a535f9a0df060569dcc786e5bc2e1de43d7dc7
Analyze and fix the following issue in the Linux kernel code: ext4: completed_io locking cleanup
Problem Details: Current unwritten extent conversion state-machine is very fuzzy. - For unknown reason it performs conversion under i_mutex. What for? My diagnosis: We already protect extent tree with i_data_sem, truncate and punch_hole should wait for DIO, so the only data we have to protect is end_io->flags m...
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 6ec9856065d6..edb049579420 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -186,7 +186,6 @@ struct mpage_da_data { #define EXT4_IO_END_ERROR 0x0002 #define EXT4_IO_END_QUEUED 0x0004 #define EXT4_IO_END_DIRECT 0x0008 -#define EXT4_IO_END_IN_FSYNC 0x0010 ...
82e54229118785badffb4ef5ba4803df25fe007f
Analyze and fix the following issue in the Linux kernel code: ext4: fix unwritten counter leakage
Problem Details: ext4_set_io_unwritten_flag() will increment i_unwritten counter, so once we mark end_io with EXT4_END_IO_UNWRITTEN we have to revert it back on error path. - add missed error checks to prevent counter leakage - ext4_end_io_nolock() will clear EXT4_END_IO_UNWRITTEN flag to signal that conversion f...
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index a1f56c3e773b..54a94426ef7b 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -3633,6 +3633,8 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode, if ((flags & EXT4_GET_BLOCKS_PRE_IO)) { ret = ext4_split_unwritten_ex...
e27f41e1b789e60e7d8cc9c81fd93ca49ef31f13
Analyze and fix the following issue in the Linux kernel code: ext4: give i_aiodio_unwritten a more appropriate name
Problem Details: AIO/DIO prefix is wrong because it account unwritten extents which also may be scheduled from buffered write endio Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 3e8e185e5e22..6ec9856065d6 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -912,7 +912,7 @@ struct ext4_inode_info { struct list_head i_completed_io_list; spinlock_t i_completed_io_lock; atomic_t i_ioend_count; /* Number of outstanding io_end structs ...
c954679cf76095b0a1232c3dad604a9066d78ab1
Analyze and fix the following issue in the Linux kernel code: smsc95xx: fix resume when usb device is reset
Problem Details: This patch fixes an issue on some systems, where after suspend the link is re-established but the ethernet interface does not resume. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index d0ff01ee0b62..f29860d6341a 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1282,6 +1282,7 @@ static struct usb_driver smsc95xx_driver = { .probe = usbnet_probe, .suspend = usbnet_suspend, .resume = us...
015a830d44695adff8b52d2703608cec4a1041ba
Analyze and fix the following issue in the Linux kernel code: time/jiffies: bring back unconditional LATCH definition
Problem Details: Patch a7ea3bbf5d "time/jiffies: Allow CLOCK_TICK_RATE to be undefined" breaks the compilation of targets that rely on the LATCH definition, because of recursive header file inclusion not defining CLOCK_TICK_RATE before it is checked here. This fixes the problem by moving LATCH back to where it was, bu...
```diff diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 82680541576d..44e389d8e8fd 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -51,9 +51,10 @@ #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ + ((((NOM) % (DEN)) << (L...
46f2007c1efadfa4071c17e75f140c47f09293de
Analyze and fix the following issue in the Linux kernel code: ARM: mvebu: fix build breaks from multi-platform conversion
Problem Details: Moving ARCH_MVEBU for multi-platform support caused several breakages in recently added addr-map and pinctrl support for mvebu. This adds the necessary selects and include paths to fix the build. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons...
```diff diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 26a817d81a70..416d46ef7ebd 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -6,6 +6,8 @@ config ARCH_MVEBU select GENERIC_IRQ_CHIP select IRQ_DOMAIN select MULTI_IRQ_HANDLER + select PINCTRL + select ...
7253b85cc62d6ff84143d96fe6cd54f73736f4d7
Analyze and fix the following issue in the Linux kernel code: ARM: 7541/1: Add ARM ERRATA 775420 workaround
Problem Details: arm: Add ARM ERRATA 775420 workaround Workaround for the 775420 Cortex-A9 (r2p2, r2p6,r2p8,r2p10,r3p0) erratum. In case a date cache maintenance operation aborts with MMU exception, it might cause the processor to deadlock. This workaround puts DSB before executing ISB if an abort may occur on cache m...
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2f88d8d97701..48c19d44be9a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1413,6 +1413,16 @@ config PL310_ERRATA_769419 on systems with an outer cache, the store buffer is drained explicitly. +config ARM_ERRATA_775420 + bool "ARM e...
8ee777fd915b0e36f35a430225729007a1df6441
Analyze and fix the following issue in the Linux kernel code: ARM: 7542/1: mm: fix cache LoUIS API for xscale and feroceon
Problem Details: Some architectures like xscale and feroceon have cache API variants that map cache flushing functions as aliases to the base architecture. This patch adds the required aliases to complete the implementation of cache flushing LoUIS API. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signe...
```diff diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S index 85e5e3baa3d4..4106b09e0c29 100644 --- a/arch/arm/mm/proc-feroceon.S +++ b/arch/arm/mm/proc-feroceon.S @@ -434,6 +434,7 @@ ENDPROC(feroceon_dma_unmap_area) range_alias flush_icache_all range_alias flush_user_cache_all range_alias ...
42a4172b6ebb4a419085c6caee7c135e51cae5ea
Analyze and fix the following issue in the Linux kernel code: sparc64: Fix trailing whitespace in NG4 memcpy.
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/lib/NG4memcpy.S b/arch/sparc/lib/NG4memcpy.S index 6f4b526b3c4f..9cf2ee01cee3 100644 --- a/arch/sparc/lib/NG4memcpy.S +++ b/arch/sparc/lib/NG4memcpy.S @@ -113,7 +113,7 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ and %g1, 0x7, %g1 brz,pt %g1, 51f sub %o2, %g1, %o2 - + 1: EX_...
ac3524b7f5a6b9a744fb7ea19991355354c09afb
Analyze and fix the following issue in the Linux kernel code: ARM: Orion5x: ts78xx: Add IOMEM for virtual addresses.
Problem Details: Also convert logical or to + for register offsets from base addresses. This fixes a number of warnings currently seen in linux-next: warning: passing argument 2 of '__raw_writeb' makes pointer from interger without cast. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Arnd Bergmann <arnd@a...
```diff diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index b4203277f3cd..b0727dcd1ef9 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c @@ -36,7 +36,7 @@ * FPGA - lives where the PCI bus would be at ORION5X_PCI_MEM_PHYS_BASE */ ...
849b286fd026a6924cc6a4315e446ed88ab983d2
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: nfs4_proc_layoutreturn must always drop the plh_block_lgets count
Problem Details: Currently it does not do so if the RPC call failed to start. Fix is to move the decrement of plh_block_lgets into nfs4_layoutreturn_release. Also remove a redundant test of task->tk_status in nfs4_layoutreturn_done: if lrp->res.lrs_present is set, then obviously the RPC call succeeded. Signed-off-by:...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 8de0435caed9..ce1ebff49fd7 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -6346,7 +6346,6 @@ static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata) { struct nfs4_layoutreturn *lrp = calldata; struct nfs_server *server; -...
7fdab069b7172f2348cf3d87e19c6c24340292bf
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Fix a race in the pNFS return-on-close code
Problem Details: If we sleep after dropping the inode->i_lock, then we are no longer atomic with respect to the rpc_wake_up() call in pnfs_layout_remove_lseg(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e605d417a006..6d5750cabd8d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -2137,6 +2137,7 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data) { struct nfs4_closedata *calldata = data; struct nfs4_state *state = calldata->s...
830ffb565760234eb984e4343ad82575e96728de
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Fix a reference leak in pnfs_update_layout
Problem Details: If we exit after the call to pnfs_find_alloc_layout(), we have to ensure that we put the struct pnfs_layout_hdr. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 2c59da5511db..d7a8f03e7295 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1067,8 +1067,10 @@ pnfs_update_layout(struct inode *ino, spin_lock(&ino->i_lock); lo = pnfs_find_alloc_layout(ino, ctx, gfp_flags); - if (lo == NULL) - goto out_unlock; + if (lo ...
f86bbcf85db32596a0484477d1b8042005709049
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Replace dprintk() in pnfs_update_layout with something less buggy
Problem Details: Dereferencing nfsi->layout in order to read plh_flags without holding a spin lock is bug prone. Furthermore, the dprintk() tells you nothing about whether or not the call succeeded. Replace it with something that tells you about whether or not a valid layout segment was returned for the inode in questi...
```diff diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 498af8779959..df45acaf91f7 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1027,17 +1027,15 @@ pnfs_update_layout(struct inode *ino, bool first = false; if (!pnfs_enabled_sb(NFS_SERVER(ino))) - return NULL; + goto out; if (pnfs_within_mdsthreshold(...
78e4e05c643768af170e5a4b21712d9a7a26cce5
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Replace get_device_info() with filelayout_get_device_info()
Problem Details: Fix the namespace pollution issue. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index dd392ed5f2e2..329bfbfed37d 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c @@ -874,7 +874,7 @@ static void free_blk_mountid(struct block_mount_id *mid) } } -/* This is mostly copied f...
9369a431bce1e985597eda32992960c969b27c5b
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Cleanup; add "pnfs_" prefix to put_lseg() and get_lseg()
Problem Details: Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index 53f94d915bd1..77cd1151ef0d 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c @@ -453,7 +453,7 @@ static void filelayout_commit_release(void *calldata) struct nfs_commit_data *data = calldata; data->completion_ops->comple...
70c3bd2bdf9a3c7c9282c362a4ec9ec88c713e13
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Cleanup; add "pnfs_" prefix to get_layout_hdr() and put_layout_hdr()
Problem Details: Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 57b8bda0f4e9..24252fea2c9c 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -122,7 +122,7 @@ static struct pnfs_layout_hdr * get_layout_by_fh_locked(struct nfs_client *clp, ino = igrab(lo->plh_inode); if (!ino) co...
49a85061b0bc9cb26361096482c81172c666c937
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Cleanup add a "pnfs_" prefix to mark_matching_lsegs_invalid
Problem Details: Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 1b5d809a105e..57b8bda0f4e9 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -158,7 +158,7 @@ static u32 initiate_file_draining(struct nfs_client *clp, ino = lo->plh_inode; spin_lock(&ino->i_lock); if (test_bit(NFS_LAYOUT...
05990d1bf2708b9e84d67074551f964d3738eedc
Analyze and fix the following issue in the Linux kernel code: NFS: Fix fdatasync/fsync() when confronted with a server reboot
Problem Details: If the server reboots before it can commit the unstable writes to disk, then nfs_commit_release_pages() will detect this when it compares the verifier returned by COMMIT to the one returned by WRITE. When this happens, the client needs to resend those writes in order to guarantee that they make it to s...
```diff diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 6a7fcab7ecb3..cc9b56691bef 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -259,7 +259,7 @@ nfs_file_fsync_commit(struct file *file, loff_t start, loff_t end, int datasync) struct dentry *dentry = file->f_path.dentry; struct nfs_open_context *ctx = nfs_file...
25ec43d3e6306978cf66060ed18c4160ce8fc302
Analyze and fix the following issue in the Linux kernel code: get_dvb_firmware: fix download site for tda10046 firmware
Problem Details: The previous website doesn't exist anymore. Update it to one site that actually exists. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware index 12d3952e83d5..32bc56b13b1c 100755 --- a/Documentation/dvb/get_dvb_firmware +++ b/Documentation/dvb/get_dvb_firmware @@ -116,7 +116,7 @@ sub tda10045 { sub tda10046 { my $sourcefile = "TT_PCI_2.19h_28_11_2006.zip"; - ...
afc49177b412dfe547c60740ac1f1db7f805da43
Analyze and fix the following issue in the Linux kernel code: ARM: clps711x: Fix register definitions
Problem Details: This patch contain some fixes: - Fixes the address of register PORTE. - Corrects name for DAIDR0 register. - Removes unused definition for SYNCIO_CFGLEN. - Fixes definition SYNCIO_FRMLEN. Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
```diff diff --git a/arch/arm/mach-clps711x/include/mach/clps711x.h b/arch/arm/mach-clps711x/include/mach/clps711x.h index 1dd806f2847e..c82e21ca49c7 100644 --- a/arch/arm/mach-clps711x/include/mach/clps711x.h +++ b/arch/arm/mach-clps711x/include/mach/clps711x.h @@ -31,8 +31,8 @@ #define PBDDR (0x0041) #define PCDDR...
7255f87a7169689be2d4722375744a1f932d4b28
Analyze and fix the following issue in the Linux kernel code: ARM: clps711x: Fix lowlevel debug-macro
Problem Details: CTS signal can not be used for the port and tied to any logic state. In this case we have an infinite loop waiting for the signal. For fix this problem, checking CTS removed, waiting for the signal "busy" was postponed after the byte write to the port. Signed-off-by: Alexander Shiyan <shc_work@mail.ru...
```diff diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S index 118b3d930573..cb3684f8dae0 100644 --- a/arch/arm/mach-clps711x/include/mach/debug-macro.S +++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S @@ -28,17 +28,11 @@ .endm .macro wait...
9c603e53d380459fb62fec7cd085acb0b74ac18f
Analyze and fix the following issue in the Linux kernel code: mtdchar: fix offset overflow detection
Problem Details: Sasha Levin has been running trinity in a KVM tools guest, and was able to trigger the BUG_ON() at arch/x86/mm/pat.c:279 (verifying the range of the memory type). The call trace showed that it was mtdchar_mmap() that created an invalid remap_pfn_range(). The problem is that mtdchar_mmap() does variou...
```diff diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index f2f482bec573..a6e74514e662 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c @@ -1123,6 +1123,33 @@ static unsigned long mtdchar_get_unmapped_area(struct file *file, } #endif +static inline unsigned long get_vm_size(struct vm_area...
5160b46f3e53c41c4c6b9e7cdbe0401d3afbfb63
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix BTCOEX weight initialization
Problem Details: The WLAN/BT weights have to set correctly before BTCOEX is initialized. Currently, this is not done for all chips in the AR9003 family. This patch fixes this issue by setting the weights in the init path. While at it, rename ar9462_wlan_weights to mci_wlan_weights since it is common to both AR9462 and ...
```diff diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c index 4ef610e63fcb..419e9a3f2fed 100644 --- a/drivers/net/wireless/ath/ath9k/btcoex.c +++ b/drivers/net/wireless/ath/ath9k/btcoex.c @@ -43,8 +43,8 @@ static const u32 ar9003_wlan_weights[ATH_BTCOEX_STOMP_MAX] { 0x00...
2d838bb608e2d1f6cb4280e76748cb812dc822e7
Analyze and fix the following issue in the Linux kernel code: b43legacy: Fix crash on unload when firmware not available
Problem Details: When b43legacy is loaded without the firmware being available, a following unload generates a kernel NULL pointer dereference BUG as follows: [ 214.330789] BUG: unable to handle kernel NULL pointer dereference at 0000004c [ 214.330997] IP: [<c104c395>] drain_workqueue+0x15/0x170 [ 214.331179] *pde ...
```diff diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 291cdf654088..18e208e3eca1 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c @@ -3895,6 +3895,8 @@ static void b43legacy_remove(struct ssb_device *dev) cancel_work_sync...
58901d181f12807d6bfa7ef29547b560740dd305
Analyze and fix the following issue in the Linux kernel code: brcmfmac: use kcalloc() to prevent integer overflow
Problem Details: The multiplication here looks like it could overflow. I've changed it to use kcalloc() to prevent that. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index e40cfe846a48..24e8f8d708ad 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c @@ -3297,8 +3297,8 @@ brcmf_n...
365d2ebcaba5f08590b8a988d137f7139a8163a5
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix chainmask selection for AR9462
Problem Details: Force chain 1 to be used for CCK rates since the target power table stored in EEPROM is too high to transmit with both chains. This is needed to avoid regulatory violation. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 8e27f4fb21fe..dfe6a4707fd2 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h @@ -173,6 +173,8 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd...
a8aa69dca7f754c9a2b524c90fda0209187ae9d7
Analyze and fix the following issue in the Linux kernel code: mwifiex: fix coding style issue
Problem Details: Remove unnecessary blank lines and extra tab. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index c24824f8c8a1..6fd4fa6705d9 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -688,7 +688,6 @@ mwifiex_cfg80211_dump_station(struct wiphy *wiphy, struct net_dev...
a549459c96ba99a691aa1cafeabdd327a7a2bfcf
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix rx filtering issue for older chips
Problem Details: We need to have the promiscuous mode enabled for older chipsets so that the olderchips hardware does not filters out some valid/necessary frames that need to be sent to mac80211. Fix this by enabling promiscus mode for all the chipsets whose macversion <= AR9160 chipsets. This should fix https://bugzil...
```diff diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 4480c0cc655f..83d16e7ed272 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -424,8 +424,8 @@ u32 ath_calcrxfilter(struct ath_softc *sc) rfilt |= ATH9K_RX_FILTER_CO...
5e056ef4ddeb6129f6bb170f2c26b8f370bbcda7
Analyze and fix the following issue in the Linux kernel code: Input: wacom - mark Intuos5 pad as in-prox when touching buttons
Problem Details: If the ExpressKeys on the Intuos5 are touched, they currently result an out-of-prox packet being sent even if the pad is already out of prox. This can cause some confusion in the X driver. To restore the expected semantics, we make being touched a sufficient condition to signal proximity. https://bugs...
```diff diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 532d067a9e07..93171098abbd 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -606,7 +606,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom) input_report_abs(input, ABS_WHEEL, ...
824efd37415961d38821ecbd9694e213fb2e8b32
Analyze and fix the following issue in the Linux kernel code: Input: synaptics - adjust threshold for treating position values as negative
Problem Details: Commit c039450 (Input: synaptics - handle out of bounds values from the hardware) caused any hardware reported values over 7167 to be treated as a wrapped-around negative value. It turns out that some firmware uses the value 8176 to indicate a finger near the edge of the touchpad whose actual position ...
```diff diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 14eaecea2b70..0786919c15cd 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -53,14 +53,19 @@ #define ABS_POS_BITS 13 /* - * Any position values from the hardware above the following limi...
9cb23dd4b6361538eeca33f463b649e8939edde1
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btmrvl: Fix skb buffer overflow
Problem Details: Add extra check to avoid skb buffer overflow. Fixes crash below: [ 101.030427] ------------[ cut here ]------------ [ 101.030459] kernel BUG at net/core/skbuff.c:127! [ 101.030486] invalid opcode: 0000 [#1] SMP ... [ 101.030806] Pid: 2010, comm: btmrvl_main_ser Not tainted 3.5.0+ #80 Laptop [...
```diff diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index ec5c45672f1d..1896e916ff7d 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c @@ -552,7 +552,16 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv) */ buf_len = payload[0];...
eb1eb7ae65a9d32f6c16a90419caf01221f94734
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Check if IOAPIC information is correct
Problem Details: When the IOAPIC information provided in the IVRS table is not correct or not complete the system may not boot at all when interrupt remapping is enabled. So check if this information is correct and print out a firmware bug message when it is not. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 9f69b561f5db..e39f9dbf297b 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -42,7 +42,7 @@ config AMD_IOMMU select PCI_PRI select PCI_PASID select IOMMU_API - depends on X86_64 && PCI && ACPI + depends on X86_64 && PCI && AC...
13465c0aeb9c56a4e4799f25aeff41d05f8a3fab
Analyze and fix the following issue in the Linux kernel code: Bluetooth: A2MP: Correct assoc_len size
Problem Details: Correct assoc_len and fix warning for x86-64 by using %zu specifier. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
```diff diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index 61e657ae71e9..42788cdbb4fe 100644 --- a/net/bluetooth/a2mp.c +++ b/net/bluetooth/a2mp.c @@ -379,12 +379,15 @@ static int a2mp_getampassoc_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct hci_dev *hdev; struct amp_ctrl *ctrl; struct hci_con...
19c03924d4b72eedff517f80edc6b33c14f0fe53
Analyze and fix the following issue in the Linux kernel code: drm/i915: Add eDP support for Valleyview
Problem Details: Eventhough Valleyview display block is derived from Cantiga, VLV supports eDP. So, added eDP checks in i9xx_crtc_mode_set path. v2: use different DPIO_DIVISOR values for VGA, DP and eDP v3: fix DPIO value calculation to use same values for all display interfaces v4: removed unconditional enabling of 6...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 6458f95263d5..e9c1f3c00143 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4415,6 +4415,14 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, } } + if (IS_V...
ae33cdcfc6aba86505f7a8ec288e3e1f7277de62
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix SDVO IER and status bits for Valleyview
Problem Details: Fixed SDVOB and SDVOC bit definitions for Valleyview. Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
```diff diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index b160bb09efae..f7ec794480c8 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2012,7 +2012,6 @@ static int valleyview_irq_postinstall(struct drm_device *dev) #endif I915_WRITE(VLV_MASTER...
500c25edda62a5d39c4d3b345c2e229a3f9d26be
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Fix features reporting
Problem Details: When the AMD IOMMU doesn't have extended features, an empty line gets issued in dmesg like so: [ 3.061417] AMD-Vi: Found IOMMU at 0000:00:00.2 cap 0x40 [ 3.066757] <--- [ 3.068294] pci 0000:00:00.2: irq 72 for MSI/MSI-X [ 3.081213] AMD-Vi: Lazy IO/TLB flushing enabled Fix it. Sign...
```diff diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 577669fece85..1772b3cbebf4 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -1114,8 +1114,8 @@ static void print_iommu_info(void) if (iommu_feature(iommu, (1ULL << i))) pr_cont(" %s",...
0774e392555a128cff7a94929b9ce957927fef49
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Fix wrong assumption in iommu-group specific code
Problem Details: The new IOMMU groups code in the AMD IOMMU driver makes the assumption that there is a pci_dev struct available for all device-ids listed in the IVRS ACPI table. Unfortunatly this assumption is not true and so this code causes a NULL pointer dereference at boot on some systems. Fix it by making sure t...
```diff diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index b64502dfa9f4..e89daf1b21b4 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -266,7 +266,7 @@ static void swap_pci_ref(struct pci_dev **from, struct pci_dev *to) static int iommu_init_device(struct device *dev) ...
a84a921978b7d56e0e4b87ffaca6367429b4d8ff
Analyze and fix the following issue in the Linux kernel code: key: Fix resource leak
Problem Details: On an error iov may still have been reallocated and need freeing Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
```diff diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 3364fbf46807..a0d373f76815 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c @@ -1112,12 +1112,12 @@ long keyctl_instantiate_key_iov(key_serial_t id, ret = rw_copy_check_uvector(WRITE, _payload_iov, ioc, ARRAY_SIZE(iovs...
631527703d1aa2f0c5dc2af0d998f4da95c83f0e
Analyze and fix the following issue in the Linux kernel code: keys: Fix unreachable code
Problem Details: We set ret to NULL then test it. Remove the bogus test Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
```diff diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index 54339cfd6734..178b8c3b130a 100644 --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c @@ -357,8 +357,6 @@ key_ref_t search_my_process_keyrings(struct key_type *type, switch (PTR_ERR(key_ref)) { case -EAGAIN:...
6fd4011e165e4a28c06a044c919161e657138181
Analyze and fix the following issue in the Linux kernel code: pinctrl: sirf: add lost chained_irq_enter and exit in sirfsoc_gpio_handle_irq
Problem Details: This patch fixes the chained irq hang issue, tested by DM9000 driver using GPIO0-3(irqnr=131) as the external IRQ on SiRFmarco: $ cat /proc/interrupts CPU0 CPU1 32: 1608 0 GIC sirfsoc_timer0 33: 0 3197 GIC sirfsoc_timer1 ...
```diff diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c index 8bf781e8c35e..fa88655c5e96 100644 --- a/drivers/pinctrl/pinctrl-sirf.c +++ b/drivers/pinctrl/pinctrl-sirf.c @@ -24,6 +24,7 @@ #include <linux/bitops.h> #include <linux/gpio.h> #include <linux/of_gpio.h> +#include <asm/mach/irq...
58d26c1eab8e94f89f17593e11d88a3821be6c3c
Analyze and fix the following issue in the Linux kernel code: pinctrl: sirf: fix spinlock deadlock in sirfsoc_gpio_set_input
Problem Details: sirfsoc_gpio_set_input() is called in those functions which have held the spinlock, so delete the duplicated locking. Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c index f309af2ced25..0f4f833e3c93 100644 --- a/drivers/pinctrl/pinctrl-sirf.c +++ b/drivers/pinctrl/pinctrl-sirf.c @@ -1458,15 +1458,10 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc) static inline void ...
ea5363663f33e4b1ec7fda1034f387b5edaf3d04
Analyze and fix the following issue in the Linux kernel code: pinctrl: sirf: fix a typo in sirfsoc_gpio_probe
Problem Details: Return 0 while probing success. Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c index 7fca6ce5952b..53aa6e25c7a2 100644 --- a/drivers/pinctrl/pinctrl-sirf.c +++ b/drivers/pinctrl/pinctrl-sirf.c @@ -1670,6 +1670,8 @@ static int __devinit sirfsoc_gpio_probe(struct device_node *np) irq_set_handler_data(bank->paren...
3850d29fc40f3494a3e9c3aac45b6afe53526449
Analyze and fix the following issue in the Linux kernel code: virtio_mmio: fix off by one error allocating queue
Problem Details: vm_setup_vq fails to allow VirtQueues needing only 2 pages of storage, as it should. Found with a kernel using 64kB pages, but can be provoked if a virtio device reports QueueNumMax where the descriptor table and available ring fit in one page, and the used ring on the second (<= 227 descriptors with 4...
```diff diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 5d7fee385b70..09edeecd42a5 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -334,8 +334,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, while (1) { size = PAGE...
74a74b376c997645b32a4fdf8e76705a00ae097a
Analyze and fix the following issue in the Linux kernel code: drivers/virtio/virtio_pci.c: fix error return code
Problem Details: Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != re...
```diff diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 42b20769d122..c33aea36598a 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -719,8 +719,10 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev, goto out_enable_device; vp_dev->ioaddr = p...
5543a6ac31eb4bfd8d938db6b234ce833d14e04e
Analyze and fix the following issue in the Linux kernel code: virtio: don't crash when device is buggy
Problem Details: Because of a sanity check in virtio_dev_remove, a buggy device can crash kernel. And in case of rproc it's userspace so it's not a good idea. We are unloading a driver so how bad can it be? Be less aggressive in handling this error: if it's a driver bug, warning once should be enough. Signed-off-by: ...
```diff diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index c3b3f7f0d9d1..1e8659ca27ef 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -159,7 +159,7 @@ static int virtio_dev_remove(struct device *_d) drv->remove(dev); /* Driver should have reset device. */ - BUG_ON(dev->conf...
04679f34c141a0591e525d392929efc249440a7c
Analyze and fix the following issue in the Linux kernel code: virtio-balloon: dependency fix
Problem Details: Devices should depend on virtio, not select it. It's supposed to be selected by the particular driver, e.g. VIRTIO_PCI. Make balloon depend on VIRTIO and EXPERIMENTAL (to match description). Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index f38b17a86c35..271be8059b93 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -27,8 +27,7 @@ config VIRTIO_PCI config VIRTIO_BALLOON tristate "Virtio balloon driver (EXPERIMENTAL)" - select VIRTIO - select VIRTIO_RING + dep...