id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
09cf7c9a1299c386525d31305fd50591acf49a9a
Analyze and fix the following issue in the Linux kernel code: drm/i915: Insert a flush between batches if the breadcrumb was dropped
Problem Details: If we drop the breadcrumb request after a batch due to a signal for example we aim to fix it up at the next opportunity. In this case we emit a second batchbuffer with no waits upon the first and so no opportunity to insert the missing request, so we need to emit the missing flush for coherency. (Note ...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 88e2e114189c..981e14f000e3 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -885,11 +885,16 @@ i915_gem_execbuffer_move_to_gpu(struct intel_ring_b...
0d71068835e2610576d369d6d4cbf90e0f802a71
Analyze and fix the following issue in the Linux kernel code: drm/i915: try to train DP even harder
Problem Details: While debugging Haswell link train failures I observed that we never try the maximum voltage configuration more than once consecutively. We start the training, the monitor keeps telling us to increase the voltage, then when we reach the maximum we just go back to the start (because of the "memset" abov...
```diff diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 2bc1505132c3..0a56b9ab0f58 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1771,7 +1771,7 @@ intel_dp_start_link_train(struct intel_dp *intel_dp) for (i = 0; i < intel_dp->lane_count; i...
a2bd1f541f1990dda7dd62f190342c9a964ceb4f
Analyze and fix the following issue in the Linux kernel code: drm/i915: check whether we actually received an edid in detect_ddc
Problem Details: Somehow detect_ddc manages to fall through all checks when we think that something responds on the ddc i2c address, but the edid read failed. Fix this up by explicitly checking for this case. This fixes a regression on newer chips because since commit aaa377302b2994fcc2c66741b47da33feb489dca Author: ...
```diff diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index 48e3b76e0ab2..7ed4a41c3965 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -330,39 +330,34 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector) { struct intel_crt *cr...
4b4147c38f89dea536afc50a0a2d2ed005b49288
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix up PCH backlight #define mixup
Problem Details: I so totally suck. This can cause a black screen if (for whatever reason) the bios hasn't set this bit itself. This regression has been introduced in commit 7cf4160148136deb31ee5f2802857dd935a38529 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue Jun 5 10:07:09 2012 +0200 drm/i915: cl...
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 7aa6e97c2c72..acc99b21e0b6 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -1900,7 +1900,7 @@ /* PCH CTL1 is totally different, all but the below bits are reserved. CTL2 is * like the no...
67b1b57182972f3c89c1ff9a58951582cb6bcca7
Analyze and fix the following issue in the Linux kernel code: drm/i915: Disable the BLT on pre-production SNB hardware
Problem Details: It never quite worked despite the numerous workarounds, yet I still see people trying to use this hardware and filing bug reports. As we no longer even try to implement the workarounds, since 6a233c78878 (drm/i915/ringbuffer: kill snb blt workaround), simply disable the ring. v2: Add a message to info...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 0fdb3d29cbbb..89d62f635ac8 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3726,6 +3726,22 @@ void i915_gem_init_ppgtt(struct drm_device *dev) } } +static bool +intel_enable_blt(struc...
a3ce9a801b56e9b2118ce8d25b4f6f84f1d37dd4
Analyze and fix the following issue in the Linux kernel code: spi: omap2-mcspi: Fix the below warning
Problem Details: The dma_map and dma_unmap should have same parameter passed otherwise we get the below warn. ks8851 spi1.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x000000009f22] [ 2.066925] Modules linked in: [ 2.070312] [ 2.071929] [<c001c250>] (unwind_backtra...
```diff diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 0c73dd4f43a0..37ccdb796c9b 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c @@ -388,7 +388,8 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer) if (tx != NULL) { wait_for...
53df1ad52545854fc34d336b26f3086b2fb2d6f7
Analyze and fix the following issue in the Linux kernel code: EXYNOS: bugfix on retrieving old_index from freqs.old
Problem Details: The policy might have been changed since last call of target(). Thus, using cpufreq_frequency_table_target(), which depends on policy to find the corresponding index from a frequency, may return inconsistent index for freqs.old. Thus, old_index should be calculated not based on the current policy. We ...
```diff diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index b243a7ee01f6..af2d81e10f71 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -62,8 +62,18 @@ static int exynos_target(struct cpufreq_policy *policy, goto out; } - if (cpufreq_frequ...
eb055fd0560b9835e9e1a956aa6a83c51a735801
Analyze and fix the following issue in the Linux kernel code: HID: usbhid: fix error paths in suspend
Problem Details: This patch (as1597) fixes some of the error paths in usbhid's suspend routine. The driver was not careful to restart everything that might have been stopped, in cases where a suspend failed. For example, once the HID_SUSPENDED flag is set, an output report submission would not restart the correspondi...
```diff diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 4309c03038f6..dedd8e4e5c6d 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -993,9 +993,10 @@ static int usbhid_output_raw_report(struct hid_device *hid, __u8 *buf, size_t co static void usbhid_r...
01a7c984e86fd45b760bb0da8b635059dff602e1
Analyze and fix the following issue in the Linux kernel code: HID: usbhid: fix autosuspend calls
Problem Details: This patch (as1593) fixes some logic errors in the usbhid driver relating to runtime PM. The driver does not balance its calls to usb_autopm_get_interface_async() and usb_autopm_put_interface_async(). For example, when the control queue is restarted the driver does a _get. But the resume won't happe...
```diff diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 6b9bad540702..213b3f39753c 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -213,9 +213,20 @@ static int usbhid_restart_out_queue(struct usbhid_device *usbhid) if ((kicked = (usbhid->outhead != us...
668160e5a80536251b4931a332dfe34d6ec2aeb7
Analyze and fix the following issue in the Linux kernel code: HID: usbhid: fix use-after-free bug
Problem Details: This patch (as1592) fixes an obscure problem in the usbhid driver. Under some circumstances, a control or interrupt-OUT URB can be submitted twice. This will happen if the first submission fails; the queue pointers aren't updated, so the next time the queue is restarted the same URB will be submitted ...
```diff diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 482f936fc29b..6b9bad540702 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -331,9 +331,12 @@ static int hid_submit_out(struct hid_device *hid) usbhid->urbout->transfer_buffer_length = ((report->s...
2b7547578b9fdf811072cfc0c3594eb370e7d219
Analyze and fix the following issue in the Linux kernel code: s390/lgr: Add init check to lgr_info_log()
Problem Details: If lgr has not been initialized, the lgr_info_log() function currently crashes because 'lgr_page' is not allocated. To fix this 'lgr_page' is allocated statically now. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/kernel/lgr.c b/arch/s390/kernel/lgr.c index 87f080b17af1..eca94e74d19a 100644 --- a/arch/s390/kernel/lgr.c +++ b/arch/s390/kernel/lgr.c @@ -45,7 +45,7 @@ struct lgr_info { /* * LGR globals */ -static void *lgr_page; +static char lgr_page[PAGE_SIZE] __aligned(PAGE_SIZE); static struc...
c999ff68029ebd0f56ccae75444f640f6d5a27d2
Analyze and fix the following issue in the Linux kernel code: pnfs-obj: Fix __r4w_get_page when offset is beyond i_size
Problem Details: It is very common for the end of the file to be unaligned on stripe size. But since we know it's beyond file's end then the XOR should be preformed with all zeros. Old code used to just read zeros out of the OSD devices, which is a great waist. But what scares me more about this situation is that, we ...
```diff diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c index 86d7595aca8f..f50d3e8d6f22 100644 --- a/fs/nfs/objlayout/objio_osd.c +++ b/fs/nfs/objlayout/objio_osd.c @@ -489,8 +489,16 @@ static struct page *__r4w_get_page(void *priv, u64 offset, bool *uptodate) struct nfs_write_data *wdata = ...
9909d45a8557455ca5f8ee7af0f253debc851f1a
Analyze and fix the following issue in the Linux kernel code: pnfs-obj: don't leak objio_state if ore_write/read fails
Problem Details: [Bug since 3.2 Kernel] CC: Stable Tree <stable@kernel.org> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
```diff diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c index b47277baebab..86d7595aca8f 100644 --- a/fs/nfs/objlayout/objio_osd.c +++ b/fs/nfs/objlayout/objio_osd.c @@ -454,7 +454,10 @@ int objio_read_pagelist(struct nfs_read_data *rdata) objios->ios->done = _read_done; dprintk("%s: offset...
537632e0a54a5355cdd0330911d18c3b773f9cf7
Analyze and fix the following issue in the Linux kernel code: ore: Unlock r4w pages in exact reverse order of locking
Problem Details: The read-4-write pages are locked in address ascending order. But where unlocked in a way easiest for coding. Fix that, locks should be released in opposite order of locking, .i.e descending address order. I have not hit this dead-lock. It was found by inspecting the dbug print-outs. I suspect there i...
```diff diff --git a/fs/exofs/ore_raid.c b/fs/exofs/ore_raid.c index fff2070c6751..5f376d14fdcc 100644 --- a/fs/exofs/ore_raid.c +++ b/fs/exofs/ore_raid.c @@ -144,26 +144,26 @@ static void _sp2d_reset(struct __stripe_pages_2d *sp2d, { unsigned data_devs = sp2d->data_devs; unsigned group_width = data_devs + sp2d->p...
62b62ad873f2accad9222a4d7ffbe1e93f6714c1
Analyze and fix the following issue in the Linux kernel code: ore: Remove support of partial IO request (NFS crash)
Problem Details: Do to OOM situations the ore might fail to allocate all resources needed for IO of the full request. If some progress was possible it would proceed with a partial/short request, for the sake of forward progress. Since this crashes NFS-core and exofs is just fine without it just remove this contraption...
```diff diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c index 49cf230554a2..24a49d47e935 100644 --- a/fs/exofs/ore.c +++ b/fs/exofs/ore.c @@ -735,13 +735,7 @@ static int _prepare_for_striping(struct ore_io_state *ios) out: ios->numdevs = devs_in_group; ios->pages_consumed = cur_pg; - if (unlikely(ret)) { - if (lengt...
9ff19309a9623f2963ac5a136782ea4d8b5d67fb
Analyze and fix the following issue in the Linux kernel code: ore: Fix NFS crash by supporting any unaligned RAID IO
Problem Details: In RAID_5/6 We used to not permit an IO that it's end byte is not stripe_size aligned and spans more than one stripe. .i.e the caller must check if after submission the actual transferred bytes is shorter, and would need to resubmit a new IO with the remainder. Exofs supports this, and NFS was suppose...
```diff diff --git a/fs/exofs/ore_raid.c b/fs/exofs/ore_raid.c index d222c77cfa1b..fff2070c6751 100644 --- a/fs/exofs/ore_raid.c +++ b/fs/exofs/ore_raid.c @@ -461,16 +461,12 @@ static void _mark_read4write_pages_uptodate(struct ore_io_state *ios, int ret) * ios->sp2d[p][*], xor is calculated the same way. These pages...
c03c3013747a4c9e01d1b48637e6dd0ea3ef65c1
Analyze and fix the following issue in the Linux kernel code: cpufreq: Fix typo in cpufreq driver
Problem Details: Correct spelling typo in cpufreq driver. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/cpufreq/s3c2416-cpufreq.c b/drivers/cpufreq/s3c2416-cpufreq.c index 50d2f15a3c8a..bcc053bc02c4 100644 --- a/drivers/cpufreq/s3c2416-cpufreq.c +++ b/drivers/cpufreq/s3c2416-cpufreq.c @@ -153,7 +153,7 @@ static int s3c2416_cpufreq_enter_dvs(struct s3c2416_data *s3c_freq, int idx) if (s3c_fr...
260db9028279beb0c5f0c6661b539a545959c7c7
Analyze and fix the following issue in the Linux kernel code: mach-omap2: Fix typo in debug message and comment
Problem Details: Correcting spelling typo in mach-omap2 Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 502c31e123be..3a8b665c43d2 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c @@ -329,7 +329,7 @@ static void __init omap_apollon_init(void) /* LCD PWR_EN */ omap_mux_init_sig...
e96eb23d82b4246cce4eeb14a7eedbbdcf37b3d4
Analyze and fix the following issue in the Linux kernel code: [SCSI] Revert "[SCSI] fix async probe regression"
Problem Details: This reverts commit 43a8d39d0137612c336aa8bbb2cb886a79772ffb. Commit 43a8d39d fixed the fact that wait_for_device_probe() was unable to flush sd probe work. Now that sd probe work is once again flushable via wait_for_device_probe() this workaround is no longer needed. Signed-off-by: Dan Williams <da...
```diff diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index a0bc66372654..56a93794c470 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -147,7 +147,7 @@ int scsi_complete_async_scans(void) do { if (list_empty(&scanning_hosts)) - goto out; + return 0; /* If we can'...
492d542273a4859f8bf8cc7744cdf71ef50b39ea
Analyze and fix the following issue in the Linux kernel code: [SCSI] cleanup usages of scsi_complete_async_scans
Problem Details: Now that scsi registers its async scan work with the async subsystem, wait_for_device_probe() is sufficient for ensuring all scanning is complete. [jejb: fix merge problems with eea03c20ae38 Make wait_for_device_probe() also do scsi_complete_async_scans()] Signed-off-by: Dan Williams <dan.j.williams@i...
```diff diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 4b01ab3d2c24..dcb8a6e48692 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -24,7 +24,6 @@ #include <linux/wait.h> #include <linux/async.h> #include <linux/pm_runtime.h> -#include <scsi/scsi_scan.h> #include "base.h" #include "power/power....
b631cf1f899f9d2e449884dbccc34940637c639f
Analyze and fix the following issue in the Linux kernel code: scsi: aha152x: Fix sparse warning and make printing pointer address more portable.
Problem Details: This is to change use of "0x%08x" in favour of "%p" as per ../Documentation/printk-formats.txt, which also takes care about the following warning during compilation time: drivers/scsi/aha152x.c: In function ‘get_command’: drivers/scsi/aha152x.c:2987: warning: cast from pointer to integer of differ...
```diff diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index 19a36945e6fd..dd4547bf6881 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c @@ -2984,8 +2984,8 @@ static int get_command(char *pos, Scsi_Cmnd * ptr) char *start = pos; int i; - SPRINTF("0x%08x: target=%d; lun=%d; cmnd=( ", ...
b94e3c94aae04a911d61f620f4ff5b575fc196ad
Analyze and fix the following issue in the Linux kernel code: HID: hid-core: optimize in case of hidraw
Problem Details: When using hidraw, hid buffer can be big and take lot's of time to process (interrupt) kernel context. Don't try to parse report if we are only interrested in hidraw. Also don't prepare data for debug stuff if no debugfs file are opened. Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com> Sig...
```diff diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 4c87276c8ddb..71f87b1d71de 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1194,8 +1194,10 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, goto out; } - for (a = 0; a < report->maxfi...
4c7b417ecb756e85dfc955b0e7a04fd45585533e
Analyze and fix the following issue in the Linux kernel code: HID: hidraw: fix list->buffer memleak
Problem Details: If we don't read fast enough hidraw device, hidraw_report_event will cycle and we will leak list->buffer. Also list->buffer are not free on release. After this patch, kmemleak report nothing. Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 36fa77b40ffb..3b6f7bf5a77e 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c @@ -96,6 +96,7 @@ static ssize_t hidraw_read(struct file *file, char __user *buffer, size_t count, } kfree(list->buffer[list->tail].value); + list->buff...
529f9a765509c2c141ecfee0c54e17bf9a6b8bc1
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: Fix to set correct return error codes and misc cleanup.
Problem Details: - Remove unnecessary if NULL check in function bfa_fcs_vport_free(). - Set correct return error codes in case of memory allocation failure in the BSG ELS/CT passthru command handler. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c index 937000db62a8..bcc4966e8ba4 100644 --- a/drivers/scsi/bfa/bfa_fcs_lport.c +++ b/drivers/scsi/bfa/bfa_fcs_lport.c @@ -5722,9 +5722,7 @@ bfa_fcs_vport_free(struct bfa_fcs_vport_s *vport) * The memory for the bfad_vport_s is f...
59057fbc37178f10a196ab7ec170b80273f75a47
Analyze and fix the following issue in the Linux kernel code: [SCSI] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning
Problem Details: This patch changes virtio-scsi to use a new virtio_driver->scan() callback so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has set add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK) to signal active virtio-ring operation, instead of from within virtscsi_probe(). This fixes a bug where...
```diff diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index ae3bef7c523f..c7030fbee79c 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -571,6 +571,13 @@ static struct virtio_scsi_target_state *virtscsi_alloc_tgt( return tgt; } +static void virtscsi_scan(struct vir...
94c122ab01f84332c371dc4ae0f5b70e879173d6
Analyze and fix the following issue in the Linux kernel code: [SCSI] ufs: fix incorrect return value about SUCCESS and FAILED
Problem Details: Currently the UFS host driver has returned incorrect values for SUCCESS and FAILED. Fix it to return the correct value to the upper layer. Signed-off-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Santosh Y <santoshsy@gmail.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: James Bo...
```diff diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 48b01fe0b9ba..58f4ba6fe412 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -1163,6 +1163,8 @@ static int ufshcd_task_req_compl(struct ufs_hba *hba, u32 index) if (task_result != UPIU_TASK_MANAGEMENT_FUNC_COMPL ...
a752359f2b0a291c5f229e883842e4b30c698387
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix sending REC after FCP_RESP is received
Problem Details: This is exposed in the case the FCP_DATA frames somehow got lost and fc_fcp got the FCP_RSP, in fc_fcp_recv_resp(), since xfer_len is less than the expected_len it resets the the timer to wait to 2 more jiffies in case the data frames are already queued locally. However, for target does not support REC...
```diff diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 3c96e9300d00..14243fa5f8e8 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -1380,10 +1380,10 @@ static void fc_fcp_timeout(unsigned long data) fsp->state |= FC_SRB_FCP_PROCESSING_TMO; - if (rpriv->fl...
ac166d2fbd2d0c295454bcee7b3c930cb96e72cc
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix retries with FDMI lport states
Problem Details: The FC-GS-3 sepc requires to wait for least 3 times R_A_TOV per sec 4.6.1 "If the Requesting_CT does not receive a Response CT_IU from the Responding_CT within three times R_A_TOV, it shall consider this to be a protocol error." This means added four new states with management server could add signifi...
```diff diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index d385d1147889..f04d15c67df3 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -1598,8 +1598,9 @@ static void fc_lport_timeout(struct work_struct *work) case LPORT_ST_RPA: case LPORT_ST_DHBA: cas...
902a45af5c9fad283a530c3bc71225fa6a8e616a
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: Remove redundant 'less than zero' check
Problem Details: strtoul returns an 'unsigned long' so there is no reason to check if the value is less than zero. strtoul already checks for the '-' character deep in its bowels. It will return an error if the user has provided a negative value and fcoe_str_to_dev_loss will return that error to its caller. This patc...
```diff diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c index 2bc163198d33..5e751689a089 100644 --- a/drivers/scsi/fcoe/fcoe_sysfs.c +++ b/drivers/scsi/fcoe/fcoe_sysfs.c @@ -102,7 +102,7 @@ static int fcoe_str_to_dev_loss(const char *buf, unsigned long *val) int ret; ret = kstrtoul(bu...
b29a4f309fb58165ebfcca0fba504ae90ec4cfa6
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: add exch timer debug info
Problem Details: Add exch timeout info to have debug log with exch timeout value to match with retries, also add debug info on exch timer cancel. Added common fc_exch_timer_cancel() func and grouped this along with fc_exch_timer_set() function, so that added debug code is not repeated. Signed-off-by: Vasu Dev <vasu.d...
```diff diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 10a6a2a7bfc5..c772d8d27159 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -333,6 +333,52 @@ static void fc_exch_release(struct fc_exch *ep) } } +/** + * fc_exch_timer_cancel() - cancel exch timer...
4bdd03e61b7a5c4c6bc2b25d46fcd491788fdfb3
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc: fix problems with -Werror
Problem Details: Commit d38bd3aef ("Add -Werror compilation flag") is causing build breakage with random gcc incarnations. These look like gcc problems, but we shouldn't break the build because of a bad gcc. Fix this by adding a make flag WARNINGS_BECOME_ERRORS=1 which is the same as aic7xxx uses so ordinarily the ...
```diff diff --git a/drivers/scsi/lpfc/Makefile b/drivers/scsi/lpfc/Makefile index fe5d396aca73..e2516ba8ebfa 100644 --- a/drivers/scsi/lpfc/Makefile +++ b/drivers/scsi/lpfc/Makefile @@ -22,7 +22,9 @@ ccflags-$(GCOV) := -fprofile-arcs -ftest-coverage ccflags-$(GCOV) += -O0 +ifdef WARNINGS_BECOME_ERRORS ccflags-y +...
b17caa174a7e1fd2e17b26e210d4ee91c4c28b37
Analyze and fix the following issue in the Linux kernel code: [SCSI] libsas: fix sas_discover_devices return code handling
Problem Details: commit 198439e4 [SCSI] libsas: do not set res = 0 in sas_ex_discover_dev() commit 19252de6 [SCSI] libsas: fix wide port hotplug issues The above commits seem to have confused the return value of sas_ex_discover_dev which is non-zero on failure and sas_ex_join_wide_port which just indicates short circu...
```diff diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 63c574227ebf..879dbbe69799 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -868,7 +868,7 @@ static struct domain_device *sas_ex_discover_end_dev( } /* See if this phy is par...
26f2f199ff150d8876b2641c41e60d1c92d2fb81
Analyze and fix the following issue in the Linux kernel code: [SCSI] libsas: continue revalidation
Problem Details: Continue running revalidation until no more broadcast devices are discovered. Fixes cases where re-discovery completes too early in a domain with multiple expanders with pending re-discovery events. Servicing BCNs can get backed up behind error recovery. Cc: <stable@vger.kernel.org> Signed-off-by: Da...
```diff diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index af659cc8308c..63c574227ebf 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -2114,9 +2114,7 @@ int sas_ex_revalidate_domain(struct domain_device *port_dev) struct domain_device...
57fc2e335fd3c2f898ee73570dc81426c28dc7b4
Analyze and fix the following issue in the Linux kernel code: [SCSI] fix eh wakeup (scsi_schedule_eh vs scsi_restart_operations)
Problem Details: Rapid ata hotplug on a libsas controller results in cases where libsas is waiting indefinitely on eh to perform an ata probe. A race exists between scsi_schedule_eh() and scsi_restart_operations() in the case when scsi_restart_operations() issues i/o to other devices in the sas domain. When this happ...
```diff diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index d0f71e5d065f..804f63270e37 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1687,6 +1687,20 @@ static void scsi_restart_operations(struct Scsi_Host *shost) * requests are started. */ scsi_run_host_queues(s...
3b661a92e869ebe2358de8f4b3230ad84f7fce51
Analyze and fix the following issue in the Linux kernel code: [SCSI] fix hot unplug vs async scan race
Problem Details: The following crash results from cases where the end_device has been removed before scsi_sysfs_add_sdev has had a chance to run. BUG: unable to handle kernel NULL pointer dereference at 0000000000000098 IP: [<ffffffff8115e100>] sysfs_create_dir+0x32/0xb6 ... Call Trace: [<ffffffff8125e4a8>] kobj...
```diff diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 2e5fe584aad3..f55e5f166973 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -1717,6 +1717,9 @@ static void scsi_sysfs_add_devices(struct Scsi_Host *shost) { struct scsi_device *sdev; shost_for_each_device(sdev, sh...
b5f1758f221e446c5a2956cf7ffdf62b005f6458
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: Fix endian issues in core and SRC portions of driver
Problem Details: This may not fix all endian issues in this driver, but it does get the driver working on PowerPC for a PMC SRC card. So it should at least fix all the problems in the core and in the SRC support. [jejb: fix >> 32 breakage reported by Fengguang Wu] Signed-off-by: Ben Collins <bcollins@ubuntu.com> Acked...
```diff diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index a35f54ebdce0..8e4b525b1b79 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -132,8 +132,8 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co init->MaxFibSi...
361ee9c3f3839d6cbd306b5bd34292e0848ecfdc
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: Better handling of in-flight events on thread stop
Problem Details: When an error occured that would shut down the driver, some in-flight events were getting caught up, deadlocking a CPU or two. Signed-off-by: Ben Collins <bcollins@ubuntu.com> Acked-by: Achim Leubner <Achim_Leubner@pmc-sierra.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index fdfc4be9c7c6..2be612b0caa5 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -1089,8 +1089,17 @@ static struct scsi_host_template aac_driver_template = { static void __aac_shutdown(struct aac_dev * aa...
7e8a74b177f17d100916b6ad415450f7c9508691
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_dh: add scsi_dh_attached_handler_name
Problem Details: Introduce scsi_dh_attached_handler_name() to retrieve the name of the scsi_dh that is attached to the scsi_device associated with the provided request queue. Returns NULL if a scsi_dh is not attached. Also, fix scsi_dh_{attach,detach} function header comments to document @q rather than @sdev. Signed...
```diff diff --git a/drivers/scsi/device_handler/scsi_dh.c b/drivers/scsi/device_handler/scsi_dh.c index 48e46f5b77cc..33e422e75835 100644 --- a/drivers/scsi/device_handler/scsi_dh.c +++ b/drivers/scsi/device_handler/scsi_dh.c @@ -468,7 +468,8 @@ EXPORT_SYMBOL_GPL(scsi_dh_handler_exist); /* * scsi_dh_attach - Atta...
6aca4112f67b67d0a2f60326a1331a4125564ca7
Analyze and fix the following issue in the Linux kernel code: [SCSI] cxgb4i: tcp push bit fix
Problem Details: Fixed the parentheses so the tcp push bit would be sent properly. Signed-off-by: Karen Xie <kxie@chelsio.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index 5a4a3bfc60cf..a12a1fe9cda4 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c @@ -438,8 +438,8 @@ static inline void make_tx_data_wr(struct cxgbi_sock *csk, struct sk_buff *skb, if ...
b485462aca7df4e32bcf7efb6f84a69e8b640243
Analyze and fix the following issue in the Linux kernel code: [SCSI] Stop accepting SCSI requests before removing a device
Problem Details: Avoid that the code for requeueing SCSI requests triggers a crash by making sure that that code isn't scheduled anymore after a device has been removed. Also, source code inspection of __scsi_remove_device() revealed a race condition in this function: no new SCSI requests must be accepted for a SCSI d...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 8af6a6497c4f..b58327758c58 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -155,13 +155,14 @@ static void __scsi_queue_insert(struct scsi_cmnd *cmd, int reason, int unbusy) /* * Requeue this command. It will go be...
67bd94130015c507011af37858989b199c52e1de
Analyze and fix the following issue in the Linux kernel code: [SCSI] Fix device removal NULL pointer dereference
Problem Details: Use blk_queue_dead() to test whether the queue is dead instead of !sdev. Since scsi_prep_fn() may be invoked concurrently with __scsi_remove_device(), keep the queuedata (sdev) pointer in __scsi_remove_device(). This patch fixes a kernel oops that can be triggered by USB device removal. See also http:/...
```diff diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 2b6a03de5787..593085a52275 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -290,6 +290,7 @@ static void scsi_host_dev_release(struct device *dev) struct Scsi_Host *shost = dev_to_shost(dev); struct device *parent = dev->parent; ...
e81ca6fe85b77109a32489a5db82f575d51dfc98
Analyze and fix the following issue in the Linux kernel code: [SCSI] block: Fix blk_execute_rq_nowait() dead queue handling
Problem Details: If the queue is dead blk_execute_rq_nowait() doesn't invoke the done() callback function. That will result in blk_execute_rq() being stuck in wait_for_completion(). Avoid this by initializing rq->end_io to the done() callback before we check the queue state. Also, make sure the queue lock is held aroun...
```diff diff --git a/block/blk-exec.c b/block/blk-exec.c index fb2cbd551621..8b6dc5bd4dd0 100644 --- a/block/blk-exec.c +++ b/block/blk-exec.c @@ -43,6 +43,9 @@ static void blk_end_sync_rq(struct request *rq, int error) * Description: * Insert a fully prepared request at the back of the I/O scheduler queue * ...
9d5d93e32a365f962fb26ebd19c0b4a392f38e64
Analyze and fix the following issue in the Linux kernel code: [SCSI] megaraid: cleanup type issue in mega_build_cmd()
Problem Details: On 64 bit systems the current code sets 32 bits of "seg" and leaves the other 32 uninitialized. It doesn't matter since the variable is never used. But it's still messy and we should fix it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Adam Radford <aradford@gmail.com> Signed-of...
```diff diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 4d39a9ffc081..97825f116954 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -524,7 +524,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy) mega_passthru *pthru; scb_t *scb; mbox_t *mbox; - long seg; +...
18e2df938c11531f4a6d336d430284abd9619017
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: Fix Spell check.
Problem Details: Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index bf36723b84e1..ddd9472066cb 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c @@ -126,7 +126,7 @@ int qla4xxx_init_rings(struct scsi_qla_host *ha) qla4xxx_init_response_q_entries(ha); - /* ...
68b6d5d3d14acc7553cb52d6468e9b6bada41ba1
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: Fix a Sparse warning message
Problem Details: Fix following message:- drivers/scsi/qla4xxx/ql4_os.c:3266:5: error: symbol 'qla4xxx_post_aen_work' redeclared with different type (originally declared at drivers/scsi/qla4xxx/ql4_glbl.h:186) - incompatible argument 2 (different signedness) Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> S...
```diff diff --git a/drivers/scsi/qla4xxx/ql4_glbl.h b/drivers/scsi/qla4xxx/ql4_glbl.h index 20b49d019043..5b2525c4139e 100644 --- a/drivers/scsi/qla4xxx/ql4_glbl.h +++ b/drivers/scsi/qla4xxx/ql4_glbl.h @@ -183,7 +183,8 @@ int qla4xxx_flash_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index, int qla4xxx_ddb_ch...
1cb78d73d36d03950501230473620fd56cec1e49
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: multi-session fix for flash ddbs
Problem Details: Allow multi-session to target (for flash ddbs) accesible via multiple network portal Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h index 96a5616a8fda..7fdba7f1ffb7 100644 --- a/drivers/scsi/qla4xxx/ql4_def.h +++ b/drivers/scsi/qla4xxx/ql4_def.h @@ -279,6 +279,7 @@ struct qla_ddb_index { struct list_head list; uint16_t fw_ddb_idx; struct dev_db_entry fw_ddb; ...
6ad819b06ddf13a5a1d995eb26555903f6c3b71a
Analyze and fix the following issue in the Linux kernel code: [SCSI] arcmsr: fix misuse of | instead of &
Problem Details: ARCMSR_ARC1880_DiagWrite_ENABLE is 0x00000080 so (x | 0x00000080) is never zero. The intent here was to test that loop until ARCMSR_ARC1880_DiagWrite_ENABLE was turned on, but because the test was wrong, we would do five loops regardless of whether it succeed or not. Also I simplified the condition a...
```diff diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index cbde1dca45ad..def24a1079ad 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -2821,7 +2821,7 @@ static void arcmsr_hardware_reset(struct AdapterControlBlock *acb) int i, count = 0; st...
23f0bb47a4ec4c662b2bbf0221d6289e91b06ece
Analyze and fix the following issue in the Linux kernel code: [SCSI] hptiop: fix RR312x in hosts with >12GB
Problem Details: As the limitation of RR312x's dma engine, the HBA can not access host memory over 12GB. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=14311 [alan: resurrected bug from 2009 and pushed upstream] Reported-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: HighPoint Linux Team <linux@highp...
```diff diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index 10b65556937b..192724ed7a32 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c @@ -42,7 +42,7 @@ MODULE_DESCRIPTION("HighPoint RocketRAID 3xxx/4xxx Controller Driver"); static char driver_name[] = "hptiop"; static const char driver_...
4b8bae08b296a1199ef40f21ea7f4685b2c56ec7
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.32: Fix error reporting of misconfigured ports
Problem Details: Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index a631ebf4158d..953603a7a43c 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -3106,6 +3106,28 @@ struct lpfc_acqe_fc_la { #define LPFC_FC_LA_EVENT_TYPE_SHARED_LINK 0x2 }; +struct lpfc_acqe_misconfigu...
6b415f5d6c05eb7f4808e98baf539c5dbc53cdbc
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.32: Fix system panic due to node state change
Problem Details: Fix System Panic During IO Test using Medusa tool Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 169b77b82b48..925975d2d765 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -4275,10 +4275,8 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) * Catch race where...
173edbb2c326ce4839bae8caa868fe83ce46dda3
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.32: Fix ability to change FCP EQ delay multiplier
Problem Details: Fix fcp_imax module parameter to dynamically change FCP EQ delay multiplier Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 5eb2bc116183..adef5bb2100e 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -3617,6 +3617,91 @@ lpfc_sriov_nr_virtfn_init(struct lpfc_hba *phba, int val) static DEVICE_ATTR(lpfc_sriov_nr_virtfn, S_...
bbeb79b90e806da2e2338bd8d89c6fa8a1333357
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.32: Correct host DIF configuration that hung system
Problem Details: Fix system hang due to bad protection module parameters (CR: 130769) Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 411ed48d79da..a79e2c21c5e4 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -5514,14 +5514,45 @@ lpfc_destroy_shost(struct lpfc_hba *phba) static void lpfc_setup_bg(struct lpfc_hba *phba, struct S...
3b3da6a974357887c73c5ee61988dbe3a8f62d88
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.32: Fix CQ and EQ dump failure for debugfs
Problem Details: Fixed debug helper routine failed to dump CQ and EQ entries in non-MSI-X mode Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/lpfc/lpfc_debugfs.h b/drivers/scsi/lpfc/lpfc_debugfs.h index 616c400dae14..afe368fd1b98 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.h +++ b/drivers/scsi/lpfc/lpfc_debugfs.h @@ -395,8 +395,13 @@ lpfc_debug_dump_fcp_cq(struct lpfc_hba *phba, int fcp_wqidx) for (fcp_cqidx = 0; fcp_cqidx...
a629852ab810015223eec7a2f31a6bd5f93c83cf
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.32: Correct null pointer Error in lpfc_sli.c
Problem Details: This patch corrects the issue caught via Smatch and reported by Dan Carpenter: http://marc.info/?l=linux-scsi&m=133693516103343 Resolve null pointer check ordering that were odd Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-of...
```diff diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index aace596887e6..3e4f8eaa1fb8 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -15863,24 +15863,18 @@ lpfc_drain_txq(struct lpfc_hba *phba) spin_lock_irqsave(&phba->hbalock, iflags); piocbq = lpfc_...
5c17ae217ad13463f821c3bab774335777da9c33
Analyze and fix the following issue in the Linux kernel code: [SCSI] bnx2fc: Improve error recovery by handling parity errors
Problem Details: During parity errors, the ramrods are not issued to FW. bnx2fc waits for the timeout value, and proceeds with cleaning up the IOs. Since we are already out-of-sync with FW, cleanup commands timeout too, and do not get the completion. This operation takes 36 secs for each session to upload causing huge...
```diff diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h index 2f1bea42336f..baac6e968095 100644 --- a/drivers/scsi/bnx2fc/bnx2fc.h +++ b/drivers/scsi/bnx2fc/bnx2fc.h @@ -275,6 +275,7 @@ struct bnx2fc_rport { #define BNX2FC_FLAG_CTX_ALLOC_FAILURE 0x6 #define BNX2FC_FLAG_UPLD_REQ_COMPL 0x7 #de...
1b8d26206134458044b0689f48194af00c96d406
Analyze and fix the following issue in the Linux kernel code: [SCSI] add new SDEV_TRANSPORT_OFFLINE state
Problem Details: This patch adds a new state SDEV_TRANSPORT_OFFLINE. It will be used by transport classes to offline devices for cases like when the fast_io_fail/recovery_tmo fires. In those cases we want all IO to fail, and we have not yet escalated to dev_loss_tmo behavior where we are removing the devices. Currentl...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 6dfb9785d345..340c569d4535 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1173,6 +1173,7 @@ int scsi_prep_state_check(struct scsi_device *sdev, struct request *req) if (unlikely(sdev->sdev_state != SDEV_RUNNING)) { ...
87098bdd100497ceac0797c6b2f4c51eea1f1e42
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfcoe: Fix section mismatch
Problem Details: Recent changes to add fcoe_sysfs caused libfcoe_init to call fcoe_transport_exit in a module initialization routine. The change resulted in the below error. This patch removes the __exit keyword from the fcoe_transport_exit definition such that it may be called from an __init routine. WARNING: drivers...
```diff diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index 861c09f72b85..ac76d8a042d7 100644 --- a/drivers/scsi/fcoe/fcoe_transport.c +++ b/drivers/scsi/fcoe/fcoe_transport.c @@ -502,7 +502,7 @@ static int __init fcoe_transport_init(void) return 0; } -static int __exit fcoe_...
3db8cc106569aa81088ee83d46f52a631471811c
Analyze and fix the following issue in the Linux kernel code: [SCSI] bnx2fc: Reduce object size by consolidating formats
Problem Details: Deduplication of formats and consolidating tests makes the object much smaller. Add bnx2fc_debug.c, add functions for a few logging functions (BNX2FC_IO_DBG, BNX2FC_TGT_DBG, BNX2FC_HBA_DBG). Use printf extension %pV. Add and use pr_fmt and pr_<level>. Move the debug #include below structure definition...
```diff diff --git a/drivers/scsi/bnx2fc/Makefile b/drivers/scsi/bnx2fc/Makefile index a92695a25176..141149e8cdad 100644 --- a/drivers/scsi/bnx2fc/Makefile +++ b/drivers/scsi/bnx2fc/Makefile @@ -1,3 +1,4 @@ obj-$(CONFIG_SCSI_BNX2X_FCOE) += bnx2fc.o -bnx2fc-y := bnx2fc_els.o bnx2fc_fcoe.o bnx2fc_hwi.o bnx2fc_io.o bnx...
6072609d9bb91ff54aee3ef29304bd5b4fc88aae
Analyze and fix the following issue in the Linux kernel code: [SCSI] Remove scsi_wait_scan module
Problem Details: scsi_wait_scan was introduced with asynchronous host scanning as a hack for distributions that weren't using proper udev based wait for root to appear in their initramfs scripts. In 2.6.30 Commit c751085943362143f84346d274e0011419c84202 Author: Rafael J. Wysocki <rjw@sisk.pl> Date: Sun Apr 12 20:06...
```diff diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index e9559782d3ec..6c810dbef7ae 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -263,23 +263,6 @@ config SCSI_SCAN_ASYNC You can override this choice by specifying "scsi_mod.scan=sync" or async on the kernel's command line. -con...
adefb69b1b94df29ea2df05cd838c0e032b2c473
Analyze and fix the following issue in the Linux kernel code: HID: uhid: Fix sending events with invalid data
Problem Details: This was detected because events with invalid types were arriving to userspace. The code before this patch would only work for the first event in the queue (when uhid->tail is 0). Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Reviewed-by: David Herrmann <dh.herrmann@googlemail.co...
```diff diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 119b7e6405be..714cd8cc9579 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c @@ -465,7 +465,7 @@ try_again: goto try_again; } else { len = min(count, sizeof(**uhid->outq)); - if (copy_to_user(buffer, &uhid->outq[uhid->tail], len)) { + i...
06bef9451a4c5ad882cd15fd7a0df9890c0249f3
Analyze and fix the following issue in the Linux kernel code: UBIFS: add debugfs knob to switch to R/O mode
Problem Details: This patch adds another debugfs knob which switches UBIFS to R/O mode. I needed it while trying to reproduce the 'first log node is not CS node' bug. Without this debugfs knob you have to perform a power cut to repruduce the bug. The knob is named 'ro_error' and all it does is it sets the 'ro_error' UB...
```diff diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 92df3b081539..bb3167257aab 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -2802,6 +2802,8 @@ static ssize_t dfs_file_read(struct file *file, char __user *u, size_t count, val = d->chk_fs; else if (dent == d->dfs_tst_rcvry) val = d->tst_rcvr...
782759b9f5f5223e0962af60c3457c912fab755f
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix compilation warning
Problem Details: Fix the following compilation warning: fs/ubifs/dir.c: In function 'ubifs_rename': fs/ubifs/dir.c:972:15: warning: 'saved_nlink' may be used uninitialized in this function Use the 'uninitialized_var()' macro to get rid of this false-positive. Artem: massaged the patch a bit. Signed-off-by: Alexandr...
```diff diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index a6d42efc76d2..390198d91e6d 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -969,7 +969,7 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry, struct ubifs_budget_req ino_req = { .dirtied_ino = 1, .dirtied_ino_d = ALIGN(old_inod...
c6727932cfdb13501108b16c38463c09d5ec7a74
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix a bug in empty space fix-up
Problem Details: UBIFS has a feature called "empty space fix-up" which is a quirk to work-around limitations of dumb flasher programs. Namely, of those flashers that are unable to skip NAND pages full of 0xFFs while flashing, resulting in empty space at the end of half-filled eraseblocks to be unusable for UBIFS. This ...
```diff diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index ef3d1ba6d992..15e2fc5aa60b 100644 --- a/fs/ubifs/sb.c +++ b/fs/ubifs/sb.c @@ -718,8 +718,12 @@ static int fixup_free_space(struct ubifs_info *c) lnum = ubifs_next_log_lnum(c, lnum); } - /* Fixup the current log head */ - err = fixup_leb(c, c->lhead_lnum, c...
634332502366554849fe37e88d05ec0a13e550c8
Analyze and fix the following issue in the Linux kernel code: dmaengine: Cleanup logging messages
Problem Details: Use a more current logging style. Add pr_fmt to prefix dmaengine: to messages. Convert printk(KERN_ERR to pr_err(. Convert embedded function name use to "%s: ", __func__ Align arguments. Original-patch-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Joe Perches <joe@perches.com...
```diff diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 2397f6f451b1..3491654cdf7b 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -45,6 +45,8 @@ * See Documentation/dmaengine.txt for more details */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/dma-map...
1ff8df4f5388ad66bd7d0199b5839a2e3345c055
Analyze and fix the following issue in the Linux kernel code: dma: sh: provide a migration path for slave drivers to stop using .private
Problem Details: This patch extends the sh dmaengine driver to support the preferred channel selection and configuration method, instead of using the "private" field from struct dma_chan. We add a standard filter function to be used by slave drivers instead of implementing their own ones, and add support for the DMA_SL...
```diff diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c index 73db282a1436..27f5c781fd73 100644 --- a/drivers/dma/sh/shdma-base.c +++ b/drivers/dma/sh/shdma-base.c @@ -171,6 +171,65 @@ static struct shdma_desc *shdma_get_desc(struct shdma_chan *schan) return NULL; } +static int shdma_setup_s...
a344a7e7c27776950a70ce4b829a9ac15a212e65
Analyze and fix the following issue in the Linux kernel code: drm: kill dma queue support
Problem Details: Absolutely unused. All the values are only ever initialized and then used at most in some debug printout functions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index 348b367debeb..b356c719f2f1 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c @@ -641,8 +641,6 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request) if (order < DRM_MIN_ORDER || order > ...
d5346b3727bad3a033cb0a5b45a4a2da45119ec3
Analyze and fix the following issue in the Linux kernel code: Revert "Revert "drm/i810: cleanup reclaim_buffers""
Problem Details: This reverts commit 6e877b576ddf7cde5db2e9a6dcb56fef0ea77e64, reinstating the original commit: commit 87499ffdcb1c70f66988cd8febc4ead0ba2f9118 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue Oct 25 23:51:24 2011 +0200 drm/i810: cleanup reclaim_buffers My dear old i815 always hits ...
```diff diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c index fa9439159ebd..57d892eaaa6e 100644 --- a/drivers/gpu/drm/i810/i810_dma.c +++ b/drivers/gpu/drm/i810/i810_dma.c @@ -881,7 +881,7 @@ static int i810_flush_queue(struct drm_device *dev) } /* Must be called with the lock held */...
c3ae331d1c2fe25edfbece73fda0bb312445b636
Analyze and fix the following issue in the Linux kernel code: tools/power: turbostat: fix large c1% issue
Problem Details: Under some conditions, c1% was displayed as very large number, much higher than 100%. c1% is not measured, it is derived as "that, which is left over" from other counters. However, the other counters are not collected atomically, and so it is possible for c1% to be calaculagted as a small negative nu...
```diff diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index b815a12159b2..861d77190206 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -444,6 +444,9 @@ delta_core(struct core_data *new, struct core_data *old) old->c7 = new-...
4dbdf0aea9585add9359e7ca5535256f866ec85c
Analyze and fix the following issue in the Linux kernel code: drm/mgag200: fix null pointer dereference
Problem Details: we are referencing the pointer after doing alloc_apertures, as alloc_apertures kzallocs, the kzalloc may fail and we get a NULL. so we need to check for NULL before we dereference this pointer Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c index 93e832d6c328..ea1024d79974 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.c +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c @@ -47,6 +47,9 @@ static void mgag200_kick_out_firmware_fb(struct pci_dev *pdev) bool prima...
f60ec4c7df043df81e62891ac45383d012afe0da
Analyze and fix the following issue in the Linux kernel code: drm/radeon: Try harder to avoid HW cursor ending on a multiple of 128 columns.
Problem Details: This could previously fail if either of the enabled displays was using a horizontal resolution that is a multiple of 128, and only the leftmost column of the cursor was (supposed to be) visible at the right edge of that display. The solution is to move the cursor one pixel to the left in that case. B...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c index 42acc6449dd6..711e95ad39bf 100644 --- a/drivers/gpu/drm/radeon/radeon_cursor.c +++ b/drivers/gpu/drm/radeon/radeon_cursor.c @@ -262,8 +262,14 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc, if (!(cursor...
343065a605646b4c1fee8b1ca07b715283813b11
Analyze and fix the following issue in the Linux kernel code: drm/fb-helper: delay hotplug handling when partially bound
Problem Details: Ok, this requires quite a dance to actually hit: 1) We plug in a 2nd screen, enable it in both X and (by vt-switching) in the fbcon. 2) We disable that screen again in with xrandr. 3) We vt-switch again, so that fbcon displays on the 2nd screen, but X on the first screen. This obviously needs a driver ...
```diff diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 5683b7fdd746..d3f15b9d1d82 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -1353,7 +1353,7 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper) struct drm_device *dev = fb_...
d773d1310625be3b040b436178ad59a0af8888f1
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix memory leak when SR-IOV VFs are direct assigned
Problem Details: The VF driver had a memory leak that would occur if VFs were assigned to a guest. The amount of leak would vary with the number of VFs but could max out at about 14K per PF. To reproduce the leak all you would need to do is enable all the VFs on the first PF. Then start a loop of loading and unloadi...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c index c7d831d6e212..4f22668b6aea 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c @@ -208,6 +208,17 @@ void ixgbe_disable_sriov(struct ixgb...
86fde74cf5b829627b37ca86322acfdd99b524b8
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: track the refcount when unmap the page
Problem Details: It will trigger a WARN_ON if the page has been freed but it is still used in mmu, it can help us to detect mm bug early Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index a5d6ef785b7e..685a48557389 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -556,6 +556,14 @@ static int mmu_spte_clear_track_bits(u64 *sptep) return 0; pfn = spte_to_pfn(old_spte); + + /* + * KVM does not hold the refcount of the pag...
9d3c92af47d853d4e31ee971dba7bc086275b7b3
Analyze and fix the following issue in the Linux kernel code: KVM: x86: remove unnecessary mark_page_dirty
Problem Details: fix: [ 132.474633] 3.5.0-rc1+ #50 Not tainted [ 132.474634] ------------------------------- [ 132.474635] include/linux/kvm_host.h:369 suspicious rcu_dereference_check() usage! [ 132.474636] [ 132.474636] other info that might help us debug this: [ 132.474636] [ 132.474638] [ 132.474638] rcu_sc...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 829b4e972558..ecc71dde4bb3 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2632,7 +2632,6 @@ static int kvm_set_guest_paused(struct kvm_vcpu *vcpu) if (!vcpu->arch.time_page) return -EINVAL; src->flags |= PVCLOCK_GUEST_STOPPED; - mar...
825906964524dd9b69c1b7920515943fc370d914
Analyze and fix the following issue in the Linux kernel code: staging: comedi: rtd520: remove the debug print of the pci addresses
Problem Details: This is just noise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index 9998d6b25d2e..02be4dd39cf0 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -1676,10 +1676,6 @@ static int rtd_attach(struct comedi_device *dev, struct comedi...
f2a64902e3c2ffa34b52e6ad13e8e3c40f6919c7
Analyze and fix the following issue in the Linux kernel code: staging: comedi: dyna_pci10xx: fix detach
Problem Details: The detach for this driver is missing the check to make sure that the pci device is enabled before disabling it. It's also missing the pci_dev_put(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfound...
```diff diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c b/drivers/staging/comedi/drivers/dyna_pci10xx.c index 6821f87a1fbd..064be9aae3aa 100644 --- a/drivers/staging/comedi/drivers/dyna_pci10xx.c +++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c @@ -346,7 +346,9 @@ static void dyna_pci10xx_detach(struct co...
718c39e8ff8ccc824883cc1078c1bf2fd2afeacc
Analyze and fix the following issue in the Linux kernel code: staging: comedi: cb_pcimdas: remove the debug print of the pci bars
Problem Details: Remove the dev_dbg output of the pci addresses. It's just add noise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c index 1b6ebb7eb4e8..34000671453a 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdas.c +++ b/drivers/staging/comedi/drivers/cb_pcimdas.c @@ -250,12 +250,6 @@ static int cb_pcimdas_attach(struct comedi_devic...
289a64295c9ae897c18302c15abd8f0464e8c6cb
Analyze and fix the following issue in the Linux kernel code: staging/cptm1217: fix checkpatch warnings
Problem Details: The below checkpatch error was fixed, drivers/staging/cptm1217/cp_tm1217.h:5: ERROR: open brace '{' following struct go on the same line Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/cptm1217/cp_tm1217.h b/drivers/staging/cptm1217/cp_tm1217.h index a0ce31db53f8..30bad357a055 100644 --- a/drivers/staging/cptm1217/cp_tm1217.h +++ b/drivers/staging/cptm1217/cp_tm1217.h @@ -1,8 +1,7 @@ #ifndef __LINUX_I2C_CP_TM1217_H #define __LINUX_I2C_CP_TM1217_H -struct cp_tm...
a952f947b9ebf83cea406bf69f2847a3ca8a076c
Analyze and fix the following issue in the Linux kernel code: staging/frontier: fix checkpatch warnings
Problem Details: The below checkpatch warns was fixed, drivers/staging/frontier/tranzport.c:356: WARNING: Prefer pr_err(... to printk(KERN_ERR, ... drivers/staging/frontier/tranzport.c:523: WARNING: Prefer pr_err(... to printk(KERN_ERR, ... drivers/staging/frontier/tranzport.c:696: WARNING: Prefer pr_err(... to printk...
```diff diff --git a/drivers/staging/frontier/alphatrack.c b/drivers/staging/frontier/alphatrack.c index acbb2cc510f9..33085782689e 100644 --- a/drivers/staging/frontier/alphatrack.c +++ b/drivers/staging/frontier/alphatrack.c @@ -333,7 +333,7 @@ static int usb_alphatrack_open(struct inode *inode, struct file *file) ...
e58b89dade3e9e7577f8481b21af3043dc0fffe3
Analyze and fix the following issue in the Linux kernel code: staging/et131x: fix checkpatch warnings
Problem Details: The below checkpatch warns was fixed, drivers/staging/et131x/et131x.c:2556: WARNING: Prefer pr_info(... to printk(KERN_INFO, ... drivers/staging/et131x/et131x.c:2577: WARNING: Prefer pr_info(... to printk(KERN_INFO, ... drivers/staging/et131x/et131x.c:5189: WARNING: Prefer pr_info(... to printk(KERN_I...
```diff diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 4c78f12ddc34..029725c89e58 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -53,6 +53,8 @@ * */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/pci.h> #include <linux/...
80da2e0df5af700518611b7d1cc4fc9945bcaf95
Analyze and fix the following issue in the Linux kernel code: usb: Add quirk detection based on interface information
Problem Details: When a whole class of devices (possibly from a specific vendor, or across multiple vendors) require a quirk, explictly listing all devices in the class make the quirks table unnecessarily large. Fix this by allowing matching devices based on interface information. Signed-off-by: Laurent Pinchart <laur...
```diff diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 69781016a266..445455a4429b 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -607,22 +607,10 @@ int usb_match_device(struct usb_device *dev, const struct usb_device_id *id) } /* returns 0 if no match, 1 if match...
373f5aedbc6fb73d30f00eeb0dc7313ecfede908
Analyze and fix the following issue in the Linux kernel code: pcmcia,synclink_cs: fix termios port I missed
Problem Details: Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 0a484b4a1b02..d0cbd29ecfd7 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -1344,7 +1344,7 @@ static void shutdown(MGSLPC_INFO * info, struct tty_struct *tty) /* TODO:disable inte...
363e2e6f9e2d9ca53fb87e3988e2a225dc879aa4
Analyze and fix the following issue in the Linux kernel code: VME: Prevent D16 cycles being split into 8-bit blocks
Problem Details: The memcpy_fromio() and memcpy_toio() functions use the __memcpy() function, at least on x86. This function carries out transfers smaller than 32 bits as multiple 8 bit transfers, causing a single (aligned) 16 bit transfer to be split into 2 8 bit transfers which may not be supported by the target VME ...
```diff diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c index f6385f7a66d9..880d9242e349 100644 --- a/drivers/vme/bridges/vme_tsi148.c +++ b/drivers/vme/bridges/vme_tsi148.c @@ -1263,12 +1263,55 @@ static ssize_t tsi148_master_read(struct vme_master_resource *image, void *buf, u32 asp...
59e32c490e476dba2938dde9fd4d4eaf5d0f8121
Analyze and fix the following issue in the Linux kernel code: staging: sm7xxfb: fix for "rename smtc_screen_info to smtc_scr_info"
Problem Details: Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Javier Muñoz <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c index 90c90db8978e..1c1780c70fbb 100644 --- a/drivers/staging/sm7xxfb/sm7xxfb.c +++ b/drivers/staging/sm7xxfb/sm7xxfb.c @@ -826,7 +826,7 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev, #ifdef __BIG_ENDIAN if (...
137f8a7213d80c1388ca48280c1ef0856b6fec30
Analyze and fix the following issue in the Linux kernel code: clk: fix compile for OF && !COMMON_CLK
Problem Details: With commit 766e6a4ec602d0c107 (clk: add DT clock binding support), compiling with OF && !COMMON_CLK is broken. Reported-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Reported-by: Prashant Gaikwad <pgaikwad@nvidia.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Mike Tu...
```diff diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index 69085e02bd58..d423c9bdd71a 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -24,7 +24,7 @@ static LIST_HEAD(clocks); static DEFINE_MUTEX(clocks_mutex); -#ifdef CONFIG_OF +#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK) struc...
9f1612d351a8e57d3d694e828641d3e4eeb224f8
Analyze and fix the following issue in the Linux kernel code: clk: fix clk_get on of_clk_get_by_name return check
Problem Details: The commit 766e6a4 (clk: add DT clock binding support) plugs device tree clk lookup of_clk_get_by_name into clk_get, and fall on non-DT lookup clk_get_sys if DT lookup fails. The return check on of_clk_get_by_name takes (clk != NULL) as a successful DT lookup. But it's not the case. For any system t...
```diff diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index 20649b3c88fe..69085e02bd58 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -157,7 +157,7 @@ struct clk *clk_get(struct device *dev, const char *con_id) if (dev) { clk = of_clk_get_by_name(dev->of_node, con_id); - if (clk && _...
8a80c72711a9b78af433013067848c0a5473a484
Analyze and fix the following issue in the Linux kernel code: ktest: Add check for bug or panic during reboot
Problem Details: Usually the target is booted into a dependable kernel when a test starts. The test will install the test kernel and reboot the box. But there may be a time that the kernel is running an unreliable kernel and the reboot may crash. Have ktest detect crashes on a reboot and force a power-cycle instead. ...
```diff diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index d10fff12bc24..c8a42d5991be 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -1138,6 +1138,7 @@ sub reboot { if (defined($time)) { if (wait_for_monitor($time, $reboot_success_line)) { # rebo...
f31fd383821555cbd77ee83e17837f7060825395
Analyze and fix the following issue in the Linux kernel code: ipv4: Fix again the time difference calculation
Problem Details: Fix again the diff value in rt_bind_exception after collision of two latest patches, my original commit actually fixed the same problem. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 89e39dc5336b..9f7ffbe201c9 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1926,7 +1926,7 @@ restart: if (daddr != fnhe_daddr) continue; if (pmtu) { - unsigned long diff = jiffies - expires; + unsigned long diff = expires - jiffies; ...
37a80bf560786d96c5e8370bff45d867e43fd5c3
Analyze and fix the following issue in the Linux kernel code: xen/hvc: Fix up checks when the info is allocated.
Problem Details: Coverity would complain about this - even thought it looks OK. CID 401957 Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
```diff diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index 944eaeb8e0cf..1e456dca4f60 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -209,11 +209,10 @@ static int xen_hvm_console_init(void) info = kzalloc(sizeof(struct xencons_info), GFP_KERNEL | __GFP_ZERO); if (!...
17f9b896b06d314da890174584278dea8da7e0ce
Analyze and fix the following issue in the Linux kernel code: xen/acpi: Fix potential memory leak.
Problem Details: Coverity points out that we do not free in one case the pr_backup - and sure enough we forgot. Found by Coverity (CID 401970) Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
```diff diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c index 7ff2569e17ae..b590ee067fcd 100644 --- a/drivers/xen/xen-acpi-processor.c +++ b/drivers/xen/xen-acpi-processor.c @@ -520,15 +520,18 @@ static int __init xen_acpi_processor_init(void) if (!pr_backup) { pr_backup = kzal...
1b2a05516e42149a5e9f0f5aeba2c7fa9574b3f4
Analyze and fix the following issue in the Linux kernel code: xen/mce: schedule a workqueue to avoid sleep in atomic context
Problem Details: copy_to_user might sleep and print a stack trace if it is executed in an atomic spinlock context. Like this: (XEN) CMCI: send CMCI to DOM0 through virq BUG: sleeping function called from invalid context at /home/konradinux/kernel.h:199 in_atomic(): 1, irqs_disabled(): 0, pid: 4581, name: mcelog Pid: 4...
```diff diff --git a/drivers/xen/mcelog.c b/drivers/xen/mcelog.c index 72e87d2f1929..804aa3c181c2 100644 --- a/drivers/xen/mcelog.c +++ b/drivers/xen/mcelog.c @@ -55,7 +55,7 @@ static struct mc_info g_mi; static struct mcinfo_logical_cpu *g_physinfo; static uint32_t ncpus; -static DEFINE_SPINLOCK(mcelog_lock); +sta...
cf79fab676b3aa3b5fbae95aab25e2d4e26e4224
Analyze and fix the following issue in the Linux kernel code: ktest: Fix config bisect with how make oldnoconfig works
Problem Details: With a name like 'oldnoconfig' one may think that the config generated would disable all configs that were not defined (selecting "no" for all options). But this is not the case. It selects the default. If a config has a 'default y', then it is added if not specified. This broke the config bisect, bec...
```diff diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 8ce58d715aef..5ad891a08113 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -189,6 +189,9 @@ my $newconfig = 0; my %entered_configs; my %config_help; my %variable; + +# force_config is the list of co...
958d8435c257f93123dec83647130457816a23e6
Analyze and fix the following issue in the Linux kernel code: ktest: Remove commented exit
Problem Details: A debug 'exit' was left in ktest.pl. Remove it. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
```diff diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 292b13ad03f5..a40af07e7772 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -2448,7 +2448,6 @@ sub create_config { } close(OUT); -# exit; make_oldconfig; } ```
551ace124d0ef471e8a5fee3ef9e5bb7460251be
Analyze and fix the following issue in the Linux kernel code: IB/qib: Reduce sdma_lock contention
Problem Details: Profiling has shown that sdma_lock is proving a bottleneck for performance. The situations include: - RDMA reads when krcvqs > 1 - post sends from multiple threads For RDMA read the current global qib_wq mechanism runs on all CPUs and contends for the sdma_lock when multiple RMDA read requests are f...
```diff diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h index 7e62f4137148..cbe577151457 100644 --- a/drivers/infiniband/hw/qib/qib.h +++ b/drivers/infiniband/hw/qib/qib.h @@ -1,8 +1,8 @@ #ifndef _QIB_KERNEL_H #define _QIB_KERNEL_H /* - * Copyright (c) 2006, 2007, 2008, 2009, 2010 QLog...
f3331f88a4b97530b7acd3112902524d9dc0688c
Analyze and fix the following issue in the Linux kernel code: IB/qib: Fix an incorrect log message
Problem Details: There is a cut-and-paste typo in the function qib_pci_slot_reset() where it prints that the "link_reset" function is called rather than the "slot_reset" function. This makes the message misleading. Signed-off-by: Betty Dall <betty.dall@hp.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
```diff diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c index 790646ef5106..4f9d91823f15 100644 --- a/drivers/infiniband/hw/qib/qib_pcie.c +++ b/drivers/infiniband/hw/qib/qib_pcie.c @@ -725,7 +725,7 @@ qib_pci_mmio_enabled(struct pci_dev *pdev) static pci_ers_result_t qib_pci_...
a9ec6bd1f7bccdc1304629f8fbb2e02035026307
Analyze and fix the following issue in the Linux kernel code: sfc: initialize dynamic sysfs attributes for lockdep
Problem Details: Dynamically allocated sysfs attributes must be initialized using sysfs_attr_init(), otherwise lockdep complains: BUG: key <address> not in .data! Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/sfc/mcdi_mon.c b/drivers/net/ethernet/sfc/mcdi_mon.c index fb7f65b59eb8..1d552f0664d7 100644 --- a/drivers/net/ethernet/sfc/mcdi_mon.c +++ b/drivers/net/ethernet/sfc/mcdi_mon.c @@ -222,6 +222,7 @@ efx_mcdi_mon_add_attr(struct efx_nic *efx, const char *name, attr->index = inde...
8b0d2f9ed3d8e92feada7c5d70fa85be46e6f948
Analyze and fix the following issue in the Linux kernel code: net: e100: ucode is optional in some cases
Problem Details: commit 9ac32e1b firmware: convert e100 driver to request_firmware() did a straight conversion of the in-driver ucode to external files. This introduced the possibility of the driver failing to enable an interface due to missing ucode. There was no evaluation of the importance of the ucode at the time...
```diff diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index ada720b42ff6..535f94fac4a1 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c @@ -1249,20 +1249,35 @@ static const struct firmware *e100_request_firmware(struct nic *nic) const struct f...
d8f1641b5829629d3af8e52750ba3b542f8f56c8
Analyze and fix the following issue in the Linux kernel code: net: Fix warnings in dst_ops.h
Problem Details: include/net/dst_ops.h:28:20: warning: ‘struct sock’ declared inside parameter list Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h index d079fc61c123..2f26dfb8450e 100644 --- a/include/net/dst_ops.h +++ b/include/net/dst_ops.h @@ -8,6 +8,7 @@ struct dst_entry; struct kmem_cachep; struct net_device; struct sk_buff; +struct sock; struct dst_ops { unsigned short family; ```
e9c31b32f1cc6d3aa190119103622fb8e4c257b1
Analyze and fix the following issue in the Linux kernel code: debug: Do not permit CONFIG_DEBUG_STACK_USAGE=y on IA64 or PARISC
Problem Details: The stack_not_used() function in <linux/sched.h> assumes that stacks grow downwards. This is not true on IA64 or PARISC, so this function would walk off in the wrong direction and into the weeds. Found on IA64 because of a compilation failure with recursive dependencies on IA64_TASKSIZE and IA64_THREA...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index a42d3ae39648..5d3e3288438f 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -694,7 +694,7 @@ config STACKTRACE config DEBUG_STACK_USAGE bool "Stack utilization instrumentation" - depends on DEBUG_KERNEL + depends on DEBUG_KERNEL && !IA64 && ...
7fed84f622ec2696087301199c2952b85e0cc3b4
Analyze and fix the following issue in the Linux kernel code: ipv4: Fix time difference calculation in rt_bind_exception().
Problem Details: Reported-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index f67e70236728..2c25581bf25c 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1907,7 +1907,7 @@ static void rt_bind_exception(struct rtable *rt, struct fib_nh *nh, __be32 daddr if (fnhe->fnhe_daddr == daddr) { if (fnhe->fnhe_pmtu) { unsign...