id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
71e585fca25c9ccde82196fd1aef78e34312e899
Analyze and fix the following issue in the Linux kernel code: [PATCH] drivers/net/wireless/ipw2200.c: fix an array overun
Problem Details: This patch fixes a big array overun found by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 65c5b1422ec9..93d53f9dab0e 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -9972,9 +9972,8 @@ static int ipw_ethtool_set_eeprom(struct net_device *dev, return -EINVAL; mutex_lock(&p->mutex...
f44349f2217d05e4575f24edc3c0e0022f5d448f
Analyze and fix the following issue in the Linux kernel code: [PATCH] ieee80211: Don't update network statistics from off-channel packets.
Problem Details: This patch fixes a problem in the ieee80211 probe response and beacon reception code that would use the packet statistics for a network even if they were received on a channel other than that which the network exists on. This causes a problem in overlapping channels where, for example, a strong AP on ...
```diff diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index 785d5a170a7f..a7f2a642a512 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c @@ -1345,7 +1345,19 @@ static void update_network(struct ieee80211_network *dst, ieee80211_network_reset(dst); dst->ibss_dfs ...
9006ea75cfaded82acbc34d03e9d4e86447f40a9
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipw2200: switch to the new ipw2200-fw-3.0 image format
Problem Details: This patch modifies the driver to support the ipw2200-fw-3.0 image format. The 3.0 fw image does not add any new capabilities, but as a result of image format changes, it should fix two problems experienced by users: 1) Race conditions with the request_firmware interface and udev/hotplug are improved...
```diff diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 078f33b01c2f..0b74b5a16647 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -2829,33 +2829,11 @@ static void ipw_arc_release(struct ipw_priv *priv) mdelay(5); } -struct fw_header { - u32 ve...
3e1555bae145ab2d079a1823cbdd5c486503d147
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipw2200: export `debug' module param only if CONFIG_IPW2200_DEBUG
Problem Details: Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index d12ef04fb4be..a56a77e8f32b 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -11185,8 +11185,10 @@ MODULE_PARM_DESC(auto_create, "auto create adhoc network (default on)"); module_param(led, int,...
1d1b09eb144e414ade1f44e21852fc60f2cf965b
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipw2200: Change debug level for firmware error logging
Problem Details: Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index d2fc8400d3ab..d12ef04fb4be 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -1796,9 +1796,9 @@ static void ipw_irq_tasklet(struct ipw_priv *priv) } if (inta & IPW_INTA_BIT_FATAL_ERROR) { -...
e8c69e27d14a5fb15df9967f8c8ec5978af33ba8
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipw2200: Fix ipw_sw_reset() implementation inconsistent with comment
Problem Details: Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index b80ebd37483e..e9804450ca6c 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -8064,7 +8064,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) if ((priv->pci_dev->device == 0x4223...
d6d5b5c13e5003c9d33dcdcfdf1febc6efd7d319
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipw2200: Fix rf_kill is activated after mode change with 'disable=1'
Problem Details: When loading the ipw2200 module with disabled=1, rf_kill is activated after every mode change. This is caused by ipw_sw_reset() is called when a mode is changed. The patch fixed the problem by distinguishing the purposes with the 'option' paramenter. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off...
```diff diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index dfa2efb3e215..b80ebd37483e 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -7978,7 +7978,14 @@ static void ipw_rx(struct ipw_priv *priv) #define DEFAULT_SHORT_RETRY_LIMIT 7U #define DEFAULT_L...
85149bace30eae1dc1f86d2c327329673123dd22
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipw2200: fix a potential NULL pointer dereference
Problem Details: Only on CONFIG_IPW2200_DEBUG is not defined Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 4722de13f1db..129891feb43f 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -7809,12 +7809,10 @@ static void ipw_rx(struct ipw_priv *priv) while (i != r) { rxb = priv->rxq->queue[i]; -#if...
48a847709f821b5eecd45ae7660add1869f9cd37
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipw2200: print geography code upon module load
Problem Details: Given the amount of support requests for the meaning of the geography code I've written a patch for printing this information on module load no matter the debug level. I've also added a section to the README.ipw2200 file listing the geography codes and their meaning. Signed-off-by: Henrik Brix Anders...
```diff diff --git a/Documentation/networking/README.ipw2200 b/Documentation/networking/README.ipw2200 index c6492d3839fa..712c5681338b 100644 --- a/Documentation/networking/README.ipw2200 +++ b/Documentation/networking/README.ipw2200 @@ -26,6 +26,7 @@ Index 1.2. Module parameters 1.3. Wireless Extension Private Meth...
6f5e6b9e69bf043074a0edabe3d271899c34eb79
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix free swap cache latency
Problem Details: Lee Revell reported 28ms latency when process with lots of swapped memory exits. 2.6.15 introduced a latency regression when unmapping: in accounting the zap_work latency breaker, pte_none counted 1, pte_present PAGE_SIZE, but a swap entry counted nothing at all. We think of pages present as the slow...
```diff diff --git a/mm/memory.c b/mm/memory.c index 9abc6008544b..85e80a57db29 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -623,11 +623,12 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb, (*zap_work)--; continue; } + + (*zap_work) -= PAGE_SIZE; + if (pte_present(ptent)) { struct page ...
7670f023aabd976c25862e4c6fb9f6d9d2758153
Analyze and fix the following issue in the Linux kernel code: [PATCH] kbuild: fix buffer overflow in modpost
Problem Details: Jiri Benc <jbenc@suse.cz> reported that modpost would stop with SIGABRT if used with long filepaths. The error looked like: > Building modules, stage 2. > MODPOST > *** glibc detected *** scripts/mod/modpost: realloc(): invalid next size: +0x0809f588 *** > [...] Fix this by allocating at least the...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index f70ff13d4818..b8b2a560b26b 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -508,12 +508,7 @@ buf_printf(struct buffer *buf, const char *fmt, ...) va_start(ap, fmt); len = vsnprintf(tmp, SZ, fmt, ap); - if (buf->size - buf-...
5b40dc780ed996162f3af8712eb03beb24dcdbef
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix race in pagevec_strip?
Problem Details: We can call try_to_release_page() with PagePrivate off and a valid page->mapping This may cause all sorts of trouble for the filesystem *_releasepage() handlers. XFS bombs out in that case. Lock the page before checking for page private. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Nick P...
```diff diff --git a/mm/swap.c b/mm/swap.c index e9ec06d845e8..b524ea90bddb 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -393,7 +393,8 @@ void pagevec_strip(struct pagevec *pvec) struct page *page = pvec->pages[i]; if (PagePrivate(page) && !TestSetPageLocked(page)) { - try_to_release_page(page, 0); + if (PageP...
8ba32fde2c5be52865b2fd7e5e3752a46971fabe
Analyze and fix the following issue in the Linux kernel code: [PATCH] dm stripe: Fix bounds
Problem Details: The dm-stripe target currently does not enforce that the size of a stripe device be a multiple of the chunk-size. Under certain conditions, this can lead to I/O requests going off the end of an underlying device. This test-case shows one example. echo "0 100 linear /dev/hdb1 0" | dmsetup create line...
```diff diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index ab89278a56bf..697aacafb02a 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c @@ -103,9 +103,15 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) return -EINVAL; } + if (((uint32_t)ti->len) & (ch...
82c3c03a4096badd026c6e337f3c5dde020e9ec6
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: check for online cpus before bringing them up
Problem Details: Bryce reported a bug wherein offlining CPU0 (on x86 box) and then subsequently onlining it resulted in a lockup. On x86, CPU0 is never offlined. The subsequent attempt to online CPU0 doesn't take that into account. It actually tries to bootup the already booted CPU. Following patch fixes the proble...
```diff diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index eba7f53f8b4a..7007e1783797 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -1029,6 +1029,16 @@ int __devinit smp_prepare_cpu(int cpu) int apicid, ret; lock_cpu_hotplug(); + + /* + * On x86, CPU0 is neve...
8532159f5521ba24e697f0d25970ae89ff62a1f2
Analyze and fix the following issue in the Linux kernel code: [PATCH] v9fs: fix overzealous dropping of dentry which breaks dcache
Problem Details: There is a d_drop in dir_release which caused problems as it invalidates dcache entries too soon. This was likely a part of the wierd cwd behavior folks were seeing. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torva...
```diff diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index ae6d032b9b59..cd5eeb032d64 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -202,7 +202,6 @@ int v9fs_dir_release(struct inode *inode, struct file *filp) filp->private_data = NULL; } - d_drop(filp->f_dentry); return 0; } ```
a0a0c28c1a7109d7955815074c52cac079ab3ba5
Analyze and fix the following issue in the Linux kernel code: [PATCH] posix-timers: fix requeue accounting when signal is ignored
Problem Details: When the posix-timer signal is ignored then the timer is rearmed by the callback function. The requeue pending accounting has to be fixed up else the state might be wrong. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Mor...
```diff diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 216f574b5ffb..fa895fc2ecf5 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c @@ -353,6 +353,7 @@ static int posix_timer_fn(void *data) hrtimer_forward(&timr->it.real.timer, timr->it.real.interval); ret = HRTIMER_RESTAR...
9cea236492ebabb9545564eb039aa0f477a05c96
Analyze and fix the following issue in the Linux kernel code: [XFS] Flush and invalidate dirty pages at the start of a direct read also,
Problem Details: else we can hit a delalloc-extents-via-direct-io BUG. SGI-PV: 949916 SGI-Modid: xfs-linux-melb:xfs-kern:25483a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index ba07b83f988d..2a936bd38ce7 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c @@ -270,6 +270,10 @@ xfs_read( } } + if (unlikely((ioflags & IO_ISDIRECT) && VN_CACHED(vp))) + VOP_FLUSHINVAL_PAGES(vp, ctooff(of...
ce9d37c257ceba5b4d089c544e4673546f647565
Analyze and fix the following issue in the Linux kernel code: [XFS] Merge Yingpings fix for a vn_count assert failure during QA -
Problem Details: another ENOSPC condition. SGI-PV: 950784 SGI-Modid: xfs-linux-melb:xfs-kern:25482a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 64c3395074de..af487437bd7e 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -491,6 +491,8 @@ xfs_vn_symlink( d_instantiate(dentry, ip); xfs_validate_fields(dir, &vattr); xfs_validate_fields(ip, ...
b12dd34298cf0cff9f337f667045335140873039
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix an infinite loop issue in bulkstat when a corrupt inode is
Problem Details: detected. Thanks to Roger Willcocks. SGI-PV: 951054 SGI-Modid: xfs-linux-melb:xfs-kern:25477a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 86a8451d10fc..b1e95707e7cf 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -253,7 +253,8 @@ xfs_itobp( xfs_inode_t *ip, xfs_dinode_t **dipp, xfs_buf_t **bpp, - xfs_daddr_t bno) + xfs_daddr_t bno, + uint imap_flags) { xfs_buf_t *bp;...
2c276603c3e5ebf38155a9d1fbbda656d52d138e
Analyze and fix the following issue in the Linux kernel code: [PATCH] powerpc: Fix bug in bug fix for bug in lmb_alloc()
Problem Details: My patch (d7a5b2ffa1352f0310630934a56aecbdfb617b72) to always panic if lmb_alloc() fails is broken because it checks alloc < 0, but should be checking alloc == 0. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index 874cd103ce6e..417d58518558 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c @@ -232,7 +232,7 @@ unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, alloc = __lmb_alloc_base(size, align, max_addr); - if ...
898b1920a67048c1f38bb99777f4cff06380a59a
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix compile error for ML300/403
Problem Details: Needed due to changes in ppc_sys.c. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/ppc/platforms/4xx/virtex.h b/arch/ppc/platforms/4xx/virtex.h index 1a01b81cff11..c14325dfd7b1 100644 --- a/arch/ppc/platforms/4xx/virtex.h +++ b/arch/ppc/platforms/4xx/virtex.h @@ -27,7 +27,7 @@ /* Device type enumeration for platform bus definitions */ #ifndef __ASSEMBLY__ enum ppc_sys_dev...
bbbe1212bd6f815290f782ba5b489467b54131dc
Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc: Fix platform_notify functions marked __init
Problem Details: While adding USB support to an MV64360 based board this week, I discovered that all MV64x60 boards in the kernel have platform_notify functions marked with __init. This causes an oops if a device is added after boot. The patch below removes the __init markers. I do not have all these boards to test on...
```diff diff --git a/arch/ppc/platforms/cpci690.c b/arch/ppc/platforms/cpci690.c index 55be550a0811..790475c22fd7 100644 --- a/arch/ppc/platforms/cpci690.c +++ b/arch/ppc/platforms/cpci690.c @@ -288,7 +288,7 @@ cpci690_fixup_mpsc_pdata(struct platform_device *pdev) pdata->brg_clk_freq = cpci690_get_bus_freq(); } -...
232a347a444e687b5f8cf0f6485704db1c6024d3
Analyze and fix the following issue in the Linux kernel code: [netdrvr] fix array overflows in Chelsio driver
Problem Details: Adrian Bunk wrote: > The Coverity checker spotted the following two array overflows in > drivers/net/chelsio/sge.c (in both cases, the arrays contain 3 > elements): [snip] This is a bug. The array should contain 2 elements. Here is the fix. Signed-off-by: Scott Bardone <sbardone@chelsio.com> Signed-...
```diff diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index 2c5b849b7ba4..30ff8ea1a402 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c @@ -1021,7 +1021,7 @@ static void restart_tx_queues(struct sge *sge) if (test_and_clear_bit(nd->if_port, &sge->stopped_tx_qu...
c3d7a3a4eb5e8f290d7b1d61430eed1ebedeb936
Analyze and fix the following issue in the Linux kernel code: [PATCH] e1000 endianness bugs
Problem Details: return -E_NO_BIG_ENDIAN_TESTING; [E1000]: Fix 4 missed endianness conversions on RX descriptor fields. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 4c4db96d0b7b..84dcca3776ee 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -3710,7 +3710,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, e1000_rx_checksum(adapter, (uint32_t)(s...
c6cb3b5f368bae67c0b258cfebc0b9dbd8e1d929
Analyze and fix the following issue in the Linux kernel code: [PATCH] powerpc: enable NAP only on cpus who support it to avoid memory corruption
Problem Details: This patch fixes incorrect setting of powersave_nap to 1 on all PowerMacs, potentially causing memory corruption on some models. This bug was introuced by me during the 32/64 bits merge. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index 34714d3ea69a..bbe794891a20 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c @@ -2491,9 +2491,7 @@ found: pmac_mb.model_id = PMAC_TYPE_COMET; iounm...
0a45d4491d0f172e02126370f312405c5d473363
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix problem with time going backwards
Problem Details: The recent changes to keep gettimeofday in sync with xtime had the side effect that it was occasionally possible for the time reported by gettimeofday to go back by a microsecond. There were two reasons: (1) when we recalculated the offsets used by gettimeofday every 2^31 timebase ticks, we lost an ac...
```diff diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 2a7ddc579379..86f7e3d154d8 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -283,9 +283,9 @@ static inline void update_gtod(u64 new_tb_stamp, u64 new_stamp_xsec, * the two values of tb_update_count match and...
2d7f2ea9c989853310c7f6e8be52cc090cc8e66b
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix ext2 readdir f_pos re-validation logic
Problem Details: This fixes not one, but _two_, silly (but admittedly hard to hit) bugs in the ext2 filesystem "readdir()" function. It also cleans up the code to avoid the unnecessary goto mess. The bugs were related to re-valiating the f_pos value after somebody had either done an "lseek()" on the directory to an i...
```diff diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 7442bdd1267a..b3dbd716cd3a 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -256,11 +256,10 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir) unsigned long npages = dir_pages(inode); unsigned chunk_mask = ~(ext2_chunk_size(inode)-1); u...
dabaeff06cca86048cfa3f74ce59688bc3addba9
Analyze and fix the following issue in the Linux kernel code: [ARM] 3364/1: [cleanup] warning fix - definitions for enable_hlt and disable_hlt
Problem Details: Patch from Ben Dooks The enable_hlt and disable_hlt should be declared in include/asm/setup.h. This fixes sparse errors from arch/arm/kernel/process.c Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index eb2de8c10515..ec91d1ff032a 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h @@ -415,6 +415,9 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size return ret; } +extern void disable_hlt(...
84dff1a73013dbdd7d770c332ab84cbfed24741b
Analyze and fix the following issue in the Linux kernel code: [ARM] 3363/1: [cleanup] process.c - fix warnings
Problem Details: Patch from Ben Dooks Fix the following warnings from sparse: arch/arm/kernel/process.c:86:6: warning: symbol 'default_idle' was not declared. Should it be static? arch/arm/kernel/process.c:378:5: warning: symbol 'dump_fpu' was not declared. Should it be static? Include <linux/elfcore.h> for dump_f...
```diff diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 4b4e4cf79c80..489c069e5c3e 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -27,6 +27,7 @@ #include <linux/kallsyms.h> #include <linux/init.h> #include <linux/cpu.h> +#include <linux/elfcore.h> #include <asm/...
72df16f109b73be37977a26d342e9103e8851cb6
Analyze and fix the following issue in the Linux kernel code: [PATCH] ieee80211: Fix QoS is not active problem
Problem Details: Fix QoS is not active even the network and the card is QOS enabled. The problem is we pass the wrong ieee80211_network address to ipw_handle_beacon/ipw_handle_probe_response, thus the ieee80211_network->qos_data.active will not be set, causing the driver not sending QoS frames at all. Signed-off-by: H...
```diff diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index b410ab8bcf7a..7ac6a7165d9c 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c @@ -1417,10 +1417,10 @@ static void ieee80211_process_probe_response(struct ieee80211_device if (is_beacon(beacon->header.fra...
0df7861240b3484dea52d1f5782c69fd95b6cf23
Analyze and fix the following issue in the Linux kernel code: [PATCH] ieee80211: Fix CCMP decryption problem when QoS is enabled
Problem Details: Use the correct STYPE for Qos data. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/ieee80211/ieee80211_crypt_ccmp.c b/net/ieee80211/ieee80211_crypt_ccmp.c index 470221728503..3840d1911f2b 100644 --- a/net/ieee80211/ieee80211_crypt_ccmp.c +++ b/net/ieee80211/ieee80211_crypt_ccmp.c @@ -131,7 +131,7 @@ static void ccmp_init_blocks(struct crypto_tfm *tfm, a4_included = ((fc & (...
aa49cdd93be6328113f0c146fc72be173d578d27
Analyze and fix the following issue in the Linux kernel code: e100: fix eeh on pseries during ethtool -t
Problem Details: Olaf Hering reported a problem on pseries with e100 where ethtool -t would cause a bus error, and the e100 driver would stop working. Due to the new load ucode command the cb list must be allocated before calling e100_init_hw, so remove the call and just let e100_up take care of it. Signed-off-by: Je...
```diff diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 24253c807e55..f57a85feda3d 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -2154,6 +2154,9 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode) msleep(10); + pci_dma_sync_single_for_cpu(nic->pdev, nic->rx_to_c...
f13b83580acef03a36c785dccc534ccdd7e43084
Analyze and fix the following issue in the Linux kernel code: [PATCH] fs/namespace.c:dup_namespace(): fix a use after free
Problem Details: The Coverity checker spotted the following bug in dup_namespace(): <-- snip --> if (!new_ns->root) { up_write(&namespace_sem); kfree(new_ns); goto out; } ... out: return new_ns; <-- snip --> Callers expect a non-NULL result...
```diff diff --git a/fs/namespace.c b/fs/namespace.c index 058a44865beb..39c81a8d6316 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1338,7 +1338,7 @@ struct namespace *dup_namespace(struct task_struct *tsk, struct fs_struct *fs) new_ns = kmalloc(sizeof(struct namespace), GFP_KERNEL); if (!new_ns) - goto o...
17320a9644a45ccac51ce4ff4333276844abf72d
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix "thead" typo
Problem Details: Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index bc9e2f8ae326..a1d1b2906e8d 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c @@ -628,7 +628,7 @@ static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp) if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)...
b4fb376628e63bfc8071fc915b921da3db4a3385
Analyze and fix the following issue in the Linux kernel code: [PATCH] Page migration documentation update
Problem Details: Update the documentation for page migration. - Fix up bits and pieces in cpusets.txt - Rework text in vm/page-migration to be clearer and reflect the final version of page migration in 2.6.16. Mention Andi Kleen's numactl package that contains user space tools for page migration via libnuma. Ad...
```diff diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index 990998ee10b6..30c41459953c 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt @@ -4,8 +4,9 @@ Copyright (C) 2004 BULL SA. Written by Simon.Derr@bull.net -Portions Copyright (c) 2004 Silicon Graphics, Inc. +Portions ...
e843e280cbe218fc8387339806d344708dee348a
Analyze and fix the following issue in the Linux kernel code: [PATCH] "s390: multiple subchannel sets support" fix
Problem Details: It seems this patch got dropped (it was in addition to the `s390: improve response code handling in chsc_enable_facility()' patch). Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Mo...
```diff diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 1bbf231f8aaf..3c77d65960db 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -409,6 +409,9 @@ __init_channel_subsystem(struct subchannel_id schid, void *data) /* -ENXIO: no more subchannels. */ case -ENXIO: return ret...
3fb962bde48c413bfa419ec4413037e87955dcb6
Analyze and fix the following issue in the Linux kernel code: Fix a direct I/O locking issue revealed by the new mutex code.
Problem Details: Affects only XFS (i.e. DIO_OWN_LOCKING case) - currently it is not possible to get i_mutex locking correct when using DIO_OWN direct I/O locking in a filesystem due to indeterminism in the possible return code/lock/unlock combinations. This can cause a direct read to attempt a double i_mutex unlock in...
```diff diff --git a/fs/direct-io.c b/fs/direct-io.c index 848044af7e16..27f3e787faca 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -1155,15 +1155,16 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode, * For writes, i_mutex is not held on entry; it is never taken. * * DIO_LOCKING (simple lo...
a488edc914aa1d766a4e2c982b5ae03d5657ec1b
Analyze and fix the following issue in the Linux kernel code: [PATCH] JFS: Take logsync lock before testing mp->lsn
Problem Details: This fixes a race where lsn could be cleared before taking the lock Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index 2967b7393415..79b5404db100 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -532,10 +532,10 @@ dbUpdatePMap(struct inode *ipbmap, lastlblkno = lblkno; + LOGSYNC_LOCK(log, flags); if (mp->lsn != 0) { /* inherit older/smaller lsn */ ...
db9c9174e42bdc8d52bc18df7c55823cf4546eda
Analyze and fix the following issue in the Linux kernel code: [SCSI] fusion - memory leak, and initializing fields
Problem Details: Changelog: (1) fix memory leak: p->phy_info (2) initialize device_info and port_info data fields (3) initialize the hba firmware handle (4) initialize phy_id for attached phy_info data fields (5) initialize attached phy_info data fields Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: Ja...
```diff diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index cea10aa50d4a..b6a6f27082b6 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -749,6 +749,9 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) goto out_free_cons...
914c2d8e597798d62c2e0a3cba737bf6f611eecf
Analyze and fix the following issue in the Linux kernel code: [SCSI] fusion - removing target_id/bus_id from the VirtDevice structure
Problem Details: It makes no sense in keeping the target_id and bus_id in the VirtDevice structure, when it can be obtained from the VirtTarget structure. In addition, this patch fix's couple compilation bugs in mptfc.c when MPT_DEBUG_FC is enabled. This provided by Micheal Reed. Signed-off-by: Eric Moore <Eric.Moore...
```diff diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index 2b9c8b5522fa..9b58234add36 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h @@ -347,10 +347,7 @@ typedef struct _VirtTarget { } VirtTarget; typedef struct _VirtDevice { - VirtTarget *...
c972c70fa03097be4235fc441658290a3b7af06f
Analyze and fix the following issue in the Linux kernel code: [SCSI] fusion - static fix's
Problem Details: Patch previously provided from Adrian Bunk <bunk@stusta.de>, moving some functions to static. This is already in the -mm tree. Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 9960ef10366f..266414ca2814 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -180,6 +180,7 @@ static void mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf) static void...
3a892bef3f7e94c4d6c2c20b9a1b546f43679fd3
Analyze and fix the following issue in the Linux kernel code: [SCSI] fusion - move some debug firmware event debug msgs to verbose level
Problem Details: Created a debug level MPT_DEBUG_VERBOSE_EVENTS. Moving some of the more vebose debug messages for firwmare events into new debug level. Also added some more firmware events descriptions. Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/message/fusion/Makefile b/drivers/message/fusion/Makefile index 33ace373241c..51740b346224 100644 --- a/drivers/message/fusion/Makefile +++ b/drivers/message/fusion/Makefile @@ -4,6 +4,7 @@ #EXTRA_CFLAGS += -DMPT_DEBUG_MSG_FRAME #EXTRA_CFLAGS += -DMPT_DEBUG_SG #EXTRA_CFLAGS += -DMPT_DEBU...
e5b3a65fd7244e662691cf617145983ecde28cc9
Analyze and fix the following issue in the Linux kernel code: [SCSI] megaraid_sas: fix extended timeout handling
Problem Details: Replace the eh_timed_out method usage with setting sdev->timeout in slave_configure. Also only use the extended timeout for raid volumes, physical devices shouldn't need it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index 4f39dd01936d..38ede24b22a6 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c @@ -772,8 +772,6 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd ...
67963132638e67ad3c5aa16765e6f3f2f3cdd85c
Analyze and fix the following issue in the Linux kernel code: [PATCH] Plug kdump shutdown race window
Problem Details: lapic_shutdown() re-enables interrupts which is un-desirable for panic case, so use local_irq_save() and local_irq_restore() to keep the irqs disabled for kexec on panic case, and close a possible race window while kdump shutdown as shown in this stack trace -- BUG: spinlock lockup on CPU#1, bash/4...
```diff diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index f39e09ef64ec..776c90989e06 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c @@ -570,16 +570,18 @@ void __devinit setup_local_APIC(void) */ void lapic_shutdown(void) { + unsigned long flags; + if (!cpu_has_apic) retur...
cbf0ec6ee001ab89471397ac84105b2e3b2fd986
Analyze and fix the following issue in the Linux kernel code: Revert "[PATCH] x86-64: Fix up handling of non canonical user RIPs"
Problem Details: This reverts commit c33d4568aca9028a22857f94f5e0850012b6444b. Andrew Clayton and Hugh Dickins report that it's broken for them and causes strange page table and slab corruption, and spontaneous reboots. Let's get it right next time. Cc: Andrew Clayton <andrew@rootshell.co.uk> Cc: Hugh Dickins <hugh@...
```diff diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 22cb6ee074b9..7c10e9009d61 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S @@ -178,12 +178,6 @@ rff_trace: * Interrupts are off on entry. * Only called from user space. * - * EM64T CPUs have somewhat weird ...
e6d83d55698b73b4d5d55d3d7715a4c26030d577
Analyze and fix the following issue in the Linux kernel code: [PATCH] SUNRPC: Fix potential deadlock in RPC code
Problem Details: In rpc_wake_up() and rpc_wake_up_status(), it is possible for the call to __rpc_wake_up_task() to fail if another thread happens to be calling rpc_wake_up_task() on the same rpc_task. Problem noticed by Bruno Faccini. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Andrew M...
```diff diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 802d4fe0f55c..e838d042f7f5 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -515,16 +515,14 @@ struct rpc_task * rpc_wake_up_next(struct rpc_wait_queue *queue) */ void rpc_wake_up(struct rpc_wait_queue *queue) { - struct rpc_task *task; -...
c12e87f4652b1ba3be168b4f63a440399b941928
Analyze and fix the following issue in the Linux kernel code: [PATCH] NFSv4: fix mount segfault on errors returned that are < -1000
Problem Details: It turns out that nfs4_proc_get_root() may return raw NFSv4 errors instead of mapping them to kernel errors. Problem spotted by Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <t...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 984ca3454d04..f8c0066e02e1 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1430,7 +1430,7 @@ static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle, if (status == 0) status = nfs4_do_fsinfo(server, fhandle, info); ...
712917d1c002f820b177683f4fd491289bde3c32
Analyze and fix the following issue in the Linux kernel code: [PATCH] SUNRPC: fix a NULL pointer dereference in net/sunrpc/clnt.c
Problem Details: The Coverity checker spotted this possible NULL pointer dereference in rpc_new_client(). Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index d2f0550c4ba0..d78479782045 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -113,7 +113,7 @@ rpc_new_client(struct rpc_xprt *xprt, char *servname, err = -EINVAL; if (!xprt) - goto out_err; + goto out_no_xprt; if (vers >= program->nrvers...
143f412eb4c7cc48b9eb4381f9133b7d36c68075
Analyze and fix the following issue in the Linux kernel code: [PATCH] NFS: Fix a potential panic in O_DIRECT
Problem Details: Based on an original patch by Mike O'Connor and Greg Banks of SGI. Mike states: A normal user can panic an NFS client and cause a local DoS with 'judicious'(?) use of O_DIRECT. Any O_DIRECT write to an NFS file where the user buffer starts with a valid mapped page and contains an unmapped page, will...
```diff diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 04ab2fc360e7..4e9b3a1b36c5 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -57,6 +57,7 @@ #define NFSDBG_FACILITY NFSDBG_VFS #define MAX_DIRECTIO_SIZE (4096UL << PAGE_SHIFT) +static void nfs_free_user_pages(struct page **pages, int npages, int do_d...
f9a3879abf2f1a27c39915e6074b8ff15a24cb55
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix sigaltstack corruption among cloned threads
Problem Details: This patch fixes alternate signal stack corruption among cloned threads with CLONE_SIGHAND (and CLONE_VM) for linux-2.6.16-rc6. The value of alternate signal stack is currently inherited after a call of clone(... CLONE_SIGHAND | CLONE_VM). But if sigaltstack is set by a parent thread, and then if mu...
```diff diff --git a/kernel/fork.c b/kernel/fork.c index a8eab86de7f1..ccdfbb16c86d 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1061,6 +1061,12 @@ static task_t *copy_process(unsigned long clone_flags, */ p->clear_child_tid = (clone_flags & CLONE_CHILD_CLEARTID) ? child_tidptr: NULL; + /* + * sigaltstack...
3cb4f09fc2e98bbf26f8c900a94bf3910cd4d823
Analyze and fix the following issue in the Linux kernel code: [PATCH] mtd_dataflash, fix block vs page erase
Problem Details: Fix a bug in the block-erase optimization for Dataflash; it was using block erase even for smaller segments that need page erase. That wouldn't matter for JFFS2, which never erases less than one block (sometimes several blocks), but for other callers it might. Signed-off-by: David Brownell <dbrownell...
```diff diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 155737e7483f..a19480d07888 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c @@ -178,7 +178,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr) * ...
642fde17dceceb56c7ba2762733ac688666ae657
Analyze and fix the following issue in the Linux kernel code: Input: gameport - fix memory leak
Problem Details: Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index bcfd700829a1..36644bff379d 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c @@ -266,6 +266,7 @@ static void gameport_queue_event(void *object, struct module *owner, if ((event = kmall...
9d921116cc5e27c1950b7e7508fdefec04a69963
Analyze and fix the following issue in the Linux kernel code: Input: serio - fix memory leak
Problem Details: Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 966600779b70..6521034bc933 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c @@ -196,6 +196,7 @@ static void serio_queue_event(void *object, struct module *owner, if ((event = kmalloc(sizeof(struct serio_even...
2bfc3c6e9516ece6856ec7904319650a5d4d9871
Analyze and fix the following issue in the Linux kernel code: Input: i8042 - fix logic around pnp_register_driver()
Problem Details: Do not assume that pnp_register_driver() returns the number of devices claimed. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index a4c6f3522723..f606e96bc2f4 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h @@ -192,7 +192,9 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { #incl...
dd55563f635751327eb06ae569d4761a0220f2e0
Analyze and fix the following issue in the Linux kernel code: Input: ns558 - fix logic around pnp_register_driver()
Problem Details: Do not assume that pnp_register_driver() returns the number of devices claimed. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/gameport/ns558.c b/drivers/input/gameport/ns558.c index d2e55dc956ba..3e2d28f263e9 100644 --- a/drivers/input/gameport/ns558.c +++ b/drivers/input/gameport/ns558.c @@ -252,14 +252,14 @@ static struct pnp_driver ns558_pnp_driver; #endif -static int pnp_registered = 0; - static in...
9b104c12f12d6b9923e3b779a1f3e45efab7bae6
Analyze and fix the following issue in the Linux kernel code: Input: atkbd - fix complaints about 'releasing unknown key 0x7f'
Problem Details: Fix bat_xl and err_xl logic causing atkbd to complain about 'unknown key 0x7f'. Noted by Ben LaHaise. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index b45981870c7a..7d26ab4818b2 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -303,19 +303,19 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, if (atkbd->translated...
50a598de407ea2e2f4e20bc34eeefe8bb5a8071e
Analyze and fix the following issue in the Linux kernel code: Input: HID - fix duplicate key mapping for Logitech UltraX remote
Problem Details: This patch makes the "cc/teletext" key emit "KEY_TEXT" event instead of "KEY_SUBTITLE" which is already mapped to "subtitle" button. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c index cb0d80f49252..25bc85f8ce39 100644 --- a/drivers/usb/input/hid-input.c +++ b/drivers/usb/input/hid-input.c @@ -510,7 +510,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel case 0x025: map_key...
493a7e0d5614c30e1f3e56d59ab774300a2609f2
Analyze and fix the following issue in the Linux kernel code: Input: fix input_free_device() implementation
Problem Details: input_free_device can't just call kfree because if input_register_device fails after successfully registering corresponding class device there is a chance that someone could get a reference to it. We need to use input_put_device() to make sure that we don't delete input device until last reference to i...
```diff diff --git a/include/linux/input.h b/include/linux/input.h index 6dca6baf06ff..cf30f3cb191a 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -421,7 +421,7 @@ struct input_absinfo { #define BTN_GEAR_UP 0x151 #define KEY_OK 0x160 -#define KEY_SELECT 0x161 +#define KEY_SELECT 0x161 #def...
f020b67f3c0c071ed5b2281bfa717125c8a39ad6
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix assert to check that in-core extents are inline only.
Problem Details: SGI-PV: 950678 SGI-Modid: xfs-linux-melb:xfs-kern:207634a Signed-off-by: Mandy Kirkconnell <alkirkco@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 9f0ed4869d47..64a02eaf1dfe 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -3414,7 +3414,8 @@ xfs_bmap_local_to_extents( args.tp = tp; args.mp = ip->i_mount; - ASSERT(ifp->if_flags & XFS_IFINLINE); + ASSERT((ifp->if_flags & + (XFS_IF...
01e1b69cfcdcfdd5b405165eaba29428f8b18a7c
Analyze and fix the following issue in the Linux kernel code: [XFS] using a spinlock per cpu for superblock counter exclusion results in
Problem Details: a preēmpt counter overflow at 256p and above. Change the exclusion mechanism to use atomic bit operations and busy wait loops to emulate the spin lock exclusion mechanism but without the preempt count issues. SGI-PV: 950027 SGI-Modid: xfs-linux-melb:xfs-kern:25338a Signed-off-by: David Chinner <dgc@s...
```diff diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index 9fdc14cffb70..bd88ccb0cad0 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h @@ -75,6 +75,7 @@ #include <linux/sort.h> #include <linux/cpu.h> #include <linux/notifier.h> +#include <linux/delay.h> #inc...
a780143ea53d26362b7cfb6666c8d04fb989bb7a
Analyze and fix the following issue in the Linux kernel code: [XFS] UUID endianess fix. uu_timelow is a 32bit field and needs to be
Problem Details: swapped with be32_to_cpu. SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25232a Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/support/uuid.c b/fs/xfs/support/uuid.c index a3d565a67734..e157015c70ff 100644 --- a/fs/xfs/support/uuid.c +++ b/fs/xfs/support/uuid.c @@ -21,13 +21,6 @@ static mutex_t uuid_monitor; static int uuid_table_size; static uuid_t *uuid_table; -void -uuid_init(void) -{ - mutex_init(&uuid_monit...
20722a91921bd9e9d4ba5c8f801d143e72e58418
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix a mutex_destroy diagnostic about a locked-mutex-on-destroy from
Problem Details: quota code. SGI-PV: 949149 SGI-Modid: xfs-linux-melb:xfs-kern:25123a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index 7c0e39dc6189..fd4abb8a32c5 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c @@ -2788,9 +2788,7 @@ xfs_qm_freelist_destroy(xfs_frlist_t *ql) xfs_qm_dqdestroy(dqp); dqp = nextdqp; } - /* - * Don't bother about unlocking. - */...
0c9512d74635198d90f349acec19381e446ba2b4
Analyze and fix the following issue in the Linux kernel code: [XFS] find_exported_dentry(). XFS does not need to use this symbol as it
Problem Details: is provided by a vector through the superblock export operations when the filesystem is exported by NFS. The fix is to call that vector instead of using the exported symbol directly. SGI-PV: 948858 SGI-Modid: xfs-linux-melb:xfs-kern:25062a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Nat...
```diff diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c index 80eb249f2fa0..821bd12dd858 100644 --- a/fs/xfs/linux-2.6/xfs_export.c +++ b/fs/xfs/linux-2.6/xfs_export.c @@ -78,7 +78,7 @@ linvfs_decode_fh( } fh = (__u32 *)&ifid; - return find_exported_dentry(sb, fh, parent, acceptable, co...
3759fa9c55923f719ae944a3f8fbb029b36f759d
Analyze and fix the following issue in the Linux kernel code: [TCP]: Fix zero port problem in IPv6
Problem Details: When we link a socket into the hash table, we need to make sure that we set the num/port fields so that it shows us with a non-zero port value in proc/netlink and on the wire. This code and comment is copied over from the IPv4 stack as is. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index 4154f3a8b6cf..bb8ffb8a14c5 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c @@ -87,7 +87,7 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row, struct inet_timewait_sock...
c33d4568aca9028a22857f94f5e0850012b6444b
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix up handling of non canonical user RIPs
Problem Details: EM64T CPUs have somewhat weird error reporting for non canonical RIPs in SYSRET. We can't handle any exceptions there because the exception handler would end up running on the user stack which is unsafe. To avoid problems any code that might end up with a user touched pt_regs should return using int_...
```diff diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 7c10e9009d61..22cb6ee074b9 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S @@ -178,6 +178,12 @@ rff_trace: * Interrupts are off on entry. * Only called from user space. * + * EM64T CPUs have somewhat weird ...
31fe4d331729e9687db84521c3ceb8e43390efcf
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: arp_tables: fix NULL pointer dereference
Problem Details: The check is wrong and lets NULL-ptrs slip through since !IS_ERR(NULL) is true. Coverity #190 Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index dd1048be8a01..7d7ab94a7a2e 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c @@ -771,7 +771,7 @@ static int get_entries(const struct arpt_get_entries *entries, struct arpt_table *t; t = xt...
baa829d8926f02ab04be6ec37780810d221c5b4b
Analyze and fix the following issue in the Linux kernel code: [IPV4/6]: Fix UFO error propagation
Problem Details: When ufo_append_data fails err is uninitialized, but returned back. Strangely gcc doesn't notice it. Coverity #901 and #902 Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 57d290d89ec2..8ee4d016740d 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -847,10 +847,11 @@ int ip_append_data(struct sock *sk, if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) && (rt->u.dst.dev->features & NETIF_F_UF...
4a1ff6e2bde56cdf176bd54d557b2e15e819f810
Analyze and fix the following issue in the Linux kernel code: [TCP]: tcp_highspeed: fix AIMD table out-of-bounds access
Problem Details: Covertiy #547 Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c index 63cf7e540847..e0e9d1383c7c 100644 --- a/net/ipv4/tcp_highspeed.c +++ b/net/ipv4/tcp_highspeed.c @@ -125,7 +125,7 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt, /* Update AIMD parameters */ if (tp->snd_cwnd > hstcp_a...
cc9a06cd8d6fbb69b4d3c46760c132cfe312fb85
Analyze and fix the following issue in the Linux kernel code: [NETLINK]: Fix use-after-free in netlink_recvmsg
Problem Details: The skb given to netlink_cmsg_recv_pktinfo is already freed, move it up a few lines. Coverity #948 Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 6b9772d95872..59dc7d140600 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1194,6 +1194,9 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock, msg->msg_namelen = sizeof(*addr); } + if (nlk->...
f8dc01f543f28253abeef649987249210d8db3cc
Analyze and fix the following issue in the Linux kernel code: [XFRM]: Fix leak in ah6_input
Problem Details: tmp_hdr is not freed when ipv6_clear_mutable_options fails. Coverity #650 Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index c7932cb420a5..84963749ab77 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -279,7 +279,7 @@ static int ah6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struc goto out; memcpy(tmp_hdr, skb->nh.raw, hdr_len); if (ipv6_clear_mutable_optio...
f6e57464df7ba0e91a23b0854adb56852dcd58a7
Analyze and fix the following issue in the Linux kernel code: [NET_SCHED]: act_api: fix skb leak in error path
Problem Details: The skb is allocated by the function, so it needs to be freed instead of trimmed on overrun. Coverity #614 Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 792ce59940ec..2ffa11c6e8de 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -707,7 +707,7 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, rtattr_failure: nlmsg_failure: - skb_trim(skb, b - skb->data); + ...
406dbfc9ae0e6b7eb4da4a52c0a6556a0d7e6a2f
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: nfnetlink_queue: fix possible NULL-ptr dereference
Problem Details: Fix NULL-ptr dereference when a config message for a non-existant queue containing only an NFQA_CFG_PARAMS attribute is received. Coverity #433 Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index cac38b2e147a..2cf5fb8322c4 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c @@ -928,8 +928,12 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb, if (nfqa[NFQA_CFG_PARAMS-1]) { ...
dc9a49a4af9cdbe3d79183eefb12372b4dbc09c2
Analyze and fix the following issue in the Linux kernel code: kconfig: fix time ordering of writes to .kconfig.d and include/linux/autoconf.h
Problem Details: Since .kconfig.d is used as a make dependency of include/linux/autoconf.h, it should be written earlier than the header file, to avoid a subsequent rebuild to consider the header outdated. Signed-Off-By: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index b0cbbe2e41bb..1b8882ddbc74 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -374,6 +374,7 @@ int conf_write(const char *name) out_h = fopen(".tmpconfig.h", "w"); if (!out_h) return 1; + file_write_de...
78c041530ac2e65c9290137bfe3004340e0840d2
Analyze and fix the following issue in the Linux kernel code: kbuild: Lindent genksyms.c
Problem Details: No fix-ups applied yet. Just the raw Lindent output. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c index da8ff4fa5001..b798e284e1fc 100644 --- a/scripts/genksyms/genksyms.c +++ b/scripts/genksyms/genksyms.c @@ -29,7 +29,7 @@ #include <stdarg.h> #ifdef __GNU_LIBRARY__ #include <getopt.h> -#endif /* __GNU_LIBRARY__ */ +#endif /* __GNU...
c79c7b0923ff353d12194e83628bcca5a8606564
Analyze and fix the following issue in the Linux kernel code: kbuild: fix genksyms build error
Problem Details: genksyms needs to know when a symbol must have a "_" prefex as is true for a few architectures. Pass $(ARCH) as commandline argument and hardcode what architectures that needs this info. Previous attemt to take it from elfconfig.h was br0ken since elfconfig.h is a generated file. Signed-off-by: Sam Ra...
```diff diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 7afe3e76cb5a..19ef2bc514c2 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -166,7 +166,7 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< cmd_modversions = \ if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ks...
2044470cccec1bfe6bb819027975df302ff43bf8
Analyze and fix the following issue in the Linux kernel code: [PATCH] libata: fix class handling in ata_bus_probe()
Problem Details: ata_bus_probe() didn't set classes[] properly for port disabled case of ->phy_reset() compatibility path. This patch moves classes[] initialization and normalization out of ->probe_reset block such that it applies to both ->probe_reset and ->phy_reset paths. Signed-off-by: Tejun Heo <htejun@gmail.com...
```diff diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 42d43b55fb8f..c17df3f22fd1 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1344,32 +1344,30 @@ static int ata_bus_probe(struct ata_port *ap) ata_port_probe(ap); - /* reset */ - if (ap->ops->probe_reset)...
597705aa7fbf3e600283f4a870fb700385eacb13
Analyze and fix the following issue in the Linux kernel code: [SCSI] fix minor problem in spi transport message functions
Problem Details: The check for a one byte message should be msg[0] == 0x55 not msg == 0x55 Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 4855d1602d6b..780aaedcbce9 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c @@ -1209,7 +1209,7 @@ int spi_print_msg(const unsigned char *msg) } else if (msg[0] & 0x80) { printk("%0...
a1d4f73a00958162f91311396d37080f5e9b9ef1
Analyze and fix the following issue in the Linux kernel code: [SCSI] sim710: fix a NULL pointer dereference
Problem Details: This patch fixes a NULL pointer dereference spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c index 9171788348c4..3274ab76c8d3 100644 --- a/drivers/scsi/sim710.c +++ b/drivers/scsi/sim710.c @@ -146,7 +146,7 @@ sim710_probe_common(struct device *dev, unsigned long base_addr, out_put_host: scsi_host_put(host); out_release: - release_region(h...
a6becb084d4beb0b0c83651541f5b53f6da01e36
Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmmca: fix a NULL pointer dereference
Problem Details: The variable was dereferenced only if it was NULL (sic)... Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c index b60c1b9270f1..3a8462e8d063 100644 --- a/drivers/scsi/ibmmca.c +++ b/drivers/scsi/ibmmca.c @@ -2412,8 +2412,7 @@ static int ibmmca_proc_info(struct Scsi_Host *shpnt, char *buffer, char **start, spin_lock_irqsave(hosts[i]->host_lock, flags); /* Ch...
c3c026ba5a16867af47578ab2030ef51f9080084
Analyze and fix the following issue in the Linux kernel code: [SCSI] dmx3191d: fix a NULL pointer dereference
Problem Details: This patch fixes a NULL pointer dereference spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c index 7905b904e01d..38e4010eff96 100644 --- a/drivers/scsi/dmx3191d.c +++ b/drivers/scsi/dmx3191d.c @@ -116,7 +116,7 @@ static int __devinit dmx3191d_probe_one(struct pci_dev *pdev, out_free_irq: free_irq(shost->irq, shost); out_release_region...
8800727ae8a20146981a9531ac833cb889666247
Analyze and fix the following issue in the Linux kernel code: [SCSI] NCR_D700: fix a NULL dereference
Problem Details: The Coverity checker spotted this NULL dereference. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/NCR_D700.c b/drivers/scsi/NCR_D700.c index e993a7ba276f..577e63499778 100644 --- a/drivers/scsi/NCR_D700.c +++ b/drivers/scsi/NCR_D700.c @@ -218,7 +218,7 @@ NCR_D700_probe_one(struct NCR_D700_private *p, int siop, int irq, return 0; detect_failed: - release_region(host->base, 64)...
93f56089898a1b27fc0c89b5c1c748291353f679
Analyze and fix the following issue in the Linux kernel code: [SCSI] fix two leaks in scsi_alloc_sdev failure paths
Problem Details: If the scsi_alloc_queue or the slave_alloc calls in scsi_alloc_device fail, we forget to release the locally allocated sdev on the failure path. Coverity #609 Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index be14f9d82fde..5d4ca87af3df 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -251,6 +251,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, /* release fn is set up in scsi_sysfs_device_initi...
986a25f96accc8272059ae8b3eb63055f58cadb0
Analyze and fix the following issue in the Linux kernel code: [SCSI] aic79xx: use BIOS settings
Problem Details: This patch fixes the aic79xx driver to properly respond to BIOS settings. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 00d48a0fb7e1..0fbd1ec58340 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -481,6 +481,7 @@ ahd_linux_target_alloc(struct scsi_target *starget) { struct ahd_softc *ahd = *...
7b22da38b64a32df20fdb7272deb7546045fccec
Analyze and fix the following issue in the Linux kernel code: [SCSI] aic79xx: remove qfrozen
Problem Details: This patch removes the need for platform_data->qfrozen. We're now using complete() instead of semaphores thus simplifying ahd_freeze_simq() quite a lot. This also fixes some deadlocks in the recovery code (again). Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bott...
```diff diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 7254ea535a16..fc393bd95f4a 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -373,7 +373,6 @@ static void ahd_linux_handle_scsi_status(struct ahd_softc *, struct scb *); s...
fc6c12bcc19bdff6b4bcb02f5bd6d9fa59a7e1af
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.1.4 : Two misc fixes
Problem Details: Two misc fixes: - Fix deadlock caused by return with host_lock held in lpfc_findnode_did - Initialize all fields of the allocated mail box structure to zero. Was causing some sysfs mailbox commands to fail immediately after load. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: ...
```diff diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 2558156f064d..b62a72dfab29 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -856,7 +856,7 @@ sysfs_mbox_write(struct kobject *kobj, char *buf, loff_t off, size_t count) mbox = mempool_alloc(phba-...
488d1469b318e6bf2b907743d626008340bc4f6e
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.1.4 : Fix Discovery processing for NPorts that change their NPortId on the fly
Problem Details: Fix Discovery processing for NPorts that change their NPortId on the fly due to a cable swap. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index cafddf2f1af8..7b6534a1c315 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h @@ -70,7 +70,7 @@ int lpfc_els_abort(struct lpfc_hba *, struct lpfc_nodelist * ndlp, int); int lpfc_els_abort_flogi(stru...
071a651e28bfc1a66a885dc285792e335427a097
Analyze and fix the following issue in the Linux kernel code: [SCSI] i2o: fix memory leak in i2o_exec_lct_modified
Problem Details: i2o_exec_lct_modified() does not release memory allocated for work_struct. Signed-off-by: Vasily Averin <vvs@sw.ru> Although your patch is the same, i've rewritten it a little bit for naming consistency in the I2O driver. Acked-by: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: James B...
```diff diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c index 9bb9859f6dfe..5ea133c59afb 100644 --- a/drivers/message/i2o/exec-osm.c +++ b/drivers/message/i2o/exec-osm.c @@ -57,6 +57,13 @@ struct i2o_exec_wait { struct list_head list; /* node in global wait list */ }; +/* Work struct n...
cf7f5b45fe0180a0f0e3491183c0ec95e4b96d44
Analyze and fix the following issue in the Linux kernel code: [SCSI] wd33c93: Fix missing prototypes by including <linux/interrupt.h>.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c index fb53eeaee617..d8a72609a31d 100644 --- a/drivers/scsi/wd33c93.c +++ b/drivers/scsi/wd33c93.c @@ -78,8 +78,8 @@ #include <linux/string.h> #include <linux/delay.h> #include <linux/init.h> +#include <linux/interrupt.h> #include <linux/blkdev.h> ...
ba244fe9005323452428fee4b4b7d0c70a06b627
Analyze and fix the following issue in the Linux kernel code: [TCP]: Fix tcp_tso_should_defer() when limit>=65536
Problem Details: That's >= a full sized TSO frame, so we should always return 0 in that case. Based upon a report and initial patch from Lachlan Andrew, final patch suggested by Herbert Xu. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index a7623ead39a8..9f498a6c8895 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1036,6 +1036,10 @@ static int tcp_tso_should_defer(struct sock *sk, struct tcp_sock *tp, struct sk_ limit = min(send_win, cong_win); + /* If a full...
c12743764129e40dc8461afc1096cf175c7c25f2
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix wrong option spelling in Makefile for CONFIG_BRIDGE_EBT_ULOG
Problem Details: Signed-off-by: Gregor Maier <gregor@net.in.tum.de> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/bridge/netfilter/Makefile b/net/bridge/netfilter/Makefile index 8bf6d9f6e9d3..905087e0d485 100644 --- a/net/bridge/netfilter/Makefile +++ b/net/bridge/netfilter/Makefile @@ -29,4 +29,4 @@ obj-$(CONFIG_BRIDGE_EBT_SNAT) += ebt_snat.o # watchers obj-$(CONFIG_BRIDGE_EBT_LOG) += ebt_log.o -obj-$...
0d27b42739ee432a66104793e51a23807b372928
Analyze and fix the following issue in the Linux kernel code: [IPV6]: fix ipv6_saddr_score struct element
Problem Details: The scope element in the ipv6_saddr_score struct used in ipv6_dev_get_saddr() is an unsigned integer, but __ipv6_addr_src_scope() returns a signed integer (and can return -1). Signed-off-by: Brian Haley <brian.haley@hp.com> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S...
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index b7d8822c1be4..19727d941962 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -822,7 +822,7 @@ struct ipv6_saddr_score { int addr_type; unsigned int attrs; int matchlen; - unsigned int scope; + int scope; unsigned int rule; }; `...
8f22757ee84da64d4f662f1dd03dae95358a1efe
Analyze and fix the following issue in the Linux kernel code: [TUN]: Fix leak in tun_get_user()
Problem Details: We're leaking an skb in a failure path in this function. Coverity #632 Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 50b8c6754b1e..a1ed2d983740 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -249,8 +249,11 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, if (align) skb_reserve(skb, align); - if (memcpy_fromiovec(skb_p...
a4d4d5181d043ea835c15da6c85a5bbecbaded6e
Analyze and fix the following issue in the Linux kernel code: [PATCH] Sparse: Cleanup sgiseeq sparse warnings.
Problem Details: o Make sgiseeq_dump_rings static. o Delete unused sgiseeq_my_reset. o Move DEBUG define to beginning where it's easier to spot and will be seen by <linux/kernel.h> as well. o Use NULL for pointer initialization. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@g...
```diff diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c index a4614df38a90..f95a5b0223fb 100644 --- a/drivers/net/sgiseeq.c +++ b/drivers/net/sgiseeq.c @@ -3,6 +3,9 @@ * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) */ + +#undef DEBUG + #include <linux/kernel.h> #include <linux/module.h> #i...
46e202ec1feeac3cb722cd3410d62a9a00891388
Analyze and fix the following issue in the Linux kernel code: libata: irq-pio build fixes
Problem Details:
```diff diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 5060a1a1ad25..1a00c80b96d4 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -3809,7 +3809,7 @@ fsm_start: if (timeout) ata_port_queue_task(ap, ata_pio_task, ap, timeout); - else if (!qc_completed) + else...
6971ed1fbbc80cae54e082aae153d5b063885d0a
Analyze and fix the following issue in the Linux kernel code: [PATCH] ahci: fix NULL pointer dereference detected by Coverity
Problem Details: Fix NULL pointer dereference detected by the Coverity checker. Kill dev -> pdev -> dev conversion while at it. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index a800fb51168b..559ff7aae3f1 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c @@ -742,23 +742,17 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs * struct ata_queued_cmd *qc; qc = ata_qc_from_tag(ap, ap...
2061a47a9b9530a9523e51167c996307db951c31
Analyze and fix the following issue in the Linux kernel code: [PATCH] libata: fix missing classes[] initialization in ata_bus_probe()
Problem Details: ata_bus_probe() didn't initialize classes[] properly with ATA_DEV_UNKNOWN. As ->probe_reset() is allowed to leave @classes alone when no device is present, this results in garbage class values. ATM, the only affected driver is ata_piix. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Jiri Slaby <jiri...
```diff diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 5acb0798534c..5a0b67a602df 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1346,6 +1346,9 @@ static int ata_bus_probe(struct ata_port *ap) /* reset */ if (ap->ops->probe_reset) { + for (i = 0; i < ATA_...
bb1a813d3c49e57814958d2d52b5bb299204032e
Analyze and fix the following issue in the Linux kernel code: [PATCH] cpufreq: fix section mismatch warnings
Problem Details: cpufreq are the only remaining bit to be solved for me to have a modpost clean build for sparc64 - so I took one more look at it. changelog entry: Fix section mismatch warnings in cpufreq: WARNING: drivers/cpufreq/cpufreq_stats.o - Section mismatch: reference to .init.text: from .data between 'cpufreq...
```diff diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index c25bdb7aec51..9694b6ed3268 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -303,7 +303,7 @@ cpufreq_stat_notifier_trans (struct notifier_block *nb, unsigned long val, return 0; } -stat...
0992a5d029181421877a716eaf99145828ff7eae
Analyze and fix the following issue in the Linux kernel code: [PATCH] 3c509: bus registration fix
Problem Details: - Don't call eisa_driver_unregister() if eisa_driver_register() failed. - Properly propagate error values. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index 824e430486c2..830528dce0ca 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c @@ -1574,6 +1574,7 @@ MODULE_LICENSE("GPL"); static int __init el3_init_module(void) { + int ret = 0; el3_cards = 0; if (debug >= 0) @@ -1589,14 +1590,16 @...
b2cba5b5777123c53852639c6a17e87709e055be
Analyze and fix the following issue in the Linux kernel code: [PATCH] de620: fix section mismatch warning
Problem Details: In latest -mm de620 gave following warning: WARNING: drivers/net/de620.o - Section mismatch: reference to \ .init.text:de620_probe from .text between 'init_module' (at offset \ 0x1682) and 'cleanup_module' init_module() call de620_probe() which is declared __init. Fix is to declare init_module() ...
```diff diff --git a/drivers/net/de620.c b/drivers/net/de620.c index 0069f5fa973a..22fc5b869a60 100644 --- a/drivers/net/de620.c +++ b/drivers/net/de620.c @@ -1012,7 +1012,7 @@ static int __init read_eeprom(struct net_device *dev) #ifdef MODULE static struct net_device *de620_dev; -int init_module(void) +int __init...
9ee09d9cd4f57bae9cd95ea7ae5f41c29a166361
Analyze and fix the following issue in the Linux kernel code: [PATCH] dl2k: DMA freeing error
Problem Details: This patch fixes an error in the dl2k driver's DMA mapping/unmapping. The adapter uses the upper 16bits of the DMA address for the buffer size. However, this is not masked off when referencing the DMA address, and can lead to errors by trying to free a DMA address out of range. Thanks, Jon Signed-of...
```diff diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index 430c628279b3..fb9dae302dcc 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c @@ -50,8 +50,8 @@ */ #define DRV_NAME "D-Link DL2000-based linux driver" -#define DRV_VERSION "v1.17a" -#define DRV_RELDATE "2002/10/04" +#define DRV_VERSION "v1.17b...