id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
a0da19149f589e3e6fd5bab527b3326368ab92bc
Analyze and fix the following issue in the Linux kernel code: pata_efar: fix register naming used in efar_set_piomode()
Problem Details: Rename 'idetm_port' and 'idetm_data' variables to 'master_port' and 'master_data' respectively to match register naming used in efar_set_dmamode() and in ata_piix.c. Fix efar_set_piomode() documentation while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Gar...
```diff diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index aca47e4e29ea..f0243ed206f7 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c @@ -73,7 +73,7 @@ static DEFINE_SPINLOCK(efar_lock); /** * efar_set_piomode - Initialize host controller PATA PIO timings * @ap: Port whose timi...
6a94a746fb2572c03c664acece101ee03dae7a17
Analyze and fix the following issue in the Linux kernel code: ata_piix: unify code for programming PIO and MWDMA timings
Problem Details: Besides making things noticably simpler it results in ~2% decrease in the driver LOC count and also ~2% decrease in the driver binary size (as measured on x86-32). Fix piix_set_piomode() documentation while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzi...
```diff diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 75fdd026a997..69ac373c72ab 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -731,22 +731,11 @@ static int piix_pata_prereset(struct ata_link *link, unsigned long deadline) static DEFINE_SPINLOCK(piix_lock); -/** - * piix_...
ce986690d9bfabb8c61fd8fe785fce5d95210b66
Analyze and fix the following issue in the Linux kernel code: ata_piix: SITRE handling fix
Problem Details: Set SITRE (separate slave timing register) bit also in master-only configurations to match other PIIX-alike drivers and make further changes easier. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index cc431d6bc97f..75fdd026a997 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -786,8 +786,6 @@ static void piix_set_piomode(struct ata_port *ap, struct ata_device *adev) if (is_slave) { /* clear TIME1|IE1|PPE1|DTE1 */ ma...
067f8c7b490edc8cc947666516f2c6833b676a2e
Analyze and fix the following issue in the Linux kernel code: pata_artop: add Power Management support
Problem Details: Fixes IDE -> libata regression. There shouldn't be any problems with it as corresponding IDE's host driver (aec62xx) has been supporting PCI Power Management since Oct 10 2008 (commit feb22b7f "ide: add proper PCI PM support (v2)") and IDE PM since Jun 14 2003 (patch v2.5.73 "ide: Power Management"). ...
```diff diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index ef2bec0d4479..4b8b22efc00b 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c @@ -2,7 +2,7 @@ * pata_artop.c - ARTOP ATA controller driver * * (C) 2006 Red Hat - * (C) 2007 Bartlomiej Zolnierkiewicz + * (C) 2007,20...
81452182be1a95567da3718773dfcb45b42a579c
Analyze and fix the following issue in the Linux kernel code: pata_sl82c105: add Power Management support
Problem Details: Fixes IDE -> libata regression. There shouldn't be any problems with it as corresponding IDE's host driver (sl82c105) has been supporting PCI Power Management since Oct 10 2008 (commit feb22b7f "ide: add proper PCI PM support (v2)") and IDE PM since Jun 14 2003 (patch v2.5.73 "ide: Power Management")....
```diff diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c index c06ce8ced566..24cf200dd1c9 100644 --- a/drivers/ata/pata_sl82c105.c +++ b/drivers/ata/pata_sl82c105.c @@ -1,6 +1,7 @@ /* * pata_sl82c105.c - SL82C105 PATA for new ATA layer * (C) 2005 Red Hat Inc + * (C) 2011 Bartlomiej Z...
adacaf1449ebb69f68075ba197495e3a61946fc2
Analyze and fix the following issue in the Linux kernel code: pata_pdc2027x: add Power Management support
Problem Details: Fixes IDE -> libata regression. There shouldn't be any problems with it as corresponding IDE's host driver (pdc202xx_new) has been supporting PCI Power Management since Oct 10 2008 (commit feb22b7f "ide: add proper PCI PM support (v2)") and IDE PM since Jun 14 2003 (patch v2.5.73 "ide: Power Managemen...
```diff diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index b1511f38b0e8..7d63f24179c7 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c @@ -63,6 +63,7 @@ enum { }; static int pdc2027x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); +static int pdc2...
4780c0b25e3f9d77122fb03ca000d3aa53992677
Analyze and fix the following issue in the Linux kernel code: pata_it8213: fix register naming used in it8213_set_piomode()
Problem Details: Rename 'idetm_port' and 'idetm_data' variables to 'master_port' and 'master_data' respectively to match register naming used in it8213_set_dmamode() and in ata_piix.c. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c index 4f0f7795a7a1..cf9164d79f11 100644 --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c @@ -76,8 +76,8 @@ static void it8213_set_piomode (struct ata_port *ap, struct ata_device *adev) { unsigned int pio = adev->pio_mode - XFER...
11e872a3e1e93ba00e5ec04a74c4d2fe3e14e708
Analyze and fix the following issue in the Linux kernel code: pata_it8213: add UDMA100 and UDMA133 support
Problem Details: Fixes IDE -> libata regression. IDE's it8213 host driver has been supporting those modes (per official documentation) since the initial driver's merge on Feb 7 2007 (commit 9c6712c0 "ide: add it8213 IDE driver"). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik...
```diff diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c index 998af0e629b1..4f0f7795a7a1 100644 --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c @@ -163,7 +163,7 @@ static void it8213_set_dmamode (struct ata_port *ap, struct ata_device *adev) /* Clocks follow the PIIX style */ ...
d9d579842e9e10a49e1ba6a16be5ce2757d38cc0
Analyze and fix the following issue in the Linux kernel code: pata_via: add via_fixup()
Problem Details: * Fix via_init_one() to enable clock on 66 MHz devices (bug introduced in commit 460f531 "pata_via: store UDMA masks in via_isa_bridges table"). * Factor out common code from via_[re]init_one() to via_fixup(). Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bz...
```diff diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 8e9f5048a10a..255f336cd7ea 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c @@ -509,6 +509,27 @@ static void via_config_fifo(struct pci_dev *pdev, unsigned int flags) } } +static void via_fixup(struct pci_dev *pdev, const st...
46b9e77076a609d10b2009310a1e58281f8daaf9
Analyze and fix the following issue in the Linux kernel code: pata_atiixp: add proper ->prereset method
Problem Details: Fixes PCI access before PCI resources are allocated. Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index 43755616dc5a..be1aa1486d39 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c @@ -48,6 +48,31 @@ static int atiixp_cable_detect(struct ata_port *ap) static DEFINE_SPINLOCK(atiixp_lock); +/** + * atiixp_prereset - p...
57242762e4d8e7c1fda6d79bf8a6f081f22db57d
Analyze and fix the following issue in the Linux kernel code: pata_cmd64x: documentation fix
Problem Details: Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index b8f2a64bef7b..e1fb39a74ce1 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c @@ -82,7 +82,7 @@ static int cmd648_cable_detect(struct ata_port *ap) } /** - * cmd64x_set_piomode - set PIO and MWDMA timing + * cmd64x_...
802872e7d7470f6cd20fa5c5f7e1e5fdba707fa8
Analyze and fix the following issue in the Linux kernel code: pata_ali: fix "Satelite" typo
Problem Details: Cosmetic fix but thanks to it pata_ali's DMI table now matches alim15x3's one. Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index cadd67998bac..61da0694aecd 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c @@ -56,7 +56,7 @@ static const struct dmi_system_id cable_dmi_table[] = { }, }, { - .ident = "Toshiba Satelite S1800-814", + .ident = "Toshiba S...
f4c6ae50209a4405b2b0bc99eb449060877eef42
Analyze and fix the following issue in the Linux kernel code: pata_cmd64x: add cmd64x_fixup()
Problem Details: Factor out common code from cmd64x_[re]init_one() to cmd64x_fixup(). Remove stale comment and fix a minor CodingStyle issue while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index 7bafc16cf5e0..b8f2a64bef7b 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c @@ -288,6 +288,22 @@ static struct ata_port_operations cmd648_port_ops = { .cable_detect = cmd648_cable_detect, }; +static void cmd64x_f...
f6b56696b974a7d6d55f98ebcfb0a1099696fc2e
Analyze and fix the following issue in the Linux kernel code: pata_artop: unify ->prereset methods
Problem Details: * Unify ->prereset methods for ATP850 and ATP86x[R] chipsets. * Fix ->prereset documentation while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index 78a93b690959..ef2bec0d4479 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c @@ -39,31 +39,15 @@ static int clock = 0; -static int artop6210_pre_reset(struct ata_link *link, unsigned long deadline) -{ - struct ata_por...
e9f7cd51ccfa4d77ca1c01fd50c1c6af55ded1c9
Analyze and fix the following issue in the Linux kernel code: pata_cs5535: fix DRV_NAME
Problem Details: .. and also a module description while at it. Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c index 03a93186aa19..697a3edd38c3 100644 --- a/drivers/ata/pata_cs5535.c +++ b/drivers/ata/pata_cs5535.c @@ -38,7 +38,7 @@ #include <linux/libata.h> #include <asm/msr.h> -#define DRV_NAME "cs5535" +#define DRV_NAME "pata_cs5535" #define DRV_...
70f301a67d5fc9690ed558b132bd3300ab64f23b
Analyze and fix the following issue in the Linux kernel code: pata_sc1200: fix DRV_NAME
Problem Details: Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c index e2c18257adff..542fb38384c7 100644 --- a/drivers/ata/pata_sc1200.c +++ b/drivers/ata/pata_sc1200.c @@ -38,7 +38,7 @@ #include <scsi/scsi_host.h> #include <linux/libata.h> -#define DRV_NAME "sc1200" +#define DRV_NAME "pata_sc1200" #defi...
3bd9856857339d7ee8c4ad50030583f1b9415c39
Analyze and fix the following issue in the Linux kernel code: ore: Support for partial component table
Problem Details: Users like the objlayout-driver would like to only pass a partial device table that covers the IO in question. For example exofs divides the file into raid-group-sized chunks and only serves group_width number of devices at a time. The partiality is communicated by setting ore_componets->first_dev and...
```diff diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h index 006fd6f33571..51f4b4c40f09 100644 --- a/fs/exofs/exofs.h +++ b/fs/exofs/exofs.h @@ -217,6 +217,7 @@ static inline void exofs_init_comps(struct ore_components *oc, one_comp->obj.id = oid; exofs_make_credential(one_comp->cred, &one_comp->obj); + oc->fir...
6352187ee886811afe7f8f3cc08664f59b364aa8
Analyze and fix the following issue in the Linux kernel code: pata_sil680: documentation fixes
Problem Details: Fix documentation for sil680_sel[reg,dev]() and sil680_set_[pio,dma]mode(). Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 31f759b0ab71..0e2a5d22bbd3 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c @@ -38,11 +38,12 @@ /** * sil680_selreg - return register base - * @hwif: interface + * @ap: ATA interface * @r: config offset * - ...
38a1ed4f039db32b418007ac365076cf53647ebd
Analyze and fix the following issue in the Linux kernel code: xen: Fix selfballooning and ensure it doesn't go too far
Problem Details: The balloon driver's "current_pages" is very different from totalram_pages. Self-ballooning needs to be driven by the latter. Also, Committed_AS doesn't account for pages used by the kernel so: 1) Add totalreserve_pages to Committed_AS for the normal target. 2) Enforce a floor for when there are litt...
```diff diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c index 1b4afd81f872..ff3f2e423af4 100644 --- a/drivers/xen/xen-selfballoon.c +++ b/drivers/xen/xen-selfballoon.c @@ -68,6 +68,8 @@ */ #include <linux/kernel.h> +#include <linux/bootmem.h> +#include <linux/swap.h> #include <linux/mm....
dda1852802a6cc6fdecb9021e491b2de680c76b9
Analyze and fix the following issue in the Linux kernel code: xen/blkback: Check for proper operation.
Problem Details: The patch titled: "xen/blkback: Fix the inhibition to map pages when discarding sector ranges." had the right idea except that it used the wrong comparison operator. It had == instead of !=. This fixes the bug where all (except discard) operations would have been ignored. Signed-off-by: Konrad Rzeszu...
```diff diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 53c81de6f886..a1ee2659d2bc 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -707,7 +707,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, * the hypercall to un...
78d090b0be3f072a3c95022771c35183af961aaa
Analyze and fix the following issue in the Linux kernel code: PCI / PM: Remove unnecessary error variable from acpi_dev_run_wake()
Problem Details: The result returned by acpi_dev_run_wake() is always either -EINVAL or -ENODEV, while obviously it should return 0 on success. The problem is that the leftover error variable, that's not really used in the function, is initialized with -ENODEV and then returned without modification. To fix this issue...
```diff diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index cd3c4f1cdf1b..4ecb6408b0d6 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c @@ -285,7 +285,6 @@ static int acpi_dev_run_wake(struct device *phys_dev, bool enable) { struct acpi_device *dev; acpi_handle handle; - int error = ...
6af8bef14d6fc9e4e52c83fd646412e9dedadd26
Analyze and fix the following issue in the Linux kernel code: PCI hotplug: acpiphp: Prevent deadlock on PCI-to-PCI bridge remove
Problem Details: I originally submitted a patch to workaround this by pushing all Ejection Requests and Device Checks onto the kacpi_hotplug queue. http://marc.info/?l=linux-acpi&m=131678270930105&w=2 The patch is still insufficient in that Bus Checks also need to be added. Rather than add all events, including non-...
```diff diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index fa32f584229f..f31c5c5f1b7e 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -80,7 +80,8 @@ static acpi_osd_handler acpi_irq_handler; static void *acpi_irq_context; static struct workqueue_struct *kacpid_wq; static struct workqueue_struct *...
3e309cdf07c930f29a4e0f233e47d399bea34c68
Analyze and fix the following issue in the Linux kernel code: PCI quirk: mmc: Always check for lower base frequency quirk for Ricoh 1180:e823
Problem Details: Commit 15bed0f2f added a quirk for the e823 Ricoh card reader to lower the base frequency. However, the quirk first checks to see if the proprietary MMC controller is disabled, and returns if so. On some devices, such as the Lenovo X220, the MMC controller is already disabled by firmware it seems, bu...
```diff diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index f70c36f9b1f3..e5aadf357ae7 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2745,20 +2745,6 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev) /* disable must be done via function #0 */ if (PCI_FUNC(dev->devfn)) return...
16014d87509e26d6ed6935adbbf437a571fb5870
Analyze and fix the following issue in the Linux kernel code: Smack: compilation fix
Problem Details: On some build configurations PER_CLEAR_ON_SETID symbol was not found when compiling smack_lsm.c. This patch fixes the issue by explicitly doing #include <linux/personality.h>. Signed-off-by: Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com> Signed-off-by: Casey Schaufler <cschaufler@cschaufler-intel.(none...
```diff diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index d55b991268d5..7db62b48eb42 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -35,6 +35,7 @@ #include <linux/audit.h> #include <linux/magic.h> #include <linux/dcache.h> +#include <linux/personality.h> #includ...
6c3c5b26d08569ed80e10d3e02d3c997ed1e6e7c
Analyze and fix the following issue in the Linux kernel code: perf buildid: Fix possible unterminated readlink() result buffer
Problem Details: The readlink function doesn't guarantee that a '\0' will be put at the end of the provided buffer if there is no space left. No need to do "buf[len] = '\0';" since the buffer is allocated with zalloc(). Link: http://lkml.kernel.org/r/4E986ABF.9040706@intra2net.com Signed-off-by: Thomas Jarosch <thoma...
```diff diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index f2ceb0f7d669..2143a32638c2 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1289,7 +1289,7 @@ int build_id_cache__remove_s(const char *sbuild_id, const char *debugdir) if (access(linkname, F_OK)) goto out_free; ...
437cfe7a37df07e2201036fb0903cadae6b08e74
Analyze and fix the following issue in the Linux kernel code: perf hists browser: Invalidate ui_browser->top after timer calls
Problem Details: With underlying dynamic data structures we need to invalidate pointers to them after a timer, as that entry may have vanished (decayed in top, for instance). I forgot about browser_ui->top. Fix it by resetting it to null after a timer. The seek operation from SEEK_SET will then set it to a valid entry...
```diff diff --git a/tools/perf/util/ui/browser.c b/tools/perf/util/ui/browser.c index 2923c493fb6a..078ceaf5f8c1 100644 --- a/tools/perf/util/ui/browser.c +++ b/tools/perf/util/ui/browser.c @@ -249,6 +249,7 @@ void ui_browser__update_nr_entries(struct ui_browser *browser, u32 nr_entries) browser->top_idx += offset;...
569083c08dc16c043b4bdd473d41ff85a2b2df9e
Analyze and fix the following issue in the Linux kernel code: drbd: fix drbd_delete_device: remove vnr from volumes; idr_remove(); synchronize_rcu(); before cleanup
Problem Details: Still missing: rcu_readlock() on the various call sites that access/iterate over those idrs. We don't need a specific write lock, as we only modify from configuration context, which is already strictly serialized. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenbe...
```diff diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 997b2e214670..9f6db5947c65 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -2124,7 +2124,9 @@ void drbd_delete_device(unsigned int minor) if (!mdev) return; - idr_remove(&mdev->tconn->vo...
206d3589411fbdead67a358ce9aaa20d771724df
Analyze and fix the following issue in the Linux kernel code: drbd: Concurrent write detection fix
Problem Details: Commit 9b1e63e changed the concurrent write detection algorithm to only insert peer requests into write_requests tree after determining that there is no conflict. With this change, new conflicting local requests could be added while the algorithm runs, but this case was not handled correctly. Instead...
```diff diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index c08a99d57c5e..c61bf121bd0f 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -1636,16 +1636,10 @@ static int e_send_discard_ack(struct drbd_work *w, int unused) struct drbd_peer...
9676c760979371701ea5a6f8adb7ce8125c22c7d
Analyze and fix the following issue in the Linux kernel code: drbd: fix a wrong likely(), updated comments
Problem Details: Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
```diff diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 01ab0bc0cd9e..8ee5c4f3d1c5 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -295,6 +295,7 @@ void drbd_csum_bio(struct drbd_conf *mdev, struct crypto_hash *tfm, struct bio * crypto_has...
0097f0405d365eff66235f887d47fa0b62b28599
Analyze and fix the following issue in the Linux kernel code: lru_cache.h: fix comments referring to ts_ instead of lc_
Problem Details: For some time we contemplated calling the "struct lru_cache" a "struct tracked_set", and some comments kept the ts_ prefix. Fix those to match the member field names. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
```diff diff --git a/lib/lru_cache.c b/lib/lru_cache.c index 9f353f7f41ca..4f638b86674f 100644 --- a/lib/lru_cache.c +++ b/lib/lru_cache.c @@ -378,7 +378,7 @@ struct lc_element *lc_get(struct lru_cache *lc, unsigned int enr) /* it was not present in the active set. * we are going to recycle an unused (or even "fre...
867f57483b1759f8cd76ec31ff1f37abde5ad577
Analyze and fix the following issue in the Linux kernel code: drbd: fix typo in comment
Problem Details: Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
```diff diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index ad618637172b..1ce3de6eed1b 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c @@ -546,7 +546,7 @@ cancel: } /** - * drbd_al_apply_to_bm() - Sets the bitmap to diry(1) where covered ba act...
436fc280261dcfce5af38f08b89287750dc91cd2
Analyze and fix the following issue in the Linux kernel code: tracing: Fix returning of duplicate data after EOF in trace_pipe_raw
Problem Details: The trace_pipe_raw handler holds a cached page from the time the file is opened to the time it is closed. The cached page is used to handle the case of the user space buffer being smaller than what was read from the ring buffer. The left over buffer is held in the cache so that the next read will conti...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index cea16053f553..b24a72d35008 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -3903,8 +3903,6 @@ tracing_buffers_read(struct file *filp, char __user *ubuf, if (info->read < PAGE_SIZE) goto read; - info->read = 0; - trace_access...
9b5f8b31af57a8ce9e9f77864d9143b5e3304815
Analyze and fix the following issue in the Linux kernel code: ftrace: Fix README to state tracing_on to start/stop tracing
Problem Details: tracing_enabled option is deprecated. To start/stop tracing, write to /sys/kernel/debug/tracing/tracing_on without tracing_enabled. This patch is based on Linux 3.1.0-rc1 Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com> Link: http://lkml.kernel.org/r/1313127022-23830-1-git-send-email-leemgs1@gmail...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index f86efe90ca45..cea16053f553 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2720,9 +2720,9 @@ static const char readme_msg[] = "# cat /sys/kernel/debug/tracing/trace_options\n" "noprint-parent nosym-offset nosym-addr noverbose\n"...
1f1503ba096d3a394d1454dac77467092ca996e6
Analyze and fix the following issue in the Linux kernel code: xen/gntdev: Fix sleep-inside-spinlock
Problem Details: BUG: sleeping function called from invalid context at /local/scratch/dariof/linux/kernel/mutex.c:271 in_atomic(): 1, irqs_disabled(): 0, pid: 3256, name: qemu-dm 1 lock held by qemu-dm/3256: #0: (&(&priv->lock)->rlock){......}, at: [<ffffffff813223da>] gntdev_ioctl+0x2bd/0x4d5 Pid: 3256, comm: qemu-d...
```diff diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 3e3603f35242..880798aae2f2 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c @@ -492,13 +492,11 @@ static int gntdev_release(struct inode *inode, struct file *flip) pr_debug("priv %p\n", priv); - spin_lock(&priv->lock); while (!li...
77447991b6c9aef83d101aae4a9e5d83c206b9c5
Analyze and fix the following issue in the Linux kernel code: xenbus: Fix loopback event channel assuming domain 0
Problem Details: The xenbus event channel established in xenbus_init is intended to be a loopback channel, but the remote domain was hardcoded to 0; this will cause the channel to be unusable when xenstore is not being run in domain 0. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Reviewed-by: Ian Campbell <I...
```diff diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 739769551e33..d5347fe15882 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c @@ -724,7 +724,7 @@ static int __init xenbus_init(void) /* Next allocate a local port which xenstored ca...
15ec090833eeb2ab242c049a68b6224345771619
Analyze and fix the following issue in the Linux kernel code: microblaze: Raise SIGFPE/FPE_INTDIV for div by zero
Problem Details: It fixes the signal nr raised for divizion by zero from SIGILL to SIGFPE, in accordance to POSIX and other archs. This came up due to a failed test in the GCC testsuite. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
```diff diff --git a/arch/microblaze/kernel/exceptions.c b/arch/microblaze/kernel/exceptions.c index 66fad2301221..6348dc82f428 100644 --- a/arch/microblaze/kernel/exceptions.c +++ b/arch/microblaze/kernel/exceptions.c @@ -119,7 +119,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, case MI...
41b7602ed17a6bbb3b3d33087c39ef5c3a5589c7
Analyze and fix the following issue in the Linux kernel code: microblaze: Fix access_ok macro
Problem Details: There is the problem with bit OR (|) because for some combination is addr | size | addr+size equal to seq. For standard kernel setting (kernel starts at 0xC0000000) is seq for user space 0xBFFFFFFF and everything below this limit is fine. But even address 0xBFFFFFFF is fine because it is below kernel...
```diff diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h index 5bb95a11880d..072b0077abf9 100644 --- a/arch/microblaze/include/asm/uaccess.h +++ b/arch/microblaze/include/asm/uaccess.h @@ -95,7 +95,7 @@ static inline int ___range_ok(unsigned long addr, unsigned long size) * ...
153b19a3b9fd8b9478495b9ee1f93f6a77c564f9
Analyze and fix the following issue in the Linux kernel code: x86, mrst: use a temporary variable for SFI irq
Problem Details: SFI tables reside in RAM and should not be modified once they are written. Current code went to set pentry->irq to zero which causes subsequent reads to fail with invalid SFI table checksum. This will break kexec as the second kernel fails to validate SFI tables. To fix this we use temporary variabl...
```diff diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c index 58425adc22c6..fe73276e026b 100644 --- a/arch/x86/platform/mrst/mrst.c +++ b/arch/x86/platform/mrst/mrst.c @@ -678,38 +678,40 @@ static int __init sfi_parse_devs(struct sfi_table_header *table) pentry = (struct sfi_device_table_en...
96cd8951684adaa5fd72952adef532d0b42f70e1
Analyze and fix the following issue in the Linux kernel code: ftmac100: fix skb truesize underestimation
Problem Details: ftmac100 allocates a page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. If frame is under 64 bytes, page is freed, so increase truesize only for bigger frames. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Po-Yu Chuang <ratbert@faraday...
```diff diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c index 9bd7746cbfcf..a127cb2476c7 100644 --- a/drivers/net/ethernet/faraday/ftmac100.c +++ b/drivers/net/ethernet/faraday/ftmac100.c @@ -439,7 +439,10 @@ static bool ftmac100_rx_packet(struct ftmac100 *priv, int *proce...
e7e5a4033f765e2a37095cd0a73261c99840f77e
Analyze and fix the following issue in the Linux kernel code: niu: fix skb truesize underestimation
Problem Details: Add a 'truesize' argument to niu_rx_skb_append(), filled with rcr_size by the caller to properly account frag sizes in skb->truesize Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index d1338885dc8b..23740e848ac9 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c @@ -3287,17 +3287,13 @@ static u16 tcam_get_valid_entry_cnt(struct niu *np) } static void niu_rx_skb_append(struct sk...
5e6c355c47e75314fd2282d087616069d4093ecf
Analyze and fix the following issue in the Linux kernel code: vmxnet3: fix skb truesize underestimation
Problem Details: vmxnet3 allocates a page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Shreyas Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 1694038192e0..902f284fd054 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -658,6 +658,7 @@ vmxnet3_append_frag(struct sk_buff *skb, struct Vmxnet3_RxCompDesc *rcd, frag->page_off...
5935f81c595897d213afcf756e3e41af7c704f0e
Analyze and fix the following issue in the Linux kernel code: ftgmac100: fix skb truesize underestimation
Problem Details: ftgmac100 allocates a page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. If frame is under 64 bytes, page is freed, and truesize adjusted. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Po-Yu Chuang <ratbert@faraday-tech.com> Signed-off...
```diff diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 54709af917e9..fb5579a3b19d 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -467,7 +467,7 @@ static bool ftgmac100_rx_packet(struct ftgmac100 *priv, int *...
7ae60b3f3b297b7f04025c93f1cb2275c3a1dfcd
Analyze and fix the following issue in the Linux kernel code: sky2: fix skb truesize underestimation
Problem Details: sky2 allocates a page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 6895e3be260c..92634907bf8d 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c @@ -2486,7 +2486,7 @@ static void skb_put_frags(struct sk_buff *skb, unsigned int hdr_space, fr...
fdb684ac1c6ea93702891c43fd2ff8aadd7f2868
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: cpu-tegra: sparse type fix
Problem Details: Type fix: arch/arm/mach-tegra/cpu-tegra.c:144:14: warning: incorrect type in argument 5 (different signedness) arch/arm/mach-tegra/cpu-tegra.c:144:14: expected unsigned int *index arch/arm/mach-tegra/cpu-tegra.c:144:14: got int *<noident> Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: ...
```diff diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c index 0e1016a827ac..f15b689b749f 100644 --- a/arch/arm/mach-tegra/cpu-tegra.c +++ b/arch/arm/mach-tegra/cpu-tegra.c @@ -130,7 +130,7 @@ static int tegra_target(struct cpufreq_policy *policy, unsigned int target_freq, ...
784278e116d6243f2588e28d2404425858df65b4
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: tegra_powergate_is_powered should be static
Problem Details: Not exported and not used externally. Also, fix return type. Due to new return type, errors can't be returned so WARN_ON instead of returning error if a bad parameter is specified. Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Stephen Warren <swarren@nvidia.com> Acked-by: Arnd Bergmann <ar...
```diff diff --git a/arch/arm/mach-tegra/include/mach/powergate.h b/arch/arm/mach-tegra/include/mach/powergate.h index 401d1b725291..39c396d2ddb0 100644 --- a/arch/arm/mach-tegra/include/mach/powergate.h +++ b/arch/arm/mach-tegra/include/mach/powergate.h @@ -31,7 +31,6 @@ int tegra_powergate_power_on(int id); int t...
31e660685ddf6ca3686519b966f289f0f83f7780
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: pcie: 0 -> NULL changes
Problem Details: Fixes: arch/arm/mach-tegra/pcie.c:465:10: warning: Using plain integer as NULL pointer Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Stephen Warren <swarren@nvidia.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
```diff diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index f7c89ee5a7e2..f5aa173c26b3 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c @@ -462,7 +462,7 @@ static struct pci_bus __init *tegra_pcie_scan_bus(int nr, struct tegra_pcie_port *pp; if (nr >= tegra_pcie.num_...
3ead5137c2ceee39901415084e7ca3ab04d01970
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: pcie: include board.h
Problem Details: Fixes: arch/arm/mach-tegra/pcie.c:908:12: warning: symbol 'tegra_pcie_init' was not declared. Should it be static? Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Stephen Warren <swarren@nvidia.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
```diff diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index 6b0c235aaef6..f7c89ee5a7e2 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c @@ -41,6 +41,8 @@ #include <mach/clk.h> #include <mach/powergate.h> +#include "board.h" + /* register definitions */ #define AFI_OF...
efaa19a582819dc0d6d61755a094a4b45f86827e
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: pcie: don't cast __iomem pointers
Problem Details: Fixes a lot of: arch/arm/mach-tegra/pcie.c:678:8: warning: cast removes address space of expression arch/arm/mach-tegra/pcie.c:678:8: warning: incorrect type in argument 1 (different base types) arch/arm/mach-tegra/pcie.c:678:8: expected void const volatile [noderef] <asn:2>*<noident> arch/arm/mach...
```diff diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index f1f699d86c32..6b0c235aaef6 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c @@ -150,9 +150,9 @@ static void __iomem *reg_pmc_base = IO_ADDRESS(TEGRA_PMC_BASE); #define pmc_writel(value, reg) \ - __raw_writel(v...
45fba2186256988a8f0cc2d7f8de6ef53fb1e4ba
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: tegra2_clocks: 0 -> NULL changes
Problem Details: Fixes a lot of: arch/arm/mach-tegra/tegra2_clocks.c:921:34: warning: Using plain integer as NULL pointer arch/arm/mach-tegra/tegra2_clocks.c:1462:4: warning: Using plain integer as NULL pointer arch/arm/mach-tegra/tegra2_clocks.c:1864:4: warning: Using plain integer as NULL pointer Signed-off-by: Olo...
```diff diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c index 3325cd6b7f28..6dd5133e56d3 100644 --- a/arch/arm/mach-tegra/tegra2_clocks.c +++ b/arch/arm/mach-tegra/tegra2_clocks.c @@ -918,7 +918,7 @@ static struct clk_ops tegra_pll_div_ops = { static void tegra2_periph_clk_init(s...
d395935f55a7ceebf22c752bbfbfe1272648a08b
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: tegra2_clocks: don't cast __iomem pointers
Problem Details: Fixes a lot of: arch/arm/mach-tegra/tegra2_clocks.c:180:2: warning: cast removes address space of expression arch/arm/mach-tegra/tegra2_clocks.c:180:2: warning: incorrect type in argument 1 (different base types) arch/arm/mach-tegra/tegra2_clocks.c:180:2: expected void const volatile [noderef] <asn...
```diff diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c index 0fe9b3ee2947..3325cd6b7f28 100644 --- a/arch/arm/mach-tegra/tegra2_clocks.c +++ b/arch/arm/mach-tegra/tegra2_clocks.c @@ -166,13 +166,13 @@ static DEFINE_SPINLOCK(clock_register_lock); static int tegra_periph_clk_enabl...
75d711662f02ad850f28507c0231cdce8fe075af
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: timer: don't cast __iomem pointers
Problem Details: Fixes a lot of: arch/arm/mach-tegra/timer.c:75:2: warning: cast removes address space of expression arch/arm/mach-tegra/timer.c:75:2: warning: incorrect type in argument 1 (different base types) arch/arm/mach-tegra/timer.c:75:2: expected void const volatile [noderef] <asn:2>*<noident> arch/arm/mach...
```diff diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c index 90350420c4e9..4d6759a02498 100644 --- a/arch/arm/mach-tegra/timer.c +++ b/arch/arm/mach-tegra/timer.c @@ -62,9 +62,9 @@ static struct timespec persistent_ts; static u64 persistent_ms, last_persistent_ms; #define timer_writel(value,...
e748b7310f281d7bc739fcc8e8f71a8ac00614d7
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: annotate IO_*_VIRT pointers
Problem Details: Provide __iomem annotation for IO_*_VIRT pointers, which will propagate up through IO_TO_VIRT(). Also fixes a 0 to NULL conversion of the base case to silence sparse. Unfortunately map_desc takes an unsigned long for the pointer instead of a void __iomem *. For now, cast explicitly for those cases. v...
```diff diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h index 4cea2230c8dc..35a011fbc42d 100644 --- a/arch/arm/mach-tegra/include/mach/io.h +++ b/arch/arm/mach-tegra/include/mach/io.h @@ -33,20 +33,26 @@ * */ +#ifdef __ASSEMBLY__ +#define IOMEM(x) (x) +#else +#define IOM...
0ab3d8b3213c8bb55370b11fcc5321ee4f2c5e92
Analyze and fix the following issue in the Linux kernel code: cy82c693: fix PCI device selection
Problem Details: Wrong PCI device may be selected by cy82c693_set_pio_mode() if modular IDE host drivers are used and there are additional IDE PCI devices installed in the system. Fix it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/ide/cy82c693.c b/drivers/ide/cy82c693.c index 67cbcfa35122..847553fd8b96 100644 --- a/drivers/ide/cy82c693.c +++ b/drivers/ide/cy82c693.c @@ -1,7 +1,7 @@ /* * Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer * Copyright (C) 1998-2002 Andre Hedrick <andre@li...
acc8dbe7f44f1bab6fcf21f2d5efb32ea92e19fd
Analyze and fix the following issue in the Linux kernel code: icside: DMA support fix
Problem Details: Fix problem introduced by commit 5e37bdc ("ide: add struct ide_dma_ops (take 3)"): d.dma_ops shouldn't be cleared if we are going to use DMA. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c index 4a697a238e28..8716066a2f2b 100644 --- a/drivers/ide/icside.c +++ b/drivers/ide/icside.c @@ -521,8 +521,8 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) { d....
839e7306e5d1ebd57cf12e83d9910b8b2dbe79ba
Analyze and fix the following issue in the Linux kernel code: IDE: Don't powerdown Compaq Triflex IDE device on suspend
Problem Details: Don't powerdown Compaq Triflex IDE device on suspend This fixes APM suspend on Compaq Armada 7400. APM BIOS doesn't suspend if IDE is powered down when suspending. The Triflex controller is found only on old Compaq boards, so this patch will hopefully have no side effects. This patch fixes a suspend ...
```diff diff --git a/drivers/ide/triflex.c b/drivers/ide/triflex.c index e53a1b78378b..281c91426345 100644 --- a/drivers/ide/triflex.c +++ b/drivers/ide/triflex.c @@ -113,12 +113,26 @@ static const struct pci_device_id triflex_pci_tbl[] = { }; MODULE_DEVICE_TABLE(pci, triflex_pci_tbl); +#ifdef CONFIG_PM +static int...
94443f43404239c2a6dc4252a7cb9e77f5b1eb6e
Analyze and fix the following issue in the Linux kernel code: CIFS: Fix incorrect max RFC1002 write size value
Problem Details: ..the length field has only 17 bits. Cc: <stable@kernel.org> Acked-by: Jeff Layton <jlayton@samba.org> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
```diff diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index ff47c1842bec..82bc0d27e495 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2809,10 +2809,10 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info, /* * When the server doesn't allow large posix writes, only allow a wsize of - * 128k minu...
98a045d7e4a59db0865a59eea2140fe36bc7c220
Analyze and fix the following issue in the Linux kernel code: e1000e: fix skb truesize underestimation
Problem Details: e1000e allocates a page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 78c5d21fa34b..035ce73c388e 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -1300,7 +1300,7 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adap...
98130646770db42cd14c44ba0d7f2d0eb8078820
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix skb truesize underestimation
Problem Details: ixgbe allocates half a page per skb fragment. We must account PAGE_SIZE/2 increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index f6fea6798851..f740a8eadf7c 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -1326,7 +1326,7 @@ static bool ixgbe_clean_rx_irq(struct i...
95b9c1dfb7b929f5f3b203ed95c28bdfd069d122
Analyze and fix the following issue in the Linux kernel code: igb: fix skb truesize underestimation
Problem Details: e1000 allocates half a page per skb fragment. We must account PAGE_SIZE/2 increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 8227824e2027..06109af8ae73 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -5950,7 +5950,7 @@ static bool igb_clean_rx_irq(struct igb_q_vector *q_vec...
ed64b3cc11502f50e1401f12e33d021592800bca
Analyze and fix the following issue in the Linux kernel code: e1000: fix skb truesize underestimation
Problem Details: e1000 allocates a full page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index a42421f26678..7b54d7246150 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c @@ -3737,7 +3737,7 @@ static void e1000_consume_page(struct e...
a1f4e8bcbccf50cf1894c263af4d677d4f566533
Analyze and fix the following issue in the Linux kernel code: bnx2: fix skb truesize underestimation
Problem Details: bnx2 allocates a full page per fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 3c221be9d1e2..6ff7636e73a2 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -3051,7 +3051,6 @@ bnx2_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, struct sk_buff ...
bdb28a97f46b5307e6e9351de52a9dd03e711a2f
Analyze and fix the following issue in the Linux kernel code: be2net: fix truesize errors
Problem Details: Fix skb truesize underestimations of this driver. Each frag truesize is exactly rx_frag_size bytes. (2048 bytes per default) A driver should not use "sizeof(struct sk_buff)" at all. Signed-off-by: Eric Dumazet <eric.dumazet> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S...
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 816ce56de7ac..679b8041e43a 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -1071,6 +1071,7 @@ static void skb_fill_rx_data(struct be_adapter ...
87fb4b7b533073eeeaed0b6bf7c2328995f6c075
Analyze and fix the following issue in the Linux kernel code: net: more accurate skb truesize
Problem Details: skb truesize currently accounts for sk_buff struct and part of skb head. kmalloc() roundings are also ignored. Considering that skb_shared_info is larger than sk_buff, its time to take it into account for better memory accounting. This patch introduces SKB_TRUESIZE(X) macro to centralize various assu...
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index ac6b05a325cc..64f86951ef74 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -46,6 +46,11 @@ #define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0)) #define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2)) +/* return minimum truesize of one s...
25fcf2b7f1f65d2cc12182ced3ccd47576970be4
Analyze and fix the following issue in the Linux kernel code: gpio-pca953x: fix gpio_base
Problem Details: gpio_base was set to 0 if no system platform data or open firmware platform data was provided. This led to conflicts, if any other gpiochip with a gpiobase of 0 was instantiated already. Setting it to -1 will automatically use the first one available. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Si...
```diff diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index c43b8ff626a7..0550dcb85814 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -577,6 +577,7 @@ pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert) void pca953x_get_alt_pdata(struct...
78a43158724793f9dc25f1e4c866393654704b87
Analyze and fix the following issue in the Linux kernel code: gpio/omap: fix build error with certain OMAP1 configs
Problem Details: With commit f64ad1a0e21a, "gpio/omap: cleanup _set_gpio_wakeup(), remove ifdefs", access to build time conditionally omitted 'suspend_wakeup' member of the 'gpio_bank' structure has been placed unconditionally in function _set_gpio_wakeup(), which is always built. This resulted in the driver compilatio...
```diff diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 0599854e2217..118ec12d2d5f 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -34,8 +34,8 @@ struct gpio_bank { u16 irq; u16 virtual_irq_start; int method; -#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_...
431879a762277ddb9df959bba80216f3ef3d8e17
Analyze and fix the following issue in the Linux kernel code: usb: gadget: mv_udc: fix compile warning
Problem Details: | drivers/usb/gadget/mv_udc_core.c: In function 'handle_setup_packet': | drivers/usb/gadget/mv_udc_core.c:1556:6: warning: 'status' may be \ used uninitialized in this function Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index 046ab122ee88..fbed5d08beee 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -1553,7 +1553,7 @@ static void ch9setaddress(struct mv_udc *udc, struct usb_ctrlrequest *setup) static void c...
daec765da767e4a6a30e1298862b28f2cae9a73f
Analyze and fix the following issue in the Linux kernel code: usb: gadget: mv_udc: fix dtd dma confusion
Problem Details: The controller will prime failure sometimes when do the iperf test. Add delay to wait controller release dtd dma before we free it. Then the issue is gone. Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index ffa6f3097a64..9d960f1f7c7f 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -138,6 +138,7 @@ static int process_ep_req(struct mv_udc *udc, int index, int i, direction; int retval = 0...
96c2bbb09d0742148a305d7afbdf7c5803fd78c1
Analyze and fix the following issue in the Linux kernel code: usb: gadget: mv_udc: fix bug when handle setup package.
Problem Details: For the code doesn't restrict controller ep must be ep0, so we will go through all the eps and check if there is a setup package received. And also we just need to acknowledge the corresponding bit in ENDPTSETUPSTAT register. Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi ...
```diff diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index 8dab8c4d10bd..fcb980def624 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -1631,8 +1631,7 @@ static void get_setup_data(struct mv_udc *udc, u8 ep_num, u8 *buffer_ptr) dqh = &udc->ep_...
bedcff970e16d36324ddbfa61de33e4640c9d619
Analyze and fix the following issue in the Linux kernel code: usb: gadget: mv_udc: fix a clerical error
Problem Details: The max size of data payload is in bit0 - bit10, so we need use 0x7ff as the bitmask to fetch from usb_endpoint_descriptor.wMaxPacketSize. Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index 84655289aea9..e2b302f11d07 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -546,7 +546,7 @@ static int mv_ep_enable(struct usb_ep *_ep, case USB_ENDPOINT_XFER_ISOC: /* Calculate tr...
4540a9ab319f1a55ded5f635da66da60d3c93e69
Analyze and fix the following issue in the Linux kernel code: usb: gadget: mv_udc: fix kernel panic on some platforms
Problem Details: Some platforms will use usb to download images, the controller may not be stopped correctly when start kernel. In some cases, it may have some pending interrupts, and they will be triggered immediately when we finish requesting irq in function probe. But we haven't finished the device initialization at...
```diff diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index cd4de00a3ff5..84655289aea9 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -2037,6 +2037,13 @@ static int __devinit mv_udc_probe(struct platform_device *dev) & CAPLENGTH_MASK)); u...
dde34cc5019b51088c18ca789d4b1a20cf9bc617
Analyze and fix the following issue in the Linux kernel code: usb: gadget: mv_udc: refine the driver structure
Problem Details: This patch do the following things: 1. Add header and Copyright for marvell usb driver. 2. Add mv_usb.h in include/linux/platform_data, make the driver fits all the marvell platform using the same ChipIdea usb ip. 3. Some SOC may has mutiple clock sources, so let me define it in mv_usb_platform_...
```diff diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile index 9ba725af4a08..c36da63009db 100644 --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile @@ -28,7 +28,7 @@ obj-$(CONFIG_USB_S3C_HSUDC) += s3c-hsudc.o obj-$(CONFIG_USB_LANGWELL) += langwell_udc.o obj-$(CONFIG_USB_EG20T) ...
8a9775ab71218690ac34bed9e237e2b968857d3a
Analyze and fix the following issue in the Linux kernel code: usb: gadget: renesas_usbhs: fix compile warning
Problem Details: | drivers/usb/renesas_usbhs/fifo.c: In function ‘usbhsf_dma_prepare_push’: | drivers/usb/renesas_usbhs/fifo.c:823:7: warning: cast from pointer \ to integer of different size [-Wpointer-to-int-cast] | drivers/usb/renesas_usbhs/fifo.c: In function ‘usbhsf_dma_try_pop’: | drivers/usb/renesas_usbhs/fifo....
```diff diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 16b12b09110a..762b7429d8bb 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -820,7 +820,7 @@ static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, int *is_done) if (len % 4) /* 32b...
951fe829c73b89a2e4a5b1aaae4c0a43ffa7c68e
Analyze and fix the following issue in the Linux kernel code: usb: gadget: renesas_usbhs: fixup driver compile style
Problem Details: In current renesas-usbhs, there was inconsistency about the style of kernel module or built-in. This patch solve it. [ balbi@ti.com : fix compile issue when building modules ] Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/renesas_usbhs/Kconfig b/drivers/usb/renesas_usbhs/Kconfig index 286cbf1ca7de..97a44016def1 100644 --- a/drivers/usb/renesas_usbhs/Kconfig +++ b/drivers/usb/renesas_usbhs/Kconfig @@ -5,6 +5,7 @@ config USB_RENESAS_USBHS tristate 'Renesas USBHS controller' depends on SUPERH || ARCH_S...
482982062f1bc25ffb5383ab724d73d1a7af07cf
Analyze and fix the following issue in the Linux kernel code: usb: gadget: renesas_usbhs: bugfix: don't modify platform data
Problem Details: renesas_usbhs has default callback functions and settings. And it tried overwrite to platform private data if platform doesn't have them. So, if renesas_usbhs was compiled as module, it will be hung-up on 2nd insmod. This patch fixup it. Special thanks to Bastian Reported-by: Bastian Hecht <hechtb@goo...
```diff diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index c3aef40fa9e5..d2e2efaba658 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -61,8 +61,8 @@ */ #define usbhs_platform_call(priv, func, args...)\ (!(priv) ? -ENODEV : \ - !...
6ff5d09bd2fd5943f5b16cb1e3453446a1f575e2
Analyze and fix the following issue in the Linux kernel code: usb: gadget: renesas_usbhs: disable pipe on top of interrupt
Problem Details: When data read interrupt happened, the pipe is BUF which means "enable". then, next un-necessary interrupt/token might be issued again when all data were popped from fifo. It will cause un-understandable bug. This patch decides pipe disable on top of read interrupt. Signed-off-by: Kuninori Morimoto <k...
```diff diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 87f56b604809..1a345c20105f 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -475,6 +475,20 @@ static int usbhsf_pio_try_pop(struct usbhs_pkt *pkt, int *is_done) len = min(len, rcv_len...
089b837a39552ee49a4ea4c188e8c3517473f10c
Analyze and fix the following issue in the Linux kernel code: usb: gadget: fix typo for default U1/U2 exit latencies
Problem Details: s/DEFULT/DEFAULT/, no functional changes. Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index e74fd55c33d9..8a5529d214fb 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -542,9 +542,9 @@ static int bos_desc(struct usb_composite_dev *cdev) if (cdev->gadget->ops->get_config_params) cd...
fe69676530f182bbb1fe0edd027e18751a1a2595
Analyze and fix the following issue in the Linux kernel code: usb: gadget: storage: fix mass storage gadgets to work with Synopsys UDC
Problem Details: The Synopsys USB device controller requires all OUT transfer request lengths to be aligned to max packet size. The mass storage gadgets do not meet this requirement for Super Speed. The gadgets already have a function which performs this alignment for CBW packets, so use it for data packets too. The a...
```diff diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 756941473148..927ee88278bd 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -958,9 +958,7 @@ static int do_write(struct fsg_common *common) * equal to the buffer size, w...
56526c0b8d752bf243a21722455807518925685f
Analyze and fix the following issue in the Linux kernel code: usb gadget: fix langwell_udc.c build error
Problem Details: Move function to fix langwell_udc.c build error: drivers/usb/gadget/langwell_udc.c: In function 'show_langwell_udc': drivers/usb/gadget/langwell_udc.c:1693:3: error: implicit declaration of function 'lpm_device_speed' drivers/usb/gadget/langwell_udc.c: At top level: drivers/usb/gadget/langwell_udc.c:2...
```diff diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c index c88158f307a8..cb728d3079af 100644 --- a/drivers/usb/gadget/langwell_udc.c +++ b/drivers/usb/gadget/langwell_udc.c @@ -1562,6 +1562,20 @@ static ssize_t show_function(struct device *_dev, static DEVICE_ATTR(function, S_IRUG...
12158f4280b4d42ef03b70a47d11b48dd8aad511
Analyze and fix the following issue in the Linux kernel code: usb: gadget: r8a66597-udc: use dev_*() instead of printk()
Problem Details: This patch also fix the balance of braces. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index 60c62e418f0e..34abb12a88e8 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c @@ -105,13 +105,15 @@ static inline u16 control_reg_get_pid(struct r8a66597 *r8a66597, u16 pipenum) u16 pid...
8b5da2df272d5aaceb17addae8afc068b447aa51
Analyze and fix the following issue in the Linux kernel code: ARM: mach-s3c2410: remove memory.h
Problem Details: This also removes the mach/s3c2400 version which was probably never used due to the fact that we have this line in arch/arm/Makefile: machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 [...] This is later used to construct the search path for: The compiler would be looking into mach-s3c2410 ...
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 01343438e91b..3776fccd923f 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -711,6 +711,7 @@ config ARCH_S3C2410 select CLKDEV_LOOKUP select ARCH_USES_GETTIMEOFFSET select HAVE_S3C2410_I2C if I2C + select NO_MACH_MEMORY_H help Samsung S3C...
6af677ea59fb62ae6b720a9e5e9d5cba32ada553
Analyze and fix the following issue in the Linux kernel code: Kconfig: remove redundant CONFIG_ prefix on two symbols
Problem Details: Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index 498534cd5265..12f5932dadc9 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig @@ -80,7 +80,7 @@ config P1010_RDB config P1022_DS bool "Freescale P1022 DS" select DEFAULT_UIMA...
18eaf0b8e60a2fa54667b2192197970174f1c061
Analyze and fix the following issue in the Linux kernel code: perf hists browser: Fix handling of TAB/UNTAB for multiple events
Problem Details: When using multiple events the 'top' and 'report' tools will first present the user with a menu to choose the event to browse. After that the user can either press <- to go back to the menu and choose another event or instead press TAB to go the next event without having to go back to the menu or shif...
```diff diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c index 662b7217a031..4a3a7c96b9b6 100644 --- a/tools/perf/util/ui/browsers/hists.c +++ b/tools/perf/util/ui/browsers/hists.c @@ -1074,30 +1074,44 @@ static int perf_evsel_menu__run(struct perf_evsel_menu *menu, if (!menu->...
45116806139743cf35baa01a584e5972e5d833f6
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Setup secondary cores PIR with hard SMP id
Problem Details: Normally logical and hard cpu ID are the same, however in same cases like on the P3060 they may differ. Where the logical is 0..5, the hard id goes 0,1,4..7. This can causes issues for places we utilize PIR to index into array like in debug exception handlers for finding the exception stack. Move to...
```diff diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index d6e47464a0d4..190d111fc117 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c @@ -48,10 +48,11 @@ smp_85xx_kick_cpu(int nr) const u64 *cpu_rel_addr; __iomem u32 *bptr_vaddr; struct ...
64391b2536ca92f9c589b2bfeaca3954896fe057
Analyze and fix the following issue in the Linux kernel code: xen/blkback: Fix the inhibition to map pages when discarding sector ranges.
Problem Details: The 'operation' parameters are the ones provided to the bio layer while the req->operation are the ones passed in between the backend and frontend. We used the wrong 'operation' value to squash the call to map pages when processing the discard operation resulting in an hypercall that did nothing. Lets ...
```diff diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index c15c559e8662..53c81de6f886 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -707,8 +707,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, * the hypercall to un...
5c62cb48602dba95159c81ffeca179d3852e25be
Analyze and fix the following issue in the Linux kernel code: xen/blkback: Report VBD_WSECT (wr_sect) properly.
Problem Details: We did not increment the amount of sectors written to disk b/c we tested for the == WRITE which is incorrect - as the operations are more of WRITE_FLUSH, WRITE_ODIRECT. This patch fixes it by doing a & WRITE check. CC: stable@kernel.org Reported-by: Andy Burns <xen.lists@burns.me.uk> Suggested-by: Ian...
```diff diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 184b1335c8e9..c15c559e8662 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -776,7 +776,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, if (operation == REA...
d11e6158307bed3f178399a4e6216eec67d16200
Analyze and fix the following issue in the Linux kernel code: xen-blkfront: If no barrier or flush is supported, use invalid operation.
Problem Details: Guard against issuing BLKIF_OP_WRITE_BARRIER or BLKIF_OP_FLUSH_CACHE by checking whether we successfully negotiated with the backend. The negotiation with the backend also sets the q->flush_flags which fortunately for us is also used when submitting an bio to us. If we don't support barriers or flushes...
```diff diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 7d1487760283..8bf0cb7b2565 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -380,7 +380,9 @@ static void do_blkif_request(struct request_queue *rq) blk_start_request(req); - if (req->cmd_type !=...
8e6dc6fe51957116d363204a725c1262b4b78e19
Analyze and fix the following issue in the Linux kernel code: xen-blkback: use kzalloc() in favor of kmalloc()+memset()
Problem Details: This fixes the problem of three of those four memset()-s having improper size arguments passed: Sizeof a pointer-typed expression returns the size of the pointer, not that of the pointed to data. It also reverts using kmalloc() instead of kzalloc() for the allocation of the pending grant handles array...
```diff diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 9713d5a490e4..e0dab614049c 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -823,9 +823,9 @@ static int __init xen_blkif_init(void) mmap_pages = xen_blkif_reqs * BLKIF_MA...
c555aab97de139ac8762c922248bb68f43a8c488
Analyze and fix the following issue in the Linux kernel code: xen-blkback: fixed indentation and comments
Problem Details: This patch fixes belows: 1. Fix code style issue. 2. Fix incorrect functions name in comments. Signed-off-by: Joe Jin <joe.jin@oracle.com> Cc: Jens Axboe <jaxboe@fusionio.com> Cc: Ian Campbell <Ian.Campbell@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
```diff diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h index bfb532ea5b1b..1b1bc4458685 100644 --- a/drivers/block/xen-blkback/common.h +++ b/drivers/block/xen-blkback/common.h @@ -46,7 +46,7 @@ #define DRV_PFX "xen-blkback:" #define DPRINTK(fmt, args...) \ - pr_debug(DRV_PF...
69ef68cef961a934c35308843a04b26d91cad4a8
Analyze and fix the following issue in the Linux kernel code: xen-blkfront: fix a deadlock while handling discard response
Problem Details: When we get -EOPNOTSUPP response for a discard request, we will clear the discard flag on the request queue so we won't attempt to send discard requests to backend again, and this should be protected under rq->queue_lock. However, when we setup the request queue, we pass blkif_io_lock to blk_init_queue...
```diff diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 52076b0d0326..7d1487760283 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -747,9 +747,7 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id) info->gd->disk_name); error = -EOPNOT...
b3cb0d6adc4bbc70b5e37e49a6068e973545ead7
Analyze and fix the following issue in the Linux kernel code: xen-blkback: Implement discard requests ('feature-discard')
Problem Details: ..aka ATA TRIM/SCSI UNMAP command to be passed through the frontend and used as appropiately by the backend. We also advertise certain granulity parameters to the frontend so it can plug them in. If the backend is a realy device - we just end up using 'blkdev_issue_discard' while for loopback devices -...
```diff diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 2330a9ad5e95..9713d5a490e4 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -39,6 +39,9 @@ #include <linux/list.h> #include <linux/delay.h> #include <linux/freezer.h> +#in...
33e27312aeb05798572ccc456a76321125e8d7cb
Analyze and fix the following issue in the Linux kernel code: perf hists: Fix compilation when NO_NEWT_SUPPORT is set
Problem Details: This patch, relative to tip/master, makes perf compile when NO_NEWT_SUPPORT is set. It also fixes the line formatting to fit 80 columns. Please test with NO_NEWT. Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20111012120328.GA1619@quad Signe...
```diff diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 7ea1e560e008..7416521f7fea 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -103,16 +103,20 @@ struct perf_evlist; #ifdef NO_NEWT_SUPPORT static inline int perf_evlist__tui_browse_hists(struct perf_evlist *evlist __used, - ...
6be9dd121ddeca9dcfb35aee96273c92bbd28014
Analyze and fix the following issue in the Linux kernel code: microblaze: add missing CONFIG_ prefixes
Problem Details: Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index 213f2d671669..36a133e5ee35 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c @@ -304,11 +304,11 @@ asmlinkage void __init mmu_init(void) /* Map in all of RAM starting at CONFIG_KERNEL_START */ mapin_ram(); -#ifde...
d0451c287cf4d0dff707a351c3c6edaed5e742ac
Analyze and fix the following issue in the Linux kernel code: ARM: mxc: fix Kconfig typo 'i.MX51'
Problem Details: Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index a5353fc0793f..4c8fdbcc9467 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig @@ -39,7 +39,7 @@ config ARCH_MX503 select ARCH_MX50_SUPPORTED select ARCH_MX53_SUPPORTED help - This enables support for machines us...
1d1136012163ab5e33a97f9779af269cf4049cb9
Analyze and fix the following issue in the Linux kernel code: ide: Fix file references in drivers/ide/
Problem Details: Fix file references in drivers/ide/ There are a lot of file references to now moved or deleted files in the whole tree, especially in documentation and Kconfig files. This patch fixes the references in drivers/ide/. Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net> Signed-off-by: Rand...
```diff diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 9827c5e686cb..811dbbd9306c 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -327,7 +327,7 @@ config BLK_DEV_OPTI621 select BLK_DEV_IDEPCI help This is a driver for the OPTi 82C621 EIDE controller. - Please read the comments at t...
d09c06c6fc240261dde65198774b279d89c35459
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio - Fix possible access over audio_feature_info[] array
Problem Details: The audio_feature_info[] array should contain all entries for UAC2_FU_*, but currently a few last entries are missing. Even though, the driver tries to probe these entries in parse_audio_feature_unit() and may access the range over the array. This patch fixes the bug by limiting the loop size properl...
```diff diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index b13b7ac5bad9..60f65ace7474 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -1259,7 +1259,7 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void build_feature_ctl(state, _ftr, 0, i, &iterm, unitid, 0); } } ...
3d37fbe44112b06279efa04ad91a0e4b7a0c600c
Analyze and fix the following issue in the Linux kernel code: ALSA: snd-usb-caiaq: Fix NULL dereference in input.c
Problem Details: There was a case where a newly-registered input device could be opened before a necessary variable in the device structure was set. When code tried to use the variable in the URB reply callback, it would cause an Oops. This fix sets the aforementioned variable before calling input_register_device. Si...
```diff diff --git a/sound/usb/caiaq/input.c b/sound/usb/caiaq/input.c index a213813487bd..9efb92e4090d 100644 --- a/sound/usb/caiaq/input.c +++ b/sound/usb/caiaq/input.c @@ -664,15 +664,17 @@ int snd_usb_caiaq_input_init(struct snd_usb_caiaqdev *dev) for (i = 0; i < input->keycodemax; i++) __set_bit(dev->keycode[...
bed45a6ed51d00007f5eb6d75560218ddcecfe51
Analyze and fix the following issue in the Linux kernel code: igb: fix static function warnings reported by sparse
Problem Details: igb_update/validate_nvm_checksum_with_offset() should be static. Also removes unneeded prototypes for the above functions. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c index c0857bdfb03a..3771bd20f437 100644 --- a/drivers/net/ethernet/intel/igb/e1000_82575.c +++ b/drivers/net/ethernet/intel/igb/e1000_82575.c @@ -66,10 +66,6 @@ static s32 igb_set_pcie_completion_timeout(st...
06218a8dbf046c0e9ba51dcbe1ce980a10a0be42
Analyze and fix the following issue in the Linux kernel code: igb: Fix features that are currently 82580 only and should also be i350
Problem Details: This change allows support for per packet timesync and global device reset on the i350 adapter. These features were supported on both 82580 and i350 however it looks like several checks where not updated and as such the i350 support was not enabled. Signed-off-by: Alexander Duyck <alexander.h.duyck@i...
```diff diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index efc367bddc47..fee771b4d332 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -563,7 +563,7 @@ static cycle_t igb_read_clock(const struct cyclecounter *...
f3a6a60e4c3ac83370c620dbbd08d2a418b9364d
Analyze and fix the following issue in the Linux kernel code: cifs: Fix typo 'CIFS_NFSD_EXPORT'
Problem Details: It should be 'CONFIG_CIFS_NFSD_EXPORT'. No-one noticed because that symbol depends on BROKEN. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Steve French <smfrench@gmail.com>
```diff diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 7986d330cbb5..aa8fe7cee0b4 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -132,12 +132,12 @@ cifs_read_super(struct super_block *sb) else sb->s_d_op = &cifs_dentry_ops; -#ifdef CIFS_NFSD_EXPORT +#ifdef CONFIG_CIFS_NFSD_EXPORT if (cifs_sb->...
4559424a0c34f0cb22fa31bc24015a06dc064b32
Analyze and fix the following issue in the Linux kernel code: powerpc/fsl-booke: Fix settlbcam for 64-bit
Problem Details: Currently, it does a cntlzd on the size and then subtracts it from 21.... this doesn't take into account the varying size of a "long". Just use __ilog instead (and subtract the 10 we have to subtract to get to the tsize encoding). Also correct the comment about page sizes supported. Signed-off-by: Be...
```diff diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index 6f593bd27174..66a6fd38e9cd 100644 --- a/arch/powerpc/mm/fsl_booke_mmu.c +++ b/arch/powerpc/mm/fsl_booke_mmu.c @@ -101,17 +101,17 @@ unsigned long p_mapped_by_tlbcam(phys_addr_t pa) /* * Set up a variable-size TLB entry (tl...