id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
30dd4508b97155a3f826f877d5750d8888bc3183
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13070): radio-mr800: fix behavior of set_stereo function
Problem Details: Fix behavior of set_stereo function. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index 7db992d3b0db..9764eca2c498 100644 --- a/drivers/media/radio/radio-mr800.c +++ b/drivers/media/radio/radio-mr800.c @@ -252,12 +252,13 @@ static int amradio_set_stereo(struct amradio_device *radio, char argument) retval = u...
4e3616576e9e65d53f9381b9f334257299c7262e
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13067): radio-mr800: fix potential use after free
Problem Details: Fix portential use after free. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index c4f4cd8dbb6c..dbae50ba250c 100644 --- a/drivers/media/radio/radio-mr800.c +++ b/drivers/media/radio/radio-mr800.c @@ -273,8 +273,8 @@ static void usb_amradio_disconnect(struct usb_interface *intf) mutex_unlock(&radio->loc...
0254294f378cd4c50de550ce0a32c70aba668f17
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13055): af9015: fix few typos
Problem Details: Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index ac21c1a8075e..7a885264e86b 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c @@ -1297,7 +1297,7 @@ static struct dvb_usb_device_properties af9015_properties[] = { .firmware = "dvb...
8171c2059cc4b0507faf3a0e0fdf28cc83d8ac62
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13045): Fix debug messaging for stv0900 demod.
Problem Details: Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/stv0900_core.c b/drivers/media/dvb/frontends/stv0900_core.c index 3bde3324a032..768a1611e8ce 100644 --- a/drivers/media/dvb/frontends/stv0900_core.c +++ b/drivers/media/dvb/frontends/stv0900_core.c @@ -34,7 +34,7 @@ #include "stv0900_priv.h" #include "stv0900_init.h" ...
2597641deae82c9a95e255518da189ab557da0af
Analyze and fix the following issue in the Linux kernel code: nfs41: v2 fix cb_recall bug
Problem Details: in NFSv4.1 the seqid part of a stateid in CB_RECALL must be 0 Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h index 0ca830984c4b..d4036be0b589 100644 --- a/fs/nfs/callback.h +++ b/fs/nfs/callback.h @@ -106,6 +106,8 @@ struct cb_sequenceres { extern unsigned nfs4_callback_sequence(struct cb_sequenceargs *args, struct cb_sequenceres *res); +extern int nfs4...
27d16d08717faeaa8afd1b736a096dbaab90f08e
Analyze and fix the following issue in the Linux kernel code: avr32: Convert BUG() to use unreachable()
Problem Details: Use the new unreachable() macro instead of for(;;); Signed-off-by: David Daney <ddaney@caviumnetworks.com> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/avr32/include/asm/bug.h b/arch/avr32/include/asm/bug.h index 331d45bab18f..2aa373cc61b5 100644 --- a/arch/avr32/include/asm/bug.h +++ b/arch/avr32/include/asm/bug.h @@ -52,7 +52,7 @@ #define BUG() \ do { \ _BUG_OR_WARN(0); \ - for (;;); \ + unreachable(); \ ...
5506e68975c346e55f786b554e28e368cdede444
Analyze and fix the following issue in the Linux kernel code: s390: Convert BUG() to use unreachable()
Problem Details: Use the new unreachable() macro instead of for(;;); Signed-off-by: David Daney <ddaney@caviumnetworks.com> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> CC: Heiko Carstens <heiko.carstens@de.ibm.com> CC: linux390@de.ibm.com CC: linux-s390@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds...
```diff diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h index 7efd0abe8887..efb74fd5156e 100644 --- a/arch/s390/include/asm/bug.h +++ b/arch/s390/include/asm/bug.h @@ -49,7 +49,7 @@ #define BUG() do { \ __EMIT_BUG(0); \ - for (;;); \ + unreachable(); \ } while (0) #define...
4ef5651e85589e3aaca704c6d2d7ae7e794e5d25
Analyze and fix the following issue in the Linux kernel code: MIPS: Convert BUG() to use unreachable()
Problem Details: Use the new unreachable() macro instead of while(1); Signed-off-by: David Daney <ddaney@caviumnetworks.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> CC: linux-mips@linux-mips.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/mips/include/asm/bug.h b/arch/mips/include/asm/bug.h index 6cf29c26e873..540c98a810d1 100644 --- a/arch/mips/include/asm/bug.h +++ b/arch/mips/include/asm/bug.h @@ -11,9 +11,7 @@ static inline void __noreturn BUG(void) { __asm__ __volatile__("break %0" : : "i" (BRK_BUG)); - /* Fool GCC int...
a5fc5eba4dfcc284e6adcd7fdcd5b43182230d2b
Analyze and fix the following issue in the Linux kernel code: x86: Convert BUG() to use unreachable()
Problem Details: Use the new unreachable() macro instead of for(;;);. When allyesconfig is built with a GCC-4.5 snapshot on i686 the size of the text segment is reduced by 3987 bytes (from 6827019 to 6823032). Signed-off-by: David Daney <ddaney@caviumnetworks.com> Acked-by: "H. Peter Anvin" <hpa@zytor.com> CC: Thomas...
```diff diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h index d9cf1cd156d2..f654d1bb17fb 100644 --- a/arch/x86/include/asm/bug.h +++ b/arch/x86/include/asm/bug.h @@ -22,14 +22,14 @@ do { \ ".popsection" \ : : "i" (__FILE__), "i" (__LINE__), \ "i" (sizeof(struct bug...
38938c879eb0c39edf85d5164aa0cffe2874304c
Analyze and fix the following issue in the Linux kernel code: Add support for GCC-4.5's __builtin_unreachable() to compiler.h (v2)
Problem Details: Starting with version 4.5, GCC has a new built-in function __builtin_unreachable() that can be used in places like the kernel's BUG() where inline assembly is used to transfer control flow. This eliminated the need for an endless loop in these places. The patch adds a new macro 'unreachable()' that w...
```diff diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 450fa597c94d..ab3af40a53c6 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h @@ -36,4 +36,18 @@ the kernel context */ #define __cold __attribute__((__cold__)) + +#if __GNUC_MINOR__ >= 5 +/* + *...
cba362221b12b102dff1f21b291fdc7b93e24a18
Analyze and fix the following issue in the Linux kernel code: IXP4xx: Fix compilation failure with CONFIG_IXP4XX_INDIRECT_PCI.
Problem Details: Instead of including the heavy linux/mm.h for VMALLOC_START, test the addresses against PCI MIN and MAX addresses. Indirect PCI uses 1:1 mapping for MMIO space making this change possible. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
```diff diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index c06d4a2911a6..0e601fe50162 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h @@ -55,10 +55,16 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data); * access ...
58e570d1182a9dc3bc52d8dc508c6bd5b2d279c7
Analyze and fix the following issue in the Linux kernel code: IXP4xx: Drop "__ixp4xx_" prefix from in/out/ioread/iowrite functions for clarity.
Problem Details: Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
```diff diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index 061a1f144a01..c06d4a2911a6 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h @@ -243,25 +243,8 @@ static inline void __indirect_readsl(const volatile void __iomem *bu...
9f2c94928a0d713d223b53909734877fe4f340ab
Analyze and fix the following issue in the Linux kernel code: ARM: fix insl() and outsl() endianness on IXP4xx architecture.
Problem Details: The repetitive in/out functions must preserve order, not value. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
```diff diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index 8a947d42a6f1..eb9c7489a999 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h @@ -311,7 +311,7 @@ static inline void __ixp4xx_outsl(u32 io_addr, const u32 *vaddr, u32...
8ae45a535b172d350759eec2fcecf4368d4c13d1
Analyze and fix the following issue in the Linux kernel code: IXP4xx: Fix normally-disabled debugging text in drivers/net/arm/ixp4xx_eth.c.
Problem Details: Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
```diff diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 691b81eb0f46..c3dfbdd2cdcf 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c @@ -322,7 +322,7 @@ static int ixp4xx_mdio_write(struct mii_bus *bus, int phy_id, int location, ret = ixp4xx_mdio_cmd(bus, phy_...
6a47081c37b7dd7810ce19e156c1a3bf11987e9a
Analyze and fix the following issue in the Linux kernel code: Input: fix memory leak in force feedback core
Problem Details: Effects were allocated, but not freed anywhere. Signed-off-by: Jari Vanhala <ext-jari.vanhala@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c index 572d0a712d2a..b2f07aa1604b 100644 --- a/drivers/input/ff-core.c +++ b/drivers/input/ff-core.c @@ -369,6 +369,7 @@ void input_ff_destroy(struct input_dev *dev) if (ff->destroy) ff->destroy(ff); kfree(ff->private); + kfree(ff->effects...
4832ddda2ec4df96ea1eed334ae2dbd65fc1f541
Analyze and fix the following issue in the Linux kernel code: x86: ASUS P4S800 reboot=bios quirk
Problem Details: Bug reporter noted their system with an ASUS P4S800 motherboard would hang when rebooting unless reboot=b was specified. Their dmidecode didn't contain descriptive System Information for Manufacturer or Product Name, so I used their Base Board Information to create a reboot quirk patch. The bug repor...
```diff diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index f93078746e00..6caf26010970 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -259,6 +259,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"), }, }, + { ...
9e0b5b2c447ad0caa075a5cfef86def62e1782ff
Analyze and fix the following issue in the Linux kernel code: PCI: fix coding style issue in pci_save_state()
Problem Details: Remove a stray space in pci_save_state(). Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index cd9b375f49d5..0bc27e059019 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -850,7 +850,7 @@ pci_save_state(struct pci_dev *dev) int i; /* XXX: 100% dword access ok here? */ for (i = 0; i < 16; i++) - pci_read_config_dword(dev, i * 4,&dev-...
b26a34aa4792b3db2500b8a98cb7702765c1a92e
Analyze and fix the following issue in the Linux kernel code: PCI: fix BUG_ON triggered by logical PCIe root port removal
Problem Details: This problem happened when removing PCIe root port using PCI logical hotplug operation. The immediate cause of this problem is that the pointer to invalid data structure is passed to pcie_update_aspm_capable() by pcie_aspm_exit_link_state(). When pcie_aspm_exit_link_state() received a pointer to root ...
```diff diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 05b8e25b551b..5a01fc7fbf05 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -657,8 +657,10 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev) free_link_state(link); /* Recheck latencies and configure upstream li...
c6a415761c59adabb53699c84e5cb42868d97c67
Analyze and fix the following issue in the Linux kernel code: PCI: add debug output for DMA mask info
Problem Details: This allows us to find out what DMA mask is used for each PCI device at boot time; useful for debugging. After the patch: ehci_hcd 0000:00:02.1: using 31bit consistent DMA mask e1000 0000:0b:01.0: using 64bit DMA mask e1000 0000:0b:01.0: using 64bit consistent DMA mask e1000e 0000:04:00.0: using 64bit...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 453d6ba6811e..be91a09c74a5 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2101,6 +2101,7 @@ pci_set_dma_mask(struct pci_dev *dev, u64 mask) return -EIO; dev->dma_mask = mask; + dev_dbg(&dev->dev, "using %dbit DMA mask\n", fls64(mask)); ...
6070d81eb5f2d4943223c96e7609a53cdc984364
Analyze and fix the following issue in the Linux kernel code: tree-wide: fix misspelling of "definition" in comments
Problem Details: "Definition" is misspelled "defintion" in several comments; this patch fixes them. No code changes. Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/arm/mach-bcmring/include/csp/reg.h b/arch/arm/mach-bcmring/include/csp/reg.h index e5f60bf5a1f3..56654d23c3d7 100644 --- a/arch/arm/mach-bcmring/include/csp/reg.h +++ b/arch/arm/mach-bcmring/include/csp/reg.h @@ -16,7 +16,7 @@ /** * @file reg.h * -* @brief Generic register defintions...
febe29d957c5076ff6a9fa49f39b01f1e48d1c04
Analyze and fix the following issue in the Linux kernel code: reiserfs: fix misspelling of "journaled"
Problem Details: "Journaled" is misspelled "journlaled" in an output string; this patch fixed it. No changes in functionality. Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c index 5e5a4e6fbaf8..db3fd7d0b990 100644 --- a/fs/reiserfs/fix_node.c +++ b/fs/reiserfs/fix_node.c @@ -834,7 +834,7 @@ static int get_empty_nodes(struct tree_balance *tb, int h) RFALSE(buffer_dirty(new_bh) || buffer_journaled(new_bh) || ...
d29cecda036f251aee4947f47eea0fe9ed8cc931
Analyze and fix the following issue in the Linux kernel code: mac80211: fix reorder buffer release
Problem Details: My patch "mac80211: correctly place aMPDU RX reorder code" uses an skb queue for MPDUs that were released from the buffer. I intentially didn't initialise and use the skb queue's spinlock, but in this place forgot that the code variant that doesn't touch the spinlock is needed. Thanks to Christian Lam...
```diff diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 4ed60ae81b99..f237df408378 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -570,7 +570,7 @@ static void ieee80211_release_reorder_frame(struct ieee80211_hw *hw, rate = &sband->bitrates[status->rate_idx]; tid_agg_rx->stored_mpdu_num--; tid...
ea028ac92541ac30bf202ed94cb53eec2ea0c9d6
Analyze and fix the following issue in the Linux kernel code: nfs41: nfs41: fix state manager deadlock in session reset
Problem Details: If the session is reset during state recovery, the state manager thread can sleep on the slot_tbl_waitq causing a deadlock. Add a completion framework to the session. Have the state manager thread set a new session state (NFS4CLNT_SESSION_DRAINING) and wait for the session slot table to drain. Signa...
```diff diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index e9ecd6bf9257..5c7740178a08 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h @@ -45,6 +45,7 @@ enum nfs4_client_state { NFS4CLNT_RECLAIM_NOGRACE, NFS4CLNT_DELEGRETURN, NFS4CLNT_SESSION_RESET, + NFS4CLNT_SESSION_DRAINING, }; /* diff --git a/fs/n...
8ba9bf8e5160b0b4ebc56f64ad445c6c0ecdac1d
Analyze and fix the following issue in the Linux kernel code: nfs41: fix switch in nfs4_recovery_handle_error
Problem Details: Do not fall through and set NFS4CLNT_SESSION_RESET bit on NFS4ERR_EXPIRED Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 902d8749bde4..f56f6be5e314 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1085,6 +1085,7 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error) case -NFS4ERR_EXPIRED: set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_sta...
b9179237e2b2b4d34b5821cca3db280ebbc8694a
Analyze and fix the following issue in the Linux kernel code: nfs41: fix switch in nfs4_handle_exception
Problem Details: Do not fall through and call nfs4_delay on session error handling. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index f0b6d569a50a..d0cb7cb367c1 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -272,7 +272,7 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, errorcode); set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); ...
e608e79f1bf4b967afcf57777e63b5f0939b00e8
Analyze and fix the following issue in the Linux kernel code: nfs41: call free slot from nfs4_restart_rpc
Problem Details: nfs41_sequence_free_slot can be called multiple times on SEQUENCE operation errors. No reason to inline nfs4_restart_rpc Reported-by: Trond Myklebust <trond.myklebust@netapp.com> nfs_writeback_done and nfs_readpage_retry call nfs4_restart_rpc outside the error handler, and the slot is not freed prior...
```diff diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index ebcd3795389e..a6f7b6cbfd09 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -177,26 +177,14 @@ extern __be32 * nfs_decode_dirent(__be32 *, struct nfs_entry *, int); extern struct rpc_procinfo nfs3_procedures[]; extern __be32 *nfs3_decode_dirent...
f195e2bff3000b8bc251ee6f685e0f027eec6f25
Analyze and fix the following issue in the Linux kernel code: m68k: ptrace fixes
Problem Details: This fixes the following issues in ptrace: - when single stepping into the signal handler stop at the first insn of the handler - handle non-zero stkadj when accessing pc and sr in ptregs - correctly handle PT_SR in PTRACE_POKEUSR - report -EIO when trying to read unknown offset in PTRACE_PEEKUSR A...
```diff diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index c5b33634c980..77fc7c16bf48 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S @@ -179,7 +179,11 @@ do_signal_return: addql #8,%sp RESTORE_SWITCH_STACK addql #4,%sp - jbra resume_userspace + tstl %d0 + jeq resume_users...
df98a4967002d0df88d92f89662261e3a7867cf7
Analyze and fix the following issue in the Linux kernel code: b43: fix two warnings
Problem Details: My gcc appears to be able to see past the function boundary and notices that the variable 'behaviour' could be used uninitialised: drivers/net/wireless/b43/leds.c: In function ‘b43_leds_register’: drivers/net/wireless/b43/leds.c:339: warning: ‘behaviour’ may be used uninitialized in this function driv...
```diff diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c index 1e8dba488004..c587115dd2b9 100644 --- a/drivers/net/wireless/b43/leds.c +++ b/drivers/net/wireless/b43/leds.c @@ -246,6 +246,7 @@ static void b43_led_get_sprominfo(struct b43_wldev *dev, *behaviour = B43_LED_OFF; break;...
52ce3e9a7db754b78cf2cbabc87013f921b25b28
Analyze and fix the following issue in the Linux kernel code: ipw2100: fix rebooting hang with driver loaded
Problem Details: Add PCI .shutdown method so that we can disable the device during shutdown or reboot. Without this, the reboot doesn't work well on some platforms. This fixes http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2124 Tested-by: pablo <pablolm2005@gmail.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> ...
```diff diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 6c836c892e43..17a9cb3528fc 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c @@ -6573,6 +6573,16 @@ static int ipw2100_resume(struct pci_dev *pci_dev) } #endif +s...
6646a664e3b60bf3e5db676e0626e6ccd71b3363
Analyze and fix the following issue in the Linux kernel code: iwmc3200wifi: fix NULL pointer dereference in pmkid update
Problem Details: When handling IWM_CMD_PMKID_FLUSH command, the bssid and pmkid in pmksa are all NULL. Check it before memcpy. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwmc3200wifi/commands.c b/drivers/net/wireless/iwmc3200wifi/commands.c index bd0630755b32..89b33fa8d4ef 100644 --- a/drivers/net/wireless/iwmc3200wifi/commands.c +++ b/drivers/net/wireless/iwmc3200wifi/commands.c @@ -970,8 +970,10 @@ int iwm_send_pmkid_update(struct iwm_priv *i...
914828fad09269292be1bfa3dfbe78d064f76068
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix TX status reporting for injected data frames
Problem Details: An earlier optimization on removing unnecessary traffic on cooked monitor interfaces ("mac80211: reduce the amount of unnecessary traffic on cooked monitor interfaces ") ended up removing quite a bit more than just unnecessary traffic. It was not supposed to remove TX status reporting for injected fram...
```diff diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 9f91fd8e6efb..d78f36c64c7b 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -148,6 +148,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) struct net_device *prev_dev = NULL; struct sta_info *sta; in...
1f351e3840dcf25aaddec2d908c3ab06ae105ee6
Analyze and fix the following issue in the Linux kernel code: airo: Fix integer overflow warning
Problem Details: On BigEndian gcc complains: drivers/net/wireless/airo.c: In function ‘sniffing_mode’: drivers/net/wireless/airo.c:4809: warning: integer overflow in expression Fix this by doing the bitwise AND on the host-endian value. Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 4eec87c3be2b..4331d675fcc6 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -4806,7 +4806,7 @@ static int airo_config_commit(struct net_device *dev, static inline int sniffing_mode(struct airo_info *ai) ...
a5186e997524578b4ba91390ad947c767450dac8
Analyze and fix the following issue in the Linux kernel code: rt2x00: Fix padding bug on L2PAD devices.
Problem Details: While reviewing the l2pad function to align both the header and the payload on a DMA-capable boundary a bug was discovered where the payload would not be properly aligned. The header_align value was used where the payload_align value should have been used. Signed-off-by: Gertjan van Wingerde <gwingerd...
```diff diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 32d4aeabfd4d..239afc7a9c0b 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c @@ -214,7 +214,7 @@ void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsign...
1014eb6ec95b18f890101e99385f05539c0c2f01
Analyze and fix the following issue in the Linux kernel code: WE: Fix set events not propagated
Problem Details: I've just noticed that some events are no longer propagated for some wireless drivers. Basically, SET request with a extra payload for driver without commit handler. The fix is pretty simple, see attached. Actually, a few lines below this line, you will see that the event generation for simple SET (iw...
```diff diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index a4e5ddc8d4f5..6033785f56c5 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c @@ -802,7 +802,8 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd, } /* Generate an event to notify listeners o...
316a4d966cae3c2dec83ebb1ee1a3515f97b30ff
Analyze and fix the following issue in the Linux kernel code: b43legacy: avoid PPC fault during resume
Problem Details: For PPC architecture with PHY Revision < 3, a read of the register B43_MMIO_HWENABLED_LO will cause a CPU fault unless b43legacy_status() returns a value of 2 (B43legacy_STAT_STARTED); however, one finds that the driver is unable to associate after resuming from hibernation unless this routine returns ...
```diff diff --git a/drivers/net/wireless/b43legacy/rfkill.c b/drivers/net/wireless/b43legacy/rfkill.c index 8783022db11e..d579df72b783 100644 --- a/drivers/net/wireless/b43legacy/rfkill.c +++ b/drivers/net/wireless/b43legacy/rfkill.c @@ -34,6 +34,13 @@ bool b43legacy_is_hw_radio_enabled(struct b43legacy_wldev *dev) ...
c2ff581acab16c6af56d9e8c1a579bf041ec00b1
Analyze and fix the following issue in the Linux kernel code: b43: avoid PPC fault during resume
Problem Details: The routine b43_is_hw_radio_enabled() has long been a problem. For PPC architecture with PHY Revision < 3, a read of the register B43_MMIO_HWENABLED_LO will cause a CPU fault unless b43_status() returns a value of 2 (B43_STAT_STARTED) (BUG 14181). Fixing that results in Bug 14538 in which the driver is...
```diff diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c index ffdce6f3c909..78016ae21c50 100644 --- a/drivers/net/wireless/b43/rfkill.c +++ b/drivers/net/wireless/b43/rfkill.c @@ -33,8 +33,14 @@ bool b43_is_hw_radio_enabled(struct b43_wldev *dev) & B43_MMIO_RADIO_HWENABLED_HI...
bd0072ecc449fb2ea8f6a2c9f6ff308f3ae0b078
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Move WKA port to zfcp FC code
Problem Details: The well-known-address (WKA) port handling code is part of the FC code in zfcp. Move everything WKA related to the zfcp_fc files and use the common zfcp_fc prefix for structs and functions. Drop the unused key management service while renaming the struct, no request could ever reach this service in zfc...
```diff diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index d7a550af4a25..e945344ff711 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c @@ -13,6 +13,7 @@ #include <asm/debug.h> #include "zfcp_dbf.h" #include "zfcp_ext.h" +#include "zfcp_fc.h" static u32 dbfsi...
9eae07ef6bb5988163d8bb82cd952905db47b721
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Assign scheduled work to driver queue
Problem Details: The port_scan work was scheduled to the work_queue provided by the kernel. This resulted on SMP systems to a likely situation that more than one scan_work were processed in parallel. This is not required and openes the possibility of race conditions between the removal of invalid ports and the enqueue ...
```diff diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 6b94f8d0609c..107d3f2b6e94 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c @@ -522,7 +522,7 @@ struct zfcp_adapter *zfcp_adapter_enqueue(struct ccw_device *ccw_device) adapter->ccw_device = ccw_device; ...
70d919fbd9ab78f3eca5ea7bd060fefd7b508641
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix payload size passed to fc_frame_alloc() in fc_lport_els_request
Problem Details: Frame header room is already incluced, just pass the length of payload. Signed-off-by: Yi Zou <yi.zou@intel.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/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index c841d547c298..bbf4152c9c69 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -1679,8 +1679,7 @@ static int fc_lport_els_request(struct fc_bsg_job *job, char *pp; int len; - fp = fc_frame_alloc(...
a747c9ce56533e376993473321d96ec8c23a3e43
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.6 : Hardware related fixes and changes
Problem Details: Hardware related Fixes and Changes. - Added new Adapter IDs and update default Adapter names. - Added PCI read after EQarm doorbell PCI write to flush the write and avoid spurrious interrupts when in INTx mode. - Phase out use of ONLINE registers. - Fix for lost MSI interrupt Signed-off-by: Jam...
```diff diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index f279d191b628..c9faa1d8c3c8 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h @@ -1168,7 +1168,8 @@ typedef struct { #define PCI_DEVICE_ID_ZEPHYR_DCSP 0xfe12 #define PCI_VENDOR_ID_SERVERENGINE 0x19a2 #defi...
1c6f4ef5d6be7ef4cbe92a86286217971f52e2cd
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.6 : Fix critical errors
Problem Details: Fix errors relating to crashes and hangs. - Fix crash due to list corruption while unloading driver. - Fix panic during pci-hot-plug testing. - Fix panic when unmapping luns. - Fixed total_scsi_bufs counting could cause exhausted memory. - Fixed locking issue causing hang. - Fixed the call from l...
```diff diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 4d7d8846b4da..3b9424427652 100755 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -1018,13 +1018,12 @@ lpfc_mbx_cmpl_reg_fcfi(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) mempool_free(mboxq,...
891478a2442d8d0077651bc8316afaec8d85dd4d
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.6 : Fix AER issues
Problem Details: Fix AER issues. - Made AER sysfs entry point return "Operation not permitted" to OneConnect HBAs - Stop and abort all I/Os on HBA for AER uncorrectable non-fatal error handling 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_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index d55befb7cf4c..75523603b91c 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -2835,6 +2835,9 @@ lpfc_aer_support_store(struct device *dev, struct device_attribute *attr, struct lpfc_hba *phba = vpo...
5ffc266ee7a62741ebee89ede15049ec0f02fa75
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.6 : FC Protocol Fixes
Problem Details: FC protocol fixes. - Fix send sequence logic to handle multi SGL IOCBs. - Fix FDISC completion always setting VPORT state to failed. - Ported the fix on reporting of max_vpi to uppper layer. - Fix incorrect number of Vports allowed to be created. - Fixed Dead FCoE port after creating vports. - Ad...
```diff diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 2fd3e45c577e..1cc23a69db5e 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -202,6 +202,7 @@ struct lpfc_stats { uint32_t elsRcvLIRR; uint32_t elsRcvRPS; uint32_t elsRcvRPL; + uint32_t elsRcvRRQ; uint32_t elsXm...
c868595d5686e97183bc1ad85502835d81d7a457
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.6 : FCoE Protocol Fixes
Problem Details: FCoE Protocol fixes. - Fixed FIP frame designation for ELS commands. - Fix CVL received on Port 1 not processed by driver. - Fix Zeroed frame on wire after FLOGI - Fix vport keep-alive does not contain the correct WWN. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottom...
```diff diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index ebeddbe86e67..2fd3e45c577e 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -290,8 +290,8 @@ struct lpfc_vport { uint16_t vpi; uint16_t vfi; - uint8_t vfi_state; -#define LPFC_VFI_REGISTERED 0x1 + uint8_t vpi_sta...
832151f45806613f203c4c0308c1566d882b971f
Analyze and fix the following issue in the Linux kernel code: [SCSI] st: fix test of value range in st_set_options()
Problem Details: value cannot logically be less than START and greater than BUFFERSIZE. #define EXTENDED_SENSE_START 18 // vi include/scsi/scsi_cmnd.h +105 #define SCSI_SENSE_BUFFERSIZE 96 [akpm@linux-foundation.org: fix warning] Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@l...
```diff diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 12d58a7ed6bc..ad59abb47722 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -2280,7 +2280,8 @@ static int st_set_options(struct scsi_tape *STp, long options) } else if (code == MT_ST_SET_CLN) { value = (options & ~MT_ST_OPTIONS) & 0xff; i...
1acf3b06f77a48b1607534408866473fb8018a65
Analyze and fix the following issue in the Linux kernel code: [SCSI] fix func names in kernel-doc
Problem Details: Fix scsi_devinfo.c kernel-doc function names to match actual function names. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.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/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 802e91c8892e..37af178b2d17 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -453,7 +453,7 @@ int scsi_get_device_flags(struct scsi_device *sdev, /** - * get_device_flags_keyed - get device specific fla...
aa9fffbe2c4db4557248c5c626a85bf3c7867044
Analyze and fix the following issue in the Linux kernel code: [SCSI] libosd: Error handling revamped
Problem Details: Administer some love to the osd_req_decode_sense function * Fix a bad bug with osd_req_decode_sense(). If there was no scsi residual, .i.e the request never reached the target, then all the osd_sense_info members where garbage. * Add grossly missing in/out_resid to osd_sense_info and fill them in...
```diff diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index ba25b1e58a6c..950202a70bcf 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -475,7 +475,8 @@ EXPORT_SYMBOL(osd_end_request); int osd_execute_request(struct osd_request *or) { - retur...
eff21490c91f981126f0ead3c081dde4f425d387
Analyze and fix the following issue in the Linux kernel code: [SCSI] libosd: Bugfix of error handling in attributes-list decoding
Problem Details: When an error was detected in an attribute list do to a target bug. We would print an error but spin endlessly regardless. Fix it. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index 5e90d19fddf8..ba25b1e58a6c 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -1167,6 +1167,7 @@ int osd_req_decode_get_attr_list(struct osd_request *or, "c=%d r=%d n=%d\n", cur_...
71ecb74b15377a6c0e0e6ea95d4b549580fb4d48
Analyze and fix the following issue in the Linux kernel code: [SCSI] libosd: bug in osd_req_decode_sense_full()
Problem Details: The (never tested) osd_sense_attribute_identification case has never worked. The loop was never advanced on. Fix it to work as intended. On 10/30/2009 04:39 PM, Roel Kluin wrote: I found this by code analysis, searching for while loops that test a local variable, but do not modify the variable. ...
```diff diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index 60b7ca1e9bc0..5e90d19fddf8 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -1583,15 +1583,14 @@ int osd_req_decode_sense_full(struct osd_request *or, { struct osd_sense_attribute...
d6ae4333e648492721a098bdc329bbd82d25eb67
Analyze and fix the following issue in the Linux kernel code: [SCSI] osduld: Use device->release instead of internal kref
Problem Details: The true logic of this patch will be clear in the next patch where we use the class_find_device() API. When doing so the use of an internal kref leaves us a narrow window where a find is started while the actual object can go away. Using the device's kobj reference solves this problem because now the s...
```diff diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c index 1ea6447f9418..fc6fc1c4d4d1 100644 --- a/drivers/scsi/osd/osd_uld.c +++ b/drivers/scsi/osd/osd_uld.c @@ -71,8 +71,7 @@ #define SCSI_OSD_MAX_MINOR 64 static const char osd_name[] = "osd"; -static const char *osd_version_string = "open-...
89f5e1f2f13b1079b8d7ff7d3ade345b7ad7c009
Analyze and fix the following issue in the Linux kernel code: [SCSI] osduld: Ref-counting bug fix
Problem Details: If scsi has released the device (logout), and exofs has last reference on the osduld_device it will be freed by osd_uld_release() within the call to fput(). But this will oops in cdev_release() which is called after the fops->release. (cdev is embedded within osduld_device). __uld_get/put pair makes su...
```diff diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c index 0bdef3390902..1ea6447f9418 100644 --- a/drivers/scsi/osd/osd_uld.c +++ b/drivers/scsi/osd/osd_uld.c @@ -224,7 +224,15 @@ void osduld_put_device(struct osd_dev *od) BUG_ON(od->scsi_device != oud->od.scsi_device); + /* If scsi has ...
4f704dc03297406ea5d53b85c4666c60f69000bf
Analyze and fix the following issue in the Linux kernel code: [SCSI] libiscsi: fix login/text checks in pdu injection code
Problem Details: For some reason we used to check for the the immediate bit set and the opcocde in many places instead of just masking the opcode. In the passthrough code this is a problem because userspace may or may not have set the immediate bit and it does not have to. This fixes up the opcode checks in the passthr...
```diff diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 67d0f3fc8ac0..8c29480fc02b 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -577,12 +577,12 @@ static int iscsi_prep_mgmt_task(struct iscsi_conn *conn, struct iscsi_session *session = conn->session; struct iscsi_hdr *h...
97ee20886cfd257a7818087c1638ca60b9ffd192
Analyze and fix the following issue in the Linux kernel code: [SCSI] pm8001: Fixes for tag alloc, error goto and code cleanup
Problem Details: Allocate right size for bitmap tag,fix error goto and cleanup print message and undocable commemts. patch attached. Signed-off-by: Lindar Liu <lindar_liu@usish.com> Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 811b5d36d5f0..42ebe725d5a5 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c @@ -203,9 +203,9 @@ static int __devinit pm8001_alloc(struct pm8001_hba_info *pm8001_ha) for (i = 0; i < pm...
d139b9bd0e52dda14fd13412e7096e68b56d0076
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_lib_dma: fix bug with dma maps on nested scsi objects
Problem Details: Some of our virtual SCSI hosts don't have a proper bus parent at the top, which can be a problem for doing DMA on them This patch makes the host device cache a pointer to the physical bus device and provides an extra API for setting it (the normal API picks it up from the parent). This patch also mod...
```diff diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 5fd2da494d08..28a753d796f3 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -180,14 +180,20 @@ void scsi_remove_host(struct Scsi_Host *shost) EXPORT_SYMBOL(scsi_remove_host); /** - * scsi_add_host - add a scsi host + * scsi_add_ho...
4ae1e19f251335a24ce6cd13f08b4af560ed8765
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix an issue of pending exch/es after i/f destroyed or rmmod fcoe
Problem Details: All exches must be freed before its EM mempool destroyed in this case but currently some exches could be still pending in their scheduled delayed work after EM mempool is destroyed causing this issue discussed and reported in this latest email thread:- http://www.open-fcoe.org/pipermail/devel/2009-Oc...
```diff diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 0f45bb8521f1..19d711cb938c 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -38,6 +38,7 @@ u16 fc_cpu_mask; /* cpu mask for possible cpus */ EXPORT_SYMBOL(fc_cpu_mask); static u16 fc_cpu_order; /* 2'...
18fa11efc279c20af5eefff2bbe814ca067e51ae
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc, fcoe: fixes for highmem skb linearize panics
Problem Details: There are cases outside of our control that may result in a transmit skb being linearized in dev_queue_xmit. There are a couple of bugs in libfc/fcoe that can result in a panic at that point. This patch contains two fixes to prevent those panics. 1) use fast cloning instead of shared skbs with dev_q...
```diff diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 28029a342892..b570f39faa3a 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -1267,10 +1267,11 @@ err2: */ static inline int fcoe_start_io(struct sk_buff *skb) { + struct sk_buff *nskb; int rc; - skb_get(skb); -...
cc0136c2e9c10e889cb36e39710c0eb10707b396
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: Fix using VLAN ID in creating lport's WWWN/WWPN
Problem Details: If the underlying netdev is a VLAN device, make sure the VLAN ID is integrated into the WWNN/WWPN name generation. Also added/updated the comments to reflect this change. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James...
```diff diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index fba7ba00c71b..28029a342892 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -555,6 +555,7 @@ static int fcoe_netdev_config(struct fc_lport *lport, struct net_device *netdev) u64 wwnn, wwpn; struct fcoe_interface *f...
75ea89ef63d9ca37f190aebb7da061070005ac6e
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: Fix setting lport's WWNN/WWPN to use san mac address
Problem Details: We are still using netdev->dev_addr to generate lport's WWNN/WWPN even if the LLD has support for NETDEV_HW_ADDR_T_SAN. Instead, we should just use the fip->ctl_src_addr, which is the NETDEV_HW_ADDR_T_SAN if LLD supports it or it is just the netdev->dev_addr if it does not. Signed-off-by: Yi Zou <yi.z...
```diff diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index c1fd7561f0bd..fba7ba00c71b 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -599,10 +599,10 @@ static int fcoe_netdev_config(struct fc_lport *lport, struct net_device *netdev) setup_timer(&port->timer, fcoe_queue_tim...
5bab87e6d465d54a2b5899e0f583d42f00dbee2e
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: Fix getting san mac for VLAN interface
Problem Details: Make sure we are get the SAN MAC address from the real netdev if the input netdev is a VLAN device. Signed-off-by: Yi Zou <yi.zou@intel.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/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 2274fcd4c713..c1fd7561f0bd 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -249,6 +249,7 @@ static int fcoe_interface_setup(struct fcoe_interface *fcoe, { struct fcoe_ctlr *fip = &fcoe->ctlr; struct netdev_hw_add...
bf361707c81f8e8e43e332bfc8838bae76ae021a
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: Fix checking san mac address
Problem Details: This was fixed before in 7a7f0c7 but it's introduced again recently. Signed-off-by: Yi Zou <yi.zou@intel.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/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 343900ac0ece..2274fcd4c713 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -275,7 +275,7 @@ static int fcoe_interface_setup(struct fcoe_interface *fcoe, rcu_read_lock(); for_each_dev_addr(netdev, ha) { if ((ha-...
ab593b187391bdd03ccad2968972a2e118a88cd4
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: register FC4 features with the FC switch
Problem Details: Customers and certification tests have pointed out that we don't show up on the switch management software as an initiator. On some MDS switches 'show fcns database' command shows libfc initiators as 'fcp' not 'fcp:init' like other initiators. On others switches, I think the switch gets the features ...
```diff diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index d3aec1959394..1bcc5e11d2c0 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -122,6 +122,7 @@ static const char *fc_lport_state_names[] = { [LPORT_ST_RSNN_NN] = "RSNN_NN", [LPORT_ST_RSPN_ID] = ...
386309ce927a308d7742a6fb24a536d3383fbd49
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfcoe: fcoe: simplify receive FLOGI response
Problem Details: There was a locking problem where the fip->lock was held during the call to update_mac(). The rtnl_lock() must be taken before the fip->lock, not the other way around. This fixes that. Now that fcoe_ctlr_recv_flog() is called only from the response handler to a FLOGI request, some checking can be el...
```diff diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index b15ec996b477..343900ac0ece 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -2247,15 +2247,12 @@ static void fcoe_flogi_resp(struct fc_seq *seq, struct fc_frame *fp, void *arg) mac = fr_cb(fp)->granted_mac; if (is_...
093bb6a2d378ee83fc6ab886c772b6be86abb5a8
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: add set_fid function to libfc template
Problem Details: This is to notify the LLD when an FC_ID is assigned to the local port. The fnic driver needs to push the assigned FC_ID to firmware. It currently does this by intercepting the FLOGI responses, and in order to make that code more common with FIP and NPIV, it makes more sense to wait until the local por...
```diff diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 90930c435455..653b52dd2ff7 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -732,6 +732,27 @@ static void fc_lport_enter_ready(struct fc_lport *lport) lport->tt.disc_start(fc_lport_disc_callback,...
52a6690d3f0cb7414c34b1e26c569b32d4987662
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix fc_els_resp_type to correct display of CT responses
Problem Details: Local port debug messages were using fc_els_resp_type() which showed all CT responses as rejects. Handle CT responses correctly based by inspecting fh_type. I decided not to rename the function to keep the patch smaller. We could call it just fc_resp_type() or fc_elsct_resp_type(). Signed-off-by: Jo...
```diff diff --git a/drivers/scsi/libfc/fc_elsct.c b/drivers/scsi/libfc/fc_elsct.c index 01be43f80f34..53748724f2c5 100644 --- a/drivers/scsi/libfc/fc_elsct.c +++ b/drivers/scsi/libfc/fc_elsct.c @@ -90,6 +90,9 @@ EXPORT_SYMBOL(fc_elsct_init); const char *fc_els_resp_type(struct fc_frame *fp) { const char *msg; + st...
5f9a056db9c7973c46337ec8d034323aa72bf206
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix symbolic name registrations smashing skb data
Problem Details: The strncpy for RSPN_ID and RSNN_NN requests was padding past the allocated frame size. Get the string length before filling in the ct header. Signed-off-by: Joe Eykholt <jeykholt@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/include/scsi/fc_encode.h b/include/scsi/fc_encode.h index c8968d31c610..ab2260cb149c 100644 --- a/include/scsi/fc_encode.h +++ b/include/scsi/fc_encode.h @@ -111,6 +111,7 @@ static inline int fc_ct_fill(struct fc_lport *lport, enum fc_fh_type *fh_type) { struct fc_ct_req *ct; + size_t l...
6049d95a8a223e2dc3a476dea9f0fbc9b580f38f
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix RNN_ID smashing skb payload
Problem Details: The code that filled in the name server RNN_ID (register node name) request had somehow gotten a line in it from the RFT_ID code which copies 32 bytes of data over the relatively short payload. This caused some corruption and hangs. Simply deleted the extraneous line. Signed-off-by: Joe Eykholt <jeyk...
```diff diff --git a/include/scsi/fc_encode.h b/include/scsi/fc_encode.h index 9afcbb94ec30..c8968d31c610 100644 --- a/include/scsi/fc_encode.h +++ b/include/scsi/fc_encode.h @@ -134,7 +134,6 @@ static inline int fc_ct_fill(struct fc_lport *lport, ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rn_id)); hton24(ct...
0f51c2e54c0bfdb6b02c53f6d7dd9b35f91821b6
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfcoe: fip: use SCSI host number to identify debug messages.
Problem Details: Use scsi host number to identify debug messages. Previously, no instance information was given, so if multiple ports were active, it became confusing. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@sus...
```diff diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 1ea17a3c8749..99f583f40df3 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c @@ -74,9 +74,10 @@ do { \ LIBFCOE_CHECK_LOGGING(LIBFCOE_LOGGING, \ printk(KERN_INFO "libfcoe: " fmt, ##args);) ...
a7bbc7f40aa01eefef3d367349e1e6e87881a305
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe, libfc: use single frame allocation API
Problem Details: Cleans up frame allocation APIs to have just single fc_frame_alloc API. Removes _fc_frame_alloc, renames __fc_frame_alloc to _fc_frame_alloc. Modifies fc_fcp_send_data for removed _fc_frame_alloc, fc_fcp_send_data was the only user of removed _fc_frame_alloc. Also Adds check in fc_frame_alloc to do ...
```diff diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 970b54f653b7..567eee7b8609 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -505,18 +505,11 @@ static int fc_fcp_send_data(struct fc_fcp_pkt *fsp, struct fc_seq *seq, */ if (tlen % 4) using_sg...
07aac328342d6ca1725d901e1c5da8a1aa88f557
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Export FC headers
Problem Details: Export fc_els.h, fc_fs.h, fc_gs.h and fc_ns.h so that they may be used by applications. This will be needed for FC Passthrough applications like fcping, but could be used by other applications. Fix to include <linux/types.h> to exported files provided by Chris Leech <christopher.leech@intel.com>. Si...
```diff diff --git a/include/scsi/Kbuild b/include/scsi/Kbuild index 33b2750e9283..b3a0ee6b2f1c 100644 --- a/include/scsi/Kbuild +++ b/include/scsi/Kbuild @@ -2,3 +2,4 @@ header-y += scsi.h header-y += scsi_netlink.h header-y += scsi_netlink_fc.h header-y += scsi_bsg_fc.h +header-y += fc/ diff --git a/include/scsi/f...
1a7b75ae719754c77ccd4d18b0d258ae5db38a25
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Move non-common routines and prototypes out of libfc.h
Problem Details: This patch moves all non-common routines and function prototypes out of libfc.h and into the appropriate .c files. It makes these routines 'static' when necessary and removes any unnecessary EXPORT_SYMBOL statements. A result of moving the fc_exch_seq_send, fc_seq_els_rsp_send, fc_exch_alloc and fc_se...
```diff diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 170cdf4bac97..659bb05287f3 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -107,7 +107,6 @@ static void fc_seq_ls_rjt(struct fc_seq *, enum fc_els_rjt_reason, enum fc_els_rjt_explan); static voi...
03b147083a2f9a2a3fbbd2505fa88ffa3c6ab194
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_lib: fix potential NULL dereference
Problem Details: Stanse found a potential NULL dereference in scsi_kill_request. Instead of triggering BUG() in 'if (unlikely(cmd == NULL))' branch, the kernel will Oops earlier on cmd dereference. Move the dereferences after the if. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: James Bottomley <Jam...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 108655230b59..e495d3813948 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1359,9 +1359,9 @@ static int scsi_lld_busy(struct request_queue *q) static void scsi_kill_request(struct request *req, struct request_queue *q) ...
1e49f78505b2c4df193614d774bf46d067cda7d8
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_debug: fix Thin provisioning support
Problem Details: While testing scsi_debug with these patches I found a problem with the Block Limits VPD page function. The length returned by the inquiry_evpd_b0() function was too short. A patch to fix that and a cosmetic change (that the form factor of scsi_debug is less than 1.8 inches) is attached. Signed-off-by:...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index cb4bf16b4e66..0b575c871007 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -685,10 +685,12 @@ static int inquiry_evpd_89(unsigned char * arr) } +/* Block limits VPD page (SBC-3) */ static unsigned char vpdb0...
14caf44c69184ed72d46a2f883311daf27a4192f
Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe, libfc: fix an libfc issue with queue ramp down in libfc
Problem Details: The cmd_per_lun value is used by scsi-ml as fall back lowest queue_depth value but in case of libfc cmd_per_lun is set to same value as max queue_depth = 32. So this patch reduces cmd_per_lun value to 3 and configures each lun with default max queue_depth 32 in fc_slave_alloc. Signed-off-by: Vasu Dev...
```diff diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index aef29afb6e71..4efbc17a7d7f 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -137,7 +137,7 @@ static struct scsi_host_template fcoe_shost_template = { .change_queue_depth = fc_change_queue_depth, .change_queue_type ...
b4a9c7ede96e90f7b1ec009ce7256059295e76df
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix free of fc_rport_priv with timer pending
Problem Details: Timer crashes were caused by freeing a struct fc_rport_priv with a timer pending, causing the timer facility list to be corrupted. This was during FC uplink flap tests with a lot of targets. After discovery, we were doing an PLOGI on an rdata that was in DELETE state but not yet removed from the look...
```diff diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 49abb839a223..324e156b5d07 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -86,6 +86,7 @@ static const char *fc_rport_state_names[] = { [RPORT_ST_LOGO] = "LOGO", [RPORT_ST_ADISC] = "ADISC", [...
8f550f937e9fdafa5c37e348e214aecec851ef3f
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix memory corruption caused by double frees and bad error handling
Problem Details: I was running into several different panics under stress, which I traced down to a few different possible slab corruption issues in error handling paths. I have not yet looked into why these exchange sends fail, but with these fixes my test system is much more stable under stress than before. fc_elsct...
```diff diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index c48799e9dd8e..d4cb3f9b1a0d 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c @@ -371,7 +371,7 @@ static void fc_disc_gpn_ft_req(struct fc_disc *disc) disc, lport->e_d_tov)) return; err: - fc_disc_...
d37322a43ebac79eef417149f5696390cf8872db
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Fix frags in frame exceeding SKB_MAX_FRAGS in fc_fcp_send_data
Problem Details: In case of sequence offload, in fc_fcp_send_data(), the skb_fill_page_info() called may end up adding more frags to the skb_shinfo(fp_skb(fp))->frags[], exceeding SKB_MAX_FRAGS, this eventually corrupts the memory. I am adding the FR_FRAME_SG_LEN back, but as SKB_MAX_FRAGS -1, leaving 1 for our fcoe_eo...
```diff diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 40ed7442d9df..28bfe1c2c50a 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -574,7 +574,8 @@ static int fc_fcp_send_data(struct fc_fcp_pkt *fsp, struct fc_seq *seq, tlen -= sg_bytes; remaining -= sg_b...
1b69bc062c2a4c8f3e15ac69f487afec3aa8d774
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: lport: fix minor documentation errors
Problem Details: Fix minor errors. A debug message said an RLIR was received instead of ECHO. "Expected" was misspelled in several places. Fix a type cast from u32 to __be32. Rob, Some of these may have been also taken care of in your other doc cleanup patch. Feel free to fold them in. Signed-off-by: Joe Eykholt <je...
```diff diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index bd2f77197447..eefe87d8efb3 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -329,7 +329,7 @@ static void fc_lport_add_fc4_type(struct fc_lport *lport, enum fc_fh_type type) * @sp: current sequence...
4347fa66878e079766258bc0d077c350cb31a799
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Fix wrong scsi return status under FC_DATA_UNDRUN
Problem Details: This bug is exposed when there is a link flap in LLD. Particularly, when it happens right after a SCSI write command is sent out, no FCP_DATA is sent, causing fsp->status_code to be set as FC_DATA_UNDRUN in fc_fcp_complete_locked even no SCSI status is received. Consequently, fc_io_compl treats this as...
```diff diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index ade962d74fb9..40ed7442d9df 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -1849,7 +1849,8 @@ static void fc_io_compl(struct fc_fcp_pkt *fsp) * scsi status is good but transport level * underrun....
5e472d077f45de4f37365171bd742f18b3ef20de
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix ddp in fc_fcp for 0 xid
Problem Details: xid 0 was used as an indication of invalid xid before but now xid 0 can be used as a valid exchange i. This patch fixes the ddp completion in fcp layer, i.e., in fc_fcp.c:fc_fcp_ddp_done() function, to make sure it does not use xid 0 for indication of an invalid xid, instead, it now uses use FC_XID_UNK...
```diff diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 59a4408b27b5..e6c6f4742368 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -302,10 +302,13 @@ static void fc_fcp_ddp_done(struct fc_fcp_pkt *fsp) if (!fsp) return; + if (fsp->xfer_ddp == FC_XID_UNKN...
85b5893ca97c69e409ecbb5ee90a5d99882369c4
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix typo in retry check on received PRLI
Problem Details: A received Fibre Channel ELS PRLI request contains a bit that indicates whether the remote port supports certain retry processing sequences. The test for this bit was somehow coded to use multiply instead of AND! This case would apply only for target mode operation, and it is unlikely to be noticed a...
```diff diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 03ea6748e7ee..bdc973278d8d 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -1402,7 +1402,7 @@ static void fc_rport_recv_prli_req(struct fc_rport_priv *rdata, break; case FC_TYPE_FCP: ...
4a5c4a5ed2b8b7fac68368e7ab8cb415dd006418
Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmvfc: Fix adapter cancel flags for terminate_rport_io
Problem Details: When issuing a Cancel to the virtual fibre channel adapter, the interface specifies a flags field for the client to indicate what kind of error recovery is being performed. Fix up these flags for terminate_rport_io to indicate an abort task set rather than a target reset. Signed-off-by: Brian King <br...
```diff diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 696328699ec3..2c73b831544c 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -2064,12 +2064,24 @@ static int ibmvfc_eh_device_reset_handler(struct scsi_cmnd *cmd) } /** - * ibmvfc_dev_cancel_...
7043110550f19c1556ad18dc4d63b1c9eaf9e4fd
Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmvfc: Fix locking in ibmvfc_remove
Problem Details: Need to grab the host lock around the call to ibmvfc_link_down. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index c35d8054dbbb..d37230faf086 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -4420,7 +4420,11 @@ static int ibmvfc_remove(struct vio_dev *vdev) ENTER; ibmvfc_remove_trace_file(&vhost->host-...
44d9269481bb43df445adf464b06ff031e67d7ea
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_debug: Thin provisioning support
Problem Details: This version fixes 64-bit modulo on 32-bit as well as inadvertent map updates when TP was disabled. Implement support for thin provisioning in scsi_debug. No actual memory de-allocation is taking place. The intent is to emulate a thinly provisioned storage device, not to be one. There are four new ...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index c4103bef41b5..cb4bf16b4e66 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -44,6 +44,8 @@ #include <net/checksum.h> +#include <asm/unaligned.h> + #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h> #include...
3d65c9488cadd2f11bd4d60c7266e639ece5d0d6
Analyze and fix the following issue in the Linux kernel code: Xen balloon: fix totalram_pages counting.
Problem Details: Change totalram_pages when a single page is added/removed to the ballooned list. This avoid totalram_pages to be set erroneously to max_pfn at boot. Signed-off-by: Gianluca Guida <gianluca.guida@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stable Kernel <stable@k...
```diff diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index d31505b6f7a4..6eb62654410a 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -136,6 +136,8 @@ static void balloon_append(struct page *page) list_add(&page->lru, &ballooned_pages); balloon_stats.balloon_low++; } + + totalram...
b69f2292063d2caf37ca9aec7d63ded203701bf3
Analyze and fix the following issue in the Linux kernel code: block: Fix io_context leak after failure of clone with CLONE_IO
Problem Details: With CLONE_IO, parent's io_context->nr_tasks is incremented, but never decremented whenever copy_process() fails afterwards, which prevents exit_io_context() from calling IO schedulers exit functions. Give a task_struct to exit_io_context(), and call exit_io_context() instead of put_io_context() in co...
```diff diff --git a/block/blk-ioc.c b/block/blk-ioc.c index dcd041290b28..cbdabb0dd6d7 100644 --- a/block/blk-ioc.c +++ b/block/blk-ioc.c @@ -66,14 +66,14 @@ static void cfq_exit(struct io_context *ioc) } /* Called by the exitting task */ -void exit_io_context(void) +void exit_io_context(struct task_struct *task) ...
61cc74fbb87af6aa551a06a370590c9bc07e29d9
Analyze and fix the following issue in the Linux kernel code: block: Fix io_context leak after clone with CLONE_IO
Problem Details: With CLONE_IO, copy_io() increments both ioc->refcount and ioc->nr_tasks. However exit_io_context() only decrements ioc->refcount if ioc->nr_tasks reaches 0. Always call put_io_context() in exit_io_context(). Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com> Signed-off-by: Jens Axboe <jens.axb...
```diff diff --git a/block/blk-ioc.c b/block/blk-ioc.c index d4ed6000147d..dcd041290b28 100644 --- a/block/blk-ioc.c +++ b/block/blk-ioc.c @@ -80,8 +80,8 @@ void exit_io_context(void) ioc->aic->exit(ioc->aic); cfq_exit(ioc); - put_io_context(ioc); } + put_io_context(ioc); } struct io_context *alloc_io_c...
6060e8df517847bf445ebc61de7d4d9c7faae990
Analyze and fix the following issue in the Linux kernel code: ARM: I-cache: flush executable mappings in flush_cache_range()
Problem Details: Dirk Behme reported instability on ARM11 SMP (VIPT non-aliasing cache) caused by the dynamic linker changing protection on text pages to write GOT entries. The problem is due to an interaction between the write faulting code providing new anonymous pages which are incoherent with the I-cache due to wr...
```diff diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index f8feb5d919fe..329594e760cd 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c @@ -66,10 +66,9 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned : : "r" (0) : "cc"); - __flush_icache_all()...
e02f0e868a2664c1f5d72cd9a7fc08b4c4309169
Analyze and fix the following issue in the Linux kernel code: doc: Fix a typo in slub.txt.
Problem Details: Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt index 510917ff59ed..b37300edf27c 100644 --- a/Documentation/vm/slub.txt +++ b/Documentation/vm/slub.txt @@ -245,7 +245,7 @@ been overwritten. Here a string of 8 characters was written into a slab that has the length of 8 characters. However, a ...
870571a2ef6fb2d6306673b4376fec93d441e013
Analyze and fix the following issue in the Linux kernel code: hdlc: spelling fix in find_pvc() comment
Problem Details: Signed-off-by: Rudy Matela <rudy.matela@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index 840cff72a0f1..4d4c543c1464 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c @@ -182,7 +182,7 @@ static inline pvc_device* find_pvc(hdlc_device *hdlc, u16 dlci) if (pvc->dlci == dlci) return pvc; if (pvc->dlc...
1b35edaf9ff33ee44db24aa38060061927a89185
Analyze and fix the following issue in the Linux kernel code: doc: fix regulator docs cut-and-pasteism
Problem Details: Minor copy-and-pasteism in the regulator docs (against git from today): Signed-off-by: Dave Gilbert <linux@treblig.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/power/regulator/consumer.txt b/Documentation/power/regulator/consumer.txt index 5f83fd24ea84..cdebb5145c25 100644 --- a/Documentation/power/regulator/consumer.txt +++ b/Documentation/power/regulator/consumer.txt @@ -104,7 +104,7 @@ to set the limit to 500mA when supplying power. Co...
86185af927bebbb094f686ce5e3c908c7a418f4c
Analyze and fix the following issue in the Linux kernel code: mtd: Fix comment in Kconfig
Problem Details: IXDP425 and Coyote aren't based on IXP2000 but on IXP425. Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index faf482f101ee..847e214ade59 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig @@ -387,9 +387,9 @@ config MTD_IXP2000 depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP2000 help This enables MTD access to flash d...
bebd04cc4569844effbdae49c01a48e57fa77864
Analyze and fix the following issue in the Linux kernel code: doc: Fix IRQ chip docs
Problem Details: This patch updates the IRQ docs to match reality. Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl index c671a0168096..1448b33fd222 100644 --- a/Documentation/DocBook/genericirq.tmpl +++ b/Documentation/DocBook/genericirq.tmpl @@ -417,8 +417,8 @@ desc->chip->end(); </para> <para> To make use of the spli...
972b94ffb90ea6d20c589d9a47215df103388ddd
Analyze and fix the following issue in the Linux kernel code: drivers/ata/libata-sff.c: comment spelling fixes
Problem Details: Comment spelling fixes and whitespace adjustment. Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index bbbb1fab1755..d210ef2d5608 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c @@ -736,7 +736,7 @@ unsigned int ata_sff_data_xfer(struct ata_device *dev, unsigned char *buf, /* * Use io*16_rep() accessors here as we...
e281d75e21ca4a876044d1dd5fa2f4336c7c43d0
Analyze and fix the following issue in the Linux kernel code: fix typos/grammos in Documentation/edac.txt
Problem Details: Trivial patch fixes some typos in the Documentation/edac.txt file. Acked-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/edac.txt b/Documentation/edac.txt index 06f8f46692dc..79c533223762 100644 --- a/Documentation/edac.txt +++ b/Documentation/edac.txt @@ -80,7 +80,7 @@ is: broken_parity_status -as is located in /sys/devices/pci<XXX>/0000:XX:YY.Z directorys for +as is located in /sys/devices/pci<X...
be030e653f1f31b75684e0e9bca160f8dc7e7aa5
Analyze and fix the following issue in the Linux kernel code: fs/debugfs/inode.c: fix comment typos
Problem Details: Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index d22438ef7674..0d23b52dd22c 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -184,7 +184,7 @@ static int debugfs_create_by_name(const char *name, mode_t mode, /** * debugfs_create_file - create a file in the debugfs filesystem * @name: a ...
809aaaae162e58696c61e1d0c156cfe16bd309e2
Analyze and fix the following issue in the Linux kernel code: sky2: fix sky2_link_down copy/paste comment error
Problem Details: Fix copy/paste comment error from sky2_link_up to sky2_link_down. Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 6a10d7ba5877..a76cd66c2282 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -1975,7 +1975,7 @@ static void sky2_link_down(struct sky2_port *sky2) netif_carrier_off(sky2->netdev); - /* Turn on link LED */ + /* Turn off link LED */ sky2...
fbfecd3712f917ca210a55c157233d88b785896b
Analyze and fix the following issue in the Linux kernel code: tree-wide: fix typos "couter" -> "counter"
Problem Details: This patch was generated by git grep -E -i -l 'couter' | xargs -r perl -p -i -e 's/couter/counter/' Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index ddccf5fa56b6..075eedc7e768 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -3238,7 +3238,7 @@ static u64 s2io_mdio_read(u32 mmd_type, u64 addr, struct net_device *dev) /** * s2io_chk_xpak_counter - Function to check the status of the x...
bf48aabb894fd0639ab72a26e8abbd7683ef23c2
Analyze and fix the following issue in the Linux kernel code: tree-wide: fix typos "offest" -> "offset"
Problem Details: This patch was generated by git grep -E -i -l 'offest' | xargs -r perl -p -i -e 's/offest/offset/' Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c index 644962adda97..81ea52c4faff 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/drivers/net/wireless/ath/ath5k/eeprom.c @@ -1492,7 +1492,7 @@ ath5k_eeprom_read_target_rate_pwr_info(struct ath5k_hw *ah, uns...
fb3d38b9904888aa8e36d88b2388dc70934b2169
Analyze and fix the following issue in the Linux kernel code: fix kerneldoc for set_irq_msi()
Problem Details: Signed-off-by: Liuweni <qingshenlwy@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index c1660194d115..ae70e93b29b5 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -166,11 +166,11 @@ int set_irq_data(unsigned int irq, void *data) EXPORT_SYMBOL(set_irq_data); /** - * set_irq_data - set irq type data for an irq + * set_irq_msi - s...
137f1188ef2747e987cbb469e6a54dde3350cb51
Analyze and fix the following issue in the Linux kernel code: spidev: fix double "of of" in comment
Problem Details: Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 5d23983f02fc..d9b4100ade9c 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -42,7 +42,7 @@ * This supports acccess to SPI devices using normal userspace I/O calls. * Note that while traditional UNIX/POSIX I/O semantics are half du...