id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
63ac4bbffb40f2cb3bc7e8b11bac47598813ea13
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: bug in erroring out upon FCP_RSP_LEN_VAL in fc_fcp_resp
Problem Details: fc_fcp_resp is assuming when FCP_SNS_LEN_VAL is set, the FCP_RSP_LEN_VAL is not, which is not true. This leads to not copying the sense data and error out a valid FCP_RSP. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <Jame...
```diff diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 220c4bc536ca..f99d66fa2ef5 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -844,8 +844,7 @@ static void fc_fcp_resp(struct fc_fcp_pkt *fsp, struct fc_frame *fp) * exit here */ return; -...
da87bfab8a7e6cfd0e1e5c5874d7fd4f7d11e64e
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe, fnic, libfc: increased CDB size to 16 bytes for fcoe.
Problem Details: No reason to restrict CDB size to 12 bytes in fcoe, so increased to 16 so that 16 bytes SCSI CDB doesn't fail. Uses common define to set max_cmd_len for fcoe and fnic, fnic is already setting max_cmd_len to 16. sg_readcap -l fails without this fix. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed...
```diff diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 4d46b71849ab..25a7ce5c2d24 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -669,6 +669,8 @@ static int fcoe_shost_config(struct fc_lport *lport, struct device *dev) lport->host->max_lun = FCOE_MAX_LUN; lport->host...
666d07646a29040e3dc4caeb679166559e152ff2
Analyze and fix the following issue in the Linux kernel code: [SCSI] fnic: Update version to 1.4.0.145
Problem Details: New fnic version to mark inclusion of tx_flush bugfix. Signed-off-by: Brian Uchino <buchino@cisco.com> Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h index 3966c71d0095..585cc9cb942c 100644 --- a/drivers/scsi/fnic/fnic.h +++ b/drivers/scsi/fnic/fnic.h @@ -36,7 +36,7 @@ #define DRV_NAME "fnic" #define DRV_DESCRIPTION "Cisco FCoE HBA Driver" -#define DRV_VERSION "1.4.0.98" +#define DRV_VER...
0b2f74a47f2b10bd4c70324820a93c070b3960a5
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix hton24 macro to take expressions as args
Problem Details: hton24(p + 3, value) would fail to compile because p + 3[0] is not a valid expression. Went ahead and converted hton24 and ntoh24 to inline functions, which is better because the parameters are evalutated only once. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w....
```diff diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 8d0d1b2d8258..a26bb50c0c8b 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h @@ -47,13 +47,18 @@ #define ntohll(x) be64_to_cpu(x) #define htonll(x) cpu_to_be64(x) -#define ntoh24(p) (((p)[0] << 16) | ((p)[1] << 8) | ((p)[2])) -#defi...
593abc0720d5639ba21834b082adf83762af39be
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfcoe: Don't fill MAC desc in FLOGI if FIP negotiated FPMA
Problem Details: FPMA indicates that the Fabric will provide the host's N_Port's MAC address. When sending a FLOGI/FDISC frame and FPMA was negotiated through FIP discovery we still need to provide the MAC descriptor, as per the specification, but the MAC should be zero'd out since the FCF will be providing it in the F...
```diff diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index ff5ccba3d741..de5c329cb3b4 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c @@ -442,10 +442,15 @@ static int fcoe_ctlr_encaps(struct fcoe_ctlr *fip, struct fc_lport *lport, memset(mac, 0, sizeof(mac)); mac...
980ead3180233d09ad37aacd803059b3142c7863
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Before removing sas_device search device in list for _scsih_sas_device_remove
Problem Details: Fix a oops in _scsih_sas_device_remove. The driver was attempting to delete a object from the sas_device link list when the object was not present. Added sanity check for sas_device NULL dereference. before deleting sas_device now driver will search device in list then only it will follow device remo...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 77163bad75f9..c5ff26a2a51d 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -537,10 +537,15 @@ _scsih_sas_device_remove(struct MPT2SAS_ADAPTER *ioc, { unsigned long fl...
130b958a5dbf0fca361beef5713715a2eba6529f
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Reworked scmd->result priority for _scsih_qcmd.
Problem Details: we added support to set the deleted flag prior to device scan, then clear the flag for responding devices, leaving the deleted flag only set for missing devices. The problem is for internal generated host resets, IO queues are not blocked at scsi mid layer level. IO will be continued sent to driver, ...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index bb5659ca128d..77163bad75f9 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -2957,25 +2957,32 @@ _scsih_qcmd(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *)) ...
490475a9938f3480e1ab3a67063e547cea41c295
Analyze and fix the following issue in the Linux kernel code: [SCSI] bnx2i: Bug fixes related to MTU change issue when there are active iscsi sessions
Problem Details: bnx2i driver has to wait and cleanup all iscsi endpoints before returning from bnx2i_stop(). This is to make sure all chip resources are freed before chip is reset. As the requirements for 1G and 10G chipsets is different, added per-device 'hba_shutdown_tmo' parameter to adapter structure If the conn...
```diff diff --git a/drivers/scsi/bnx2i/bnx2i.h b/drivers/scsi/bnx2i/bnx2i.h index 6cf9dc37d78b..6b624e767d3b 100644 --- a/drivers/scsi/bnx2i/bnx2i.h +++ b/drivers/scsi/bnx2i/bnx2i.h @@ -362,6 +362,7 @@ struct bnx2i_hba { u32 num_ccell; int ofld_conns_active; + wait_queue_head_t eh_wait; int max_active_conns;...
78730cfe0649bce86e64eafda9bdffa38f05d396
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.12: Fix discovery issues
Problem Details: - Add code to prevent unreg_vpi mailbox command from failing. - Add code to reset the HBA if unreg_vpi mailbox fails with busy status. - Remove code that was clearing the nlp_type stored during rport discovery. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <jam...
```diff diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index 5087c4211b43..fbc9baeb6048 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h @@ -65,6 +65,7 @@ void lpfc_mbx_cmpl_read_la(struct lpfc_hba *, LPFC_MBOXQ_t *); void lpfc_init_vpi_cmpl(struct lpfc_hba *, ...
c74959370369cd870560777b7db7ec940565bb85
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.12: BSG Fixes and enhancements
Problem Details: - Add memcpy to mailbox completion to transfer reply correctly. - Add support for BSG mailbox commands (dump, update_cfg, and event_log_status). - Add warning message and refuse mailbox command while mgmt is blocked. - Add checks for memory allocation failure. - Add check for sli4 dump zero BDE size...
```diff diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 141a1ce9b742..dcf088262b20 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -84,7 +84,7 @@ struct lpfc_bsg_mbox { uint8_t *ext; /* extended mailbox data */ uint32_t mbOffset; /* from app */ uint32...
49198b371e2da20548d1408a7d3a8dea2f91263c
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.12: Critical fixes
Problem Details: - Move the code to increase the sg seg count for LP21000 adapters. - Check pcmd on command completion before dereferencing it. - Clear queue memory when creating firmware queues to prevent stale entries. - Replace the use of PAGE_SIZE in many areas that assumed it was always 4k. - Add an else clause to...
```diff diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 92ad202a9380..141a1ce9b742 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -2591,7 +2591,7 @@ lpfc_bsg_issue_mbox(struct lpfc_hba *phba, struct fc_bsg_job *job, goto job_done; } - mb = kzalloc(P...
66a679365780a8d775b1ed03e2576007f7100121
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Check for NULL pointer before free_pages is added.
Problem Details: Added check before free_pages just to make sure ioc->scsi_lookup is not NULL. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index b04ccad7d972..b830d61684dd 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -1919,7 +1919,10 @@ _base_release_memory_pools(struct MPT2SAS_ADAPTER *ioc) ioc->config_pag...
78d4e5a07dca7374dd9db40b3346d727b65eb794
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_debug: add max_queue + no_uld parameters
Problem Details: While testing the midlevel q_at_head and q_at_tail patch for sg and the block SG_IO ioctl I found it useful to reduce the queuing within the scsi_debug driver. The reason is that the midlevel queue only comes into play when the corresponding LLD queue is full. It is also useful when testing to be conf...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 3e10c306de94..a783cd33a3e4 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -12,7 +12,7 @@ * SAS disks. * * - * For documentation see http://www.torque.net/sg/sdebug26.html + * For documentation see http:/...
a71fa1fc43a29133f13ae6ada1a389ca298c0934
Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmvscsi: fix DMA API misuse
Problem Details: ibmvscsi uses dma_unmap_single() for buffers mapped via dma_map_sg(). It works however it's the API violation. The DMA debug facility complains about it: http://marc.info/?l=linux-scsi&m=127018555013151&w=2 Reported-by: Sachin Sant <sachinp@in.ibm.com> Tested-by: Sachin Sant <sachinp@in.ibm.com> Sign...
```diff diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index ff5ec5ac1fb5..88bad0e81bdd 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -323,16 +323,6 @@ static void set_srp_direction(struct scsi_cmnd *cmd, srp_cmd->buf_fmt = fmt; } -static...
a8f23b03535359c5afeb77d937b89b8a4d87b2b2
Analyze and fix the following issue in the Linux kernel code: [SCSI] wd7000: fix reset handler typo spin_unlock_irq() => spin_lock_irq()
Problem Details: This was introduced back in 2005 at the very start of the git era by: df0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 [SCSI] allow sleeping in ->eh_host_reset_handler() Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c index d0b7d2ff9ac5..333580bf37c5 100644 --- a/drivers/scsi/wd7000.c +++ b/drivers/scsi/wd7000.c @@ -1587,7 +1587,7 @@ static int wd7000_host_reset(struct scsi_cmnd *SCpnt) { Adapter *host = (Adapter *) SCpnt->device->host->hostdata; - spin_unlock_i...
3233ac19811fe17033b537832ca7b59df8bf4aa9
Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: retry read_capacity on UNIT_ATTENTION
Problem Details: Hazard testing uncovered yet another bug in sd. Under heavy reset activity the retry counter might be exhausted and the command will be returned with sense UNIT_ATTENTION/0x29/00 (POWER ON, RESET, OR BUS DEVICE RESET OCCURRED). In those cases we should just increase the retry counter again, retrying on...
```diff diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7955bc226125..015a597a852e 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1433,6 +1433,8 @@ static void read_capacity_error(struct scsi_disk *sdkp, struct scsi_device *sdp, #error RC16_LEN must not be more than SD_BUF_SIZE #endif +#define ...
5bbf297cc652713a0a6511004b8d4c1cc21a3b02
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Fix tracing of requests with error status
Problem Details: When a FSF request is returned with an error it should be reported through blktrace for the ziomon tools, but the latency information should not be read. Fix this by also calling zfcp_fsf_req_trace for the error case, but skip reading the latencies inside the function. Reviewed-by: Swen Schillig <swen...
```diff diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 18564891ea61..b3b1d2f79398 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -2105,7 +2105,8 @@ static void zfcp_fsf_req_trace(struct zfcp_fsf_req *req, struct scsi_cmnd *scsi) blktrc.inb_usage = req->...
d7d05548a62c87ee55b0c81933669177f885aa8d
Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi_tcp: fix relogin/shutdown hang
Problem Details: When I made this patch: b64e77f70b8c11766e967e3485331a9e6ef01390 it was to solve a problem where we were already on the waitqueue becuase a connection problem/logout caused us to be on there when we were cleaning up the session. If we happen to get on queue for more normal reasons like their just does ...
```diff diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 0ee725ced511..02143af7c1af 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -599,7 +599,7 @@ static void iscsi_sw_tcp_conn_stop(struct iscsi_cls_conn *cls_conn, int flag) set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx)...
be3bd2223b89d270853302ab0a5909fa875fd831
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix typo "numer" -> "number" in alloc.c
Problem Details: Fixes the typo found in a warning message of a persistent object allocator function. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
```diff diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c index 3f959f1879d8..c2a13870c605 100644 --- a/fs/nilfs2/alloc.c +++ b/fs/nilfs2/alloc.c @@ -425,7 +425,7 @@ void nilfs_palloc_abort_alloc_entry(struct inode *inode, bitmap = bitmap_kaddr + bh_offset(req->pr_bitmap_bh); if (!nilfs_clear_bit_atomic(nilfs_mdt_...
ce2d763a2cd09513cb0c0e9ea52c30373c00b2f1
Analyze and fix the following issue in the Linux kernel code: [SCSI] bnx2i: link bnx2i hba and cnic device before registering the device
Problem Details: When bnx2/cnic/bnx2i drivers are loaded in certain order, bnx2i will will not initialize the device correctly because 'hba->cnic' will be NULL when bnx2i_start() is called from register_device() context. Under this condition 'ifdown' and 'ifup' of associated network interface is required to bring iscsi...
```diff diff --git a/drivers/scsi/bnx2i/bnx2i_init.c b/drivers/scsi/bnx2i/bnx2i_init.c index 6d8172e781cf..737dce084276 100644 --- a/drivers/scsi/bnx2i/bnx2i_init.c +++ b/drivers/scsi/bnx2i/bnx2i_init.c @@ -278,6 +278,7 @@ static int bnx2i_init_one(struct bnx2i_hba *hba, struct cnic_dev *cnic) int rc; mutex_lock(...
7794a5af67c672d44cfdbc7172a608b7542a66e3
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Fix documentation of ql2xfdmienable module parameter
Problem Details: The default is enabled since 7e47e5ca184548341a82eeb2238ee3622c43cae1. Signed-off-by: Ferenc Wagner <wferi@niif.hu> Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 6bdc7de82c5b..f31820691dc2 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -70,8 +70,8 @@ static void qla2x00_free_device(scsi_qla_host_t *); int ql2xfdmienable=1; module_param(ql2xfdmienable, in...
bfdaa761d3f9663a4721f572e093dd2894cedaf9
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Fix to make conditional decision based on port number.
Problem Details: Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index f32a4b032967..e74552c8c5e1 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -739,11 +739,11 @@ qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t flt_addr) ha->flt_region_gold_fw = start; ...
077424e2e2c97c830d903891dfcd1532068b85b7
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: sg addr big endian fix
Problem Details: sg address in IO request is not set up correctly for big endian platform. add new macros to properly swap the address. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/bfa/bfa_ioim.c b/drivers/scsi/bfa/bfa_ioim.c index 8a1be201d29b..687f3d6e252b 100644 --- a/drivers/scsi/bfa/bfa_ioim.c +++ b/drivers/scsi/bfa/bfa_ioim.c @@ -758,7 +758,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim) sge = &m->sges[0]; if (ioim->nsges) { sg = (struct scatterlis...
2eba0d4c000777ce43012d7fda806b075f6cf877
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: fix the issue of not handling scsi_cmnd sg chaining case
Problem Details: Currently the driver doesn't take into consideraion of possible sg chaining when it walks through the sg list. This is fixed by using the sg_next() which automatically handles the chaining case. Obosolete code is removed as a result of this change. Signed-off-by: Jing Huang <huangj@brocade.com> Signed...
```diff diff --git a/drivers/scsi/bfa/bfa_cb_ioim_macros.h b/drivers/scsi/bfa/bfa_cb_ioim_macros.h index 961fe439daad..53a616f5f50d 100644 --- a/drivers/scsi/bfa/bfa_cb_ioim_macros.h +++ b/drivers/scsi/bfa/bfa_cb_ioim_macros.h @@ -116,35 +116,6 @@ bfa_cb_ioim_get_timeout(struct bfad_ioim_s *dio) return 0; } -/** -...
12fb8c1574d7d0c262d2f4c667047889c4f27ebe
Analyze and fix the following issue in the Linux kernel code: [SCSI] don't kfree an initialized struct device
Problem Details: This patch (as1359) fixes a bug in scsi_alloc_target(). After a device structure has been initialized (and especially after its name has been set), it must not be freed directly. One has to call put_device() instead. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomle...
```diff diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 38518b088073..c992ecf4e372 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -459,8 +459,7 @@ static struct scsi_target *scsi_alloc_target(struct device *parent, found_target->reap_ref++; spin_unlock_irqrestore(shos...
1821438a9b6a8454281ec2e151014709f641d2d5
Analyze and fix the following issue in the Linux kernel code: [SCSI] don't reap targets upon device_add failure
Problem Details: This patch (as1358) fixes a bug in the error pathway of scsi_target_add(). If registration fails, the target should not be reaped. The reaping occurs later, when scanning is finished and all the child devices are removed. The current code leaves an unbalanced value in starget->reap_ref. Signed-off-...
```diff diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 429c9b73e3e4..838a0db8ea1f 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -853,9 +853,6 @@ static int scsi_target_add(struct scsi_target *starget) error = device_add(&starget->dev); if (error) { dev_err(&s...
e94f67472106e5a0e97c79090211c551e69e889b
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Fix for little endian
Problem Details: 1. Fixes for little endian issues. 2. Now Debug info for Discovery event is more readable. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index b7b6285a3061..6f786349679f 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -285,6 +285,9 @@ _base_sas_ioc_info(struct MPT2SAS_ADAPTER *ioc, MPI2DefaultReply_t *mpi_reply, ...
f891dcfdc11d2004253861f51d627bfda6773c76
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Corrected conditional checks for Internal device Reset
Problem Details: bug fix in the handling of the internal device reset event The reason code check in scsih_sas_device_status_change_event never evaluates as true for internal device reset, hence driver never quiesce s IO when firmware is sending a device reset. The fix is to change the evaluate to: if (event_data->Reas...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index fa94f0ff7762..f3ce9b1825b1 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -4435,10 +4435,10 @@ _scsih_sas_device_status_change_event(struct MPT2SAS_ADAPTER *ioc, ...
7921b35c5fcf300ebd860e3e7894c692c9547838
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Corrected time stamp
Problem Details: incorrect timestamp on 32 bit platforms: The upper 32 bit of the timestamp was getting truncated when converting seconds to milliseconds, which was due to the variable being long. To fix the problem, the variable needs to be u64. Also the microseconds conversion to milliseconds was incorrect; it should...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index fb886d099baf..2e6e45a2803f 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -3009,8 +3009,8 @@ _base_send_ioc_init(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) * since epo...
e2af0d2ed86a2415b0562526601cf2d5cae5a96d
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.11: Fix AER uncorrectable non-fatal error handling
Problem Details: Only abort outstanding I/O to force the OS to retry failed I/Os for AER uncorrectable non-fatal errors instead of reseting the adapter. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.d...
```diff diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index feba3be90cb2..56421c714bf8 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -7764,21 +7764,23 @@ lpfc_pci_resume_one_s3(struct pci_dev *pdev) * @phba: pointer to lpfc hba data structure. * * T...
65c054f235fda2d545ecd2a7948906a3cf0c1f39
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt: modify mptctl_exit() to call proper deregister functions
Problem Details: This patch fixes some issues of mptctl_exit(). 1) It doesn't call mpt_deregister() for mptctl_taskmgmt_id => Insmoding/rmmoding mptctl.ko repeadtedly (up to MPT_MAX_PROTOCOL_DRIVERS-1 at most) can eat up all cb_idx, and that would cause a lack of MptCallbacks[], MptDriverClass[]...
```diff diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index caa8f568a41c..80421d2cf049 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c @@ -2991,6 +2991,14 @@ static int __init mptctl_init(void) } mptctl_taskmgmt_id = mpt_register(mptctl_taskmgmt_...
b3ef990c1514859bffae221b9e82e46a38f1e7bf
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Add debug statements when fc_fcp returns DID_ERROR to scsi-ml
Problem Details: DID_ERROR cases can be ambigouos. Debugging FCP error cases will be much easier if we have debug statements when we hit these error conditions. This patch simply adds debug messages using the FC_FCP_DBG macro when we return DID_ERROR to SCSI. This way if a DID_ERROR is reproducible turning on debug_lo...
```diff diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 39f18e39125c..044c420a1371 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -1916,6 +1916,8 @@ static void fc_io_compl(struct fc_fcp_pkt *fsp) } break; case FC_ERROR: + FC_FCP_DBG(fsp, "Returning D...
5c12c418e905aac2826bb70f947648944c079ed9
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix fcp pkt recovery in fc_fcp_recv_data
Problem Details: Currently fc_fcp_recv_data calls fc_fcp_retry_cmd to retry failed IO but in this case tgt is still sending data frames, therefore exchange needs to be aborted first before initiating retry. So this patch fixes this by aborting exchange first then have retry. Renames fc_timeout_error to fc_fcp_recovery...
```diff diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 17396c708b08..39f18e39125c 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -97,7 +97,7 @@ static void fc_fcp_resp(struct fc_fcp_pkt *, struct fc_frame *); static void fc_fcp_complete_locked(struct fc_fcp_...
a104c844576c6bdc44c6f1336e30a5fcd90fef1c
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fixes unnecessary seq id jump
Problem Details: In some cases seq is incremented twice causing unnecessary seq jump, for instance fc_exch_recv_seq_resp increments seq id when fc_sof_is_init is true and that is true for each incoming xfer ready but then fc_fcp_send_data does another seq increment to send data for xfer ready. This patch removes all s...
```diff diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 7cc084cf9950..981021edfba9 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -920,12 +920,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, * Find or create the sequence. ...
cc3593d3882ffa7dfaa739a8302b256955be7d99
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix sequence-initiative WARN in fc_seq_start_next
Problem Details: When starting a new response sequence in a multi-sequence exchange, a warning was issued that sequence initiative wasn't held. The bug was that sequence initiative was cleared by the previous sequence due to the END_SEQ flag being on. The intent may have been to check LAST_SEQ. Change just to check ...
```diff diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index e5df0d4db67e..7cc084cf9950 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -488,7 +488,7 @@ static int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp, */ spin_lock_bh(&ep->ex_lock); ep->f...
e49bf6145f50da2d95f9fab605ce74f8fb44cb16
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfcoe: fix debug message entering non-FIP mode
Problem Details: The debug message that indicated we are using non-FIP mode was being printed only if we were already in non-FIP mode. Also changed the message text to make it more clear the mode is being set, not that the message is indicating how FLOGI was received. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Si...
```diff diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 3440da48d169..22f6e44fa737 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c @@ -1334,9 +1334,9 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *fip, struct fc_lport *lport, if (fip->state == FIP_ST_AUTO || fip...
2f2ac4a0df8c4beee6e4057a69fa973b6040a573
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix oops in point-to-point mode
Problem Details: In point-to-point mode, if the PLOGI to the remote port times out, it can get deleted by the remote port module. Since there's no reference by the local port, lport->ptp_data points to a freed rport, and when the local port is reset and tries to logout again, an oops occurs in mutex_lock_nested(). Ho...
```diff diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index d126ecfff704..fe8700f4326a 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -228,9 +228,12 @@ static void fc_lport_ptp_setup(struct fc_lport *lport, u64 remote_wwnn) { mutex_lock(&lpor...
6ce00cae684e7c6310e14634320184ca3c011750
Analyze and fix the following issue in the Linux kernel code: [SCSI] gdth: fix buffer overflow
Problem Details: This allows i == MAXHA, which is out of range Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 35a4b3073ec3..a765fe7a55c3 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c @@ -3842,7 +3842,7 @@ int __init option_setup(char *str) TRACE2(("option_setup() str %s\n", str ? str:"NULL")); - while (cur && isdigit(*cur) && i <= MA...
1278b11f46d9f34097f44ecc417148f27e8997fe
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas : Device removal algorithm in interrupt context only
Problem Details: external host not connecting after controller reboot: The problem is : devices are not coming back after having the cable disconnected then reconnected. The problem is because the driver/firmware device removal handshake is failing. Due to this failure, the controller firmware is not sending out device...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h index 199424d22346..142b694c9de5 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.h +++ b/drivers/scsi/mpt2sas/mpt2sas_base.h @@ -259,16 +259,6 @@ struct _internal_cmd { u16 smid; }; -/* - * SAS Topology Structures - */ - ...
36dd288f0f930c154ec6a4d73a6a35f3079418c6
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_transport_fc: Protect against overflow in dev_loss_tmo
Problem Details: The rport structure defines dev_loss_tmo as u32, which is later multiplied with HZ to get the actual timeout value. This might overflow for large dev_loss_tmo values. So we should be better using u64 as intermediate variables here to protect against overflow. Signed-off-by: Hannes Reinecke <hare@suse....
```diff diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 6cfffc88022a..55fe730a8606 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -834,7 +834,7 @@ static ssize_t store_fc_rport_dev_loss_tmo(struct device *dev, struct device_attribute *attr...
bb789d01620e5d36081b22edb6fb71cf55ff043c
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: fix the incorrect scsi_dma_map error checking
Problem Details: scsi_dma_map() returns -1 if an error occurred (zero means that the command has no data). So the following current code can't catch an error: sges_left = scsi_dma_map(scmd); if (!sges_left) { sdev_printk(KERN_ERR, scmd->device, "pci_map_sg" " failed: request for %d bytes!\n", scsi_bufflen(scmd)); r...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index be171ed682e0..aa67b757bf23 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -988,7 +988,7 @@ _scsih_build_scatter_gather(struct MPT2SAS_ADAPTER *ioc, u32 chain_offset; ...
509b0865fbd8ab6c820397706dde980c1c285538
Analyze and fix the following issue in the Linux kernel code: pcmcia: fix io_probe due to parent (PCI) resources
Problem Details: Similar to commit 7a96e87d, we need to be aware of any parent PCI device when requesting IO regions, even only for testing ("probing"). Reported-by: Komuro <komurojun-mbn@nifty.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index 559069a80a3b..1178a823fbc6 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c @@ -214,7 +214,7 @@ static void do_io_probe(struct pcmcia_socket *s, unsigned int base, return; } for (i = bas...
d88d4050dcaf09e417aaa9a5024dd9449ef71b2e
Analyze and fix the following issue in the Linux kernel code: PM / Hibernate: user.c, fix SNAPSHOT_SET_SWAP_AREA handling
Problem Details: When CONFIG_DEBUG_BLOCK_EXT_DEVT is set we decode the device improperly by old_decode_dev and it results in an error while hibernating with s2disk. All users already pass the new device number, so switch to new_decode_dev(). Signed-off-by: Jiri Slaby <jslaby@suse.cz> Reported-and-tested-by: Jiri Kosi...
```diff diff --git a/kernel/power/user.c b/kernel/power/user.c index 4d2289626a84..a8c96212bc1b 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -420,7 +420,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, * User space encodes device types as two-byte values, * so we need to r...
29aac005ff4dc8a5f50b80f4e5c4f59b21c0fb50
Analyze and fix the following issue in the Linux kernel code: ALSA: usb - Fix Oops after usb-midi disconnection
Problem Details: usb-midi causes sometimes Oops at snd_usbmidi_output_drain() after disconnection. This is due to the access to the endpoints which have been already released at disconnection while the files are still alive. This patch fixes the problem by checking disconnection state at snd_usbmidi_output_drain() an...
```diff diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 2c59afd99611..9e28b20cb2ce 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c @@ -986,6 +986,8 @@ static void snd_usbmidi_output_drain(struct snd_rawmidi_substream *substream) DEFINE_WAIT(wait); long timeout = msecs_to_jiffies(50); + if ...
5da3dac8d99c9933f12286fd73fa18e26f768bea
Analyze and fix the following issue in the Linux kernel code: firewire: ohci: cleanups and fix for nonstandard build without debug facility
Problem Details: 1) Clean up two function names: The ohci_ prefix is only used in names of fw_card_driver hooks. There were two unnecessary exceptions. 2) Replace empty macros by empty inline functions so that call parameter type checking is available in #ifndef'd builds. 3) CONFIG_FIREWIRE_OHCI_DEBUG is currently ...
```diff diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 5bbf42eb3f9a..07deac77bc13 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -262,13 +262,13 @@ MODULE_PARM_DESC(quirks, "Chip quirks (default = 0" ", no 1394a enhancements = " __stringify(QUIRK_NO_1394A) ")"); -#ifde...
54672386ccf36ffa21d1de8e75624af83f9b0eeb
Analyze and fix the following issue in the Linux kernel code: firewire: ohci: fix up configuration of TI chips
Problem Details: On TI chips (OHCI-Lynx and later), enable link enhancements features that TI recommends to be used. None of these are required for proper operation, but they are safe and nice to have. In theory, these bits should have been set by default, but in practice, some BIOS/EEPROM writers apparently do not r...
```diff diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index e934713f3fce..6a27a0ef3b63 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -2431,7 +2431,7 @@ static int __devinit pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) { struct fw_ohci *ohci; - u3...
9cac00b8f0079d5d3d54ec4dae453d58dec30e7c
Analyze and fix the following issue in the Linux kernel code: firewire: cdev: fix information leak
Problem Details: A userspace client got to see uninitialized stack-allocated memory if it specified an _IOC_READ type of ioctl and an argument size larger than expected by firewire-core's ioctl handlers (but not larger than the core's union ioctl_arg). Fix this by clearing the requested buffer size to zero, but only a...
```diff diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 5eba9e0f876c..0d3df0927efc 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -1356,24 +1356,24 @@ static int dispatch_ioctl(struct client *client, return -ENODEV; if (_IOC_TYPE(cmd) != '#' || - ...
bfac4d6725baacbfc085c38e231b8582a1b8f62b
Analyze and fix the following issue in the Linux kernel code: drm/i915: Ignore LVDS EDID when it is unavailabe or invalid
Problem Details: This trys to shut up complains about invalid LVDS EDID during mode probe, but uses fixed panel mode directly for panels with broken EDID. https://bugs.freedesktop.org/show_bug.cgi?id=23099 https://bugs.freedesktop.org/show_bug.cgi?id=26395 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Tested-by: S...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index b7cb4aadd059..6960849522f8 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -611,6 +611,8 @@ typedef struct drm_i915_private { /* Reclocking support */ bool render_reclock_avail; bool ...
a6305ddb080fb483ca41ca56cacb6f96089f0c8e
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a race with the new commit code
Problem Details: This patch fixes a race which occurs due to the fact that we release the PG_writeback flag while still holding the nfs_page locked. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 7f40ea305543..40297c4f1ee0 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -201,6 +201,7 @@ static int nfs_set_page_writeback(struct page *page) struct inode *inode = page->mapping->host; struct nfs_server *nfss = NFS_SERVER(inode); + page_cache_ge...
1544fa0f7a46241582abc48f07b74f3d846379e4
Analyze and fix the following issue in the Linux kernel code: NFS: Fix the mode calculation in nfs_find_open_context
Problem Details: Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 737128f777f3..50a56edca0b5 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -623,10 +623,10 @@ struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_c list_for_each_entry(pos, &nfsi->open_files, list) { if (cred != NULL && pos->...
65384a1d41c4e91f0b49d90d11b7f424d6e5c58e
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: more atom parser fixes (v2)
Problem Details: shr/shl ops need the full dst rather than the pre-masked version. Fixes fdo bug 27478 and kernel bug 15738. v2: remove some unsed vars, add comments Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index 58845e053b36..a8bf50042464 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c @@ -907,11 +907,16 @@ static void atom_op_shl(atom_exec_context *ctx, int *ptr, int arg) uint8_t attr = U8((*ptr)++), shift...
335af9a235a82842854b394507ab5e310d88be42
Analyze and fix the following issue in the Linux kernel code: drm/i915: change intel_ddc_get_modes() function parameters
Problem Details: This one replaces original param for intel_ddc_get_modes() with DRM connector and i2c bus adapter instead. With explicit params, we won't require that a single driver structure must hold connector and DDC bus reference, which ease the conversion to splitted encoder/ connector model. It also clears up ...
```diff diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index b96574ea4707..4dd5daa8ebe7 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -433,28 +433,25 @@ static int intel_crt_get_modes(struct drm_connector *connector) { int ret; struct inte...
fb8b5a39b6310379d7b54c0c7113703a8eaf4a57
Analyze and fix the following issue in the Linux kernel code: drm/i915: Configure the TV sense state correctly on GM45 to make TV detection reliable
Problem Details: The TV detection logic is not reliable on the Cantiga platform. Sometimes the TV will be misdetected as the following two cases: - TV is misdetected on some laptops. e.g. There is no TV connector port or no TV is attached. But the TV is shown as connected. - TV connector type is misdetected. e.g. the c...
```diff diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index d7d39b2327df..eea593071e49 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c @@ -1399,6 +1399,15 @@ intel_tv_detect_type (struct drm_crtc *crtc, struct intel_encoder *intel_encoder DAC_A_0...
679370641e3675633cad222449262abbe93a4a2a
Analyze and fix the following issue in the Linux kernel code: powernow-k8: Fix frequency reporting
Problem Details: With F10, model 10, all valid frequencies are in the ACPI _PST table. Cc: <stable@kernel.org> # 33.x 32.x Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com> LKML-Reference: <1270065406-1814-6-git-send-email-bp@amd64.org> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> Reviewed-by: Thomas ...
```diff diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 52fce638f444..6f3dc8fbbfdc 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c @@ -935,7 +935,8 @@ static int fill_powernow_table_pstate(struct powernow_k8_...
470058e0ad82fcfaaffd57307d8bf8c094e8e9d7
Analyze and fix the following issue in the Linux kernel code: iwlwifi: avoid Tx queue memory allocation in interface down
Problem Details: We used to free all the Tx queues memory when interface is brought down and reallocate them again in interface up. This requires order-4 allocation for txq->cmd[]. In situations like s2ram, this usually leads to allocation failure in the memory subsystem. The patch fixed this problem by allocating the ...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 384b45c519f1..c465c8590833 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c @@ -512,10 +512,13 @@ int iwlagn_hw_nic_init(struct iwl_priv *priv) s...
57e40d36e59f828f43d60b2662041991dcd78044
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix compiler warning
Problem Details: Check return code on iwl_send_cmd_pdu() to get rid of compiler warning. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 9b4d527bd3f8..d86ecd2f9ec2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -425,6 +425,7 @@ static void iwl_sta_init_lq(struct iwl_priv *priv, const u8 *addr, bo...
f875f5183b8f511161eddcbb4e9a1aada33d4aaf
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix compile warnings when compiling without debug
Problem Details: Fixes: CC [M] drivers/net/wireless/iwlwifi/iwl-agn-rs.o drivers/net/wireless/iwlwifi/iwl-agn-rs.c: In function ‘rs_get_rate’: drivers/net/wireless/iwlwifi/iwl-agn-rs.c:2419: warning: unused variable ‘priv’ CC [M] drivers/net/wireless/iwlwifi/iwl-sta.o drivers/net/wireless/iwlwifi/iwl-sta.c: In functi...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index 9e411dc0e5e1..80e9bbc7884a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c @@ -647,7 +647,7 @@ static void rs_get_rate(void *priv_r, struct ieee8021...
461ef382fd68f02b7bac8f94f7f2b85162bad896
Analyze and fix the following issue in the Linux kernel code: iwlwifi: add more debug info in error event dump
Problem Details: When sys assert happen, driver will dump the error table information provided by uCode. There are more information available but is not being display by the driver; adding program counter and last host command the to log to help uCode debugging. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signe...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 3526d5ee4755..8a002c6f3a61 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -1843,6 +1843,7 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv) u32 data2, lin...
8b9fce77737ae9983f61ec56cd53f52fb738b2c7
Analyze and fix the following issue in the Linux kernel code: iwlwifi: work around bogus active chains detection
Problem Details: The current algorithm will sometimes "detect" that more chains are enabled than are really present in the device because, for unknown reasons, the ucode sends up all-zeroes signal values. The simplest way of solving this is to restrict the active chains mask to the chains we know are really present on...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-calib.c b/drivers/net/wireless/iwlwifi/iwl-calib.c index 845831ac053e..64de42be7ea3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-calib.c +++ b/drivers/net/wireless/iwlwifi/iwl-calib.c @@ -807,6 +807,18 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, }...
aecb0565e3e331d4dd23b4d35180519532015f22
Analyze and fix the following issue in the Linux kernel code: wl1271: Fix mac80211 RTS threshold requests during WL1271_STATE_OFF
Problem Details: mac80211 sends RTS threshold configuration request even if the wl1271 interface state is WL1271_STATE_OFF. This leads to failures during pm tests. This patch leaves the configuration function, if the interface is going down. Signed-off-by: Saravanan Dhanabal <ext-saravanan.dhanabal@nokia.com> Reviewe...
```diff diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 2eb7b99ff276..4adc5162e7e5 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c @@ -1582,10 +1582,13 @@ out: static int wl1271_op_set_rts_threshold(struct i...
2c10bb9cb3f9cecb71bd2cbb771778136433ebe2
Analyze and fix the following issue in the Linux kernel code: wl1271: Fix mac80211 configuration requests during WL1271_STATE_OFF
Problem Details: mac80211 sends configuration requests even if the wl1271 interface state is WL1271_STATE_OFF. This creates warnings from mac80211. This patch leaves the configuration functions, if the interface is going down. Signed-off-by: Saravanan Dhanabal <ext-saravanan.dhanabal@nokia.com> Reviewed-by: Juuso Oik...
```diff diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 4e9754056d45..2eb7b99ff276 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c @@ -1223,6 +1223,9 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u3...
bd9dc49cd565aeb20d4f6eb2f6af4c16acce2ef5
Analyze and fix the following issue in the Linux kernel code: wl1271: Fix memory leaks on driver initialization
Problem Details: This patch fixes some memory leaks occurring during driver init/de-init. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdrive...
```diff diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 5c32d8d72361..4e9754056d45 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c @@ -1093,6 +1093,14 @@ static void wl1271_op_remove_interface(struct ieee8021...
c15cf5fcf9ea0a7749536c201965370d99c86c7f
Analyze and fix the following issue in the Linux kernel code: mac80211: fix typo for LDPC capability
Problem Details: Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 740ff6c5b92c..6bc9b07c3eda 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c @@ -176,7 +176,7 @@ static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf, if (htc->ht_supported) { p += scnprintf...
d3e06e2b15590b70ea73733fc4612e4741ff46e0
Analyze and fix the following issue in the Linux kernel code: slub: Fix kmem_ptr_validate() for non-kernel pointers
Problem Details: As suggested by Linus, fix up kmem_ptr_validate() to handle non-kernel pointers more graciously. The patch changes kmem_ptr_validate() to use the newly introduced kern_ptr_validate() helper to check that a pointer is a valid kernel pointer before we attempt to convert it into a 'struct page'. Cc: Andr...
```diff diff --git a/mm/slub.c b/mm/slub.c index b364844a1068..7d6c8b1ccf63 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2386,6 +2386,9 @@ int kmem_ptr_validate(struct kmem_cache *s, const void *object) { struct page *page; + if (!kern_ptr_validate(object, s->size)) + return 0; + page = get_object_page(object); ...
4dc86ae1f925b2121d4e75058675895f83e54c71
Analyze and fix the following issue in the Linux kernel code: Revert "memory-hotplug: add 0x prefix to HEX block_size_bytes"
Problem Details: This reverts commit ba168fc37dea145deeb8fa9e7e71c748d2e00d74. It changes user-visible sysfs interfaces, and breaks some existing user space applications which apparently rely on the fact that the output does not contain the "0x" prefix. Requested-by: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-b...
```diff diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 4f4aa5897b4c..933442f40321 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -313,7 +313,7 @@ static ssize_t print_block_size(struct sysdev_class *class, struct sysdev_class_attribute *attr, char *buf) { - return sprintf(buf,...
53e5b5c215ce8372250e227f2c9acf9892de8434
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix perl support installation when O= is used
Problem Details: We need to create the $O/scripts/perl/Perf-Trace-Util/ directory too. Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Me...
```diff diff --git a/tools/perf/Makefile b/tools/perf/Makefile index f578b05a30eb..57b3569716dd 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -158,6 +158,7 @@ all:: # Define NO_DWARF if you do not want debug-info analysis feature at all. $(shell sh -c 'mkdir -p $(OUTPUT)scripts/python/Perf-Trace-Uti...
7f311a46916a3be00a1a8e3f1bdf461d08f1d263
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix initial capture source connections of ALC880/260
Problem Details: The widget connections of ADC of ALC880 and ALC2260 aren't initialized, thus it might point to invalid pin. This can be a problem when mode=auto and there is only one input pin. Then user can't change the connection at all. This patch adds the code to initialize the input pin connection of these cod...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9b58f29833e6..8d60b1f25ce1 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4809,6 +4809,25 @@ static void alc880_auto_init_analog_input(struct hda_codec *codec) } } +static void alc880_auto_i...
b660d0485efeff743c72f1be2185832de8477a24
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_LED: add refcounts to LED target
Problem Details: Add reference counting to the netfilter LED target, to fix errors when multiple rules point to the same target ("LED trigger already exists"). Signed-off-by: Adam Nielsen <a.nielsen@shikadi.net> Signed-off-by: Patrick McHardy <kaber@trash.net>
```diff diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c index efcf56db23e8..bd102c77d1f0 100644 --- a/net/netfilter/xt_LED.c +++ b/net/netfilter/xt_LED.c @@ -31,12 +31,18 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Adam Nielsen <a.nielsen@shikadi.net>"); MODULE_DESCRIPTION("Xtables: trigger LED devices on p...
85b3cce880a19e78286570d5fd004cc3cac06f57
Analyze and fix the following issue in the Linux kernel code: ARM: Fix ioremap_cached()/ioremap_wc() for SMP platforms
Problem Details: Write combining/cached device mappings are not setting the shared bit, which could potentially cause problems on SMP systems since the cache lines won't participate in the cache coherency protocol. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Santosh Shilimkar <santosh.shilimka...
```diff diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 9d4da6ac28eb..4223d086aa17 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -420,6 +420,10 @@ static void __init build_mem_type_table(void) user_pgprot |= L_PTE_SHARED; kern_pgprot |= L_PTE_SHARED; vecs_pgprot |= L_PTE_SHARED; + mem_typ...
176b1803ce4690d0dd94e16f118dbd14af045034
Analyze and fix the following issue in the Linux kernel code: [S390] fix io_return critical section cleanup
Problem Details: If a machine check interrupts the io interrupt handler on one of the instructions between io_return and io_leave the critical section cleanup code will move the return psw to io_work_loop. By doing that the switch from the asynchronous interrupt stack to the process stack is skipped. If e.g. TIF_NEED_R...
```diff diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 4348f9bc5393..6af7045280a8 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -964,7 +964,7 @@ cleanup_critical: clc 4(4,%r12),BASED(cleanup_table_io_work_loop) bl BASED(0f) clc 4(4,%r12),BASED(cleanup_table_io_wor...
35ac734f72d846f250c0344913a91f954ea764c3
Analyze and fix the following issue in the Linux kernel code: [S390] sclp_async: potential buffer overflow
Problem Details: "len" hasn't been properly range checked so we shouldn't use it as an array offset. This can only be written to by root but it would still be annoying to accidentally write more than 3 characters and corrupt your memory. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Martin Schwidefs...
```diff diff --git a/drivers/s390/char/sclp_async.c b/drivers/s390/char/sclp_async.c index 2aecf7f21361..7ad30e72f868 100644 --- a/drivers/s390/char/sclp_async.c +++ b/drivers/s390/char/sclp_async.c @@ -85,7 +85,7 @@ static int proc_handler_callhome(struct ctl_table *ctl, int write, rc = copy_from_user(buf, buffer, ...
6ca0c22ef8a4e988e2487d25964d55e6c37c5785
Analyze and fix the following issue in the Linux kernel code: ASoC: WM8750: Convert to new API
Problem Details: Register the WM8750 as a SPI or I2C device. This patch mostly shuffles code around. Hugely inspired by WM8753 which was already converted. Also, this patch fixes the Jive and Spitz machine. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by:...
```diff diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index ee084083a49d..4bbc512c0836 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c @@ -29,11 +29,6 @@ #include "wm8750.h" -/* codec private data */ -struct wm8750_priv { - unsigned int sysclk; -}; - /* * wm8750 regis...
226b1ec8c18bcb6d1aa448a29b2c8aeae1946228
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix setup for ALC269vb amic and dmic models
Problem Details: Corrected HP and mic pins for ALC269vb amic and dmic models. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fbbdfbc8a1ca..9b58f29833e6 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -13789,19 +13789,19 @@ static void alc269_laptop_unsol_event(struct hda_codec *codec, } } -static void alc269_laptop_...
531d8791accf1464bc6854ff69d08dd866189d17
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix auto-parser of ALC269vb for HP pin NID 0x21
Problem Details: ALC269vb has an alternative HP pin 0x21 in addition. Fix the parser to recognize it. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 2971e48e50ad..fbbdfbc8a1ca 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -12869,6 +12869,7 @@ static int alc268_new_analog_output(struct alc_spec *spec, hda_nid_t nid, dac = 0x02; break; ...
9823f1a8463fb631fe965110fe19adeb3df239c4
Analyze and fix the following issue in the Linux kernel code: ARM: 6043/1: AT91 slow-clock resume: Don't wait for a disabled PLL to lock
Problem Details: at91 slow-clock resume: Don't wait for a disabled PLL to lock. We run into this problem with the PLLB on the at91: ohci-at91 disables the PLLB when going to suspend. The slowclock code however tries to do the same: It saves the PLLB register value and when restoring the value during resume, it waits f...
```diff diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S index 987fab3d846a..9fcbd6ca0090 100644 --- a/arch/arm/mach-at91/pm_slowclock.S +++ b/arch/arm/mach-at91/pm_slowclock.S @@ -205,13 +205,25 @@ ENTRY(at91_slow_clock) ldr r3, .saved_pllbr str r3, [r1, #(AT91_CKGR_PLLBR - AT91_P...
3440c49f5c5ecb4f29b0544aa87da71888404f8f
Analyze and fix the following issue in the Linux kernel code: cfq-iosched: Fix the incorrect timeslice accounting with forced_dispatch
Problem Details: When CFQ dispatches requests forcefully due to a barrier or changing iosched, it runs through all cfqq's dispatching requests and then expires each queue. However, it does not activate a cfqq before flushing its IOs resulting in using stale values for computing slice_used. This patch fixes it by callin...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 7104ac816fb6..b773000f8a06 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -2205,10 +2205,13 @@ static int cfq_forced_dispatch(struct cfq_data *cfqd) struct cfq_queue *cfqq; int dispatched = 0; - while ((cfqq = cfq_get_next_queue_f...
812df48d127365ffd0869aa139738f572a86759c
Analyze and fix the following issue in the Linux kernel code: blkio: Add more debug-only per-cgroup stats
Problem Details: 1) group_wait_time - This is the amount of time the cgroup had to wait to get a timeslice for one of its queues from when it became busy, i.e., went from 0 to 1 request queued. This is different from the io_wait_time which is the cumulative total of the amount of time spent by each IO in that cgr...
```diff diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt index 6e52e7c512a4..db054ea3e7fb 100644 --- a/Documentation/cgroups/blkio-controller.txt +++ b/Documentation/cgroups/blkio-controller.txt @@ -150,6 +150,35 @@ Details of cgroup files cgroup's existence. Queu...
84c124da9ff50bd71fab9c939ee5b7cd8bef2bd9
Analyze and fix the following issue in the Linux kernel code: blkio: Changes to IO controller additional stats patches
Problem Details: that include some minor fixes and addresses all comments. Changelog: (most based on Vivek Goyal's comments) o renamed blkiocg_reset_write to blkiocg_reset_stats o more clarification in the documentation on io_service_time and io_wait_time o Initialize blkg->stats_lock o rename io_add_stat to blkio_add...
```diff diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt index 630879cd9a42..ed04fe9cce1a 100644 --- a/Documentation/cgroups/blkio-controller.txt +++ b/Documentation/cgroups/blkio-controller.txt @@ -77,7 +77,6 @@ Details of cgroup files ======================= - blk...
a7433742d62c6e0e1173bd144a4aef7724b48d60
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix cypress firmware typo.
Problem Details: Pointed out by Dave Witbrodt. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index d178fa826eec..25aa2f808935 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -79,7 +79,7 @@ MODULE_FIRMWARE("radeon/REDWOOD_rlc.bin"); MODULE_FIRMWARE("radeon/JUNIPER_pfp.bin"); MODULE_FIRMWARE("ra...
c1a7368a6f0b18b10fdec87972da680ebdf03794
Analyze and fix the following issue in the Linux kernel code: Security: Fix coding style in security/
Problem Details: Fix coding style in security/ Signed-off-by: Zhitong Wang <zhitong.wangzt@alibaba-inc.com> Signed-off-by: James Morris <jmorris@namei.org>
```diff diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index cd191bbec03c..0293843f7eda 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c @@ -503,11 +503,11 @@ static ssize_t sel_write_access(struct file *file, char *buf, size_t size) return length; length = -...
2295e17a4a0c339ca8507deb2cab5f339007e5e5
Analyze and fix the following issue in the Linux kernel code: drm/nv40: Init some tiling-related PGRAPH state.
Problem Details: Fixes garbled 3D on an nv46 card. Reported-by: Francesco Marella <francesco.marella@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv40_graph.c b/drivers/gpu/drm/nouveau/nv40_graph.c index 53e8afe1dcd1..0616c96e4b67 100644 --- a/drivers/gpu/drm/nouveau/nv40_graph.c +++ b/drivers/gpu/drm/nouveau/nv40_graph.c @@ -335,6 +335,27 @@ nv40_graph_init(struct drm_device *dev) nv_wr32(dev, 0x400b38, 0x2ffff800)...
0fcdb61e78050f8f0b31029eeafa5ae013ce0f35
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms/evergreen: add gart support
Problem Details: Gart setup is more or less like r7xx. Copy rv770d.h to evergreend.h and fix up changes. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 7672f11ed995..afcff06ef291 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -27,7 +27,7 @@ #include "radeon.h" #include "radeon_asic.h" #include "radeon_drm.h" -#include "rv77...
494ab824f179ddeb2022cbb1d25aee41ab46ee9b
Analyze and fix the following issue in the Linux kernel code: drm/nv50: fix instmem init on IGPs if stolen mem crosses 4GiB mark
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c index 34280eb31df3..5f21df31f3aa 100644 --- a/drivers/gpu/drm/nouveau/nv50_instmem.c +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c @@ -63,9 +63,10 @@ nv50_instmem_init(struct drm_device *dev) struct drm_nouveau_private...
2eb92c80074ecfbc691741720382007417f64523
Analyze and fix the following issue in the Linux kernel code: drm/nv40: add LVDS table quirk for Dell Latitude D620
Problem Details: Should fix: https://bugzilla.redhat.com/show_bug.cgi?id=505132 https://bugzilla.redhat.com/show_bug.cgi?id=543091 https://bugzilla.redhat.com/show_bug.cgi?id=530425 https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-nouveau/ +bug/539730 Signed-off-by: Ben Skeggs <bskeggs@redhat.com...
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 075eb894648f..ad6c2d4520ae 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -3659,6 +3659,21 @@ int nouveau_bios_parse_lvds_table(struct drm_device *dev, int pxcl...
40b2a687bd92827ca144d3623cf48377d8f7680d
Analyze and fix the following issue in the Linux kernel code: drm/nv50: add more 0x100c80 flushy magic
Problem Details: Fixes the !vbo_fifo path in the 3D driver on certain chipsets. Still not really any good idea of what exactly the magic achieves, but it makes things work. While we're at it, in the PCIEGART path, flush on unbinding also. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 2dc09dbd817d..a4d5ecc6ed5a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c @@ -347,6 +347,20 @@ nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t ...
0c324971986f1498ccd289cb2b4927a6fd3efbe5
Analyze and fix the following issue in the Linux kernel code: drm/nv50: fix fbcon when framebuffer above 4GiB mark
Problem Details: This can't actually happen right now, but lets fix it anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv50_fbcon.c b/drivers/gpu/drm/nouveau/nv50_fbcon.c index 25a3cd8794f9..a8c70e7e9184 100644 --- a/drivers/gpu/drm/nouveau/nv50_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv50_fbcon.c @@ -157,8 +157,11 @@ nv50_fbcon_accel_init(struct fb_info *info) struct drm_nouveau_private *de...
0dd8c3f093e3d0cab2cc967f9620b41a125f1f56
Analyze and fix the following issue in the Linux kernel code: drm/nv50: Fix NEWCTX_DONE flag number
Problem Details: Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv50_grctx.c b/drivers/gpu/drm/nouveau/nv50_grctx.c index 546b31949a30..3c3cc4606a03 100644 --- a/drivers/gpu/drm/nouveau/nv50_grctx.c +++ b/drivers/gpu/drm/nouveau/nv50_grctx.c @@ -55,12 +55,12 @@ #define CP_FLAG_AUTO_LOAD ((2 * 32) + 5) #define CP_FLAG_AUTO_L...
c385e50cb51ace73ebe12d57df76882e9dcf0e53
Analyze and fix the following issue in the Linux kernel code: drm/edid: Fix sync polarity for secondary GTF curve
Problem Details: Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 8840066a5775..f1f473ea97d3 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -452,7 +452,10 @@ drm_gtf_mode_complex(struct drm_device *dev, int hdisplay, int vdisplay, } drm_mode_set_name(drm_mode); - ...
bc0beb44f27dc068c1daefc79826c07e0b22ef6c
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: fix lock imbalance
Problem Details: Stanse found that one error path in qla24xx_bsg_timeout omits to unlock ha->hardware_lock. Fix that. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 359e9a71a021..1c7ef55966fb 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -2393,6 +2393,7 @@ qla24xx_bsg_timeout(struct fc_bsg_job *bsg_job) return 0; done: + spin_unlock_irqrestore(&...
67221a4226a5fc48e413e2050db266bb171753c4
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc: fix lock imbalances
Problem Details: Stanse found that two error paths in lpfc_bsg_rport_els_cmp and lpfc_issue_ct_rsp_cmp omits to unlock phba->ct_ev_lock. It is because they wrongly unlock phba->hbalock instead. Fix that. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bott...
```diff diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index ec3723831e89..d62b3e467926 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -433,7 +433,7 @@ lpfc_bsg_rport_els_cmp(struct lpfc_hba *phba, dd_data = cmdiocbq->context1; /* normal completion and time...
4ec3fdbef17d0266826b56b33735dc9dada58c27
Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: fix lock imbalance
Problem Details: Stanse found that one error path in mgmt_invalidate_icds omits to unlock ctrl->mbox_lock. Fix that. Added in 756d29c8c7ed8887ed7d752371ce2f (Enable async mode for mcc rings) where the spinlock was moved. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Jayamohan Kallickal <jayamohank@serverengine...
```diff diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index 72617b650a7e..e641922f20bc 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c @@ -169,6 +169,7 @@ unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba, SE_DEBUG(DBG_LVL_1, "Failed ...
229bab6bacc42295f13c0434772381a88ce2308b
Analyze and fix the following issue in the Linux kernel code: [SCSI] dpt_i2o: several use after free issues
Problem Details: adpt_i2o_delete_hba() calls kfree() so we have to save "pHba->next" before calling it. Also inside adpt_i2o_delete_hba() itself, there was another use after free bug which I fixed by moving the kfree() down a line. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: James Bottomley <James...
```diff diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 496764349c41..0435d044c9da 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -188,7 +188,8 @@ MODULE_DEVICE_TABLE(pci,dptids); static int adpt_detect(struct scsi_host_template* sht) { struct pci_dev *pDev = NULL; - adpt_hba...
a05988bbbef5ac2391fe696646f0b80708f33f2e
Analyze and fix the following issue in the Linux kernel code: ath5k: fix race condition in tx desc processing
Problem Details: As pointed out by Benoit Papillault, there is a potential race condition between the host and the hardware in reading the next link in the transmit descriptor list: cpu0 hw tx for buf completed raise tx_ok interrupt process buf buf->ds_link = 0 ...
```diff diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 38c41e3c7988..f7f57c1cca7d 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -2083,6 +2083,17 @@ ath5k_tx_processq(struct ath5k_softc *sc, struct ath5k_txq *txq) lis...
2eb46d9bda44b3f85727fee6865d9b25725e6bf9
Analyze and fix the following issue in the Linux kernel code: ath9k: simplify AR9220 fixup code for AR_AN_TOP2 register
Problem Details: Don't modify ah->iniModes, it's supposed to be constant. Instead, apply the fixup when the data is written to the registers. Change ath9k_hw_init_eeprom_fix() to only determine whether the fixup is needed. This allows similteneous support for AR9220 cards that need AR_AN_TOP2 fixup (such as Ubiquiti...
```diff diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 88f8bfdbded4..3b9f4c1f8d4e 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -27,9 +27,6 @@ static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type); static void at...
f984d94c500c79048b33ab14923dfcec336d9968
Analyze and fix the following issue in the Linux kernel code: ath9k_htc: Fix HTC layer memleak
Problem Details: Messages that are generated by the HTC layer don't have any TX callback endpoints assigned to them. Consequently, the allocated SKBs are never freed. Fix this issue by handling this case in the HTC layer itself. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <lin...
```diff diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c index 30f608bfc567..24d7b886fe23 100644 --- a/drivers/net/wireless/ath/ath9k/htc_hst.c +++ b/drivers/net/wireless/ath/ath9k/htc_hst.c @@ -326,11 +326,13 @@ void ath9k_htc_txcompletion_cb(struct htc_target *htc_handl...
c503269a0f77e9b2d6de9e8a5f66ace53dde6e04
Analyze and fix the following issue in the Linux kernel code: ath9k_htc: Fix module unloading issue
Problem Details: The maximum number of packets in a single buffer in stream mode is 10. The driver currently uses 8 - which caused stack corruption, in the absence of any kind of OOB checking. Fixing this to the correct value of 10 fixes the module unload issue. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Te...
```diff diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 4528df4a5bdc..69bef1de71ae 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -324,7 +324,7 @@ static struct ath9k_htc_hif hif_usb = { static void ath9k_hi...
66b10e33f742bb45a29b7dbbc8dc85583d4c9ef6
Analyze and fix the following issue in the Linux kernel code: ath9k_htc: Fix RX URB reference count
Problem Details: RX URBs are automatically freed when the reference count drops to zero - this currently doesn't happen when usb_kill_anchored_urbs() is called during unload. Fix this by dropping the reference count by one during initial submission. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: ...
```diff diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 8838cdfcc497..4528df4a5bdc 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -652,6 +652,12 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb...
2626419ad5be1a054d350786b684b41d23de1538
Analyze and fix the following issue in the Linux kernel code: tcp: Set CHECKSUM_UNNECESSARY in tcp_init_nondata_skb
Problem Details: Back in commit 04a0551c87363f100b04d28d7a15a632b70e18e7 ("loopback: Drop obsolete ip_summed setting") we stopped setting CHECKSUM_UNNECESSARY in the loopback xmit. This is because such a setting was a lie since it implies that the checksum field of the packet is properly filled in. Instead what happe...
```diff diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index f181b78f2385..00afbb0c7e5f 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -349,6 +349,7 @@ static inline void TCP_ECN_send(struct sock *sk, struct sk_buff *skb, */ static void tcp_init_nondata_skb(struct sk_buff *skb, u32 seq...
1223c67c0938d2df309fde618bd82c87c8c1af04
Analyze and fix the following issue in the Linux kernel code: udp: fix for unicast RX path optimization
Problem Details: Commits 5051ebd275de672b807c28d93002c2fb0514a3c9 and 5051ebd275de672b807c28d93002c2fb0514a3c9 ("ipv[46]: udp: optimize unicast RX path") broke some programs. After upgrading a L2TP server to 2.6.33 it started to fail, tunnels going up an down, after the 10th tunnel came up. My modified rp-l2tp uses a...
```diff diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 7af756d0f931..24272c4cfbca 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -471,8 +471,8 @@ static struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, if (hslot->count < hslot2->count) goto begin; - result = udp4_lib_lookup2(net, INAD...
e4077e018b5ead3de9951fc01d8bf12eeeeeefed
Analyze and fix the following issue in the Linux kernel code: xfrm: Fix crashes in xfrm_lookup()
Problem Details: From: Timo Teräs <timo.teras@iki.fi> Happens because CONFIG_XFRM_SUB_POLICY is not enabled, and one of the helper functions I used did unexpected things in that case. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 625dd61ccbba..cccb049991a9 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -735,19 +735,12 @@ static inline void xfrm_pol_put(struct xfrm_policy *policy) xfrm_policy_destroy(policy); } -#ifdef CONFIG_XFRM_SUB_POLICY static inline void...