id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
d24d65eda97fe51f2996538148e85d309e2460e4
Analyze and fix the following issue in the Linux kernel code: e100: Fix rx-over-length statistics.
Problem Details: The old code would += the total errors every time stats were gathered. Instead, keep a count of short-pkt and long-pkt counters and then simply add them together for the rx-over-length stat. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-of...
```diff diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index 4d8a616fe9cd..d2b78722fc32 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c @@ -622,6 +622,7 @@ struct nic { u32 rx_fc_pause; u32 rx_fc_unsupported; u32 rx_tco_frames; + u32 rx_sh...
1ec41a31fb695682cab7fc7c1f6ced84d188b6f9
Analyze and fix the following issue in the Linux kernel code: staging: ozwpan: remove debug allocator
Problem Details: The kernel already has a debug allocator, no need to have one unique to a single driver. So delete it, replace with kfree, kmalloc, and, in a few places that need it, kzalloc(). Cc: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/ozwpan/Kbuild b/drivers/staging/ozwpan/Kbuild index e655e0005ffd..6cc84cb3f0a6 100644 --- a/drivers/staging/ozwpan/Kbuild +++ b/drivers/staging/ozwpan/Kbuild @@ -12,7 +12,6 @@ ozwpan-y := \ ozeltbuf.o \ ozproto.o \ ozcdev.o \ - ozalloc.o \ ozurbparanoia.o \ oztrace.o \ o...
cc55bb03ea17fcbeffb5ae3ec68ea1f8673bc0c8
Analyze and fix the following issue in the Linux kernel code: Staging: bcm: fix possible memory leak of 'pstAddIndication' in CmHost.c and removes a whitespace
Problem Details: Memory is being allocated by kmalloc and stored in variable pstAddIndication. However, this memory is not being freed in all cases. Therefore, this patch frees it on several exit paths. This patch also removes a whitespace. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kro...
```diff diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index e332f1e7c11e..7e38af5e1765 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1399,12 +1399,16 @@ ULONG StoreCmControlResponseMessage(PMINI_ADAPTER Adapter, PVOID pvBuffer, UINT /* AUTHORIZED SET */ ...
0f1acee5f5e2ceaef3244dc4c1f3895b907669cd
Analyze and fix the following issue in the Linux kernel code: staging: iio: core: Avoid NULL pointer de-ref in case indio_dev->setup_ops are not in use
Problem Details: Drivers may not need setup_ops at all, so let the core supply some empty ops. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index 868e36672001..27695dffb177 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c @@ -854,6 +854,8 @@ static const struct file_operations iio_buffer_fileops = { .com...
e553f182d55bd268fea3f106368e2344141c212a
Analyze and fix the following issue in the Linux kernel code: staging: iio: core: Introduce debugfs support, add support for direct register access
Problem Details: Changes since V1: Exclude iio debugfs code in case CONFIG_DEBUG_FS isn't enabled. Introduce helper function iio_get_debugfs_dentry. Document additions to struct iio_dev iio_debugfs_read_reg: Use snprintf. Use a shorter fixed length. Introduce len instead of pointer math. iio_debugfs_write_reg: ...
```diff diff --git a/drivers/staging/iio/iio.h b/drivers/staging/iio/iio.h index 6aa31e52c26d..b9cd454f69e2 100644 --- a/drivers/staging/iio/iio.h +++ b/drivers/staging/iio/iio.h @@ -286,6 +286,9 @@ struct iio_info { struct iio_trigger *trig); int (*update_scan_mode)(struct iio_dev *indio_dev, const unsigne...
4abf6f8b29e37f492078173a9d4cb808ce327ec0
Analyze and fix the following issue in the Linux kernel code: drivers:staging:iio Fix typos and comments in staging iio.
Problem Details: The below patch fixes some comments and some typos that I have found while reading drivers/staging/iio/* Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/iio/Documentation/device.txt b/drivers/staging/iio/Documentation/device.txt index 1abb80cb884e..8926f2448cc9 100644 --- a/drivers/staging/iio/Documentation/device.txt +++ b/drivers/staging/iio/Documentation/device.txt @@ -62,7 +62,7 @@ Then fill in the following: An optional assoc...
b222258ac11cae3e0350fe5992ad164a7b128103
Analyze and fix the following issue in the Linux kernel code: misc: bmp085: Use unsigned long to store jiffies
Problem Details: This fixes following compilation warning: drivers/misc/bmp085.c: In function ‘bmp085_get_pressure’: drivers/misc/bmp085.c:238:4: warning: comparison of distinct pointer types lacks a cast [enabled by default] Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Greg Kroah-Hartma...
```diff diff --git a/drivers/misc/bmp085.c b/drivers/misc/bmp085.c index b088abc0f45b..76c3064629f1 100644 --- a/drivers/misc/bmp085.c +++ b/drivers/misc/bmp085.c @@ -87,7 +87,7 @@ struct bmp085_data { u32 raw_temperature; u32 raw_pressure; unsigned char oversampling_setting; - u32 last_temp_measurement; + unsign...
b1443ac0e486842c133b8805ee035ab3ff918763
Analyze and fix the following issue in the Linux kernel code: usb: gadget: dummy_hcd: signedness bug in transfer()
Problem Details: "len" is unsigned so it's never less than zero. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 8cc1a88d21e7..e1cd56c5e2a8 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -1352,7 +1352,7 @@ top: len = dummy_perform_transfer(urb, req, len); ep->last_io = jiffies; - if (len < 0)...
a5360a53a7ccad5ed9ccef210b94fef13c6e5529
Analyze and fix the following issue in the Linux kernel code: usb: cp210x: Update to support CP2105 and multiple interface devices
Problem Details: This patch updates the cp210x driver to support CP210x multiple interface devices devices from Silicon Labs. The existing driver always sends control requests to interface 0, which is hardcoded in the usb_control_msg function calls. This only allows for single interface devices to be used, and causes a...
```diff diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 651b2aa13486..0310e2df59f5 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -49,6 +49,7 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, unsigned int, unsigned int); static void cp210x_b...
9c5028e9da1255dd2b99762d8627b88b29f68cce
Analyze and fix the following issue in the Linux kernel code: r8169: corrupted IP fragments fix for large mtu.
Problem Details: Noticed with the 8168d (-vb-gr, aka RTL_GIGA_MAC_VER_26). ConfigX registers should only be written while the Config9346 lock is held. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Reported-by: Nick Bowler <nbowler@elliptictech.com> Cc: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S...
```diff diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 7a0c800b50ad..1adf17757cea 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -3781,12 +3781,20 @@ static void rtl8169_init_ring_indexes(struct rtl8169_private *tp) stat...
71919403dc86b40fafd9400738668f96679c551b
Analyze and fix the following issue in the Linux kernel code: Revert "powerpc/usb: fix issue of CPU halt when missing USB PHY clock"
Problem Details: This reverts commit 529febeee680dc22416fca033151a5e8bc620447. To quote Dirk: This commit introduces a check for the USB PHY clock. Problem is that CTRL_PHY_CLK_VALID bit seems not to be present on all Freescale ehci implementations, at least P1022 does not have it. So this check always fails and ...
```diff diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index c26a82e83f6e..b556a72264d1 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -239,7 +239,7 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci, ehci_writel(ehci, portsc, &ehci->regs->port_status[port_o...
3f2010b2ad3d66d5291497c9b274315e7b807ecd
Analyze and fix the following issue in the Linux kernel code: packetengines: fix config default
Problem Details: As part of the big network driver reorg, each vendor directory defaults to yes, so that older config's can migrate correctly. Looks like this one got missed. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/packetengines/Kconfig b/drivers/net/ethernet/packetengines/Kconfig index b97132d9dff0..8f29feb35548 100644 --- a/drivers/net/ethernet/packetengines/Kconfig +++ b/drivers/net/ethernet/packetengines/Kconfig @@ -4,6 +4,7 @@ config NET_PACKET_ENGINE bool "Packet Engine devices...
2b4bf3974249da74f4aef1e9180d4beaf6332515
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix updating local name when powering on
Problem Details: When powering on we need to apply whatever name has been set through mgmt_set_local_name. The appropriate place for this is mgmt_powered() and not hci_setup() since this needs to be applied also if the HCI init sequence was already completed but the adapter was still "powered off" from a mgmt perspecti...
```diff diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index d6c41bbfe759..6a817daf095b 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -552,14 +552,6 @@ static void hci_setup(struct hci_dev *hdev) if (hdev->hci_ver > BLUETOOTH_VER_1_1) hci_send_cmd(hdev, HCI_OP_READ_L...
e39d40c65dfd8390b50c03482ae9e289b8a8f351
Analyze and fix the following issue in the Linux kernel code: ARM: S3C24XX: DMA resume regression fix
Problem Details: s3c2410_dma_suspend suspends channels from 0 to dma_channels. s3c2410_dma_resume resumes channels in reverse order. So pointer should be decremented instead of being incremented. Signed-off-by: Gusakov Andrey <dron0gus@gmail.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Cc: stable <stable@vger.ke...
```diff diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 9fe35348e03b..2bab4c99a234 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c @@ -1249,7 +1249,7 @@ static void s3c2410_dma_resume(void) struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1; int ch...
2446ab6070861aba2dd9229463ffbc40016a9f33
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Use RCU to dereference the rpc_clnt.cl_xprt field
Problem Details: A migration event will replace the rpc_xprt used by an rpc_clnt. To ensure this can be done safely, all references to cl_xprt must now use a form of rcu_dereference(). Special care is taken with rpc_peeraddr2str(), which returns a pointer to memory whose lifetime is the same as the rpc_xprt. Signed-...
```diff diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 0e0865e38065..1bb297243624 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -8,6 +8,7 @@ #include <linux/nfs4.h> #include <linux/nfs_fs.h> #include <linux/slab.h> +#include <linux/rcupdate.h> #include "nfs4_fs.h" #include...
c8e252586f8d5de906385d8cf6385fee289a825e
Analyze and fix the following issue in the Linux kernel code: regset: Prevent null pointer reference on readonly regsets
Problem Details: The regset common infrastructure assumed that regsets would always have .get and .set methods, but not necessarily .active methods. Unfortunately people have since written regsets without .set methods. Rather than putting in stub functions everywhere, handle regsets with null .get or .set methods expl...
```diff diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index bcb884e2d613..07d096c49920 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1421,7 +1421,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t, for (i = 1; i < view->n; ++i) { const struct user_regset *regset = &view->regsets[i]; ...
b2dbf316f32b44d174445f868a39b37e4608541e
Analyze and fix the following issue in the Linux kernel code: drm/i915: remove ACPI related DRM_ERRORs
Problem Details: They're not really errors (well actually I don't know; I don't understand _DSM and _MUX well enough to say, but I do know they spam people's logs and seem to be harmless). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [danvet: The _DSM error got remove in another patch already] Bugzilla: http...
```diff diff --git a/drivers/gpu/drm/i915/intel_acpi.c b/drivers/gpu/drm/i915/intel_acpi.c index bae3edf956a4..f152b2a7fc54 100644 --- a/drivers/gpu/drm/i915/intel_acpi.c +++ b/drivers/gpu/drm/i915/intel_acpi.c @@ -182,8 +182,6 @@ static void intel_dsm_platform_mux_info(void) DRM_DEBUG_DRIVER(" hpd mux info: %s\n"...
e703c206135acb458adb705ec44bcc5d2615b37d
Analyze and fix the following issue in the Linux kernel code: ext3: fix start and len arguments handling in ext3_trim_fs()
Problem Details: The overflow might happen when passing blocknr into ext3_get_group_no_and_offset(), because it expects type ext3_fsblk_t which might be smaller than uint64_t. This will most likely happen when calling FITRIM with the default argument len = ULLONG_MAX. Fix this by using "end" variable instead of "start...
```diff diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index 954a7d355f59..1e036b79384c 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c @@ -1973,7 +1973,7 @@ static ext3_grpblk_t ext3_trim_all_free(struct super_block *sb, sbi = EXT3_SB(sb); /* Walk through the whole group */ - while (start < max) { + whil...
7b3cc67d4445995a025a4b55a7dc687b6829b4ca
Analyze and fix the following issue in the Linux kernel code: [S390] qdio: fix handler function arguments for zfcp data router
Problem Details: Git commit 25f269f17316549e "[S390] qdio: EQBS retry after CCQ 96" introduced a regression in regard to the zfcp data router. Revoke the incorrect simplification of the function call arguments for the qdio handler to make the zfcp hardware data router working again. This is applicable to 3.2+ kernels....
```diff diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 3ef8d071c64a..770a740a393c 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -167,7 +167,7 @@ again: DBF_ERROR("%4x EQBS ERROR", SCH_NO(q)); DBF_ERROR("%3d%3d%2d", count, tmp_count, nr); q->handler...
962bcbc57aa244eeb1176fa2e9f65ac865cca68a
Analyze and fix the following issue in the Linux kernel code: pinctrl: fix the pin descriptor kerneldoc
Problem Details: The introduction of the owner field on the pin descriptor was not properly documented so fix this up. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h index 97f8124b4381..e1dfdb3c144f 100644 --- a/drivers/pinctrl/core.h +++ b/drivers/pinctrl/core.h @@ -76,9 +76,7 @@ struct pinctrl { * datasheet or such * @dynamic_name: if the name of this pin was dynamically allocated * @lock: a lock to protec...
1018faa6cf23b256bf25919ef203cd7c129f06f2
Analyze and fix the following issue in the Linux kernel code: perf/x86/kvm: Fix Host-Only/Guest-Only counting with SVM disabled
Problem Details: It turned out that a performance counter on AMD does not count at all when the GO or HO bit is set in the control register and SVM is disabled in EFER. This patch works around this issue by masking out the HO bit in the performance counter control register when SVM is not enabled. The GO bit is not t...
```diff diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h index 096c975e099f..461ce432b1c2 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h @@ -242,4 +242,12 @@ static inline void perf_get_x86_pmu_capability(struct x86_pmu_capability *cap) static i...
249a456930cd2df29d085fb738b0e8f4bc1680cf
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: take lock while modifying flags
Problem Details: dwc3_gadget_ep_set_wedge() and dwc3_gadget_set_selfpowered() were modifying dwc->flags/dwc->is_selfpowered without taking the lock. Since those modifications are non-atomic, that could cause other flags to be corrupted. Fix them both to take the lock. Signed-off-by: Paul Zimmerman <paulz@synopsys.com>...
```diff diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index e2633dd03f8c..bfdfd4f151f8 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1196,8 +1196,12 @@ out: static int dwc3_gadget_ep_set_wedge(struct usb_ep *ep) { struct dwc3_ep *dep = to_dwc3_ep(ep); + struct dwc...
7d26b58735f5badf2b7ce3320c6ba21b603c77a9
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: pci: fix failure path in dwc3_pci_probe()
Problem Details: dwc3_pci_probe() would return success even if the calls to dwc3_get_device_id() or platform_device_alloc() fail, fix that. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 74bac06652c4..dcc64791b4e1 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -81,8 +81,10 @@ static int __devinit dwc3_pci_probe(struct pci_dev *pci, pci_set_master(pci); devid = dwc3_get_device_id(); ...
9bafa56c7cee5c6fa68de5924220abb220c7e229
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: fix bogus test in dwc3_gadget_start_isoc
Problem Details: Zero is a valid value for a microframe number. So remove the bogus test for non-zero in dwc3_gadget_start_isoc(). Cc: stable@vger.kernel.org Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 60b75c302aa4..fac11491850f 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1656,7 +1656,7 @@ static void dwc3_endpoint_transfer_complete(struct dwc3 *dwc, static void dwc3_gadget_start_isoc(struct dwc3 *dwc, ...
62d3c5439c534b0e6c653fc63e6d8c67be3a57b1
Analyze and fix the following issue in the Linux kernel code: Block: use a freezable workqueue for disk-event polling
Problem Details: This patch (as1519) fixes a bug in the block layer's disk-events polling. The polling is done by a work routine queued on the system_nrt_wq workqueue. Since that workqueue isn't freezable, the polling continues even in the middle of a system sleep transition. Obviously, polling a suspended drive for...
```diff diff --git a/block/genhd.c b/block/genhd.c index b26c4085590d..df9816ede75b 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1478,9 +1478,9 @@ static void __disk_unblock_events(struct gendisk *disk, bool check_now) intv = disk_events_poll_jiffies(disk); set_timer_slack(&ev->dwork.timer, intv / 4); if (c...
cecd353a02fb1405c8a72a324b26b5acf97e7411
Analyze and fix the following issue in the Linux kernel code: drivers/block/DAC960: fix -Wuninitialized warning
Problem Details: Set CommandMailbox with memset before use it. Fix for: drivers/block/DAC960.c: In function ‘DAC960_V1_EnableMemoryMailboxInterface’: arch/x86/include/asm/io.h:61:1: warning: ‘CommandMailbox.Bytes[12]’ may be used uninitialized in this function [-Wuninitialized] drivers/block/DAC960.c:1175:30: note: ‘...
```diff diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 487ce64c5493..8db9089127c5 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c @@ -1177,7 +1177,8 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T int TimeoutCounter; int i; - + memset(&CommandMai...
bca505f1097c725708ddc055cf8055e922b0904b
Analyze and fix the following issue in the Linux kernel code: drivers/block/DAC960: fix DAC960_V2_IOCTL_Opcode_T -Wenum-compare warning
Problem Details: Fixed compiler warning: comparison between ‘DAC960_V2_IOCTL_Opcode_T’ and ‘enum <anonymous>’ Renamed enum, added a new enum for SCSI_10.CommandOpcode in DAC960_V2_ProcessCompletedCommand(). Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index e086fbbbe853..487ce64c5493 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c @@ -4627,7 +4627,8 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command) DAC960_Controller_T *Controller = Command->Controller; ...
9f53d2fe815b4011ff930a7b6db98385d45faa68
Analyze and fix the following issue in the Linux kernel code: block: fix __blkdev_get and add_disk race condition
Problem Details: The following situation might occur: __blkdev_get: add_disk: register_disk() get_gendisk() disk_block_events() disk->ev == NULL disk_add_events() __disk_unblock_events() disk->ev != NULL --ev->block Then we unblock events, when they are suppose to be blocked. This can trigger events ...
```diff diff --git a/block/genhd.c b/block/genhd.c index 23b4f7063322..b26c4085590d 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -35,6 +35,7 @@ static DEFINE_IDR(ext_devt_idr); static struct device_type disk_type; +static void disk_alloc_events(struct gendisk *disk); static void disk_add_events(struct gendis...
12ebffd146768556ab7c415d0ff9ab78e3d16b7a
Analyze and fix the following issue in the Linux kernel code: block: Fix setting bio flags in drivers (sd_dif/floppy)
Problem Details: Fix setting bio flags in drivers (sd_dif/floppy). Signed-off-by: Muthukumar R <muthur@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 9baf11e86362..744f078f4dd8 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -3832,7 +3832,7 @@ static int __floppy_read_block_0(struct block_device *bdev) bio.bi_size = size; bio.bi_bdev = bdev; bio.bi_sector = 0; - bio....
fe316bf2d5847bc5dd975668671a7b1067603bc7
Analyze and fix the following issue in the Linux kernel code: block: Fix NULL pointer dereference in sd_revalidate_disk
Problem Details: Since 2.6.39 (1196f8b), when a driver returns -ENOMEDIUM for open(), __blkdev_get() calls rescan_partitions() to remove in-kernel partition structures and raise KOBJ_CHANGE uevent. However it ends up calling driver's revalidate_disk without open and could cause oops. In the case of SCSI: process A...
```diff diff --git a/block/partition-generic.c b/block/partition-generic.c index d06ec1c829c2..6df5d6928a44 100644 --- a/block/partition-generic.c +++ b/block/partition-generic.c @@ -389,17 +389,11 @@ static bool disk_unlock_native_capacity(struct gendisk *disk) } } -int rescan_partitions(struct gendisk *disk, str...
efead8710aad9e384730ecf25eae0287878840d7
Analyze and fix the following issue in the Linux kernel code: vmxnet3: Fix transport header size
Problem Details: Fix transport header size Fix the transpoert header size for UDP packets. Signed-off-by: Shreyas N 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 3dcd3857a36c..756c0f5565a5 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -830,13 +830,8 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, ctx->...
8d21547d3c9c3bc653261f26d554cfabc4a083de
Analyze and fix the following issue in the Linux kernel code: udlfb: fix hcd_buffer_free panic on unplug/replug
Problem Details: Fix race conditions with unplug/replug behavior, in particular take care not to hold up USB probe/disconnect for long-running framebuffer operations and rely on usb to handle teardown. Fix for kernel panic reported with new F17 multiseat support. Reported-by: Kay Sievers <kay.sievers@vrfy.org> Signed...
```diff diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index 04aea205f021..cbf030d0dfc4 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c @@ -918,10 +918,6 @@ static void dlfb_free(struct kref *kref) { struct dlfb_data *dev = container_of(kref, struct dlfb_data, kref); - /* this function w...
d4f68526e438dbb7d194b08499a96c733131ad72
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix command status error code values
Problem Details: Error codes in the command status should always be from the set of values defined for mgmt and never e.g. POSIX error codes. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 40b3da3d5e62..bd01e4a4784e 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -2745,7 +2745,7 @@ int mgmt_index_added(struct hci_dev *hdev) int mgmt_index_removed(struct hci_dev *hdev) { - u8 status = ENODEV; + u8 status = MGMT_STAT...
9f8ce967caed427f78d00bb6b07d79cb040a88bd
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix clearing of HCI_PENDING_CLASS flag
Problem Details: When doing reset HCI_PENDING_CLASS is one of the flags that should be cleared (since it's used for a pending HCI command and a reset clear all pending commands). Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index aee9556e1039..d6c41bbfe759 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -193,7 +193,7 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb) hci_req_complete(hdev, HCI_OP_RESET, status); /...
da564a05b3aefe403062411b67d64b7e992718f7
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP1: ams-delta: clean up init data section assignments
Problem Details: The main purpose of this patch is to fix several section mismatch warnings from the board file and a few board specific drivers, introduced with recent Amstrad Delta patch series, some of them rising up only when building with CONFIG_MODULES not set. While being at it, section tagging of all init data...
```diff diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 3c97e6400546..ce50fe137269 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -150,7 +150,7 @@ static struct map_desc ams_delta_io_desc[] __initdata = { } }; -stat...
dc0caefdf48713fce373c8663e5a0d292a424746
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP1: ams-delta: fix incorrect section tags
Problem Details: While resolving section mismatches introduced with recent patches to for-next, a few dangerous, driver bind/unbind unaware section tagging already present in mainline have been identified. Fix them. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Tony Lindgren <tony@atomide.co...
```diff diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 87b13039f936..3c97e6400546 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -154,7 +154,7 @@ static struct omap_lcd_config ams_delta_lcd_config = { .ctrl_name = "in...
413708bbaf5c85c4c8a264145f7d6c3afcd97f99
Analyze and fix the following issue in the Linux kernel code: enic: fix an endian bug in enic_probe()
Problem Details: "num_vfs" is a u32 but we only use the high 16 bits and the low 16bits are left as zero. That isn't a problem for little endian systems but it will break on big endian ones. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/cisco/enic/enic.h b/drivers/net/ethernet/cisco/enic/enic.h index ee93a2087fe6..c52295cd05ef 100644 --- a/drivers/net/ethernet/cisco/enic/enic.h +++ b/drivers/net/ethernet/cisco/enic/enic.h @@ -94,7 +94,7 @@ struct enic { u32 rx_coalesce_usecs; u32 tx_coalesce_usecs; #ifdef...
9edbd953f8aeabf49b89c7c29ff9e31560775b27
Analyze and fix the following issue in the Linux kernel code: NFSv4: fix server_scope memory leak
Problem Details: server_scope would never be freed if nfs4_check_cl_exchange_flags() returned non-zero Signed-off-by: Weston Andros Adamson <dros@netapp.com> Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 87c584dd88b1..20c3bb06763a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4945,8 +4945,10 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) clp->cl_rpcclient->cl_auth->au_flavor); res.server_scope = kzalloc(s...
c501ae7f332cdaf42e31af30b72b4b66cbbb1604
Analyze and fix the following issue in the Linux kernel code: drm/i915: Only clear the GPU domains upon a successful finish
Problem Details: By clearing the GPU read domains before waiting upon the buffer, we run the risk of the wait being interrupted and the domains prematurely cleared. The next time we attempt to wait upon the buffer (after userspace handles the signal), we believe that the buffer is idle and so skip the wait. There are ...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 6dbcec387951..1f441f5c2405 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3064,10 +3064,13 @@ i915_gem_object_finish_gpu(struct drm_i915_gem_object *obj) return ret; } + ret = i91...
75fb0e324daa48ec458fb5c2960eb07b80cfad9d
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix init sequence for some CSR based controllers
Problem Details: Some CSR controllers will generate a spontaneous reset during init and just eat up any pending command without sending a command complete for it. This patch solves the issue by just resending whatever was the last sent command. hci_send_cmd is not used since we need to bypass all other commands in the ...
```diff diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index db484a8e7364..d3ddc0ba9cd4 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -82,8 +82,28 @@ void hci_req_complete(struct hci_dev *hdev, __u16 cmd, int result) /* If this is the init phase check if the completed comma...
a97f4f5e524bcd09a85ef0b8821a14d35e69335f
Analyze and fix the following issue in the Linux kernel code: x86/PCI: do not tie MSI MS-7253 use_crs quirk to BIOS version
Problem Details: Carlos was getting WARNING: at drivers/pci/pci.c:118 pci_ioremap_bar+0x24/0x52() when probing his sound card, and sound did not work. After adding pci=use_crs to the kernel command line, no more trouble. Ok, we can add a quirk. dmidecode output reveals that this is an MSI MS-7253, for which we al...
```diff diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 7034c081b226..49a5cb55429b 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -68,7 +68,6 @@ static const struct dmi_system_id pci_use_crs_table[] __initconst = { DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), DMI...
cd70469d084fde198dc07c1a31b8463562228a5a
Analyze and fix the following issue in the Linux kernel code: usb: core: hcd: make hcd->irq unsigned
Problem Details: There's really no point in having hcd->irq as a signed integer when we consider the fact that IRQ 0 means NO_IRQ. In order to avoid confusion, make hcd->irq unsigned and fix users who were passing -1 as the IRQ number to usb_add_hcd. Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Sign...
```diff diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index e1282328fc27..9d7fc9a39933 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2352,7 +2352,7 @@ static int usb_hcd_request_irqs(struct usb_hcd *hcd, "io mem" : "io base", (unsigned long long)hcd->rsrc_start); } el...
367456c756a6b84f493ca9cc5b17b1f5d38ef466
Analyze and fix the following issue in the Linux kernel code: sched: Ditch per cgroup task lists for load-balancing
Problem Details: Per cgroup load-balance has numerous problems, chief amongst them that there is no real sane order in them. So stop pretending it makes sense and enqueue all tasks on a single list. This also allows us to more easily fix the fwd progress issue uncovered by the lock-break stuff. Rotate the list on fail...
```diff diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 25e06a5e048b..95545126be1c 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6959,6 +6959,9 @@ void __init sched_init(void) rq->online = 0; rq->idle_stamp = 0; rq->avg_idle = 2*sysctl_sched_migration_cost; + + INIT_LIST_HEAD(&rq...
9bd58e77e656abe08f3f781d982bc9e29167e1c3
Analyze and fix the following issue in the Linux kernel code: [media] smsusb: fix the default delivery system setting
Problem Details: There are two issues on the default delivery system setting for smsusb: 1) instead of filling the delivery system for the per-client frontend.ops, it were changing the global structure; 2) The client->frontend.ops copy were keeping the previous value of the template. So, the first time the ...
```diff diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index 654685c9303e..e2dc80da82cc 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c @@ -872,11 +872,11 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev, switch (smscore_get_device_mo...
847854f5988a04fe7e02d2fdd4fa0df9f96360fe
Analyze and fix the following issue in the Linux kernel code: memblock: Fix size aligning of memblock_alloc_base_nid()
Problem Details: memblock allocator aligns @size to @align to reduce the amount of fragmentation. Commit: 7bd0b0f0da ("memblock: Reimplement memblock allocation using reverse free area iterator") Broke it by incorrectly relocating @size aligning to memblock_find_in_range_node(). As the aligned size is not propagat...
```diff diff --git a/mm/memblock.c b/mm/memblock.c index 77b5f227e1d8..99f285599501 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -99,9 +99,6 @@ phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t start, phys_addr_t this_start, this_end, cand; u64 i; - /* align @size to avoid excessive fragmen...
a08fd280b58836c910a4af10eee2066e358d16db
Analyze and fix the following issue in the Linux kernel code: GFS2: Unlock rindex mutex on glock error
Problem Details: This patch fixes an error path in function gfs2_rindex_update that leaves the rindex mutex held. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 1446b4e0ac73..e09370eec590 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -699,13 +699,14 @@ int gfs2_rindex_update(struct gfs2_sbd *sdp) if (!gfs2_glock_is_locked_by_me(gl)) { error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh); if (error) ...
c3363c912ba743e6f981ba58c744e413fc41f943
Analyze and fix the following issue in the Linux kernel code: Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
Problem Details: This reverts commit 382d19f197f9870522a23d726ce857cd7bc572fe, as the changes in question are done in v4l tree differently. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/media/video/s5p-tv/hdmi_drv.c b/drivers/media/video/s5p-tv/hdmi_drv.c index 3e0dd099b2e0..8b41a0410ab1 100644 --- a/drivers/media/video/s5p-tv/hdmi_drv.c +++ b/drivers/media/video/s5p-tv/hdmi_drv.c @@ -962,7 +962,7 @@ static int __devinit hdmi_probe(struct platform_device *pdev) /* storin...
d1f4159723450252b643bcddff064153f32918bc
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix random system lockup
Problem Details: The commit "ath6kl: Use a mutex_lock to avoid race in diabling and handling irq" introduces a state where ath6kl_sdio_irq_handler() would be waiting to claim the sdio function for receive indefinitely when things happen in the following order. ath6kl_sdio_irq_handler() - aquires mtx_irq - sdio_relea...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index cae446bf2129..346f5dd3a954 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c @@ -50,8 +50,8 @@ struct ath6kl_sdio { /* scatter request list head */ struct list_he...
48752f6513012a1b078da08b145d5c40a644f058
Analyze and fix the following issue in the Linux kernel code: rtnetlink: Fix VF IFLA policy
Problem Details: Add VF spoof check to IFLA policy. The original patch I submitted to add the spoof checking feature to rtnl failed to add the proper policy rule that identifies the data type and len. This patch corrects that oversight. No bugs have been reported against this but it may cause some problem for the ne...
```diff diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 5cf39cd7da85..2be10181d583 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -1132,6 +1132,8 @@ static const struct nla_policy ifla_vf_policy[IFLA_VF_MAX+1] = { .len = sizeof(struct ifla_vf_vlan) }, [IFLA_VF_TX_RATE] = { .ty...
24ddd967806a5f0a7915721b7d60cac6f2cf5db9
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix comments that are out of date or formatted incorrectly
Problem Details: This patch corrects several comments that are either incorrect or formatted incorrectly for multiline comments. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 1cf676bf12ec..23a466530a04 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -2359,7 +2359,7 @@ static irqreturn_t ixgbe_intr(int irq, ...
c466d7a73360ed02167598a94984ab7b4dadfa68
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix spelling errors
Problem Details: Correct spelling error caught with codespell.py. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index 383b9413292e..87f6b4f8abbd 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c @@ -3336,7 +3336,7 @@ static u8 ixgbe_calculate_check...
7504a3e1f552cf7447835e7a893bea4bb2d6541d
Analyze and fix the following issue in the Linux kernel code: ath6kl: add padding to firmware log records
Problem Details: firmware debug utility expects firmware log record size to be 1500 bytes. This patch ensures that the firmware record will be exactly 1500 bytes. kvalo: remove trailing space Signed-off-by: Etay Luz <eluz@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
```diff diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c old mode 100644 new mode 100755 index 3d0713dfe3b9..28b516ff3d59 --- a/drivers/net/wireless/ath/ath6kl/debug.c +++ b/drivers/net/wireless/ath/ath6kl/debug.c @@ -277,7 +277,7 @@ void ath6kl_debug_fwlog_event(struct ath...
080eec4fb478f10c6f171875634fc3174da1a1c3
Analyze and fix the following issue in the Linux kernel code: ath6kl: Clear the IE in firmware if not set
Problem Details: Remove check so that IE in firmware is cleared if not set. Without this fix, any previously set IE will be used incorrectly in the next frame. For example, consider the scenario where a P2P device scan is followed by a regular station scan. The P2P IE set by the P2P scan needs to be cleared, otherwise ...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 50b76d0a4c6a..0becddd8b585 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -885,19 +885,14 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy...
b796f0934ae07fdd26d265ac9bf87e18921d7fef
Analyze and fix the following issue in the Linux kernel code: ath6kl: Defer wiphy and netdev registration till the end of ath6kl_core_init()
Problem Details: This makes the wiphy and initial netdev registration the last step in dev initialization. Apart from the fact that this looks right, it can also be used to setup wiphy with the regulatory information received from firmware after uploading the firmware. Also it fixes a FIXME in ath6kl_core_init() where ...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/core.c b/drivers/net/wireless/ath/ath6kl/core.c index d5c06c0dddab..e66cf4399b61 100644 --- a/drivers/net/wireless/ath/ath6kl/core.c +++ b/drivers/net/wireless/ath/ath6kl/core.c @@ -98,38 +98,6 @@ int ath6kl_core_init(struct ath6kl *ar) ath6kl_dbg(ATH6KL_DBG_TRC,...
00abfe4442864144a77f70b6b411d691bcb796bf
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix coding style with breaking lines
Problem Details: Our limit is 80 and broken lines should as right as possible. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
```diff diff --git a/drivers/bluetooth/btmrvl_debugfs.c b/drivers/bluetooth/btmrvl_debugfs.c index 60fe333cfd40..3497347e6dbb 100644 --- a/drivers/bluetooth/btmrvl_debugfs.c +++ b/drivers/bluetooth/btmrvl_debugfs.c @@ -401,28 +401,27 @@ void btmrvl_debugfs_init(struct hci_dev *hdev) dbg->config_dir = debugfs_create_d...
c1ba544f81544ed9613ad5d058968533dbcef4b2
Analyze and fix the following issue in the Linux kernel code: ARM: S3C24XX: Fix restart on S3C2442
Problem Details: Commit b27b072791dc (ARM: 7265/1: restart: S3C24XX: use new restart hook) introduced the new restart hook also for the S3C244x cpus, but it was only defined in the S3C2440 scope, i.e. when CPU_S3C2440 was selected. Devices using the S3C2442 like the GTA02 normally don't select this CPU which leads to c...
```diff diff --git a/arch/arm/mach-s3c2440/common.h b/arch/arm/mach-s3c2440/common.h index db8a98ac68c5..0c1eb1dfc534 100644 --- a/arch/arm/mach-s3c2440/common.h +++ b/arch/arm/mach-s3c2440/common.h @@ -12,6 +12,6 @@ #ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H #define __ARCH_ARM_MACH_S3C2440_COMMON_H -void s3c2440_res...
c65d8ef2e7158ba521e9cb1ce10ff468b8ddcb6a
Analyze and fix the following issue in the Linux kernel code: ARM: SAMSUNG: Fix memory size for hsotg
Problem Details: The device link core registers for hsotg is base + 0000h ~ base + 11000h. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> [Rebased on the newest git/kgene/linux-samsung #for-next] Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> S...
```diff diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index f10768e988d4..d21d744e4d99 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -1409,7 +1409,7 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) #ifdef CONFIG_S3C_DEV_USB_HSOTG static ...
063b0ee4026fe87ead0c5528b9c3186635268ec7
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] Fix exposure of ARM_EXYNOS4210_CPUFREQ
Problem Details: exynos4210-cpufreq.c is not buildable on non-exynos builds, so it's pointless allowing this option to be exposed. Fix this by adding a dependency on ARCH_EXYNOS. drivers/cpufreq/exynos4210-cpufreq.c:20:29: error: mach/regs-clock.h: No such file or directory drivers/cpufreq/exynos4210-cpufreq.c:21:26:...
```diff diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index e0664fed018a..c8bde43281c7 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -34,6 +34,7 @@ config ARM_EXYNOS_CPUFREQ config ARM_EXYNOS4210_CPUFREQ bool "Samsung EXYNOS4210" + depends on ARCH_EXYNOS h...
7c8fb0411766849a332575673d0cc69ea571f031
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] s3c64xx: Fix mis-cherry pick of VDDINT
Problem Details: We don't have any of the other code for VDDINT, including the variable declaration, so don't try to get it as we can't build. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dave Jones <davej@redhat.com>
```diff diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c index a5e72cb5f53c..6f9490b3c356 100644 --- a/drivers/cpufreq/s3c64xx-cpufreq.c +++ b/drivers/cpufreq/s3c64xx-cpufreq.c @@ -217,13 +217,6 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy) } else { s3c6...
f7c96f59b4af72f51c7835ed073da820bc3786b3
Analyze and fix the following issue in the Linux kernel code: Revert "powerpc/usb: fix usb CTRL_PHY_CLK_VALID breaks on some platform"
Problem Details: This reverts commit 79857e8e7b1ba740f8025b540f1e171c9a0a5d31. To quote Shengzhou Liu: I'm sorry, please don't apply this patch. It appears not only on P1022 platform. There will be more breaks on other platforms regarding CTRL_PHY_CLK_VALID bit. I will post a new patch with well compatibility on ...
```diff diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index e9d8a0cca47b..7a15c2235758 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -248,11 +248,7 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci) struct usb_hcd *hcd = ehci_to_hcd(ehci); struct fsl_usb...
da3e6ec2f443ac00aa623c5921e3521f5f38efe4
Analyze and fix the following issue in the Linux kernel code: staging: r8712u: Fix regression in signal level after commit c6dc001
Problem Details: In commit c6dc001 "staging: r8712u: Merging Realtek's latest (v2.6.6). Various fixes", the returned qual.qual member of the iw_statistics struct was changed. For strong signals, this change made no difference; however for medium and weak signals it results in a low signal that shows considerable fluctu...
```diff diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index 507584b837c3..ef35bc29a3fa 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -2380,13 +2380,7 @@ static struct iw_statistics *r871x_get...
2080913e017ab9f88379d93fd09546ad95faf87b
Analyze and fix the following issue in the Linux kernel code: staging: r8712u: Fix regression caused by commit 8c213fa
Problem Details: In commit 8c213fa "staging: r8712u: Use asynchronous firmware loading", the command to release the firmware was placed in the wrong routine. In combination with the bug introduced in commit a5ee652 "staging: r8712u: Interface-state not fully tracked", the driver attempts to upload firmware that had al...
```diff diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index 4cf175f53f9e..7bbd53a410e3 100644 --- a/drivers/staging/rtl8712/os_intfs.c +++ b/drivers/staging/rtl8712/os_intfs.c @@ -475,9 +475,6 @@ static int netdev_close(struct net_device *pnetdev) r8712_free_assoc_resources(pada...
9f4bc8cf3fe750ed093856a5f5d41c11cc12ad22
Analyze and fix the following issue in the Linux kernel code: staging: r8712u: Fix regression introduced by commit a5ee652
Problem Details: In commit a5ee652 "staging: r8712u: Interface-state not fully tracked", the private boolean "bup" was set false when the interface was brought down, as that seemed appropriate. This change has not caused any problems when using NetworkManager or manual control of the device; however, when wicd control ...
```diff diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index b22fea53a746..4cf175f53f9e 100644 --- a/drivers/staging/rtl8712/os_intfs.c +++ b/drivers/staging/rtl8712/os_intfs.c @@ -475,8 +475,6 @@ static int netdev_close(struct net_device *pnetdev) r8712_free_assoc_resources(pada...
4768f3f09a69d3a7a8ac27e9daafddc1ac920ab4
Analyze and fix the following issue in the Linux kernel code: Staging: crystalhd: Add global header
Problem Details: In the crystalhd_cmds.h there was a struct dependence bug: the struct crystalhd_adp (which is declared on crystalhd_lnx.h) is used on the crystalhd_cmd struct, however the crystalhd_lnx.h is never included on crystalhd_cmds.h at all. Including the crystalhd_lnx.h on crystalhd_cmds.h breaks the build,...
```diff diff --git a/drivers/staging/crystalhd/crystalhd.h b/drivers/staging/crystalhd/crystalhd.h new file mode 100644 index 000000000000..3f4d79515026 --- /dev/null +++ b/drivers/staging/crystalhd/crystalhd.h @@ -0,0 +1,14 @@ +#ifndef _CRYSTALHD_H_ +#define _CRYSTALHD_H_ + +#include <asm/system.h> +#include "bc_dts_d...
dc91e2f1c01a579e055ebd25c32c1628041b0eca
Analyze and fix the following issue in the Linux kernel code: staging: mei: fix typo in error code return
Problem Details: ~ENODEV is a different number than -ENODEV Signed-off-by: Devin J. Pohly <djpohly@gmail.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/mei/interrupt.c b/drivers/staging/mei/interrupt.c index 3c21c93af8ea..8a9044ba3573 100644 --- a/drivers/staging/mei/interrupt.c +++ b/drivers/staging/mei/interrupt.c @@ -1280,7 +1280,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list, } } if (dev->stop...
1dd4c8e42aa08f21de3cdb4f7aa0841fbd7e3f58
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8996: Fix /RESET bounce ordering
Problem Details: We want to leave the device out of rather than in reset. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index fb5c07a9ec9c..1226f92bbb03 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -1719,8 +1719,8 @@ static bool wm8996_volatile_register(struct device *dev, unsigned int reg) static int wm8996_reset(struct wm8996_priv ...
041aba19b916ddfd5254c80ef413ef8a7e76c8ad
Analyze and fix the following issue in the Linux kernel code: staging: zcache: fix memory corruption bug
Problem Details: This patch fixes a bug where the zv code writes before the allocated buffer, resulting in system memory corruption. This was introduced during the switch from xvmalloc to zsmalloc. Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index 46c7c04c2451..70734652f724 100644 --- a/drivers/staging/zcache/zcache-main.c +++ b/drivers/staging/zcache/zcache-main.c @@ -701,7 +701,6 @@ static struct zv_hdr *zv_create(struct zs_pool *pool, uint32_t pool_id, u32...
843c666d16e62e4b3889f1491a1d91b87ddc7bd3
Analyze and fix the following issue in the Linux kernel code: staging: zcache: fix length type mismatch
Problem Details: This fixes a type mismatch in the compression code where a size_t pointer was cast to a unsigned int pointer. On little endian archs, there is no issue. However on big endian archs, the value is incorrect, taking the high order bits and truncating the lower order bits. Signed-off-by: Seth Jennings <...
```diff diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index 238d82095ab1..46c7c04c2451 100644 --- a/drivers/staging/zcache/zcache-main.c +++ b/drivers/staging/zcache/zcache-main.c @@ -1170,14 +1170,14 @@ static atomic_t zcache_curr_pers_pampd_count = ATOMIC_INIT(0); static un...
0339d3dbbfd51348dda584796e59a740a57a7e32
Analyze and fix the following issue in the Linux kernel code: staging: ozwpan: Reduced size of oz_evtlist structure.
Problem Details: This structure is used in an ioctl definition and was causing the 64-bit PowerPC build to fail. The size of the array in the structure has been reduced to fix this. Signed-off-by: Chris Kelly <ckelly@ozmodevices.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartma...
```diff diff --git a/drivers/staging/ozwpan/ozeventdef.h b/drivers/staging/ozwpan/ozeventdef.h index cfe4163965de..a880288bab11 100644 --- a/drivers/staging/ozwpan/ozeventdef.h +++ b/drivers/staging/ozwpan/ozeventdef.h @@ -37,7 +37,7 @@ struct oz_event { unsigned ctx4; }; -#define OZ_EVT_LIST_SZ 256 +#define OZ_EV...
df91e49477a9be15921cb2854e1d12a3bdb5e425
Analyze and fix the following issue in the Linux kernel code: TOMOYO: Fix mount flags checking order.
Problem Details: Userspace can pass in arbitrary combinations of MS_* flags to mount(). If both MS_BIND and one of MS_SHARED/MS_PRIVATE/MS_SLAVE/MS_UNBINDABLE are passed, device name which should be checked for MS_BIND was not checked because MS_SHARED/MS_PRIVATE/MS_SLAVE/MS_UNBINDABLE had higher priority than MS_BIND...
```diff diff --git a/security/tomoyo/mount.c b/security/tomoyo/mount.c index bee09d062057..fe00cdfd0267 100644 --- a/security/tomoyo/mount.c +++ b/security/tomoyo/mount.c @@ -199,30 +199,32 @@ int tomoyo_mount_permission(char *dev_name, struct path *path, if (flags & MS_REMOUNT) { type = tomoyo_mounts[TOMOYO_MOUNT...
3573bfb2306b58b88adccaf95fa310c53d392903
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: trivial cleanup
Problem Details: 1. Do not initialise globals to 0 2. Fix wrong spelling in debug message 3. Modified debug log messages Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c index b2d336c236c0..7ac21dabbf22 100644 --- a/drivers/scsi/qla4xxx/ql4_mbx.c +++ b/drivers/scsi/qla4xxx/ql4_mbx.c @@ -622,7 +622,7 @@ int qla4xxx_get_firmware_status(struct scsi_qla_host * ha) return QLA_ERROR; } - ql4_printk(KE...
a7380a65312c98317aab70df6512c620369c2f19
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: Fix sparse warning
Problem Details: Fix following warning:- drivers/scsi/qla4xxx/ql4_os.c:35:5: warning: symbol 'ql4xdisablesysfsboot' was not declared. Should it be static? drivers/scsi/qla4xxx/ql4_iocb.c:461:5: warning: symbol 'qla4xxx_send_mbox_iocb' was not declared. Should it be static? drivers/scsi/qla4xxx/ql4_os.c:3025:6: warnin...
```diff diff --git a/drivers/scsi/qla4xxx/ql4_iocb.c b/drivers/scsi/qla4xxx/ql4_iocb.c index c70651ddaf8b..2a2022a6bb9b 100644 --- a/drivers/scsi/qla4xxx/ql4_iocb.c +++ b/drivers/scsi/qla4xxx/ql4_iocb.c @@ -458,8 +458,8 @@ static struct mrb *qla4xxx_get_new_mrb(struct scsi_qla_host *ha) return mrb; } -int qla4xxx_...
8270ee2abb78c73b73e04f2909b0de15540c9017
Analyze and fix the following issue in the Linux kernel code: [SCSI] pm8001: fix endian issue with code optimization.
Problem Details: 1. Fix endian issue. 2. Fix the following warning : " drivers/scsi/pm8001/pm8001_hwi.c:2932:32: warning: comparison between ‘enum sas_device_type’ and ‘enum sas_dev_type’". 3. Few code optimization. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Jack Wang <jack_wang@us...
```diff diff --git a/drivers/scsi/pm8001/pm8001_chips.h b/drivers/scsi/pm8001/pm8001_chips.h index 4efa4d0950e5..9241c7826034 100644 --- a/drivers/scsi/pm8001/pm8001_chips.h +++ b/drivers/scsi/pm8001/pm8001_chips.h @@ -46,9 +46,9 @@ static inline u32 pm8001_read_32(void *virt_addr) return *((u32 *)virt_addr); } -s...
50ec5babd3b9da274ac3e0d5ca0c4772e3c7bc8d
Analyze and fix the following issue in the Linux kernel code: [SCSI] pm8001: Fix possible racing condition.
Problem Details: There is a possble racing scenario. 'process_oq' is called by two routines, as shown below. pm8001_8001_dispatch = { ....... .isr = pm8001_chip_isr --> process_oq,// A .isr_process_oq = process_oq, // B ..... } process_oq() --> proces...
```diff diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 871d1c3fa01b..dc28ae186450 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c @@ -3869,7 +3869,9 @@ static int process_oq(struct pm8001_hba_info *pm8001_ha) void *pMsg1 = NULL; u8 bc = 0;...
bdaefbf580cd200ae3230b6aacd1f4f2dadb18e3
Analyze and fix the following issue in the Linux kernel code: [SCSI] pm8001: Fix bogus interrupt state flag issue.
Problem Details: Static checker is giving following warning: " error: calling 'spin_unlock_irqrestore()' with bogus flags" The code flow is as shown below: process_oq() --> process_one_iomb --> mpi_sata_completion In 'mpi_sata_completion' the first call for 'spin_unlock_irqrestore()' is with flags=0, which is as good...
```diff diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 3920b49f4f57..871d1c3fa01b 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c @@ -2082,7 +2082,6 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb) { struct sas_task *t...
8a6552299e2c3b01bb49ea52be2788f7c6bd8bf2
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: handle default case in qla2x00_request_firmware()
Problem Details: This silences a static checker warning. Also we're always adding new types of firmware, so it might fix a bug in real life some day. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 094af74989d6..a2f999273a5f 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -4058,7 +4058,6 @@ qla2x00_request_firmware(scsi_qla_host_t *vha) struct qla_hw_data *ha = vha->hw; struct fw_blob *bl...
13de2c541993394ec4db4949302312a0ce0af7b1
Analyze and fix the following issue in the Linux kernel code: [SCSI] isci: improvements in driver unloading routine
Problem Details: This patch fixes scenario where driver removal should be possible only when driver is in READY state. Also it removes redundant invocation of routine disabling SCU interrupts - this method is called somewhere else in driver deinitialization path. Signed-off-by: Andrzej Jakowski <andrzej.jakowski@intel...
```diff diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index c9af456e7dfe..5137db5a5d85 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c @@ -60,6 +60,7 @@ #include <linux/efi.h> #include <asm/string.h> #include <scsi/scsi_host.h> +#include "host.h" #include "isci.h" #include "...
50af5ead3b44ccf8bd2b4d2a50c1b610f557c480
Analyze and fix the following issue in the Linux kernel code: bug.h: add include of it to various implicit C users
Problem Details: With bug.h currently living right in linux/kernel.h there are files that use BUG_ON and friends but are not including the header explicitly. Fix them up so we can remove the presence in kernel.h file. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
```diff diff --git a/arch/arm/mach-imx/cpu_op-mx51.c b/arch/arm/mach-imx/cpu_op-mx51.c index 9d34c3d4c024..7b92cd6da6d3 100644 --- a/arch/arm/mach-imx/cpu_op-mx51.c +++ b/arch/arm/mach-imx/cpu_op-mx51.c @@ -11,6 +11,7 @@ * http://www.gnu.org/copyleft/gpl.html */ +#include <linux/bug.h> #include <linux/types.h> ...
26a2e68f816ebd736a0484ca293457b280af4ef1
Analyze and fix the following issue in the Linux kernel code: [SCSI] libsas: don't recover end devices attached to disabled phys
Problem Details: If userspace has decided to disable a phy the kernel should honor that and not inadvertantly re-enable the phy via error recovery. This is more straightforward in the sata case where link recovery (via libata-eh) is separate from sas_task cancelling in libsas-eh. Teach libsas to accept -ENODEV as a s...
```diff diff --git a/drivers/scsi/aic94xx/aic94xx_tmf.c b/drivers/scsi/aic94xx/aic94xx_tmf.c index 50b914ffab94..cf9040933da6 100644 --- a/drivers/scsi/aic94xx/aic94xx_tmf.c +++ b/drivers/scsi/aic94xx/aic94xx_tmf.c @@ -192,7 +192,7 @@ int asd_I_T_nexus_reset(struct domain_device *dev) ASD_DPRINTK("sending %s reset to...
840234745edaa82d514420dc1086e63536493a51
Analyze and fix the following issue in the Linux kernel code: [SCSI] libsas: fix lifetime of SAS_HA_FROZEN
Problem Details: Until all sas_tasks are known to no longer be in-flight this flag gates late completions from colliding with error handling. However, it must be cleared prior to the submission of scsi_send_eh_cmnd() requests, otherwise those commands will never be completed correctly. This was spotted by slub debug:...
```diff diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 3701ff7e7267..fd3291337c1b 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c @@ -521,8 +521,7 @@ try_bus_reset: return FAILED; } -static int sas_eh_handle_sas_errors(struct ...
354cf82980e2449e71fdaa3c6f170357ebd65467
Analyze and fix the following issue in the Linux kernel code: [SCSI] libsas: let libata recover links that fail to transmit initial sig-fis
Problem Details: libsas fails to discover all sata devices in the domain. If a device fails negotiation and does not transmit a signature fis the link needs recovery. libata already understands how to manage slow to come up links, so treat these conditions as ata device attach events for the purposes of creating an at...
```diff diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index ba1ebfe991d7..25008a42412f 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -278,26 +278,84 @@ static struct sas_internal *dev_to_sas_internal(struct domain_device *dev) return to_sas_internal(dev...
1c1bc9223387dacc48eb2b61b0baabe7e9cf47f6
Analyze and fix the following issue in the Linux kernel code: perf probe: Ensure offset provided is not greater than function length without DWARF info too
Problem Details: The 'perf probe' command allows kprobe to be inserted at any offset from a function start, which results in adding kprobes to unintended location. (example: perf probe do_fork+10000 is allowed even though size of do_fork is ~904). My previous patch https://lkml.org/lkml/2012/2/24/42 addressed the cas...
```diff diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 29cb65459811..e33554a562b3 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -1867,6 +1867,12 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev, tev->point.symbol); r...
30e68bcc67e41ab6dab4e4e1efc7ea8ca893c0af
Analyze and fix the following issue in the Linux kernel code: perf evlist: Return first evsel for non-sample event on old kernel
Problem Details: On old kernels that don't support sample_id_all feature, perf_evlist__id2evsel() returns NULL for non-sampling events. This breaks perf top when multiple events are given on command line. Fix it by using first evsel in the evlist. This will also prevent getting the same (potential) problem in such new...
```diff diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 3f16e08a5c8d..ea32a061f1c8 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -349,6 +349,10 @@ struct perf_evsel *perf_evlist__id2evsel(struct perf_evlist *evlist, u64 id) hlist_for_each_entry(sid, pos, head, node) ...
a692b0eec5efae382dfa800e8b4b083f172921a7
Analyze and fix the following issue in the Linux kernel code: [SCSI] libsas: fix sas port naming
Problem Details: Make sas-port naming consistent with the expander-attached case whereby the phy-id is the last digit in the port name. Otherwise we get the random behavior of the allocation order. Reported-by: Patrick Thomson <patrick.s.thomson@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed...
```diff diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c index 59ee8a0a6ea9..29f8fd335523 100644 --- a/drivers/scsi/libsas/sas_port.c +++ b/drivers/scsi/libsas/sas_port.c @@ -122,7 +122,7 @@ static void sas_form_port(struct asd_sas_phy *phy) spin_unlock_irqrestore(&sas_ha->phy_port_lock, f...
d214d81e883b6fc6f11cc772ff88585565d45cce
Analyze and fix the following issue in the Linux kernel code: [SCSI] libsas: improve debug statements
Problem Details: It's difficult to determine which domain_device is triggering error recovery, so convert messages like: sas: ex 5001b4da000e703f phy08:T attached: 5001b4da000e7028 sas: ex 5001b4da000e703f phy09:T attached: 5001b4da000e7029 ... ata7: sas eh calling libata port error handler ata8: sas eh call...
```diff diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 40edf520d69a..ba1ebfe991d7 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -317,6 +317,28 @@ static int local_ata_check_ready(struct ata_link *link) } } +static int sas_ata_printk(const char *...
5d7f6d1071eadd020edb2cf366d358e0f6d0a0f9
Analyze and fix the following issue in the Linux kernel code: [SCSI] libsas: fix sas_unregister_ports vs sas_drain_work
Problem Details: We need to hold drain_mutex across the unregistration as port down events queue device removal as chained events, so we need to make sure no other drainers are active. [ 1118.673968] WARNING: at kernel/workqueue.c:996 __queue_work+0x11a/0x326() [ 1118.681982] Hardware name: S2600CP [ 1118.686193] Modu...
```diff diff --git a/drivers/scsi/libsas/sas_event.c b/drivers/scsi/libsas/sas_event.c index dbfaceeea0f7..16639bbae629 100644 --- a/drivers/scsi/libsas/sas_event.c +++ b/drivers/scsi/libsas/sas_event.c @@ -51,15 +51,11 @@ static void sas_queue_event(int event, unsigned long *pending, } } -int sas_drain_work(struc...
d230ce691c7712c4f56ba3378d6d2f44628a49f1
Analyze and fix the following issue in the Linux kernel code: [SCSI] libsas: fix mixed topology recovery
Problem Details: If we have a domain with sas and sata devices there may still be sas recovery actions to take after peeling off the commands to send to libata. Reported-by: Andrzej Jakowski <andrzej.jakowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@P...
```diff diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 26a943eb153a..40edf520d69a 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -699,10 +699,9 @@ void sas_ata_strategy_handler(struct Scsi_Host *shost) sas_enable_revalidation(sas_ha); } -int sas_...
8abda4d28a55ecb91e39ceb5e3ee264c5a3cd1af
Analyze and fix the following issue in the Linux kernel code: [SCSI] libsas: close scsi_remove_target() vs libata-eh race
Problem Details: ata_port lifetime in libata follows the host. In libsas it follows the scsi_target. Once scsi_remove_device() has caused all commands to be completed it allows scsi_remove_target() to immediately proceed to freeing the ata_port causing bug reports like: [ 848.393333] BUG: spinlock bad magic on CPU#...
```diff diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 37a9e73870d4..26a943eb153a 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -661,8 +661,13 @@ static void async_sas_ata_eh(void *data, async_cookie_t cookie) struct ata_port *ap = dev->sata_dev.ap...
9277699121b81891e303ada0a53fa1d04b7ffe72
Analyze and fix the following issue in the Linux kernel code: [SCSI] isci: fix interpretation of "hard" reset
Problem Details: A hard reset to isci in the direct-attached case is one where the driver internally manages debouncing the link. In the sas-expander-attached case a hard reset is one that clears affiliations. The driver should not be prematurely dropping affiliations at run time, that decision (to force expander har...
```diff diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c index f9d20c1e63ca..e55ef65f5212 100644 --- a/drivers/scsi/isci/port.c +++ b/drivers/scsi/isci/port.c @@ -305,7 +305,9 @@ static void port_state_machine_change(struct isci_port *iport, static void isci_port_hard_reset_complete(struct isci_port *i...
c132f692085ac624d7c8123df781846c8dcb3166
Analyze and fix the following issue in the Linux kernel code: [SCSI] isci: kill iphy->isci_port lookups
Problem Details: This field is a holdover from the OS abstraction conversion. The stable phy to port lookups are done via iphy->ownining_port under scic_lock. After this conversion to use port->lldd_port the only volatile lookup is the initial lookup in isci_port_formed(). After that point any lookup via a successful...
```diff diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h index 5477f0fa8233..adbad69d1069 100644 --- a/drivers/scsi/isci/host.h +++ b/drivers/scsi/isci/host.h @@ -187,6 +187,7 @@ struct isci_host { int id; /* unique within a given pci device */ struct isci_phy phys[SCI_MAX_PHYS]; struct isci_port ...
a0391a3ae91d301c0e59368531a4de5f0b122bcf
Analyze and fix the following issue in the Linux kernel code: udf: Fix deadlock in udf_release_file()
Problem Details: udf_release_file() can be called from munmap() path with mmap_sem held. Thus we cannot take i_mutex there because that ranks above mmap_sem. Luckily, i_mutex is not needed in udf_release_file() anymore since protection by i_data_sem is enough to protect from races with write and truncate. CC: stable@...
```diff diff --git a/fs/udf/file.c b/fs/udf/file.c index dca0c3881e82..d567b8448dfc 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c @@ -201,12 +201,10 @@ out: static int udf_release_file(struct inode *inode, struct file *filp) { if (filp->f_mode & FMODE_WRITE) { - mutex_lock(&inode->i_mutex); down_write(&UDF_I(i...
b2527bfa535956d99663718b9d9aac0b8fe3f017
Analyze and fix the following issue in the Linux kernel code: udf: Fix file entry logicalBlocksRecorded
Problem Details: ECMA 1.67 requires setting logicalBlocksRecorded to zero if the file has no extents. This should be checked in udf_update_inode(). udf_fill_inode() will then take care of itself. Signed-off-by: Steven P. Nickel <snickel@focusinfo.com> Signed-off-by: Jan Kara <jack@suse.cz>
```diff diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 91c6f2311f35..7d7528008359 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -1497,6 +1497,7 @@ static int udf_update_inode(struct inode *inode, int do_sync) struct buffer_head *bh = NULL; struct fileEntry *fe; struct extendedFileEntry *efe; + uint64_t ...
fd4287dbc07763595c1e74edbb6520092290185c
Analyze and fix the following issue in the Linux kernel code: udf: Fix handling of i_blocks
Problem Details: Commit 36350462 removed unused quota support from UDF. As an unfortunate sideeffect it also removed updates of i_blocks so all files had i_block == 0. Fix the problem by returning updates of file space back to UDF allocation and freeing functions. Signed-off-by: Jan Kara <jack@suse.cz>
```diff diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c index 987585bb0a1d..1ba2baaf4367 100644 --- a/fs/udf/balloc.c +++ b/fs/udf/balloc.c @@ -105,7 +105,6 @@ static void udf_add_free_space(struct super_block *sb, u16 partition, u32 cnt) } static void udf_bitmap_free_blocks(struct super_block *sb, - struct in...
89605011915aec5c6194e53a9f02631d68aea6bc
Analyze and fix the following issue in the Linux kernel code: xfs: include reservations in quota reporting
Problem Details: Report all quota usage including the currently pending reservations. This avoids the need to flush delalloc space before gathering quota information, and matches quota enforcement, which already takes the reservations into account. This fixes xfstests 270. Reviewed-by: Dave Chinner <dchinner@redhat....
```diff diff --git a/fs/xfs/xfs_qm_bhv.c b/fs/xfs/xfs_qm_bhv.c index a0a829addca9..e4e37877f867 100644 --- a/fs/xfs/xfs_qm_bhv.c +++ b/fs/xfs/xfs_qm_bhv.c @@ -40,28 +40,28 @@ STATIC void xfs_fill_statvfs_from_dquot( struct kstatfs *statp, - xfs_disk_dquot_t *dp) + struct xfs_dquot *dqp) { __uint64_t limit; -...
c288ec614e264b46853c65d3db9ccf91d53c9484
Analyze and fix the following issue in the Linux kernel code: carl9170: fix breakage from "mac80211: handle non-bufferable MMPDUs correctly"
Problem Details: That commit intended for 3.4 renamed IEEE80211_TX_CTL_POLL_RESPONSE as IEEE80211_TX_CTL_NO_PS_BUFFER. Meanwhile, "carl9170: fix frame delivery if sta is in powersave mode" added a reference to IEEE80211_TX_CTL_POLL_RESPONSE in the fixes stream for 3.3. This simple patch fixes that merge boo-boo. Sig...
```diff diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c index 0f00721995ef..aed305177af6 100644 --- a/drivers/net/wireless/ath/carl9170/tx.c +++ b/drivers/net/wireless/ath/carl9170/tx.c @@ -1247,7 +1247,7 @@ static bool carl9170_tx_ps_drop(struct ar9170 *ar, struct sk_buff *...
c3dfefa0a6d235bd465309e12f4c56ea16e71111
Analyze and fix the following issue in the Linux kernel code: drm/i915: reenable gmbus on gen3+ again
Problem Details: With the rework to merge the bit-banging fallback into the gmbus i2c adapter we've gotten rid of the deadlock possibility that originally lead to the disabling of this code. This reverts the revert commit 826c7e4147f902737b281e8a5a7d7aa33fd63316 Author: Jean Delvare <khali@linux-fr.org> Date: Sat J...
```diff diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index 8fdc95700218..601c86e664af 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c @@ -390,7 +390,7 @@ int intel_setup_gmbus(struct drm_device *dev) bus->has_gpio = intel_gpio_setup(bus, i); ...
bb79a0798d7c430f012f2f906fd7873f8976bc89
Analyze and fix the following issue in the Linux kernel code: i2c: imx: fix imx driver to work though signal is pending
Problem Details: Interrupt a test application for I2C based mc13xxx driven touch panel, SIGINT, causes open event file descriptor to be closed, which in turn causes I2C activity to mask PMIC local interrupts. This eventually ends up in i2c_imx_bus_busy to wait for some busy flag to toggle, but while waiting it would fi...
```diff diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 58832e578fff..124d9c594f40 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -149,11 +149,6 @@ static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx, int for_busy) break; if (!for_busy && !(t...
08db1ab7fa4cab08c1e24f373439d472d054a921
Analyze and fix the following issue in the Linux kernel code: iwlegacy: Kconfig: Change Debug Option to be more clear
Problem Details: Since the menuconfig system doesn't indent the debug options for the 3945 /4965, add some text to make it clear which debug options are being configured. Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlegacy/Kconfig b/drivers/net/wireless/iwlegacy/Kconfig index 4d81b80b16e6..fb919727b8bb 100644 --- a/drivers/net/wireless/iwlegacy/Kconfig +++ b/drivers/net/wireless/iwlegacy/Kconfig @@ -60,7 +60,7 @@ config IWL3945 say M here and read <file:Documentation/kbuild/modules.t...
649921499c7116d5283b02ec432ff42229aefccd
Analyze and fix the following issue in the Linux kernel code: iwlegacy: Kconfig: Move Debugging Options
Problem Details: Move the debug options so they appear below the 3945 / 4965 options. Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlegacy/Kconfig b/drivers/net/wireless/iwlegacy/Kconfig index 05bd375cb845..4d81b80b16e6 100644 --- a/drivers/net/wireless/iwlegacy/Kconfig +++ b/drivers/net/wireless/iwlegacy/Kconfig @@ -6,45 +6,6 @@ config IWLEGACY select LEDS_TRIGGERS select MAC80211_LEDS -menu "Debug...
02d83e60b9864e7920d87b49e1fbedffd32470f8
Analyze and fix the following issue in the Linux kernel code: mac80211: fix ieee80211_set_disassoc() sending DelBA
Problem Details: When ieee80211_set_disassoc() is called with the tx argument set to true, it will send DelBA out to the peer. This isn't useful or necessary in a few cases where we do it today, those being when we lost the connection or when the supplicant explicitly asked us to not tell the AP. Signed-off-by: Johann...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 82d49341eaa0..379a1d140161 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1684,7 +1684,7 @@ static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata) printk(KERN_DEBUG "%s: Connection to AP %pM lost.\n", s...