id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
9b952a3970c75bd0b46f73976b3613b3c68476f4
Analyze and fix the following issue in the Linux kernel code: powerpc/86xx: Fix GE SBC310 XMC site support
Problem Details: Correction to interrupt map mask for GE SBC310 XMC site and addition of alias. Signed-off-by: Malcolm Crossley <malcolm.crossley2@gefanuc.com> Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/boot/dts/gef_sbc310.dts b/arch/powerpc/boot/dts/gef_sbc310.dts index 8ea8d4ad270a..8e4efff3bda1 100644 --- a/arch/powerpc/boot/dts/gef_sbc310.dts +++ b/arch/powerpc/boot/dts/gef_sbc310.dts @@ -32,6 +32,7 @@ serial0 = &serial0; serial1 = &serial1; pci0 = &pci0; + pci1 = &pci1;...
dfa1a041094f4a6e5845a19a1b10e317676722e7
Analyze and fix the following issue in the Linux kernel code: drivers/net/tehuti.c: Reapply use DEFINE_PCI_DEVICE_TABLE()
Problem Details: Commit 865a21a5e3d1b384c559a44c898fcad93e187b82 overwrote commit a3aa18842a5303fc28fcc4d57dbd16618bd830a0 Fix it. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c index b295b926bc45..2517cc00ac2a 100644 --- a/drivers/net/tehuti.c +++ b/drivers/net/tehuti.c @@ -66,7 +66,7 @@ #include "tehuti.h" -static struct pci_device_id __devinitdata bdx_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE(bdx_pci_tbl) = { {0x1FC...
f1f6baf8f1df29be38003089787e378567ce0086
Analyze and fix the following issue in the Linux kernel code: x86, setup: When restoring the screen, update boot_params.screen_info
Problem Details: When we restore the screen content after a mode change, we return the cursor to its former position. However, we need to also update boot_params.screen_info accordingly, so that the decompression code knows where on the screen the cursor is. Just in case the video BIOS does something extra screwy, re...
```diff diff --git a/arch/x86/boot/video.c b/arch/x86/boot/video.c index f767164cd5df..43eda284d27f 100644 --- a/arch/x86/boot/video.c +++ b/arch/x86/boot/video.c @@ -298,11 +298,18 @@ static void restore_screen(void) } /* Restore cursor position */ + if (saved.curx >= xs) + saved.curx = xs-1; + if (saved.cury >...
28e0f13cd1be5452f795bea6f68657a702000e69
Analyze and fix the following issue in the Linux kernel code: omap3: Fix typo on IGEP v2 board
Problem Details: Fix typo on IGEP v2 board Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index f90b225ef888..2e81a6ef63e7 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -131,7 +131,7 @@ config MACH_CM_T35 select OMAP_MUX config MACH_IGEP0020 - bool "IGEP0020" + bool "IGEP v2 board" depends o...
0621d75698b3a485d7e31e9d964c76885628c015
Analyze and fix the following issue in the Linux kernel code: omap3evm: Fixes after moving to matrix_keypad
Problem Details: The keypad was not working properly after migrating to matrix_keypad. Swapped the row, col fields of the KEY() macro in the keymap definition to get it working again. Signed-off-by: Sanjeev Premi <premi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 3b473cf9cc5b..34655a61d5f2 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -448,20 +448,23 @@ static struct twl4030_usb_data omap3evm_usb_data = { static int board_ke...
d7ecfb3c2aa155c9f6152ebe91de92067d16ba6e
Analyze and fix the following issue in the Linux kernel code: sparc: Fix incorrect comparison in of_bus_ambapp_match()
Problem Details: Use type instead of name in comparison. Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c index 4c26eb59e742..53a58b349849 100644 --- a/arch/sparc/kernel/of_device_32.c +++ b/arch/sparc/kernel/of_device_32.c @@ -105,7 +105,7 @@ static unsigned long of_bus_sbus_get_flags(const u32 *addr, unsigned long flags) static in...
e76b69cc0133952c98aa1ad6330cacacd269fd64
Analyze and fix the following issue in the Linux kernel code: net: bug fix for vlan + gro issue
Problem Details: Traffic (tcp) doesnot start on a vlan interface when gro is enabled. Even the tcp handshake was not taking place. This is because, the eth_type_trans call before the netif_receive_skb in napi_gro_finish() resets the skb->dev to napi->dev from the previously set vlan netdev interface. This causes the ip...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index d1cf53d0d597..1968980f513a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2813,7 +2813,7 @@ gro_result_t napi_frags_finish(struct napi_struct *napi, struct sk_buff *skb, switch (ret) { case GRO_NORMAL: case GRO_HELD: - skb->protocol = eth_type_tran...
1d4bd947c501ea1da81300280fb6aeec2cca9335
Analyze and fix the following issue in the Linux kernel code: mv643xx_eth: fix missing validate_addr hook
Problem Details: Fix missing validate_addr hook. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index e24072a9a979..2733b0a3b703 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -2846,6 +2846,7 @@ static const struct net_device_ops mv643xx_eth_netdev_ops = { .ndo_start_xmit = mv643xx_eth_xmit, .ndo_set_rx_mode...
3ed215259f2d8cd937abc833dc76e309173aaa52
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Do not call sas_is_tlr_enabled for RAID volumes.
Problem Details: For RAID volume sas_is_tlr_enabled call will hit BUG at scsi_transport_sas.c:163, since raid volume is not visible to sas transport layer. Now Added check to make sure arg pass in sas_is_tlr_enabled() is not a volume. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley ...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 344a22ad2f33..c7ec3f174782 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -3062,8 +3062,9 @@ _scsih_qcmd(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *)) }...
22ed130719987d1081831dc1481160b216224ffd
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Fix warnings from smatch
Problem Details: The smatch tool from http://repo.or.cz/w/smatch.git warns about this: drivers/s390/scsi/zfcp_scsi.c +64 zfcp_scsi_command_fail(5) warn: variable dereferenced before check 'scpnt->device' drivers/s390/scsi/zfcp_scsi.c +64 zfcp_scsi_command_fail(5) warn: variable dereferenced before check 'scpnt->device...
```diff diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index e1e56f523116..1fce8a49fc60 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -60,10 +60,9 @@ static void zfcp_scsi_command_fail(struct scsi_cmnd *scpnt, int result) { struct zfcp_adapter *adapter ...
2c27c9a57c93a0757b9b4b0e7dc1abeaf1db1ce2
Analyze and fix the following issue in the Linux kernel code: ceph: fix typo in ceph_queue_writeback debug output
Problem Details: Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 58bdff09c2c1..d7d5d4923772 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1247,10 +1247,10 @@ void ceph_queue_writeback(struct inode *inode) { if (queue_work(ceph_inode_to_client(inode)->wb_wq, &ceph_inode(inode)->i_wb_work)) { - dout("c...
cb2992a60b7e73fbabe9ffe54056eed0022f2ed2
Analyze and fix the following issue in the Linux kernel code: doc: typo - Table 1-2 should refer to "status", not "statm"
Problem Details: Fixes a typo in proc.txt documentation. Table 1-2 should refer to "status", not "statm" Signed-off-by: Mulyadi Santosa <mulyadi.santosa@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 0d07513a67a6..bb314f60a76a 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -188,7 +188,7 @@ memory usage. Its seven fields are explained in Table 1-3. The stat file contains d...
696c1cff5254bb3ac280fbbb639c66e9ff20306e
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Don't assume response request present.
Problem Details: Fix NULL pointer dereference crash occurs in fc_lport_bsg_request() for bsg requests that do not contain a response request. Specifically, FC_BSG_HST_ADD_RPORT and FC_BSG_HST_DEL_RPORT bsg requests are not guaranteed to include a response request. Signed-off-by: Hugh Daschbach <hdasch@broadcom.com> Si...
```diff diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 0b165024a219..7ec8ce75007c 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -1800,7 +1800,8 @@ int fc_lport_bsg_request(struct fc_bsg_job *job) u32 did; job->reply->reply_payload_rcv_len = 0; ...
5b7a381e55d187e50a148b750abf4525cadd3a4f
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Fix e_d_tov ns -> ms scaling factor in PLOGI response.
Problem Details: Both PLOGI and RTV response processing conditionally scale e_d_tov, but use different scaling factors. The scaling factor is correct in RTV response processing. Bring PLOGI e_d_tov scaling in line with RTV common service parameter inspection. Signed-off-by: Hugh Daschbach <hdasch@broadcom.com> Acked...
```diff diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 02300523b234..97923bb07765 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -623,7 +623,7 @@ static void fc_rport_plogi_resp(struct fc_seq *sp, struct fc_frame *fp, tov = ntohl(plp->fl_csp.sp_e...
72100cc43262fa39821b3debc04be1a7a17b3428
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.9: Fix locking and memory issues
Problem Details: - Use the hbalock when changing the fc_flag. - Use the host_lock when changeing the sli_flag. - Prevent NULL pointer dereference after dma_alloc_coherent failure. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index b890e2dc15db..2359d0bfb734 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -757,11 +757,13 @@ lpfc_linkdown(struct lpfc_hba *phba) spin_lock_irq(&phba->hbalock); phba->fcf.fcf_fla...
08326dbe7b5825295ec3711eec53b093549749e5
Analyze and fix the following issue in the Linux kernel code: SiS190/191 half-duplex initialization fix
Problem Details: Adds half-duplex specific setup code (taken from SiS own GPL driver). Without those, half-duplex connections are very unreliable, often working on small transfers and failing after a while. Signed-off-by: Riccardo Ghetta <birrachiara@tin.it> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 8c4e38f9ebf7..bf2ffbb913ff 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c @@ -47,7 +47,7 @@ #define PHY_ID_ANY 0x1f #define MII_REG_ANY 0x1f -#define DRV_VERSION "1.3" +#define DRV_VERSION "1.4" #define DRV_NAME "sis190" #de...
0c43f43f48c5c60d62c4d26917da3ee71df464ea
Analyze and fix the following issue in the Linux kernel code: bnx2x: fix in 57710 self-test
Problem Details: Bug fix: Use the last unicast entry in CAM in bnx2x_test_int(). Relevant for 57710 only. Author: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed...
```diff diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index ccdc3fe13414..24fe083ee1be 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -10433,7 +10433,8 @@ static int bnx2x_test_intr(struct bnx2x *bp) config->hdr.length = 0; if (CHIP_IS_E1(bp)) - config->hdr.offset = (B...
d43a7e67ae2f911765b3d5b6cbb85221a9ffd0a4
Analyze and fix the following issue in the Linux kernel code: bnx2x: Do not allow enabling LRO if disable_tpa=1
Problem Details: Bug fix: Do not allow enabling LRO if disable_tpa=1. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 16685a153c10..ccdc3fe13414 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -9968,12 +9968,14 @@ static int bnx2x_set_flags(struct net_device *dev, u32 data) /* TPA requires Rx CSUM offloading */ if ((data & ETH_...
f1e1a199f3a68a32cf86095b3650d761ee8798b9
Analyze and fix the following issue in the Linux kernel code: bnx2x: clean up in case of error in bnx2x_init_hw()
Problem Details: Bug fix: clean up MCP state in case of error in bnx2x_init_hw(). Author: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller...
```diff diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index d7aef840a1d5..16685a153c10 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -7530,6 +7530,9 @@ static int bnx2x_nic_load(struct bnx2x *bp, int load_mode) rc = bnx2x_init_hw(bp, load_code); if (rc) { BNX2X_ERR("H...
6cbe5065bb367d4c8db0a71d2e828995bcfae336
Analyze and fix the following issue in the Linux kernel code: bnx2x: Properly release allocated MSI-X/MSI vectors
Problem Details: Bug fix: Properly release allocated MSI-X/MSI vectors if ifup failed due to lack of memory. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 6d8559052ee6..d7aef840a1d5 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -6938,19 +6938,21 @@ static void bnx2x_free_msix_irqs(struct bnx2x *bp) } } -static void bnx2x_free_irq(struct bnx2x *bp) +static void bn...
89420424fce28769c338909393518087befe8b37
Analyze and fix the following issue in the Linux kernel code: be2net: fix rx-path to ignore a flush completion
Problem Details: The flush compl (compl with numfrags == 0; no data) is rcvd from hw to indicate completion of RXQ destory operation. Fix the RX path to not process it as RX data. Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 43dbe288a5ef..2c3deadd2d83 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c @@ -680,17 +680,17 @@ static void be_rx_compl_discard(struct be_adapter *adapter, * indicated by rxcp. */ static void skb_fill_r...
aa13bd6ef4ddd81080f972220fae30eb28f65b17
Analyze and fix the following issue in the Linux kernel code: qlge: Fix occasional loopback test failure.
Problem Details: On some servers we see the cleaning of the RX queue finish before all the loopback packets are sent out. This delay allows the queues to settle before checking for successful completion. Also, delay completion so link has time to come back up. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-...
```diff diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c index 4f26afeb0f38..05b8bde9980d 100644 --- a/drivers/net/qlge/qlge_ethtool.c +++ b/drivers/net/qlge/qlge_ethtool.c @@ -503,7 +503,8 @@ static int ql_run_loopback_test(struct ql_adapter *qdev) return -EPIPE; atomic_inc(&qdev->...
801e9096c566d40d2e7c9903dc902fa01a5a0b36
Analyze and fix the following issue in the Linux kernel code: qlge: Fix bonding mac address bug.
Problem Details: Use local copy of current mac address when initializing. In bonding testing we saw cases where dev_addr was out of data causing failover errors. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index 57d135e3bfaf..8b742b639ceb 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h @@ -2139,6 +2139,8 @@ struct ql_adapter { u16 device_id; struct timer_list timer; atomic_t lb_count; + /* Keep local copy of current mac addres...
c0c56955e7325ba2f910c760111457adc21ef0d4
Analyze and fix the following issue in the Linux kernel code: qlge: Fix dropping of large non-TCP/UDP frames.
Problem Details: This was found with pings that were large enough to span multiple rx buffers. The split frame logic handles this case nicely. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 2c052caee884..0541e777694d 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -2066,21 +2066,11 @@ static unsigned long ql_process_mac_rx_intr(struct ql_adapter *qdev, ql_process_mac_rx_page(qdev, rx_r...
8ea7a37c5a312bfee51ff7f12f78efe4fbc901cc
Analyze and fix the following issue in the Linux kernel code: ll_temac: Fix MAC address configuration from userland
Problem Details: A userland command to set the LLTEMAC MAC address, i.e. "ifconfig eth0 hw addr xx:yy:zz:pp:dd:qq", results in a device address of 00:01:xx:yy:zz:pp. Correct this. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index d7eb24cc2648..e53440253748 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c @@ -224,6 +224,13 @@ static int temac_set_mac_address(struct net_device *ndev, void *address) return 0; } +static int netdev_set...
8a5ce54562f296b1996813a413b0f2307ec9351a
Analyze and fix the following issue in the Linux kernel code: xt_hashlimit: fix locking
Problem Details: Commit 2eff25c18c3d332d3c4dd98f2ac9b7114e9771b0 (netfilter: xt_hashlimit: fix race condition and simplify locking) added a mutex deadlock : htable_create() is called with hashlimit_mutex already locked Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft...
```diff diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index e47fb805ffb4..d952806b6469 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c @@ -262,9 +262,7 @@ static int htable_create_v0(struct net *net, struct xt_hashlimit_info *minfo, u_ hinfo->timer.expires = jif...
b3925514f6f6878e3f671fb6990874e731a26d02
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: fix compile warning due to invalid extHwConfig
Problem Details: If the nvram is invalid qla4xxx tries to set Asuint32_t based on the card type. If the card type is not listed then Asuint32_t is going to be gargabe. This just fixes that if/elseif by adding a else to catch the case for new hardware that might not be listed yet. Signed-off-by: Mike Christie <michaelc...
```diff diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index af8c3233e8ae..92329a461c68 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c @@ -844,10 +844,10 @@ static int qla4xxx_config_nvram(struct scsi_qla_host *ha) DEBUG2(printk("scsi%ld: %s: Get EEP...
92ed4d69934a1281abcc10c6a82274a04651a260
Analyze and fix the following issue in the Linux kernel code: [SCSI] libiscsi: reset cmd timer if cmds are making progress
Problem Details: This patch resets the cmd timer if cmds started before the timedout command are making progress. The idea is that the cmd probably timed out because we are trying to exeucte too many commands. If it turns out that the device the IO timedout on was bad or the cmd just got screwed up but other IO/devs we...
```diff diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index c28a712fd4db..703eb6a88790 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -1919,10 +1919,11 @@ static int iscsi_has_ping_timed_out(struct iscsi_conn *conn) static enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct s...
81fc03909a80bead8f553287a2b749a1d29dca64
Analyze and fix the following issue in the Linux kernel code: kmemcheck: Test the full object in kmemcheck_is_obj_initialized()
Problem Details: This is a fix for bug #14845 (bugzilla.kernel.org). The update_checksum() function in mm/kmemleak.c calls kmemcheck_is_obj_initialised() before scanning an object. When KMEMCHECK_PARTIAL_OK is enabled, this function returns true. However, the crc32_le() reads smaller intervals (32-bit) for which kmemle...
```diff diff --git a/arch/x86/mm/kmemcheck/kmemcheck.c b/arch/x86/mm/kmemcheck/kmemcheck.c index 8cc183344140..b3b531a4f8e5 100644 --- a/arch/x86/mm/kmemcheck/kmemcheck.c +++ b/arch/x86/mm/kmemcheck/kmemcheck.c @@ -337,7 +337,7 @@ bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size) if (!shadow) retu...
2a8ccf3187aff6defed72f7d8fa562ff2f69ef2a
Analyze and fix the following issue in the Linux kernel code: [SCSI] hpsa: fix bug in adjust_hpsa_scsi_table
Problem Details: fix bug in adjust_hpsa_scsi_table which caused devices which have changed size, etc. to do the wrong thing. The problem was as follows: The driver maintains its current idea of what devices are present in the h->dev[] array. When it updates this array, it scans the hardware, and produces a new list ...
```diff diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 2764cb605693..6b40221a7220 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -675,6 +675,24 @@ lun_assigned: return 0; } +/* Replace an entry from h->dev[] array. */ +static void hpsa_scsi_replace_entry(struct ctlr_info *h, int hostno...
23231048309ea8eed0189f1eb8f870f08703cac0
Analyze and fix the following issue in the Linux kernel code: [SCSI] hpsa: Fix hpsa_find_scsi_entry so that it doesn't try to dereference NULL pointers
Problem Details: Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 42295c49682f..2764cb605693 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -776,6 +776,8 @@ static int hpsa_scsi_find_entry(struct hpsa_scsi_dev_t *needle, #define DEVICE_CHANGED 1 #define DEVICE_SAME 2 for (i = 0; i < haystack_size;...
339b2b14c634da58626eb742370d915591c2fb6d
Analyze and fix the following issue in the Linux kernel code: [SCSI] hpsa: Fix p1210m LUN assignment.
Problem Details: The p1210m responsds to SCSI report LUNs, unlike traditional Smart Array controllers. This means that the bus, target, and lun assignments done by the driver cannot be arbitrary, but must match what SCSI REPORT LUNS returns. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-b...
```diff diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 46055e2490f1..cc9e92a3be22 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -458,6 +458,15 @@ static inline int is_logical_dev_addr_mode(unsigned char scsi3addr[]) return (scsi3addr[3] & 0xC0) == 0x40; } +static inline int is_scsi_re...
84ca0be2a2cd9730683310b831db9d2fa60b3b0b
Analyze and fix the following issue in the Linux kernel code: [SCSI] hpsa: fix some debug printks to use dev_dbg instead
Problem Details: Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h index da8dd3e619cb..cdac95b0e65f 100644 --- a/drivers/scsi/hpsa.h +++ b/drivers/scsi/hpsa.h @@ -173,10 +173,7 @@ struct ctlr_info { static void SA5_submit_command(struct ctlr_info *h, struct CommandList *c) { -#ifdef HPSA_DEBUG - printk(KERN_WARNING "h...
a9a44cbd4b41bf4b9535c1eb7f5e942d8b2e9d54
Analyze and fix the following issue in the Linux kernel code: [SCSI] hpsa: remove unwanted debug code
Problem Details: Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index bd081fedc3a7..45942007bdc7 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -1580,9 +1580,6 @@ static int hpsa_gather_lun_info(struct ctlr_info *h, } memcpy(nphysicals, &physdev->LUNListLength[0], sizeof(*nphysicals)); *nphysicals =...
466dc22409b97343c6b2168094d5f867093a70c2
Analyze and fix the following issue in the Linux kernel code: [SCSI] hpsa: fix typo in comments
Problem Details: Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h index 12d71387ed9a..2df1c661ce10 100644 --- a/drivers/scsi/hpsa_cmd.h +++ b/drivers/scsi/hpsa_cmd.h @@ -269,7 +269,7 @@ struct ErrorInfo { struct ctlr_info; /* defined in hpsa.h */ /* The size of this structure needs to be divisible by 8 - * od ...
780a3762fb9208748baac5aa9c63a4d4c9287753
Analyze and fix the following issue in the Linux kernel code: [SCSI] megaraid_sas: Zero pad_0 in mfi structure
Problem Details: Add the pad_0 in mfi frame structure to 0 to fix the context value larger than 32bit value issue. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index 708ea3157b60..18d3a312c29f 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c @@ -843,6 +843,7 @@ megasas_build_dcdb(struct megasas_instance *instance, struct scsi_cmnd *scp, ...
9794b146fa7b93f8ab74fb62d67fdefad760769f
Analyze and fix the following issue in the Linux kernel code: ceph: fix memory leak when destroying osdmap with pg_temp mappings
Problem Details: Also move _lookup_pg_mapping into a helper. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c index a6afe3836f7e..443fdcdb19c4 100644 --- a/fs/ceph/osdmap.c +++ b/fs/ceph/osdmap.c @@ -321,8 +321,13 @@ void ceph_osdmap_destroy(struct ceph_osdmap *map) dout("osdmap_destroy %p\n", map); if (map->crush) crush_destroy(map->crush); - while (!RB_EMPTY_ROO...
7c1332b8cb5b27656cf6ab1f5fe808a8eb8bb2c0
Analyze and fix the following issue in the Linux kernel code: ceph: fix iterate_caps removal race
Problem Details: We need to be able to iterate over all caps on a session with a possibly slow callback on each cap. To allow this, we used to prevent cap reordering while we were iterating. However, we were not safe from races with removal: removing the 'next' cap would make the next pointer from list_for_each_entry...
```diff diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index f94b56faba3b..4958a2ef3e04 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -266,12 +266,11 @@ static struct ceph_cap *get_cap(struct ceph_cap_reservation *ctx) return cap; } -static void put_cap(struct ceph_cap *cap, - struct ceph_cap_reservation ...
b72c7d543589736d43da531566490dd31572f5ca
Analyze and fix the following issue in the Linux kernel code: omap: Remove DEBUG_FS dependency for mux name checking
Problem Details: The check for a valid mux name should be performed regardless of whether DEBUG_FS is enabled or not. Otherwise without DEBUG_FS, we get: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: Oops: 5 [#1] last sysfs file: Mo...
```diff diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 5fedc50c58e4..5fef73f4743d 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c @@ -961,16 +961,14 @@ static void __init omap_mux_init_list(struct omap_mux *superset) while (superset->reg_offset != OMAP_MUX_TERMINATOR)...
c3bfc96ef7366aa996fb8286a36f3333a3b4ff25
Analyze and fix the following issue in the Linux kernel code: pcmcia: avoid sysfs-related lockup for cardbus
Problem Details: In cb_free(), we remove some sysfs files -- other sysfs files might grab ops_mutex, so we cannot hold it while removing sysfs files. This fixes http://lkml.org/lkml/2010/1/17/88 . Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index d529e02c2d54..9a49c394f04f 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c @@ -400,10 +400,19 @@ static void socket_shutdown(struct pcmcia_socket *s) s->lock_count = 0; kfree(s->fake_cis); s->fake_cis = NULL; + s->functions = 0; + + /...
aa584ca4cdd8db370a524c61fd3ca408303281e9
Analyze and fix the following issue in the Linux kernel code: pcmcia: use state machine for extended requery
Problem Details: The requery callback now also handles the addition of a second pseudo multifunction device. Avoids messing with dev_{g,s}et_drvdata(), and fixes any workqueue <-> skt_mutex deadlock. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 5400e20c664e..9968c0d3a5fb 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -244,23 +244,11 @@ static void pcmcia_release_dev(struct device *dev) kfree(p_dev); } -static void pcmcia_add_device_later(struct pcmcia_socket *s, int mfc) ...
af461fc1875b6ec18e23b5f670af36c4ed35c84e
Analyze and fix the following issue in the Linux kernel code: pcmcia: delay re-scanning and re-querying of PCMCIA bus
Problem Details: After a CIS update -- or the finalization of the resource database --, proceed with the re-scanning or re-querying of PCMCIA cards only in a separate thread to avoid deadlocks. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 14de287a8bf6..17a5da32cce1 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c @@ -1670,15 +1670,7 @@ static ssize_t pccard_store_cis(struct kobject *kobj, if (error) return -EIO; - mutex_lock(&s->skt_mutex); - if ((s->ca...
f971dbd5da4e2fbf756d07b938a9c65a9c75178b
Analyze and fix the following issue in the Linux kernel code: pcmcia: use pccardd to handle eject, insert, suspend and resume requests
Problem Details: This avoids any sysfs-related deadlock (or lockdep warning), such as reported at http://lkml.org/lkml/2010/1/17/88 . Reported-by: Ming Lei <tom.leiming@gmail.com> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 7ba45b0cca6b..823ecda32216 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c @@ -505,7 +505,10 @@ static int socket_insert(struct pcmcia_socket *skt) dev_dbg(&skt->dev, "insert\n"); mutex_lock(&skt->ops_mutex); - WARN_ON(skt->state & SO...
c6958fdb041db6ed77f24e871dd4af5f059d1a2b
Analyze and fix the following issue in the Linux kernel code: pcmcia/i82365: fix typos in comments
Problem Details: Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/drivers/pcmcia/i82365.h b/drivers/pcmcia/i82365.h index 622860c689d9..849ef1b5d687 100644 --- a/drivers/pcmcia/i82365.h +++ b/drivers/pcmcia/i82365.h @@ -77,8 +77,8 @@ #define I365_VPP2_5V 0x04 /* Vpp2 = 5.0v */ #define I365_VPP2_12V 0x08 /* Vpp2 = 12.0v */ #define I365_VPP1_MASK 0x03 /* Mask fo...
0d418dfae81987f09a2c13778318d56abee49529
Analyze and fix the following issue in the Linux kernel code: pcmcia/omap_cf: don't redefine SZ_2K
Problem Details: This fixes: drivers/pcmcia/omap_cf.c:74:1: warning: "SZ_2K" redefined Since c1191b0 ([ARM] Kirkwood: create a mapping for the Security Accelerator SRAM) SZ_2K is defined in arch/arm/include/asm/sizes.h. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Dominik Brodo...
```diff diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index 663781d20129..3ef991552398 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c @@ -71,8 +71,6 @@ struct omap_cf_socket { #define POLL_INTERVAL (2 * HZ) -#define SZ_2K (2 * SZ_1K) - /*--------------------------------...
7432a5b6c7e38f5d89e890c6fcc00990006ab997
Analyze and fix the following issue in the Linux kernel code: pcmcia/at91_cf: don't redefine SZ_2K
Problem Details: This fixes: drivers/pcmcia/at91_cf.c:55:1: warning: "SZ_2K" redefined Since c1191b0 ([ARM] Kirkwood: create a mapping for the Security Accelerator SRAM) SZ_2K is defined in arch/arm/include/asm/sizes.h. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Andrew Victor <lin...
```diff diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index e1dccedc5960..5d228071ec69 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c @@ -52,8 +52,6 @@ struct at91_cf_socket { unsigned long phys_baseaddr; }; -#define SZ_2K (2 * SZ_1K) - static inline int at91_cf_present...
35169529093be3bbef70afd3c4125e35cece7e03
Analyze and fix the following issue in the Linux kernel code: pcmcia/yenta: add module parameter for O2 speedups
Problem Details: O2-bridges can do read prefetch and write burst. However, for some combinations of older bridges and cards, this causes problems, so it is disabled for those bridges. Now, as some users know their setup works with the speedups enabled, a new parameter is introduced to the driver. Now, a user can specif...
```diff diff --git a/drivers/pcmcia/o2micro.h b/drivers/pcmcia/o2micro.h index 624442fc0d35..e74bebac2695 100644 --- a/drivers/pcmcia/o2micro.h +++ b/drivers/pcmcia/o2micro.h @@ -116,13 +116,12 @@ static int o2micro_override(struct yenta_socket *socket) * from Eric Still, 02Micro. */ u8 a, b; + bool use_speedup...
9d9c98e89ee24b7d42f72c4f663c4d644d1c3f81
Analyze and fix the following issue in the Linux kernel code: pcmcia: fix yenta dependency on PCCARD_NONSTATIC
Problem Details: With CONFIG_PCMCIA=m and CONFIG_YENTA=y, we get drivers/built-in.o: In function `yenta_probe': yenta_socket.c:(.devinit.text+0x1e582): undefined reference to `pccard_nonstatic_ops' This is because select PCCARD_NONSTATIC if PCMCIA sets PCCARD_NONSTATIC = min(YENTA, PCMCIA). Change it to 'if PCMCIA!...
```diff diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig index efc51b9e811e..e8f35dac2d51 100644 --- a/drivers/pcmcia/Kconfig +++ b/drivers/pcmcia/Kconfig @@ -84,7 +84,7 @@ config YENTA tristate "CardBus yenta-compatible bridge support" depends on PCI select CARDBUS if !EMBEDDED - select PCCARD_NONSTA...
b248df30fca3aeee1d650b570e8cbc4e8cc45710
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Don't assume response request present.
Problem Details: Fix NULL pointer dereference crash occurs in fc_lport_bsg_request() for bsg requests that do not contain a response request. Specifically, FC_BSG_HST_ADD_RPORT and FC_BSG_HST_DEL_RPORT bsg requests are not guaranteed to include a response request. Signed-off-by: Hugh Daschbach <hdasch@broadcom.com> Si...
```diff diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 0b165024a219..7ec8ce75007c 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -1800,7 +1800,8 @@ int fc_lport_bsg_request(struct fc_bsg_job *job) u32 did; job->reply->reply_payload_rcv_len = 0; ...
3b709150b73205710d05128b925090aac048ed23
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Fix e_d_tov ns -> ms scaling factor in PLOGI response.
Problem Details: Both PLOGI and RTV response processing conditionally scale e_d_tov, but use different scaling factors. The scaling factor is correct in RTV response processing. Bring PLOGI e_d_tov scaling in line with RTV common service parameter inspection. Signed-off-by: Hugh Daschbach <hdasch@broadcom.com> Acked...
```diff diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 02300523b234..97923bb07765 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -623,7 +623,7 @@ static void fc_rport_plogi_resp(struct fc_seq *sp, struct fc_frame *fp, tov = ntohl(plp->fl_csp.sp_e...
6c5f1fed49f96a0600aa9a97ac3faf972c33a341
Analyze and fix the following issue in the Linux kernel code: ASoC: Make pmdown_time a long
Problem Details: Fixes a warning. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/include/sound/soc.h b/include/sound/soc.h index d9d88dd9720d..5d234a8c2506 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -521,7 +521,7 @@ struct snd_soc_card { int (*set_bias_level)(struct snd_soc_card *, enum snd_soc_bias_level level); - int pmdown_time; + long pmdown...
d24720a45ad2928f687c6371482cdfba19b74fc5
Analyze and fix the following issue in the Linux kernel code: powerpc/mpc5121: correct DIU compatible property
Problem Details: The DIU driver should bind against "fsl,mpc5121-diu" directly. Add this compatible property to the match table and fix DTS and platform code accordingly. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/arch/powerpc/boot/dts/mpc5121ads.dts b/arch/powerpc/boot/dts/mpc5121ads.dts index d2b2db7cb4a2..c9ef6bbe26cf 100644 --- a/arch/powerpc/boot/dts/mpc5121ads.dts +++ b/arch/powerpc/boot/dts/mpc5121ads.dts @@ -255,7 +255,7 @@ }; display@2100 { - compatible = "fsl,mpc5121-diu", "fsl,diu"; + ...
57ab12e418ec4fe24c11788bb1bbdabb29d05679
Analyze and fix the following issue in the Linux kernel code: HID: usbhid: initialize interface pointers early enough
Problem Details: Move the initialization of USB interface pointers from _start() over to _probe() callback, which is where it belongs. This fixes case where interface is NULL when parsing of report descriptor fails. LKML-Reference: <20100213135720.603e5f64@neptune.home> Reported-by: Alan Stern <stern@rowland.harvard....
```diff diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 74bd3ca220d3..ceaf4a14b67b 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -1005,9 +1005,6 @@ static int usbhid_start(struct hid_device *hid) spin_lock_init(&usbhid->lock); - usbhid->intf = i...
e8d400a933fa44e2fba3849b084e1ae5814d7fca
Analyze and fix the following issue in the Linux kernel code: kbuild: fix a couple of typos in Documentation
Problem Details: Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index 6f8c1cabbc5d..84725b72675a 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt @@ -65,7 +65,7 @@ CROSS_COMPILE Specify an optional fixed part of the binutils filename. CROSS_COMPILE can be a par...
f81b1be40c44b33b9706d64c117edd29e627ad12
Analyze and fix the following issue in the Linux kernel code: tags: include headers before source files
Problem Details: Currently looking up a structure definition in TAGS / tags takes one to one of multiple "static struct X" definitions in arch sources, which makes it for many structs practically impossible to get to the required header. This patch changes the order of sources being tagged to first scan architecture in...
```diff diff --git a/scripts/tags.sh b/scripts/tags.sh index 1a0c44d7c4a7..c1220419e59d 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -32,13 +32,20 @@ fi # find sources in arch/$ARCH find_arch_sources() { - find ${tree}arch/$1 $ignore -name "$2" -print; + for i in $archincludedir; do + prune="$prune -wholen...
b721e68bdc5b39c51bf6a1469f8d3663fbe03243
Analyze and fix the following issue in the Linux kernel code: ALSA: Echoaudio, fix Guru Meditation #00000005.48454C50
Problem Details: This patch fixes a division by zero error in the irq handler. There is a small window between the hw_params() callback and when runtime->frame_bits is set by ALSA middle layer. When another substream is already running, if an interrupt is delivered during that window the irq handler calls pcm_pointer(...
```diff diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index 1305f7ca02c3..641d7f07392c 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c @@ -1821,7 +1821,9 @@ static irqreturn_t snd_echo_interrupt(int irq, void *dev_id) /* The hardware doesn't tell us ...
0065b96775f1eff167a2c3343a41582e8fab4c6c
Analyze and fix the following issue in the Linux kernel code: sh: Fix up dynamically created write-through PMB mappings.
Problem Details: Write-through PMB mappings still require the cache bit to be set, even if they're to be flagged with a different cache policy and bufferability bit. To reduce some of the confusion surrounding the flag encoding we centralize the cache mask based on the system cache policy while we're at it. Signed-off...
```diff diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index f2ad6e374b64..cb808a8aaffc 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c @@ -101,6 +101,26 @@ static void pmb_free(struct pmb_entry *pmbe) pmbe->entry = PMB_NO_ENTRY; } +/* + * Ensure that the PMB entries match our cache configuration. + * + * W...
5ce6e9dbe6805ab8ee67e21936d17f431adc63c6
Analyze and fix the following issue in the Linux kernel code: ceph: fix authentication races, auth_none oops
Problem Details: Call __validate_auth() under monc->mutex, and use helper for initial hello so that the pending_auth flag is set. This fixes possible races in which we have an authentication request (hello or otherwise) pending and send another one. In particular, with auth_none, we _never_ want to call ceph_build_au...
```diff diff --git a/fs/ceph/mon_client.c b/fs/ceph/mon_client.c index 542276e60798..40d7d90bbed1 100644 --- a/fs/ceph/mon_client.c +++ b/fs/ceph/mon_client.c @@ -95,6 +95,18 @@ int ceph_monmap_contains(struct ceph_monmap *m, struct ceph_entity_addr *addr) return 0; } +/* + * Send an auth request. + */ +static voi...
44ca18f2682eb1cfbed153849adedb79e3e19790
Analyze and fix the following issue in the Linux kernel code: ceph: use rbtree for mds requests
Problem Details: The rbtree is a more appropriate data structure than a radix_tree. It avoids extra memory usage and simplifies the code. It also fixes a bug where the debugfs 'mdsc' file wasn't including the most recent mds request. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index fba44b2a6086..cd5dd805e4be 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c @@ -142,21 +142,16 @@ static int monc_show(struct seq_file *s, void *p) static int mdsc_show(struct seq_file *s, void *p) { struct ceph_client *client = s->private; - st...
91e45ce38946a8efa21fefbc65d023ca3c0b434f
Analyze and fix the following issue in the Linux kernel code: ceph: cancel delayed work when closing connection
Problem Details: This ensures that if/when we reopen the connection, we can requeue work on the connection immediately, without waiting for an old timer to expire. Queue new delayed work inside con->mutex to avoid any race. This fixes problems with clients failing to reconnect to the MDS due to the client_reconnect me...
```diff diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index acf383f6a9cd..ca2ad0e5bb28 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c @@ -344,6 +344,7 @@ void ceph_con_close(struct ceph_connection *con) clear_bit(STANDBY, &con->state); /* avoid connect_seq bump */ mutex_lock(&con->mutex); re...
e2663ab60de59d20fa33da3528f6d5359f8eb003
Analyze and fix the following issue in the Linux kernel code: ceph: allow connection to be reopened by fault callback
Problem Details: Fix the messenger to allow a ceph_con_open() during the fault callback. Previously the work wasn't getting queued on the connection because the fault path avoids requeued work (normally spurious). Loop on reopening by checking for the OPENING state bit. This fixes OSD reconnects when a TCP connection...
```diff diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 44bdaf439924..acf383f6a9cd 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c @@ -1808,7 +1808,7 @@ done: clear_bit(BUSY, &con->state); dout("con->state=%lu\n", con->state); if (test_bit(QUEUED, &con->state)) { - if (!backoff) { + if (...
580e0ad21d6d6f932461d24b47041e3dd499c23f
Analyze and fix the following issue in the Linux kernel code: core: Move early_res from arch/x86 to kernel/
Problem Details: This makes the range reservation feature available to other architectures. -v2: add get_max_mapped, max_pfn_mapped only defined in x86... to fix PPC compiling -v3: according to hpa, add CONFIG_HAVE_EARLY_RES -v4: fix typo about EARLY_RES in config Signed-off-by: Yinghai Lu <yinghai@kernel.org> L...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 29f9efb74fc7..0e9f8b10de52 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -183,6 +183,9 @@ config ARCH_SUPPORTS_OPTIMIZED_INLINING config ARCH_SUPPORTS_DEBUG_PAGEALLOC def_bool y +config HAVE_EARLY_RES + def_bool y + config HAVE_INTEL_TXT d...
7bdda6209f224aa784a036df54b22cb338d2e859
Analyze and fix the following issue in the Linux kernel code: sh: Fix up more 64-bit pgprot truncation on SH-X2 TLB.
Problem Details: Both the store queue API and the PMB remapping take unsigned long for their pgprot flags, which cuts off the extended protection bits. In the case of the PMB this isn't really a problem since the cache attribute bits that we care about are all in the lower 32-bits, but we do it just to be safe. The sto...
```diff diff --git a/arch/sh/include/asm/mmu.h b/arch/sh/include/asm/mmu.h index 2fcbedb55002..151bc922701b 100644 --- a/arch/sh/include/asm/mmu.h +++ b/arch/sh/include/asm/mmu.h @@ -33,6 +33,7 @@ #ifndef __ASSEMBLY__ #include <linux/errno.h> #include <linux/threads.h> +#include <asm/page.h> /* Default "unsigned ...
838a4a9dcee0cbaeb0943531da00ac44d578f315
Analyze and fix the following issue in the Linux kernel code: sh: fix sh7723 SDHI support using INTC force_disable
Problem Details: Update the sh7723 INTC tables with force_enable support to mask out pending unsupported SDHI interrupt sources. Without this patch the kernel locks up due to a pending SDHI interrupt that the tmio_mmc driver cannot handle. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <let...
```diff diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 7b90ebcfa20e..85c61f624702 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -602,6 +602,7 @@ void l2_cache_init(void) enum { UNUSED=0, ENABLED, + DISABLED, ...
e9125ac0bf78bc19181359a3411d2e2bb757942d
Analyze and fix the following issue in the Linux kernel code: sh: fix sh7722 SDHI support using INTC force_disable
Problem Details: Update the sh7722 INTC tables with force_enable support to mask out pending unsupported SDHI interrupt sources. Without this patch the kernel locks up due to a pending SDHI interrupt that the tmio_mmc driver cannot handle. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <let...
```diff diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 0949135a125c..ef3f97827808 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c @@ -447,6 +447,7 @@ void __init plat_early_device_setup(void) enum { UNUSED=0, ENABL...
3bffb6529cf10d48a97ac0d6d789986894c25c37
Analyze and fix the following issue in the Linux kernel code: powerpc/booke: Add support for advanced debug registers
Problem Details: powerpc/booke: Add support for advanced debug registers From: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Based on patches originally written by Torez Smith. This patch defines context switch and trap related functionality for BookE specific Debug Registers. It adds support to ptrace() for setting and...
```diff diff --git a/arch/powerpc/include/asm/system.h b/arch/powerpc/include/asm/system.h index aa59f5b794e8..a6297c67c3d6 100644 --- a/arch/powerpc/include/asm/system.h +++ b/arch/powerpc/include/asm/system.h @@ -112,8 +112,13 @@ static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; } #endif ...
99396ac105f54fe3584374c7c70a5cb6def766e6
Analyze and fix the following issue in the Linux kernel code: powerpc/booke: Add definitions for advanced debug registers
Problem Details: powerpc/booke: Add definitions for advanced debug registers From: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Based on patches originally written by Torez Smith. This patch adds additional definitions for BookE Debug Registers to the reg_booke.h header file. Signed-off-by: Dave Kleikamp <shaggy@linux...
```diff diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 9eed29eee604..221ba6240464 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -161,9 +161,41 @@ struct thread_struct { #ifdef CONFIG_PPC32 void *pgdir; /* root of page...
3162d92dfb79a0b5fc03380b8819fa5f870ebf1e
Analyze and fix the following issue in the Linux kernel code: powerpc: Extended ptrace interface
Problem Details: powerpc: Extended ptrace interface From: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Based on patches originally written by Torez Smith. Add a new extended ptrace interface so that user-space has a single interface for powerpc, without having to know the specific layout of the debug registers. Implem...
```diff diff --git a/Documentation/powerpc/ptrace.txt b/Documentation/powerpc/ptrace.txt new file mode 100644 index 000000000000..f4a5499b7bc6 --- /dev/null +++ b/Documentation/powerpc/ptrace.txt @@ -0,0 +1,134 @@ +GDB intends to support the following hardware debug features of BookE +processors: + +4 hardware breakpoi...
172ae2e7f8ff9053905a36672453a6d2ff95b182
Analyze and fix the following issue in the Linux kernel code: powerpc/booke: Introduce new CONFIG options for advanced debug registers
Problem Details: powerpc/booke: Introduce new CONFIG options for advanced debug registers From: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Introduce new config options to simplify the ifdefs pertaining to the advanced debug registers for booke and 40x processors: CONFIG_PPC_ADV_DEBUG_REGS - boolean: true for dac-base...
```diff diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index bf15e7b4cd3d..654bba5cf6b4 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -240,6 +240,33 @@ config PPC_OF_PLATFORM_PCI config ARCH_SUPPORTS_DEBUG_PAGEALLOC def_bool y +config PPC_ADV_DEBUG_REGS + bool + depends on 40x || BOOKE ...
63e6c5b8102af7df7a5e1cebbd865d711645886a
Analyze and fix the following issue in the Linux kernel code: powerpc: Pair loads and stores in copy_4k_page
Problem Details: A number of our chips like loads and stores to be paired. A small kernel module testcase shows the improvement of pairing loads and stores in copy_4k_page: POWER6: +9% POWER7: +1.5% #include <linux/module.h> #include <linux/mm.h> #define ITERATIONS 10000000 static int __init copypage_init(void) { ...
```diff diff --git a/arch/powerpc/lib/copypage_64.S b/arch/powerpc/lib/copypage_64.S index e68beac0a171..4d4eeb900486 100644 --- a/arch/powerpc/lib/copypage_64.S +++ b/arch/powerpc/lib/copypage_64.S @@ -43,62 +43,62 @@ END_FTR_SECTION_IFSET(CPU_FTR_CP_USE_DCBTZ) ld r7,16(r4) ldu r8,24(r4) 1: std r5,8(r3) - ld r9,8...
53eae2281ad2607fa66a8ad1cb06186c8900da56
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix lwsync patching code on 64bit
Problem Details: do_lwsync_fixups doesn't work on 64bit, we end up writing lwsyncs to the wrong addresses: 0:mon> di c0000001000bfacc c0000001000bfacc 7c2004ac lwsync Since the lwsync section has negative offsets we need to use a signed int pointer so we sign extend the value. Signed-off-by: Anton Blanchard <a...
```diff diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c index 7e8865bcd683..4dee652dfcad 100644 --- a/arch/powerpc/lib/feature-fixups.c +++ b/arch/powerpc/lib/feature-fixups.c @@ -112,7 +112,7 @@ void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end) void d...
8d3d50bf1913561ef3b1f5b53115c5a481ba9b1e
Analyze and fix the following issue in the Linux kernel code: powerpc/eeh: Fix a bug when pci structure is null
Problem Details: During a EEH recover, the pci_dev structure can be null, mainly if an eeh event is detected during cpi config operation. In this case, the pci_dev will not be known (and will be null) the kernel will crash with the following message: Unable to handle kernel paging request for data at address 0x000000a...
```diff diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h index 2828f9d0f66d..42fdff0e4b32 100644 --- a/arch/powerpc/include/asm/ppc-pci.h +++ b/arch/powerpc/include/asm/ppc-pci.h @@ -137,6 +137,11 @@ struct device_node * find_device_pe(struct device_node *dn); void eeh_sysfs_add_dev...
170800088666963de1111d62fb503889c8c82eda
Analyze and fix the following issue in the Linux kernel code: TOMOYO: Remove __func__ from tomoyo_is_correct_path/domain
Problem Details: __func__ is used for only debug printk(). We can remove it. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org>
```diff diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index ffcf02450560..30dd1c68a647 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c @@ -179,14 +179,12 @@ static void tomoyo_normalize_line(unsigned char *buffer) * 1 = must / -1 = must not / 0 = don't care * @...
dfbb84ffe94e75e2d56250fa948db40f6c62093f
Analyze and fix the following issue in the Linux kernel code: CAPI: Fix locking around capiminor's output queue and drop workaround_lock
Problem Details: Introduce outlock as a spin lock that protects capiminor's outqueue, outbytes and outskb (formerly known as ttyskb). outlock can be acquired from soft-IRQ context via capinc_write, so make it bh-safe. This finally removes the last reason for keeping the workaround lock around (which was incomplete and...
```diff diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index be85c8c1e8b4..074496fae8da 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -95,11 +95,13 @@ struct capiminor { struct tty_port port; int ttyinstop; int ttyoutstop; - struct sk_buff ...
a84fdf41b25ad4c2b83e7c8ca87268fdbe6207d1
Analyze and fix the following issue in the Linux kernel code: CAPI: Drop atomic ttyopencount
Problem Details: Not needed, tty->count keeps track of this information. At this chance, drop traces of ancient attempts to debug this logic via _DEBUG_REFCOUNT. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 0b264b4565c8..867589a5916a 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -45,7 +45,6 @@ MODULE_DESCRIPTION("CAPI4Linux: Userspace /dev/capi20 interface"); MODULE_AUTHOR("Carsten Paeth"); MODULE_LICENSE("GPL"); -...
28a1dbb6f7feade304f43798feb15f6978516624
Analyze and fix the following issue in the Linux kernel code: CAPI: Fix racy capi_read
Problem Details: capi_read still used interruptible_sleep_on, risking to miss a wakeup this way. Convert it to wait_event_interruptible. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index f8f86602c57e..8abec9655e1a 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -657,24 +657,19 @@ capi_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) struct capidev *cdev = (struct capidev *)file-...
522530311b35ec8fc4785062441dd2d63967ac55
Analyze and fix the following issue in the Linux kernel code: CAPI: Call a controller 'controller', not 'card'
Problem Details: At least for our internal use, fix the misnomers that refer to a CAPI controller as 'card'. No functional changes. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index ef564ee1c06c..f37c13b4ddc7 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c @@ -67,24 +67,24 @@ static DEFINE_RWLOCK(application_lock); static DEFINE_MUTEX(controller_mutex); struct capi20_appl *capi_applications[...
c947862f9126983537a4cc11e07d26882d60b7e7
Analyze and fix the following issue in the Linux kernel code: CAPI: Fix leaks in capifs_new_ncci
Problem Details: When something went wrong during capifs_new_ncci, the looked up dentry was not properly released. Neither was the allocated inode. Refactor the function to avoid leaks. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index 9f8f67b6c07f..dc68fcb122a0 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c @@ -152,22 +152,33 @@ static struct dentry *get_node(int num) void capifs_new_ncci(unsigned int number, dev_t device) { struct dentry...
18d19c96457d172d913510c083bc7411ed40cb10
Analyze and fix the following issue in the Linux kernel code: class: Free the class private data in class_release
Problem Details: Fix a memory leak by freeing the memory allocated in __class_register for the class private data. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de...
```diff diff --git a/drivers/base/class.c b/drivers/base/class.c index 161746deab4b..6e2c3b064f53 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -59,6 +59,8 @@ static void class_release(struct kobject *kobj) else pr_debug("class '%s' does not have a release() function, " "be careful\n", class...
7c0ff870d1ed287504a61ed865f3d728c757436b
Analyze and fix the following issue in the Linux kernel code: sysfs: sysfs_sd_setattr set iattrs unconditionally
Problem Details: There is currently a bug in sysfs_sd_setattr inherited from sysfs_setattr in 2.6.32 where the first time we set the attributes on a sysfs file we allocate backing store but do not set the backing store attributes. Resulting in overly restrictive permissions on sysfs files. The fix is to simply modify...
```diff diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 220b758523ae..6a06a1d1ea7b 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -81,24 +81,23 @@ int sysfs_sd_setattr(struct sysfs_dirent *sd, struct iattr * iattr) if (!sd_attrs) return -ENOMEM; sd->s_iattr = sd_attrs; - } else { - /* attribu...
177867ce08f2756fa361e37086fc1792d7b4cf29
Analyze and fix the following issue in the Linux kernel code: sparc64: Kill bogus ip_tables.h include.
Problem Details: Fixes the following build failure: CC arch/sparc/kernel/sys_sparc32.o In file included from include/linux/netfilter_ipv4/ip_tables.h:28, from arch/sparc/kernel/sys_sparc32.c:46: include/linux/netfilter/x_tables.h:525: error: expected declaration specifiers or ‘...’ before ‘nf_h...
```diff diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c index dc0ac197e7e2..daded3b96398 100644 --- a/arch/sparc/kernel/sys_sparc32.c +++ b/arch/sparc/kernel/sys_sparc32.c @@ -43,7 +43,6 @@ #include <linux/security.h> #include <linux/compat.h> #include <linux/vfs.h> -#include <linux/ne...
c9885fe5a76dea798543f2938a872bc159e8e69a
Analyze and fix the following issue in the Linux kernel code: bnx2: Fix bug when saving statistics.
Problem Details: This fixes the problem of dropping the carry when adding 2 32-bit values. Switch to use array indexing for better readability. Reported by and fix provided by Patrick Rabau. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller...
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index d1e5e5d9e986..3fb110edad49 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -6555,16 +6555,16 @@ bnx2_save_stats(struct bnx2 *bp) u32 hi; u64 lo; - hi = *(temp_stats + i) + *(hw_stats + i); - lo = *(temp_stats + i + 1) + *(hw_stats ...
31e5d4abceaa3d11ff583ddf76ec292e90eacb7d
Analyze and fix the following issue in the Linux kernel code: USB: gadget: fix EEM gadget CRC usage
Problem Details: eem_wrap() is sending a sentinel CRC, but it didn't indicate that to the host, it should zero bit 14 (bmCRC) in the EEM packet header, instead of setting it. Also remove a redundant crc calculation in eem_unwrap(). Signed-off-by: Steve Longerbeam <stevel@netspectrum.com> Acked-by: Brian Niebuhr <bni...
```diff diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c index 0a577d5694fd..d4f0db58a8ad 100644 --- a/drivers/usb/gadget/f_eem.c +++ b/drivers/usb/gadget/f_eem.c @@ -358,7 +358,7 @@ done: * b15: bmType (0 == data) */ len = skb->len; - put_unaligned_le16((len & 0x3FFF) | BIT(14), skb_push(s...
dbe4a99d846e565f0f99914cc82658cd9ce60bdc
Analyze and fix the following issue in the Linux kernel code: USB: g_multi: fix CONFIG_USB_G_MULTI_RNDIS usage
Problem Details: g_multi used CONFIG_USB_ETH_RNDIS to check if RNDIS option was requested where it should check for CONFIG_USB_G_MULTI_RNDIS. As a result, RNDIS was never present in g_multi regardless of configuration. This fixes changes made in commit 396cda90d228d0851f3d64c7c85a1ecf6b8ae1e8. Signed-off-by: Michal ...
```diff diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index 429560100b10..76496f5d272c 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c @@ -29,7 +29,7 @@ #if defined USB_ETH_RNDIS # undef USB_ETH_RNDIS #endif -#ifdef CONFIG_USB_ETH_RNDIS +#ifdef CONFIG_USB_G_MULTI_RNDI...
5a5e0f4c7038168e38d1db6af09d1ac715ee9888
Analyze and fix the following issue in the Linux kernel code: kfifo: Don't use integer as NULL pointer
Problem Details: This patch fixes following sparse warnings: include/linux/kfifo.h:127:25: warning: Using plain integer as NULL pointer kernel/kfifo.c:83:21: warning: Using plain integer as NULL pointer Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Stefani Seibold <stefani@seibold.net> Signed-of...
```diff diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 6f6c5f300af6..bc0fc795bd35 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h @@ -124,7 +124,7 @@ extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo, */ static inline bool kfifo_initialized(struct kfifo *fifo) { - r...
4c743d0ae60462e91465483dd87f4458d71af550
Analyze and fix the following issue in the Linux kernel code: USB: FHCI: Fix build after kfifo rework
Problem Details: After kfifo rework FHCI fails to build: CC drivers/usb/host/fhci-tds.o drivers/usb/host/fhci-tds.c: In function 'fhci_ep0_free': drivers/usb/host/fhci-tds.c:108: error: used struct type value where scalar is required drivers/usb/host/fhci-tds.c:118: error: used struct type value where scalar is...
```diff diff --git a/drivers/usb/host/fhci-tds.c b/drivers/usb/host/fhci-tds.c index d224ab467a40..e1232890c78b 100644 --- a/drivers/usb/host/fhci-tds.c +++ b/drivers/usb/host/fhci-tds.c @@ -105,7 +105,7 @@ void fhci_ep0_free(struct fhci_usb *usb) if (ep->td_base) cpm_muram_free(cpm_muram_offset(ep->td_base)); ...
1a02d59aba9b61b820517fb135086471c065b573
Analyze and fix the following issue in the Linux kernel code: kfifo: Make kfifo_initialized work after kfifo_free
Problem Details: After kfifo rework it's no longer possible to reliably know if kfifo is usable, since after kfifo_free(), kfifo_initialized() would still return true. The correct behaviour is needed for at least FHCI USB driver. This patch fixes the issue by resetting the kfifo to zero values (the same approach is us...
```diff diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 498cabba225e..559fb5582b60 100644 --- a/kernel/kfifo.c +++ b/kernel/kfifo.c @@ -97,6 +97,7 @@ EXPORT_SYMBOL(kfifo_alloc); void kfifo_free(struct kfifo *fifo) { kfree(fifo->buffer); + _kfifo_init(fifo, NULL, 0); } EXPORT_SYMBOL(kfifo_free); ```
b9df794258de24d10b0616634d4c30d8b6e9d381
Analyze and fix the following issue in the Linux kernel code: USB: ehci: phy low power mode bug fixing
Problem Details: 1. There are two msleep calls inside two spin lock sections, need to unlock and lock again after msleep. 2. Save a extra status reg setting. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index c75d9270c752..19372673bf09 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -196,7 +196,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) if (hostpc_reg) { u32 t3; + spin_unlock_irq(&ehci...
d4a4683ca054ed9917dfc9e3ff0f7ecf74ad90d6
Analyze and fix the following issue in the Linux kernel code: USB: usbfs: only copy the actual data received
Problem Details: We need to only copy the data received by the device to userspace, not the whole kernel buffer, which can contain "stale" data. Thanks to Marcus Meissner for pointing this out and testing the fix. Reported-by: Marcus Meissner <meissner@suse.de> Tested-by: Marcus Meissner <meissner@suse.de> Cc: Alan S...
```diff diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 6e8bcdfd23b4..ca948bbc388f 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -1312,9 +1312,9 @@ static int processcompl(struct async *as, void __user * __user *arg) void __user *addr = as->userurb; unsigned int i; ...
d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
Analyze and fix the following issue in the Linux kernel code: tunnels: fix netns vs proto registration ordering
Problem Details: Same stuff as in ip_gre patch: receive hook can be called before netns setup is done, oopsing in net_generic(). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 95db732e542b..2f302d3ac9a3 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c @@ -830,15 +830,14 @@ static int __init ipip_init(void) printk(banner); - if (xfrm4_tunnel_register(&ipip_handler, AF_INET)) { + err = register_pernet_device(&ipip_net_ops); +...
c2892f02712e9516d72841d5c019ed6916329794
Analyze and fix the following issue in the Linux kernel code: gre: fix netns vs proto registration ordering
Problem Details: GRE protocol receive hook can be called right after protocol addition is done. If netns stuff is not yet initialized, we're going to oops in net_generic(). This is remotely oopsable if ip_gre is compiled as module and packet comes at unfortunate moment of module loading. Signed-off-by: Alexey Dobriya...
```diff diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 7631b20490f5..a2a5983dbf03 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -1665,14 +1665,15 @@ static int __init ipgre_init(void) printk(KERN_INFO "GRE over IPv4 tunneling driver\n"); - if (inet_add_protocol(&ipgre_protocol, IPPROTO_GRE) ...
07793d33b4fba00f5bd1dac78fa038bb0e23fa5c
Analyze and fix the following issue in the Linux kernel code: be2net: set proper value to version field in req hdr
Problem Details: Before sending a command to the ASIC, set version properly. This is necessary for the ARM firmware to send correct data to the driver. This also fixes a bug in certain skews of the ASIC where the statistics are misreported. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S....
```diff diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index fee6eee7ae5b..006cb2efcd22 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c @@ -296,6 +296,7 @@ static void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr, req_hdr->opcode = opcode; req_hdr->subsystem =...
553f9118abc4fc53674fff87f6fe5fa3f56a41ed
Analyze and fix the following issue in the Linux kernel code: xfrm: Fix xfrm_state_clone leak
Problem Details: xfrm_state_clone calls kfree instead of xfrm_state_put to free a failed state. Depending on the state of the failed state, it can cause leaks to things like module references. All states should be freed by xfrm_state_put past the point of xfrm_init_state. Signed-off-by: Herbert Xu <herbert@gondor.ap...
```diff diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index b36cc344474b..f445ea1c5f52 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1102,7 +1102,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp) int err = -ENOMEM; struct xfrm_state *x = xfrm_state...
4f4517c45f325ba511458465430a52864a5d0d30
Analyze and fix the following issue in the Linux kernel code: spi: Correct SPI clock frequency setting in spi_mpc8xxx
Problem Details: Correct SPI clock frequency division factor rounding, preventing clock rates higher than the maximum specified clock frequency being used. When specifying spi-max-frequency = <10000000> in the device tree, the resulting frequency was 11.1 MHz, with spibrg being 133333332. According to the freescale d...
```diff diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index 08065fb15817..4f0cc9d457e0 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c @@ -365,7 +365,7 @@ int mpc8xxx_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t) if ((mpc8xxx_spi->spibrg / hz) > 64) {...
73b50c1c92666d326b5fa2c945d46509f2f6d91f
Analyze and fix the following issue in the Linux kernel code: ext4: Fix BUG_ON at fs/buffer.c:652 in no journal mode
Problem Details: Calls to ext4_handle_dirty_metadata should only pass in an inode pointer for inode-specific metadata, and not for shared metadata blocks such as inode table blocks, block group descriptors, the superblock, etc. The BUG_ON can get tripped when updating a special device (such as a block device) that is ...
```diff diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index 2f407c487e6b..53d2764d71ca 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -125,7 +125,7 @@ int __ext4_handle_dirty_metadata(const char *where, handle_t *handle, ext4_journal_abort_handle(where, __func__, bh, handle, err); ...
9307f6b19ac4f5887552b5b2992f391b866f7633
Analyze and fix the following issue in the Linux kernel code: dm: sysfs revert add empty release function to avoid debug warning
Problem Details: Revert commit d2bb7df8cac647b92f51fb84ae735771e7adbfa7 at Greg's request. Author: Milan Broz <mbroz@redhat.com> Date: Thu Dec 10 23:51:53 2009 +0000 dm: sysfs add empty release function to avoid debug warning This patch just removes an unnecessary warning: kobject: 'dm': does ...
```diff diff --git a/drivers/md/dm-sysfs.c b/drivers/md/dm-sysfs.c index f53392df7b97..f91b40942e07 100644 --- a/drivers/md/dm-sysfs.c +++ b/drivers/md/dm-sysfs.c @@ -79,13 +79,6 @@ static struct sysfs_ops dm_sysfs_ops = { .show = dm_attr_show, }; -/* - * The sysfs structure is embedded in md struct, nothing to do...
9eef87da2a8ea4920e0d913ff977cac064b68ee0
Analyze and fix the following issue in the Linux kernel code: dm mpath: fix stall when requeueing io
Problem Details: This patch fixes the problem that system may stall if target's ->map_rq returns DM_MAPIO_REQUEUE in map_request(). E.g. stall happens on 1 CPU box when a dm-mpath device with queue_if_no_path bounces between all-paths-down and paths-up on I/O load. When target's ->map_rq returns DM_MAPIO_REQUEUE,...
```diff diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 3167480b532c..aa4e2aa86d49 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1595,10 +1595,15 @@ static int dm_prep_fn(struct request_queue *q, struct request *rq) return BLKPREP_OK; } -static void map_request(struct dm_target *ti, struct request *c...
558569aa9d83e016295bac77d900342908d7fd85
Analyze and fix the following issue in the Linux kernel code: dm raid1: fix null pointer dereference in suspend
Problem Details: When suspending a failed mirror, bios are completed by mirror_end_io() and __rh_lookup() in dm_rh_dec() returns NULL where a non-NULL return value is required by design. Fix this by not changing the state of the recovery failed region from DM_RH_RECOVERING to DM_RH_NOSYNC in dm_rh_recovery_end(). Iss...
```diff diff --git a/drivers/md/dm-region-hash.c b/drivers/md/dm-region-hash.c index 5f19ceb6fe91..168bd38f5006 100644 --- a/drivers/md/dm-region-hash.c +++ b/drivers/md/dm-region-hash.c @@ -660,10 +660,9 @@ void dm_rh_recovery_end(struct dm_region *reg, int success) spin_lock_irq(&rh->region_lock); if (success) ...
5528d17de1cf1462f285c40ccaf8e0d0e4c64dc0
Analyze and fix the following issue in the Linux kernel code: dm raid1: fail writes if errors are not handled and log fails
Problem Details: If the mirror log fails when the handle_errors option was not selected and there is no remaining valid mirror leg, writes return success even though they weren't actually written to any device. This patch completes them with EIO instead. This code path is taken: do_writes: bio_list_merge(&ms->failur...
```diff diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index ad779bd13aec..6c1046df81f6 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c @@ -724,7 +724,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes) /* * Dispatch io. */ - if (unlikely(ms->log_failure)) { + i...
ebfd32bba9b518d684009d9d21a56742337ca1b3
Analyze and fix the following issue in the Linux kernel code: dm log: userspace fix overhead_size calcuations
Problem Details: This patch fixes two bugs that revolve around the miscalculation and misuse of the variable 'overhead_size'. 'overhead_size' is the size of the various header structures used during communication. The first bug is the use of 'sizeof' with the pointer of a structure instead of the structure itself - r...
```diff diff --git a/drivers/md/dm-log-userspace-transfer.c b/drivers/md/dm-log-userspace-transfer.c index 54abf9e303b7..f1c8cae70b4b 100644 --- a/drivers/md/dm-log-userspace-transfer.c +++ b/drivers/md/dm-log-userspace-transfer.c @@ -172,11 +172,15 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int reque...