id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
948ac6d71cf868b431adb3139d8dfbd9c4e4a6ca
Analyze and fix the following issue in the Linux kernel code: [PATCH] clocksource: Fix thinko in watchdog selection
Problem Details: The watchdog implementation excludes low res / non continuous clocksources from being selected as a watchdog reference unintentionally. Allow using jiffies/PIT as a watchdog reference as long as no better clocksource is available. This is necessary to detect TSC breakage on systems, which have no pmti...
```diff diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 5b0e46b56fd0..fe5c7db24247 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -151,7 +151,8 @@ static void clocksource_check_watchdog(struct clocksource *cs) watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL; ...
9501b6cf5541f0d576d566a463f1e7d3eaaab4eb
Analyze and fix the following issue in the Linux kernel code: [PATCH] dynticks: fix hrtimer rounding error in next_timer_interrupt
Problem Details: The rework of next_timer_interrupt() fixed the timer wheel bugs, but invented a rounding error versus the next hrtimer event. This is caused by the conversion of the hrtimer internal representation to relative jiffies. This causes bug #8100: http://bugzilla.kernel.org/show_bug.cgi?id=8100 next_timer_...
```diff diff --git a/kernel/timer.c b/kernel/timer.c index 797cccb86431..440048acaea1 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -695,15 +695,28 @@ static unsigned long cmp_next_hrtimer_event(unsigned long now, { ktime_t hr_delta = hrtimer_get_next_event(); struct timespec tsdelta; + unsigned long delta; ...
78fae27ebf5bd35fb9b2e4213e486635eacfc0ad
Analyze and fix the following issue in the Linux kernel code: Btrfs: leak fixes, pinning fixes
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 9583a9ae8b79..369b960fce45 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -165,13 +165,23 @@ static int pin_down_block(struct btrfs_root *root, u64 blocknr, int tag) { int err; struct buffer_head *bh = sb_getblk(root->f...
0fa7d868ca456ddf4f41b700fd9dee186f8f4e12
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix typos in net/ieee80211/Kconfig
Problem Details: This is just a QA / cosmetic fix .. [ "a modules" => "a module" ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/net/ieee80211/Kconfig b/net/ieee80211/Kconfig index a64be6cdf078..6ef766ef9618 100644 --- a/net/ieee80211/Kconfig +++ b/net/ieee80211/Kconfig @@ -38,7 +38,7 @@ config IEEE80211_CRYPT_WEP Include software based cipher suites in support of IEEE 802.11's WEP. This is needed for WEP as well as 802...
f5ae29e284b328e0976789d5c199bbbe80e4b005
Analyze and fix the following issue in the Linux kernel code: [PATCH] cx88-dvb: fix nxt200x rf input switching
Problem Details: After dvb tuner refactoring, the pllbuff has been altered such that the pll address is now stored in buf[0]. Instead of sending buf to set_pll_input, we should send buf+1. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Ivan Andrewjeski <ivan@...
```diff diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c index 87c286ee6a00..b809f83d9563 100644 --- a/drivers/media/dvb/frontends/nxt200x.c +++ b/drivers/media/dvb/frontends/nxt200x.c @@ -562,7 +562,7 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, ...
8fb303c7f1118b0a82aa08e33429adf9b5ad192c
Analyze and fix the following issue in the Linux kernel code: [MIPS] SB1250: Fix bugs/warnings by creative use of volatile.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mm/pg-sb1.c b/arch/mips/mm/pg-sb1.c index fc3c7878fb45..adb37d0a30ea 100644 --- a/arch/mips/mm/pg-sb1.c +++ b/arch/mips/mm/pg-sb1.c @@ -218,8 +218,7 @@ void sb1_dma_init(void) for (i = 0; i < DM_NUM_CHANNELS; i++) { const u64 base_val = CPHYSADDR(&page_descr[i]) | V_DM_DSCR...
41a8198f61d858bcad7ef705d5d3ec3e3a8dea4a
Analyze and fix the following issue in the Linux kernel code: [MIPS] SB1: Fix pile of gcc's bogus format string warnings.
Problem Details: CC arch/mips/mm/cerr-sb1.o arch/mips/mm/cerr-sb1.c: In function 'sb1_cache_error': arch/mips/mm/cerr-sb1.c:235: warning: format '%010llx' expects type 'long long unsigned int', but argument 2 has type 'uint64_t' arch/mips/mm/cerr-sb1.c: In function 'extract_ic': arch/mips/mm/cerr-sb1.c:385: warnin...
```diff diff --git a/arch/mips/mm/cerr-sb1.c b/arch/mips/mm/cerr-sb1.c index 11a916629d3b..4c72e650f9b6 100644 --- a/arch/mips/mm/cerr-sb1.c +++ b/arch/mips/mm/cerr-sb1.c @@ -177,8 +177,8 @@ extern void check_bus_watcher(void); asmlinkage void sb1_cache_error(void) { - uint64_t cerr_dpa; uint32_t errctl, cerr_i, ...
bf9f88a2192aaee6f1bbff50175aa68ff107355e
Analyze and fix the following issue in the Linux kernel code: [MIPS] Jazz: Fix warning.
Problem Details: arch/mips/jazz/jazzdma.c:70: warning: assignment makes integer from pointer without a cast Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c index 46e421e14348..e8e0ffb9354d 100644 --- a/arch/mips/jazz/jazzdma.c +++ b/arch/mips/jazz/jazzdma.c @@ -67,7 +67,8 @@ void __init vdma_init(void) * aligned and should be uncached to avoid cache flushing after every * update. */ - vdma_p...
ce486cd810a42572a91cada0be2538e433715449
Analyze and fix the following issue in the Linux kernel code: [MIPS] ARC: Fix warning.
Problem Details: The missing cast did result a warning when calling an 32-bit ARC firmware function that takes 5 arguments where the 5th argument is a pointer from a 64-bit kernel. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/sgiarcs.h b/include/asm-mips/sgiarcs.h index ddb859d05257..439bce7daa3a 100644 --- a/include/asm-mips/sgiarcs.h +++ b/include/asm-mips/sgiarcs.h @@ -459,7 +459,7 @@ struct linux_smonblock { register signed int __a2 __asm__("$5") = (int) (long) (a2); \ register signed int __a3 _...
7605b3906192a171e651076325b1ed1d5ea57ec9
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix pipeline hazard.
Problem Details: In the the sequence: ei .. mfc0 $x, $status the mfc0 may not see the SR_IE bit set. This was a deliberate bug in the kernel code because we knew this was a safe thing to do on all R2 silicon so far but new silicon is changing this. Signed-off-by: Ralf Baechle <ralf@linux-mi...
```diff diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h index 50073157a617..e50c77e69cb5 100644 --- a/include/asm-mips/hazards.h +++ b/include/asm-mips/hazards.h @@ -52,6 +52,7 @@ ASMMACRO(tlb_probe_hazard, _ehb ) ASMMACRO(irq_enable_hazard, + _ehb ) ASMMACRO(irq_disable_hazard, _ehb ``...
c9d06962233bd0ce9bf46b007900eb88e716e948
Analyze and fix the following issue in the Linux kernel code: [MIPS] Always use virt_to_phys() when translating kernel addresses
Problem Details: This patch fixes two places where we used plain 'x - PAGE_OFFSET' to achieve virtual to physical address convertions. This type of convertion is no more allowed since commit 6f284a2ce7b8bc49cb8455b1763357897a899abb. Reported-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Franck Bui-Huu <fbuihuu@g...
```diff diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index f503d02e403b..f0eb29917d9a 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c @@ -19,6 +19,13 @@ #include <dma-coherence.h> +static inline unsigned long dma_addr_to_virt(dma_addr_t dma_addr) +{ + unsigned long ...
38315878a560eede1a2db52e511ad3a2cfbb4206
Analyze and fix the following issue in the Linux kernel code: drm: fix DRM_CONSISTENT mapping
Problem Details: This patch got lost in the DRM git tree for ages, bring it back to life. Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c index f7d4e29d5073..2d83b0b3a514 100644 --- a/drivers/char/drm/drm_vm.c +++ b/drivers/char/drm/drm_vm.c @@ -175,8 +175,7 @@ static __inline__ struct page *drm_do_vm_shm_nopage(struct vm_area_struct *vma, offset = address - vma->vm_start; i...
d7d8aac79dc38cbdef83b774e49bafdae9918137
Analyze and fix the following issue in the Linux kernel code: drm: fix up mmap locking in preparation for ttm changes
Problem Details: This change is needed to protect againt disappearing maps which aren't common. The map lists are protected using sturct_mutex but drm_mmap never locked it. Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c index 239ac33a6e10..f7d4e29d5073 100644 --- a/drivers/char/drm/drm_vm.c +++ b/drivers/char/drm/drm_vm.c @@ -413,7 +413,7 @@ static struct vm_operations_struct drm_vm_sg_ops = { * Create a new drm_vma_entry structure as the \p vma private data ...
f33bc55c472295966e520c9347822fdd8b1082cd
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: avoid sending LOCAL_TIMER_VECTOR IPI to itself
Problem Details: Ray Lee reported, that on an UP kernel with "noapic" command line option set, the box locks hard during boot. Adding some debug printks revealed, that the last action on the box before stalling was "Send IPI" - a debug printk which was put into smp_send_timer_broadcast_ipi(). It seems that send_IPI_m...
```diff diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index 46acf4f2f1ec..bd3e45d47c37 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c @@ -934,9 +934,17 @@ EXPORT_SYMBOL(switch_APIC_timer_to_ipi); void smp_send_timer_broadcast_ipi(void) { + int cpu = smp_processor_id(); ...
7f5c15160e1436a53d01f9190db11c2a3a4d788a
Analyze and fix the following issue in the Linux kernel code: Add generation number to btrfs_header, readdir fixes, hash collision fixes
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 052434a328ec..b33a6bfaf327 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1,6 +1,7 @@ #include <linux/module.h> #include "ctree.h" #include "disk-io.h" +#include "transaction.h" static int split_node(struct btrfs_trans_handle *trans, struct ...
105fd108a66ceff2b0fb710582b97d61ee4c9d40
Analyze and fix the following issue in the Linux kernel code: [PATCH] "ext[34]: EA block reference count racing fix" performance fix
Problem Details: A little mistake in 8a2bfdcbfa441d8b0e5cb9c9a7f45f77f80da465 is making all transactions synchronous, which reduces ext3 performance to comical levels. Cc: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org...
```diff diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c index 12f7dda1232c..f58cbb26323e 100644 --- a/fs/ext3/xattr.c +++ b/fs/ext3/xattr.c @@ -495,7 +495,8 @@ ext3_xattr_release_block(handle_t *handle, struct inode *inode, BHDR(bh)->h_refcount = cpu_to_le32( le32_to_cpu(BHDR(bh)->h_refcount) - 1); error = ex...
cee9e8c5cb1554e9e85ad764d27b6c808555ed89
Analyze and fix the following issue in the Linux kernel code: [PATCH] rivafb: fix initial brightness
Problem Details: This is the rivafb equivalent of 238576e12fef1d52751c6e08db2d0bdb0e248caf. It fixes rivafb having a default backlight brightness of 0 (no picture at all) on a PBook 6,1. Signed-off-by: Guido Guenther <agx@sigxcpu.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Acked-by: Richard Purdie <rpurdie@rpsys.n...
```diff diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 1d1c7c624d7f..d7ece8d17a2c 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c @@ -285,8 +285,6 @@ static const struct riva_regs reg_template = { #define MAX_LEVEL 0x534 #define LEVEL_STEP ((MAX_LEVEL - MIN_LEVEL) ...
aa289b47231c95abe53a75223906fdfb79ae368e
Analyze and fix the following issue in the Linux kernel code: [PATCH] FDPIC: fix the /proc/pid/stat representation of executable boundaries
Problem Details: Fix the /proc/pid/stat representation of executable boundaries. It should show the bounds of the executable, but instead shows the bounds of the loader. Before the patch is applied, the bug can be seen by examining, say, inetd: # ps | grep inetd 610 root 0 S /usr/sbin/inetd ...
```diff diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 5810aa1339fd..47d6d49d1fb9 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c @@ -179,6 +179,8 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, int executable_stack; int retval, i; + kdebug("____ LOAD %d ____", curr...
0444b3035e5f4981f4d1d96f9f0c3cbada1e6d69
Analyze and fix the following issue in the Linux kernel code: [PATCH] time: fix formatting in /proc/timer_list
Problem Details: Fix the print formatting of three unsigned long fields in /proc/timer_list, which are currently being formatted as signed long. Signed-off-by: James Morris <jmorris@namei.org> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-founda...
```diff diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index f82c635c3d5c..59df5e8555a8 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c @@ -194,9 +194,9 @@ print_tickdevice(struct seq_file *m, struct tick_device *td) return; } SEQ_printf(m, "%s\n", dev->name); - SEQ_printf(...
7a9eeb2fa1b3a3a83670b9ba08dd396beedb88f8
Analyze and fix the following issue in the Linux kernel code: ieee1394: fix oops on "modprobe -r ohci1394" after network class_device conversion
Problem Details: The networking subsystem has been converted from class_device to device but ieee1394 hasn't. This results in a 100% reproducible NULL pointer dereference if the ohci1394 driver module is unloaded while the eth1394 module is still loaded. http://lkml.org/lkml/2006/11/16/147 http://lkml.org/lkml/2007/3/...
```diff diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index a95313521985..03e44b337eb0 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c @@ -584,7 +584,10 @@ static void ether1394_add_host (struct hpsb_host *host) } SET_MODULE_OWNER(dev); +#if 0 + /* FIXME - Is...
991b5557f7f04602b3b161341dee85971e0b6be6
Analyze and fix the following issue in the Linux kernel code: [netdrvr] ewrk3: correct card detection bug
Problem Details: Arwin Vosselman pointed out: > The ewrk3-driver doesn't function with 2.6.16-kernels (used 2.6.16.41 for > my tests). Cards will never be detected due to this bug. > > drivers/net/ewrks3.c: > Line 417 reads: > > if (nicsr == (CSR_TXD | CSR_RXD)) > > that should be: > > if (nicsr != (CSR_TXD | CSR_RXD))...
```diff diff --git a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c index c8c41f0a47d6..714ea1176ec7 100644 --- a/drivers/net/ewrk3.c +++ b/drivers/net/ewrk3.c @@ -414,10 +414,9 @@ ewrk3_hw_init(struct net_device *dev, u_long iobase) icr &= 0x70; outb(icr, EWRK3_ICR); /* Disable all the IRQs */ - if (nicsr == (CSR_TXD...
194c1fbe43af532a7921d483bc2a553b2f361256
Analyze and fix the following issue in the Linux kernel code: cxgb3 - fix white spaces in drivers/net/Kconfig
Problem Details: Use tabs instead of white spaces for CHELSIO_T3 entry. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 1b6459b218ca..c3f9f599f134 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -2372,23 +2372,23 @@ config CHELSIO_T1_NAPI when the driver is receiving lots of packets from the card. config CHELSIO_T3 - tristate "Chelsio Commun...
b52a8b7f0aeff5b91921cd53728ac781cdb4cccf
Analyze and fix the following issue in the Linux kernel code: myri10ge: fix management of >4kB allocated pages
Problem Details: Fix management of allocated physical pages when the architecture page size is not 4kB since the firmware cannot cross 4K boundary. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 2449b9fd7362..c89ca3fec161 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c @@ -905,6 +905,14 @@ myri10ge_alloc_rx_pages(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx, (rx->page_...
69a43ac0cf40577157111bbe25500e2b98e801ea
Analyze and fix the following issue in the Linux kernel code: SAA9730: Fix large pile of warnings
Problem Details: The SAA9730 driver doesn't quite grok what the difference between an ioport and memory mapped I/O is. It just happened to work on the one Linux system the SAA9730 happens to spend it's misserable existence on. drivers/net/saa9730.c: In function 'evm_saa9730_enable_lan_int': drivers/net/saa9730.c:68: ...
```diff diff --git a/drivers/net/saa9730.c b/drivers/net/saa9730.c index b269513cde45..143958f1ef0a 100644 --- a/drivers/net/saa9730.c +++ b/drivers/net/saa9730.c @@ -64,37 +64,37 @@ static unsigned int pci_irq_line; static void evm_saa9730_enable_lan_int(struct lan_saa9730_private *lp) { - outl(readl(&lp->evm_saa9...
6f6881b846e3d97ee15f6ab1f6529cd1cc2f4c28
Analyze and fix the following issue in the Linux kernel code: Revert "ucc_geth: returns NETDEV_TX_BUSY when BD ring is full"
Problem Details: This reverts commit 18babd38547a042a4bfd4154a014d1ad33373eb0. Michael Barkowski points out that it's wrong, and I agree. The patch causes a problem rather than fixes one after another patch "ucc_geth: Fix BD processing" was applied. Before that patch, current packet should be blocked. However after...
```diff diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index dab88b958d6e..639e1e6913bf 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c @@ -3607,7 +3607,6 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) if (bd == ugeth->confBd[txQ]) { if (!netif_queue_s...
fc90664e3438c990d280f179ccb0642711d5c553
Analyze and fix the following issue in the Linux kernel code: cxgb3 - Fix potential MAC hang
Problem Details: Under rare conditions, the MAC might hang while generating a pause frame. This patch fine tunes the MAC settings to avoid the issue, allows for periodic MAC state check, and triggers a recovery if hung. Also fix one MAC statistics counter for the rev board T3B2. Signed-off-by: Divy Le Ray <divy@chels...
```diff diff --git a/drivers/net/cxgb3/common.h b/drivers/net/cxgb3/common.h index e23deeb7d06d..85e5543cfb57 100644 --- a/drivers/net/cxgb3/common.h +++ b/drivers/net/cxgb3/common.h @@ -260,6 +260,10 @@ struct mac_stats { unsigned long serdes_signal_loss; unsigned long xaui_pcs_ctc_err; unsigned long xaui_pcs_al...
05b97b30b09ed245d376035cddf669532e5cca67
Analyze and fix the following issue in the Linux kernel code: cxgb3 - fix ethtool cmd on multiple queues port
Problem Details: Limit ethtool -g/-G to the given port's queues. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 7ff834e45d6b..eb0a4e068200 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c @@ -1362,23 +1362,27 @@ static int set_rx_csum(struct net_device *dev, u32 data) static void get_sge_param(struct net_...
5c4851ccb6b12ff29e28b84e7515a18006b19fdf
Analyze and fix the following issue in the Linux kernel code: Fix return code in pci-skeleton.c
Problem Details: We assign the return value of register_netdev to i, but return rc later on. Fix it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c index 00ca0fdb837b..6ca4e4fa6b88 100644 --- a/drivers/net/pci-skeleton.c +++ b/drivers/net/pci-skeleton.c @@ -710,8 +710,8 @@ match: tp->chipset, rtl_chip_info[tp->chipset].name); - i = register_netdev (dev); - if (i) + rc = register_n...
e3a1b99fb60dab1b39d5022d1d8f47bebfe6d8c6
Analyze and fix the following issue in the Linux kernel code: skge: deadlock on tx timeout
Problem Details: The skge driver will deadlock if gets a transmit timeout because the netif_tx_lock() is already held. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 8fecf1b817f7..fad189e01ec6 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -2576,7 +2576,11 @@ static int skge_down(struct net_device *dev) skge_led(skge, LED_MODE_OFF); netif_poll_disable(dev); + + netif_tx_lock_bh(dev); skge_tx_cle...
4edc5db83f574dfcc8be35b7b96760ded543b360
Analyze and fix the following issue in the Linux kernel code: [PATCH] setup_boot_APIC_clock() irq-enable fix
Problem Details: latest -git triggers an irqtrace/lockdep warning of a leaked irqs-off condition: BUG: at kernel/fork.c:1033 copy_process() after some debugging it turns out that commit ca1b940c accidentally left interrupts disabled - which trickled down all the way to the first time we fork a kernel thread and tri...
```diff diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 36825117835d..244c3fe9b8c3 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c @@ -506,7 +506,8 @@ void __init setup_boot_APIC_clock(void) apic_printk(APIC_VERBOSE, "... jiffies result ok\n"); else local_apic_timer_ve...
9c35dd7f8bda1849dcb430be99325504221048df
Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep: debug_show_all_locks & debug_show_held_locks vs. debug_locks
Problem Details: lockdep's data shouldn't be used when debug_locks == 0 because it's not updated after this, so it's more misleading than helpful. PS: probably lockdep's current-> fields should be reset after it turns debug_locks off: so, after printing a bug report, but before return from exported functions, but ther...
```diff diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 8dc24c92dc6d..7065a687ac54 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -2742,6 +2742,10 @@ void debug_show_all_locks(void) int count = 10; int unlock = 1; + if (unlikely(!debug_locks)) { + printk("INFO: lockdep is turned off.\n"); + retu...
e3a55fd18deab758a2970e0dfcd60a677a920426
Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep: lockdep_depth vs. debug_locks
Problem Details: lockdep found a bug during a run of workqueue function - this could be also caused by a bug from other code running simultaneously. lockdep really shouldn't be used when debug_locks == 0! Reported-by: Folkert van Heusden <folkert@vanheusden.com> Inspired-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off...
```diff diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 06fe93a3e916..14c937d345cb 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -245,7 +245,7 @@ extern void lock_release(struct lockdep_map *lock, int nested, # define INIT_LOCKDEP .lockdep_recursion = 0, -#define loc...
058560fbd70190ea6b50b5df4d814bc30911d06b
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix extra BIOS invocation during resume
Problem Details: It causes extra moon icons blinking on x60, and breaks at least two other systems. During resume, we do not know that "reboot"/"shutdown" method was used, so we assume "plaform" and call BIOS, anyway... This is 2.6.21 material, and should fix 2 or 3 regressions from 2.6.20. Signed-off-by: Pavel Mach...
```diff diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 873cdf8ea5a4..dee0ff40befd 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c @@ -241,18 +241,11 @@ static int software_resume(void) goto Done; } - error = platform_prepare(); - if (error) { - swsusp_free(); - goto Thaw; - } - pr_de...
d56e03cd275486eb8141116a7af2df7457cb0115
Analyze and fix the following issue in the Linux kernel code: [PATCH] NOMMU: supply get_unmapped_area() to fix NOMMU SYSV SHM
Problem Details: Supply a get_unmapped_area() to fix NOMMU SYSV SHM support. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Adam Litke <agl@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/mm/nommu.c b/mm/nommu.c index 23fb033e596d..ba6df4d29979 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1192,6 +1192,28 @@ void unmap_mapping_range(struct address_space *mapping, } EXPORT_SYMBOL(unmap_mapping_range); +/* + * ask for an unmapped area at which to create a mapping on a file + */ +un...
8da38d7bac802ed2a09a79aaae9961c806a1847c
Analyze and fix the following issue in the Linux kernel code: [PATCH] FRV: fix unannotated variable declarations
Problem Details: Fix unannotated variable declarations. Variables that have allocation section annotations (such as __meminitdata) on their definitions must also have them on their declarations as not doing so may affect the addressing mode used by the compiler and may result in a linker error. Signed-off-by: David H...
```diff diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 2275f2748708..81c07cd18643 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h @@ -108,7 +108,7 @@ static inline void *alloc_remap(int nid, unsigned long size) #endif /* CONFIG_HAVE_ARCH_ALLOC_REMAP */ extern unsigned long _...
93c9a7ff50a5b39dbdf80129c5da89e6d6256bea
Analyze and fix the following issue in the Linux kernel code: [PATCH] swsusp: Fix SNAPSHOT_S2RAM ioctl
Problem Details: The SNAPSHOT_S2RAM ioctl does not disable the nonboot CPUs before entering the suspend, although it should do this. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linu...
```diff diff --git a/kernel/power/user.c b/kernel/power/user.c index d6a8dcc26ae5..bf211fee1222 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -368,9 +368,12 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, if (error) { printk(KERN_ERR "Failed to suspend some devices.\n"); }...
47ebea8351061f763089f6c3e2d2403715b510e1
Analyze and fix the following issue in the Linux kernel code: [PATCH] drivers/video/s3fb.c: fix a use-before-check
Problem Details: NULL checks should be before the first dereference. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Ondrej Zajicek <santiago@crfreenet.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus T...
```diff diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index 98919a6975f0..3091b20124b4 100644 --- a/drivers/video/s3fb.c +++ b/drivers/video/s3fb.c @@ -1000,11 +1000,12 @@ err_enable_device: static void __devexit s3_pci_remove(struct pci_dev *dev) { struct fb_info *info = pci_get_drvdata(dev); - struct s...
6b3964cde70cfe6db79d35b42137431ef7d2f7e4
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: clockevents fix breakage on Geode/Cyrix PIT implementations
Problem Details: The PIT has no dedicated mode for shut down. The only way to disable PIT is to put it into one shot mode. AMD implementations of PIT on Geode (also observed on Cyrix) are confused by an "empty" transition from CLOCK_EVT_MODE_UNUSED to CLOCK_EVT_MODE_SHUTDOWN, which puts the PIT into one shot mode momen...
```diff diff --git a/arch/i386/kernel/i8253.c b/arch/i386/kernel/i8253.c index 5cbb776b3089..10cef5ca8a5b 100644 --- a/arch/i386/kernel/i8253.c +++ b/arch/i386/kernel/i8253.c @@ -47,9 +47,17 @@ static void init_pit_timer(enum clock_event_mode mode, outb(LATCH >> 8 , PIT_CH0); /* MSB */ break; - case CLOCK_EVT_M...
040ac32048d5efabd557c1e0a6ab8aec2c710c56
Analyze and fix the following issue in the Linux kernel code: drm: fix driver deadlock with AIGLX and reclaim_buffers_locked
Problem Details: Bugzilla Bug #9457 Add refcounting of user waiters to the DRM hardware lock, so that we can use DRM_LOCK_CONT flag more conservatively. Also add a kernel waiter refcount that if nonzero transfers the lock for the kernel context when it is released. This is useful when waiting for idle and can be used...
```diff diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 09705da8cdd7..80041d5b792d 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -414,6 +414,10 @@ typedef struct drm_lock_data { struct file *filp; /**< File descr of lock holder (0=kernel) */ wait_queue_head_t lock_queue...
77d8e1efea0e313edc710160c232a6fd2dc9f907
Analyze and fix the following issue in the Linux kernel code: IB/ipoib: Fix thinko in packet length checks
Problem Details: The packet length checks in ipoib are broken: we add 4 bytes (IPoIB encapsulation header) when sending a packet, not 20 bytes (hardware address length) to each packet. Therefore, if connected mode is enabled so that the interface MTU is larger than the multicast MTU, IPoIB may end up trying to send to...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 467564074e93..e70492db74f6 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -452,7 +452,7 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, s...
d04d01b113be5b88418eb30087753c3de0a39fd8
Analyze and fix the following issue in the Linux kernel code: IPoIB: Fix use-after-free in path_rec_completion()
Problem Details: The connected mode code added the possibility that an neigh struct gets freed in the list_for_each_entry() loop in path_rec_completion(), which causes a use-after-free. Fix this by changing to the _safe variant of the list walking macro. This was spotted by the Coverity checker (CID 1567). Signed-of...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index f9dbc6f68145..0741c6d1337c 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -380,7 +380,7 @@ static void path_rec_completion(int status, struct net_...
fae8773b737d03f94ba83f0b78a891f385f35f98
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Check return value of lookup_one_len
Problem Details: This fixes kernel.org bug 8003. Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 5b40a846ff95..ed55979bfd34 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c @@ -451,12 +451,18 @@ bail: return ret; } -static void remove_file(struct dentry *pa...
e07832b66285124038a96b25a2056e91a55d8b1e
Analyze and fix the following issue in the Linux kernel code: IPoIB: Fix race in detaching from mcast group before attaching
Problem Details: There's a race between ipoib_mcast_leave() and ipoib_mcast_join_finish() where we can try to detach from a multicast group before we've attached to it. Fix this by reordering the code in ipoib_mcast_leave to free the multicast group first, which waits for the multicast callback thread (which calls ipo...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 56c87a81bb67..54fbead4de01 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c @@ -644,6 +644,9 @@ static int ipoib_mcast_leave(struct n...
60a596dab7c82bdfa5ee7abcee8e0ce385d4ef21
Analyze and fix the following issue in the Linux kernel code: IPoIB/cm: Fix reaping of stale connections
Problem Details: The sense of the time_after_eq() test in ipoib_cm_stale_task() is reversed so that only non-stale connections are reaped. Fix this by changing to time_before_eq(). Noticed by Pradeep Satyanarayana <pradeep@us.ibm.com>. Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Roland ...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 3484e8ba24a4..467564074e93 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -1095,7 +1095,7 @@ static void ipoib_cm_stale_task(struct work_struct *work) /*...
b6f99a211957910a07437f46ce54dcfb1755cf84
Analyze and fix the following issue in the Linux kernel code: [NET]: fix up misplaced inlines.
Problem Details: Turning up the warnings on gcc makes it emit warnings about the placement of 'inline' in function declarations. Here's everything that was under net/ Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 4c914df5fd06..ecfe8da1ce6b 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c @@ -319,7 +319,7 @@ static int __hidp_send_ctrl_message(struct hidp_session *session, return 0; } -static int inline hidp_send_ctrl_mess...
b19cbe2a1695c09c74f83646c4b82b51123b3690
Analyze and fix the following issue in the Linux kernel code: [BRIDGE]: Fix fdb RCU race
Problem Details: br_fdb_get use atomic_inc to increase the refcount of an element found on a RCU protected list, which can lead to the following race: CPU0 CPU1 br_fdb_get: rcu_read_lock __br_fdb_get: find element fdb_delete: hlist_del_rcu br_fdb_put br_fdb_put: atomic_dec_and_test c...
```diff diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index def2e403f932..8d566c13cc73 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c @@ -197,8 +197,8 @@ struct net_bridge_fdb_entry *br_fdb_get(struct net_bridge *br, rcu_read_lock(); fdb = __br_fdb_get(br, addr); - if (fdb) - atomic_inc(&fdb...
ec25615b9ddd5c584b4066652840581fdb6c5e7a
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix fib_rules dump race
Problem Details: fib_rules_dump needs to use list_for_each_entry_rcu to protect against concurrent changes to the rules list. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 215f1bff048f..3aea4e87d3d7 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -374,7 +374,7 @@ int fib_rules_dump(struct sk_buff *skb, struct netlink_callback *cb, int family) return -EAFNOSUPPORT; rcu_read_lock(); - list_for_eac...
a5aaea37858fb56d624227408d1dde4cb78c9a6c
Analyze and fix the following issue in the Linux kernel code: i2c-i801: Restore the device state before leaving
Problem Details: Restore the original host configuration on driver unload and on suspend. In particular this returns the SMBus master in I2C mode if it was originally in I2C mode, which should help with suspend/resume if the BIOS expects to find the SMBus master in I2C mode. This fixes bug #6449 (for real this time.) ...
```diff diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 6569a36985bd..a320e7d82c1f 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -97,6 +97,7 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write, int command, int hwpe...
4980d5eb750288ffc0bb9daff3feb947e1bac61e
Analyze and fix the following issue in the Linux kernel code: [POWERPC] EEH: restructure multi-function support
Problem Details: Rework how multi-function PCI devices are identified and traversed. This fixes a bug with multi-function recovery on Power4 that was introduced by a recent Power4 EEH patch. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index eac2a631c5a1..a56be71d1ede 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -282,7 +282,7 @@ void eeh_mark_slot (struct device_node *dn, int mode_flag) dn = find_device...
5794dbcbab862e416c4ea4f10fda5e67f5565fd7
Analyze and fix the following issue in the Linux kernel code: [POWERPC] EEH: multifunction recovery bugfix
Problem Details: If the second or higher function of a multi-function device fails to recover, this failure is not reported upwards. Fix this. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index d73c297b0234..5ec6edf19ece 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c @@ -158,7 +158,8 @@ static void eeh_report_reset(struct pci_dev *dev,...
90fdd6130f5c0053c48e8c8e247091739b6e4092
Analyze and fix the following issue in the Linux kernel code: [POWERPC] EEH: hotplug recovery bugfix
Problem Details: If a device driver does not have native PCI error recovery, a hotplug error recovery will be attemped. In this case, the device driver will not report back whether its healthy or not; simply assume that it is. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@sa...
```diff diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index 550fad2199ad..d73c297b0234 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c @@ -438,7 +438,8 @@ struct pci_dn * handle_eeh_events (struct eeh_eve...
6845118b3b7a9cc2ba14dc665370217bc3ba8057
Analyze and fix the following issue in the Linux kernel code: ACPI: sbs: Debug messages correction/improvement
Problem Details: Debug messages correction/improvement: Use ACPI_EXCEPTION instead of ACPI_DEBUG_PRINT. Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index eab5c680a6ac..395664528dd1 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c @@ -271,7 +271,7 @@ acpi_ec_sbs_access(struct acpi_sbs *sbs, u16 addr, break; default: ACPI_EXCEPTION((AE_INFO, AE_ERROR, - "unsupported transaction %d\n", si...
4f5fa2fb1259f506d20e8af447117ec3ec426a53
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Bypass hcall stats until cpu features have run
Problem Details: I noticed that we execute hcalls before cpu feature code has run (eg for setting up the bolted kernel region). This means that we may be executing code that is not appropriate for the processor we have. Create an unconditional branch that we nop out all the time to fix this. Signed-off-by: Anton Blan...
```diff diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S index 1501b0a9e749..c1427b3634ec 100644 --- a/arch/powerpc/platforms/pseries/hvCall.S +++ b/arch/powerpc/platforms/pseries/hvCall.S @@ -30,9 +30,14 @@ END_FTR_SECTION_IFSET(CPU_FTR_PURR); /* * postcall is perfor...
b4aea36b7956eeebfc56314ce0944db1441255ce
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Avoid hypervisor statistics calculation in real mode
Problem Details: kexec invokes plpar_hcall hypervisor call in real mode. plpar_hcall refers to per cpu variables for accounting hypervisor statistics. These variables may not be in the RMO region, so accesses to them in real mode may result in a data storage exception. This fixes this problem by using a new plpar_hca...
```diff diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S index 5c7e38789897..1501b0a9e749 100644 --- a/arch/powerpc/platforms/pseries/hvCall.S +++ b/arch/powerpc/platforms/pseries/hvCall.S @@ -123,6 +123,40 @@ _GLOBAL(plpar_hcall) blr /* return r3 = status */ +/* +...
0272bf7271eb6895b081c3df34c3ebe50cb769b7
Analyze and fix the following issue in the Linux kernel code: [SCSI] fix scsi_wait_scan build problem
Problem Details: The #ifdef MODULE around the export of scsi_complete_async_scans() which is the API the scsi_wait_scan module uses is incorrect and causes the symbol to be undefined in certain circumstances leading to a build failure. Remove the defines. 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 0949145304ea..a67f315244d7 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -181,10 +181,8 @@ int scsi_complete_async_scans(void) return 0; } -#ifdef MODULE /* Only exported for the benefit of scsi_wait_scan */ ...
b1dfe1f1457a85b42544ef8b9c83c7cf9d9c3a16
Analyze and fix the following issue in the Linux kernel code: [ARM] 4272/1: Missing symbol h1940_pm_return fix
Problem Details: Added missing ifdefs, to make kernel linkable without the PM support. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 01c60d0923cd..d052ab2d9377 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c @@ -202,7 +202,9 @@ static void __init h1940_map_io(void) /* setup PM */ +#ifdef CONFIG_PM_H1940 ...
d84702a5d7b500ead8db129ddea789c88764f357
Analyze and fix the following issue in the Linux kernel code: firewire: fix compiler warnings on 64bit
Problem Details: Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
```diff diff --git a/drivers/firewire/fw-device-cdev.c b/drivers/firewire/fw-device-cdev.c index b1b7edb0d2ad..f9f268861418 100644 --- a/drivers/firewire/fw-device-cdev.c +++ b/drivers/firewire/fw-device-cdev.c @@ -274,10 +274,11 @@ static int ioctl_get_info(struct client *client, void __user *arg) if (get_info.rom...
7bc301e97b96597df967f11b9fa9cf391109893a
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] tcrypt: Fix error checking for comp allocation
Problem Details: This patch fixes loading the tcrypt module while deflate isn't available at all (isn't build). Signed-off-by: Sebastian Siewior <linux-crypto@ml.breakpoint.cc> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index f5e9da319ece..8eaa5aa210b0 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -768,7 +768,7 @@ static void test_deflate(void) tv = (void *)tvmem; tfm = crypto_alloc_comp("deflate", 0, CRYPTO_ALG_ASYNC); - if (tfm == NULL) { + if (IS_ERR(tfm)) { pr...
58e40308f329275ccf556312a9cd788522f7c224
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] doc: Fix typo in hash example
Problem Details: there is a tiny bug in Documentation/crypto/api-intro.txt. The file has the following example code: struct scatterlist sg[2]; [...] if (crypto_hash_digest(&desc, &sg, 2, result)) which does not match the declaration of crypto_hash_digest() in include/linux/crypto.h. (static inline int crypto_hash_di...
```diff diff --git a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt index e41a79aa71ce..9b84b805ab75 100644 --- a/Documentation/crypto/api-intro.txt +++ b/Documentation/crypto/api-intro.txt @@ -60,7 +60,7 @@ Here's an example of how to use the API: desc.tfm = tfm; desc.flags = 0; - if (c...
f70ee5ec8fc59ba2d905e6daf0d395edf6fb461d
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] api: scatterwalk_copychunks() fails to advance through scatterlist
Problem Details: In the loop in scatterwalk_copychunks(), if walk->offset is zero, then scatterwalk_pagedone rounds that up to the nearest page boundary: walk->offset += PAGE_SIZE - 1; walk->offset &= PAGE_MASK; which is a no-op in this case, so we don't advance to the next element of the scatterlist array: if...
```diff diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c index 35172d3f043b..a66423121773 100644 --- a/crypto/scatterwalk.c +++ b/crypto/scatterwalk.c @@ -91,6 +91,8 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, memcpy_dir(buf, vaddr, len_this_page, out); scatterwalk_unmap(vaddr, ou...
58a69c367c02a165004a5ce5dd55ce03b59ba43d
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix wrong /proc/iomem on SGI Altix
Problem Details: In sn_io_slot_fixup(), the parent is re-set from the bus to io(port|mem)_resource because the address is changed in a way that it's not child of the bus any more. However, only the root is set but not the parent/child/sibling relationship in the resource tree which causes 'cat /proc/iomem' to stop aft...
```diff diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 600be3ebae05..6b10e5d28488 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c @@ -247,10 +247,18 @@ sn_io_slot_fixup(struct pci_dev *dev) addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET; dev->re...
60b548dfe4ad178dbf0fa8c2a50e36aaa42d603a
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix typo/thinko in crash.c
Problem Details: Clearly should be checking for "val == DIE_INIT_SLAVE_ENTER". Signed-off-by: Jay Lan <jlan@sgi.com> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c index 7d1bbb4403ba..80a94e707827 100644 --- a/arch/ia64/kernel/crash.c +++ b/arch/ia64/kernel/crash.c @@ -164,7 +164,7 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data) nd = (struct ia64_mca_notify_die *)args->...
c5e83e3f42938c0a84047e125edb98d6513f985b
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix get_model_name() for mixed cpu type systems
Problem Details: If a system consists of mixed processor types, kmalloc() can be called before the per-cpu data page is initialized. If the slab contains sufficient memory, then kmalloc() works ok. However, if the slabs are empty, slab calls the memory allocator. This requires per-cpu data (NODE_DATA()) & the cpu dies....
```diff diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 339e8a54c2f1..69b9bb3fd7c5 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c @@ -692,12 +692,15 @@ struct seq_operations cpuinfo_op = { .show = show_cpuinfo }; -static char brandname[128]; +#define MAX_BRANDS 8 +stat...
a3f5c338b9f30f328276739d9589beae19254936
Analyze and fix the following issue in the Linux kernel code: [IA64] min_low_pfn and max_low_pfn calculation fix
Problem Details: We have seen bad_pte_print when testing crashdump on an SN machine in recent 2.6.20 kernel. There are tons of bad pte print (pfn < max_low_pfn) reports when the crash kernel boots up, all those reported bad pages are inside initmem range; That is because if the crash kernel code and data happens to be...
```diff diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c index fb0f4698f5d0..44ce5ed9444c 100644 --- a/arch/ia64/mm/contig.c +++ b/arch/ia64/mm/contig.c @@ -96,26 +96,6 @@ void show_mem(void) /* physical address where the bootmem map is located */ unsigned long bootmap_start; -/** - * find_max_pfn - adjus...
cc5d2c8c64804564617a7be71c73a075a426d1c6
Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: fix up start/stop messages for new sd_printk() API
Problem Details: Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 49a94ae3225b..b044dcf73427 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1733,10 +1733,11 @@ static void scsi_disk_release(struct class_device *cdev) kfree(sdkp); } -static int sd_start_stop_device(struct scsi_device *sdp, int start) +st...
9d5cf5adcbb703a4c794232840c25a65a372c357
Analyze and fix the following issue in the Linux kernel code: [ARM] 4235/1: ns9xxx: declare the clock functions as "const"
Problem Details: This patch removes some "const"s that I introduced thinking they mean the same thing as the "const"s introduced here. So it fixes three warnings. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-ns9xxx/clock.h b/include/asm-arm/arch-ns9xxx/clock.h index 4371a485db47..a7c5ab3d9011 100644 --- a/include/asm-arm/arch-ns9xxx/clock.h +++ b/include/asm-arm/arch-ns9xxx/clock.h @@ -11,6 +11,7 @@ #ifndef __ASM_ARCH_CLOCK_H #define __ASM_ARCH_CLOCK_H +static inline u32 ns9xxx...
3721050afc6cb6ddf6de0f782e2054ebcc225e9b
Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: fix return value of sd_sync_cache()
Problem Details: sd_sync_cache() should return -errno on error, fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 12e18bb5456a..3dda77c31f50 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -766,7 +766,9 @@ static int sd_sync_cache(struct scsi_disk *sdkp) sd_print_sense_hdr(sdkp, &sshdr); } - return res; + if (res) + return -EIO; + return 0; } s...
03d4433721880bf1972c924b168e4e1dd3c59d53
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: Improved error handling
Problem Details: Received from Mark Salyzyn, This set of fixes improve error handling stability of the driver. A popular manifestation of the problems is an NULL pointer reference in the interrupt handler when referencing portions of the scsi command context, or in the scsi_done handling when an offlined device is ref...
```diff diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 3d21d7dd2e5f..0c4e27eb6520 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -5,7 +5,7 @@ * based on the old aacraid driver that is.. * Adaptec aacraid device driver for Linux. * - * Copyright ...
f2b1a06ad46209c6e631e3099138d1fa3f14d3a8
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: fix srb ioctl for 64 bits
Problem Details: Received from Mark Salyzyn, The raw srb ioctl is supposed to be able to take packets with 32 and 64 bit virtual address SG elements, it did not handle the frames with 64 bit SG elements well when communicating with 64 bit DMA capable adapters, and it did not handle the 32 bit limited DMA adapters at a...
```diff diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 3a8e7cac9ee2..987e35e4078e 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -5,7 +5,7 @@ * based on the old aacraid driver that is.. * Adaptec aacraid device driver for Linux. * - * Co...
9e7c349c91db3a9f9ac6cd74a693c4093c7d4571
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: remove un-needed references to container id (cid)
Problem Details: Received from Mark Salyzyn, This little patch removes the ',cid)' container identification argument from some of the functions. The argument is used in some cases as merely a debug helper and thus not used, and in others, the value can be quickly acquired from the scsi command in their single solitary...
```diff diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 1610f0670c78..3d21d7dd2e5f 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -375,7 +375,7 @@ static void get_container_name_callback(void *context, struct fib * fibptr) /** * aac_get_container_na...
33bb3b296207ff4f9e3b8dddb623e645ee1b8809
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: Fix ioctl handling when adapter resets
Problem Details: Received from Mark Salyzyn, Outstanding ioctl calls still have some problems with aborting cleanly in the face of a reset iop recovery action should the adapter ever enter into a Firmware Assert (BlinkLED) condition. The enclosed patch resolves some uncovered flawed handling. Signed-off-by: Mark Have...
```diff diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 83d5680e1326..3a8e7cac9ee2 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -64,6 +64,9 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) unsigned size; int retval; ...
fe76df4235986cfacc2d3b71cef7c42bc1a6dd6c
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: Fix blocking issue with container probing function (cast update)
Problem Details: Received from Mark Salyzyn, The aac_probe_container call blocks. This is an issue because it is called on occasion in the context of the queuecommand handler. Once in a blue moon this has resulted in a kernel panic sleeping during interrupt; or problems with some embedded system versions of the kernel...
```diff diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index d789e61bdc49..1610f0670c78 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -258,13 +258,10 @@ int aac_get_containers(struct aac_dev *dev) u32 index; int status = 0; struct fib * fibptr; - un...
a8166a52968216ae079a5530ac3269147de2ef31
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: Fix struct element name issue
Problem Details: Received from Mark Salyzyn, This patch is to resolve a namespace issue that will result from a patch expected in the future that adds a new interface; rationalized as correcting a long term issue where hw_fib, instead of hw_fib_va, refers to the virtual address space and hw_fib_pa refers to the physic...
```diff diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 7e25c0bbd644..9ca594b33d1c 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -834,7 +834,7 @@ struct fib { */ struct list_head fiblink; void *data; - struct hw_fib *hw_fib; /* Actual ...
b889d531b635da66ce2704a47febfed68173d9db
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: fix RSCN handling on big-endian systems
Problem Details: qla2xxx driver fails to handle RSCN events affecting area or domain due to an endian issue on big endian systems. This fixes the port_id_t structure on big endian systems. Signed-off-by: Malahal Naineni <malahal@us.ibm.com> Acked-by: Seokmann Ju <seokmann.ju@qlogic.com> Signed-off-by: Andrew Vasquez ...
```diff diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 05f4f2a378eb..e8948b679f5b 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -1478,14 +1478,17 @@ typedef union { uint32_t b24 : 24; struct { - uint8_t d_id[3]; - uint8_t rsvd_1; - } r; -...
1544d67738c864245b8a061fb72093daeea8d4f1
Analyze and fix the following issue in the Linux kernel code: [SCSI] fusion: kernel-doc warning fixes
Problem Details: Fix kernel-doc warnings in fusion driver code. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: "Moore, Eric" <Eric.Moore@lsi.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 083acfd91d8b..0a2d7db7b634 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -4739,12 +4739,8 @@ mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum) } /** - * mpt_inactive_ra...
e4ce837de96d58509f5f815ab37a46889788e701
Analyze and fix the following issue in the Linux kernel code: [X25] x25_forward_call(): fix NULL dereferences
Problem Details: This patch fixes two NULL dereferences spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/x25/x25_forward.c b/net/x25/x25_forward.c index d339e0c810a8..8738ec7ce693 100644 --- a/net/x25/x25_forward.c +++ b/net/x25/x25_forward.c @@ -26,64 +26,66 @@ int x25_forward_call(struct x25_address *dest_addr, struct x25_neigh *from, short same_lci = 0; int rc = 0; - if ((rt = x25_get_rou...
c577c2b99387b5ff8607d42d6eaff9ec024d4773
Analyze and fix the following issue in the Linux kernel code: [IrDA]: Calling ppp_unregister_channel() from process context
Problem Details: We need to call ppp_unregister_channel() when IrNET disconnects, and this must be done from a process context. Bug reported and patch tested by Guennadi Liakhovetski. Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h index 873ae189e37a..bc2e15ce7004 100644 --- a/net/irda/irnet/irnet.h +++ b/net/irda/irnet/irnet.h @@ -419,7 +419,7 @@ typedef struct irnet_socket u32 raccm; /* to please pppd - dummy) */ unsigned int flags; /* PPP flags (compression, ...) *...
7bb1bbe615de25d955b974cb47d40fa198154bb9
Analyze and fix the following issue in the Linux kernel code: [IrDA]: irttp_dup spin_lock initialisation
Problem Details: Without this initialization one gets kernel BUG at kernel/rtmutex_common.h:80! This patch should also be included in the -stable kernel. Signed-off-by: G. Liakhovetski <gl@dsa-ac.de> Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/irda/irttp.c b/net/irda/irttp.c index a7486b3bddcb..da3f2bc1b6f6 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c @@ -1455,6 +1455,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance) /* Not everything should be copied */ new->notify.instance = instance; + spin_lock_in...
0cd4554df0c261f7ba74786e471ccaa0e3725fb9
Analyze and fix the following issue in the Linux kernel code: ACPI: IA64: fix %ll build warnings
Problem Details: acpi_integer is 64-bits on all platforms, and so was defined as a u64. i386 and x86_64 define u64 as unsigned long long. ia64 defines u64 as long. While these are all 64-bits, the kernel build warns about formating a "long" with %ll: drivers/ata/libata-acpi.c:176: warning: long long unsigned int for...
```diff diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 72a6e2c3a536..56bf492e7acc 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -344,7 +344,7 @@ typedef u32 acpi_integer; /* 64-bit integers */ -typedef u64 acpi_integer; +typedef unsigned long long acpi_integer...
8140a90ec180192b202af086e7a582e5937c5580
Analyze and fix the following issue in the Linux kernel code: ACPI: IA64: fix allnoconfig build
Problem Details: The evils of Kconfig's select bite us once again... ia64/Kconfig selects ACPI, which depends on PM. But select ignores dependencies, allnoconfig chooses CONFIG_PM=n, and thus the menu of sub-options under ACPI vanish, which breaks the build. Manually select PM along with ACPI for now. Some day, we sho...
```diff diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index d51f0f11f7f9..e19185d26554 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -13,6 +13,7 @@ config IA64 bool select PCI if (!IA64_HP_SIM) select ACPI if (!IA64_HP_SIM) + select PM if (!IA64_HP_SIM) default y help The Itanium Processo...
119537c092638bf8a0672415024639353c773bb1
Analyze and fix the following issue in the Linux kernel code: [MIPS] Misc fixes for plat_irq_dispatch functions
Problem Details: o adds missing ST0_IM masks, which caused the logging of valid interrupts as spurious o stops pnx8550 to log every interrupt as spurious o adds cause register masks for ip22/ip32, which caused handling of masked interrupts o removes some superfluous parentheses in the SNI interrupt code Signe...
```diff diff --git a/arch/mips/ddb5xxx/ddb5477/irq.c b/arch/mips/ddb5xxx/ddb5477/irq.c index 2b23234a5b95..faa4a506bf82 100644 --- a/arch/mips/ddb5xxx/ddb5477/irq.c +++ b/arch/mips/ddb5xxx/ddb5477/irq.c @@ -194,7 +194,7 @@ static void vrc5477_irq_dispatch(void) asmlinkage void plat_irq_dispatch(void) { - unsigned i...
72ede9b18967e7a8a62a88f164f003193f6d891f
Analyze and fix the following issue in the Linux kernel code: [MIPS] Qemu: Fix Symmetric Uniprocessor support.
Problem Details: Might be useful for SMP debugging. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> [Rewritten Kconfig bits to deal better fit in the usual pattern of doing things - Ralf] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 5f29018a6533..656f0ca52782 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -542,6 +542,8 @@ config QEMU select SYS_SUPPORTS_LITTLE_ENDIAN select ARCH_SPARSEMEM_ENABLE select GENERIC_HARDIRQS_NO__DO_IRQ + select NR_CPUS_DEFAULT_1 + select S...
e8e30c765c5cfa5219918d3e5017fc563cf7ea03
Analyze and fix the following issue in the Linux kernel code: USB: necessary update for mos7720 driver
Problem Details: these devices have a shared interrupt endpoint. For serialcore to pass an interrupt endpoint to a subdriver, the subdriver must define and _export_ a fitting callback. The mos7720 driver failed to do so. This led invariably to an oops upon open. This patch fixes it. The driver is useless without it. Pl...
```diff diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 2d588fb82573..19bf403f9db2 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -1628,6 +1628,7 @@ static struct usb_serial_driver moschip7720_2port_driver = { .chars_in_buffer = mos7720_chars_in_buffer, ...
521b85ae66ad40a670b27b0596312d347a89b669
Analyze and fix the following issue in the Linux kernel code: USB: fix usb-serial regression
Problem Details: This patch reverts d9a7ecacac5f8274d2afce09aadcf37bdb42b93a since it breaks drivers that need to access the ->port[] array in shutdown (most of them). Signed-Off: Jim Radford <radford@blackbean.org> Acked-by: Mark Lord <mlord@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 8511352251f3..7639022cdf84 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -138,6 +138,11 @@ static void destroy_serial(struct kref *kref) dbg("%s - %s", __FUNCTION__, serial->type->des...
282c6b9c7a344ce6436bb61a006b9c2a373b9626
Analyze and fix the following issue in the Linux kernel code: pata_ixp4xx_cf: fix interrupt
Problem Details: As per compact flash specifications, the default irq mode upon cf insertion is pulse mode. this patch fixes the driver to cope with that. Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index bbcc9e7a95a0..c6f0e1927551 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c @@ -193,7 +193,7 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); i...
2ab302b3579b76b8c575f0858a8e4b82f6dfca52
Analyze and fix the following issue in the Linux kernel code: pata_ixp4xx_cf: fix oops on detach
Problem Details: pata_ixp4xx_cf dodged dont-clear-drvdata-in-LLD bombing run as it used platform_set_drvdata() instead of dev_set_drvdata(). This causes OOPS on devres host release. Kill it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index 9a0523b5c947..bbcc9e7a95a0 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c @@ -232,7 +232,6 @@ static __devexit int ixp4xx_pata_remove(struct platform_device *dev) struct ata_host *host = platform_get_d...
cc261267dfbced100eb10832aaabb03bf993745d
Analyze and fix the following issue in the Linux kernel code: libata: kernel-doc fix
Problem Details: Warning(linux-2621-rc3g7/drivers/ata/libata-core.c:842): No description found for parameter 'unknown' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 3c1f8830ac8b..bf327d473ce9 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -826,7 +826,7 @@ static u64 ata_id_n_sectors(const u16 *id) /** * ata_id_to_dma_mode - Identify DMA mode from id block * @dev: device...
43a867a2d2a119c744bab6dc8d3e1da6809d7141
Analyze and fix the following issue in the Linux kernel code: [S390] zcrypt: fix possible race when unloading zcrypt driver modules
Problem Details: Move try_module_get() call into spin protected block to prevent zcrypt driver module unload while submitting a request to driver. Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index 99761391f340..e3625a47a596 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c @@ -298,14 +298,14 @@ static long zcrypt_rsa_modexpo(struct ica_rsa_modexpo *mex) get_device(&zdev->ap_dev->de...
cf352ce0b9104dc6a1c11df52db9f910f1f6cd2e
Analyze and fix the following issue in the Linux kernel code: [S390] zcrypt: fix possible dead lock in AP bus module
Problem Details: AP bus module uses bus_for_each_dev() in software interrupt context to poll for completed requests which might cause dead locks. Solution: use private AP device list for polling in software interrupt context. Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwi...
```diff diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index c7d1355237b6..181b51772b1b 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -65,6 +65,8 @@ module_param_named(poll_thread, ap_thread_flag, int, 0000); MODULE_PARM_DESC(poll_thread, "Turn on/off poll th...
257c6e1ce8f875dd02220e90cf38e615e47788fe
Analyze and fix the following issue in the Linux kernel code: [S390] memory detection: fix off by one bug.
Problem Details: diag 260 returns the address of the last addressable byte and not the size of memory. Since we want the size we have to add 1 to the return value. Disable diag 260 for non z/Arch mode since it doesn't work there anyway. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Sc...
```diff diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index afca1c6f4d21..5e47936573f2 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c @@ -141,9 +141,9 @@ static noinline __init void detect_machine_type(void) machine_flags |= 4; } +#ifdef CONFIG_64BIT static noinline __ini...
4b560fde06aeb342f3ff0bce924627ab722d251a
Analyze and fix the following issue in the Linux kernel code: drm: fix warning in drm_fops.c
Problem Details: drivers/char/drm/drm_fops.c: In function 'drm_setup': drivers/char/drm/drm_fops.c:60: warning: comparison of distinct pointer types lacks a cast Unfortunately PAGE_SIZE has different types on different architectures. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie ...
```diff diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c index afe5f07f2e17..314abd9d6510 100644 --- a/drivers/char/drm/drm_fops.c +++ b/drivers/char/drm/drm_fops.c @@ -57,7 +57,7 @@ static int drm_setup(drm_device_t * dev) dev->magicfree.next = NULL; /* prebuild the SAREA */ - sareapage = m...
5851fadce8824d5d4b8fd02c22ae098401f6489e
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix build error due to not including <linux/errno.h>
Problem Details: Since d9a9cdfb078d755e648d53ec25b7370f84ee5729 <linux/sysfs.h> is using ENOSYS without including <linux/errno.h> if CONFIG_SYSFS is disabled. Fixed by including <linux/errno.h>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 0544edda7168..fea9a6b3fb7b 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -11,6 +11,7 @@ #define _SYSFS_H_ #include <linux/compiler.h> +#include <linux/errno.h> #include <linux/list.h> #include <asm/atomic.h> ```
d9c1e9a8fff512bb6c43461181d4360f1c8cfd6d
Analyze and fix the following issue in the Linux kernel code: [PATCH] tty: Fix two reported pid leaks
Problem Details: These leaks were reported by: Catalin Marinas <catalin.marians@gmail.com> and I have been able to very by inspection they are possible. When converting tty_io.c to store pids as struct pid pointers instead of pid_t values it appears I overlooked two places where we stop using the pid value. The very ...
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index e45326856680..7a32df594907 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1376,6 +1376,8 @@ static void do_tty_hangup(struct work_struct *work) read_unlock(&tasklist_lock); tty->flags = 0; + put_pid(tty->session); + put_p...
aeb3f6d10ebfd5607f4bd3920b3b730a992ab82c
Analyze and fix the following issue in the Linux kernel code: [PATCH] gpio_direction_output-needs-an-initial-value fix
Problem Details: Build fix: sa1100/generic.c should already have included <asm/gpio.h>, but it didn't ... causing a build problem with a recent patch. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed...
```diff diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index edc349e5fcf7..9e13c8358ea7 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c @@ -27,6 +27,7 @@ #include <asm/mach/map.h> #include <asm/mach/flash.h> #include <asm/irq.h> +#include <asm/gpio.h> ...
303cd1535f6257b9fd8214534ca87b1a1567a2c5
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix atomicity of TIF update in flush_thread() for x86_64
Problem Details: Fix atomicity of TIF update in flush_thread() for x86_64 Race : parent process executing : sys_ptrace() (lock_kernel()) (ptrace_get_task_struct(pid)) arch_ptrace() ptrace_detach() ptrace_disable(child); clear_singlestep(child); clear_tsk_thread_flag(child, TIF_SINGLESTEP); ...
```diff diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index cbbc6adc1a92..d8d5ccc245c8 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c @@ -382,14 +382,17 @@ void exit_thread(void) void flush_thread(void) { struct task_struct *tsk = current; - struct thread_inf...
bad77057ed59892bd5c7807dcf0c2500e5ff1fe7
Analyze and fix the following issue in the Linux kernel code: [PATCH] machzwd warning fix
Problem Details: drivers/char/watchdog/machzwd.c: In function 'zf_ioctl': drivers/char/watchdog/machzwd.c:327: warning: passing argument 1 of 'zf_ping' makes integer from pointer without a cast Also some coding-style repairs. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Al Viro <viro@ftp.linux.org.uk>...
```diff diff --git a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c index 81fb3dec180f..76c7fa37fa6c 100644 --- a/drivers/char/watchdog/machzwd.c +++ b/drivers/char/watchdog/machzwd.c @@ -314,21 +314,21 @@ static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, { void __user ...
6a3d039078b337856bd3cfa436be3b1b223440a5
Analyze and fix the following issue in the Linux kernel code: [PATCH] ia64: platform_kernel_launch_event is noop on generic kernel
Problem Details: Add a missing #define for the platform_kernel_launch_event. Without this fix, a call to platform_kernel_launch_event() becomes a noop on generic kernels. SN systems require this fix to successfully kdump/kexec from certain hardware errors. [bwalle@suse.de: fix it] Signed-off-by: John Keller <jpk@sgi...
```diff diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index 3c96ac19154e..ca33eb181ff2 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h @@ -168,6 +168,7 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *); # define platform_setup_msi_irq ia64_mv.setup_msi_irq ...
647157255915b76ddfbea87ca396ace364d158c5
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix wrong /proc/iomem on SGI Altix
Problem Details: In sn_io_slot_fixup(), the parent is re-set from the bus to io(port|mem)_resource because the address is changed in a way that it's not child of the bus any more. However, only the root is set but not the parent/child/sibling relationship in the resource tree which causes 'cat /proc/iomem' to stop aft...
```diff diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 600be3ebae05..6b10e5d28488 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c @@ -247,10 +247,18 @@ sn_io_slot_fixup(struct pci_dev *dev) addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET; dev->re...
27aba76615eeb36af84118e8ea6d35ffa51fd1e3
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Fix host memory corruption on i386 with >= 4GB ram
Problem Details: PAGE_MASK is an unsigned long, so using it to mask physical addresses on i386 (which are 64-bit wide) leads to truncation. This can result in page->private of unrelated memory pages being modified, with disasterous results. Fix by not using PAGE_MASK for physical addresses; instead calculate the corr...
```diff diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index 2cb48937be44..e85b4c7c36f7 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -131,7 +131,7 @@ static int dbg = 1; (((address) >> PT32_LEVEL_SHIFT(level)) & ((1 << PT32_LEVEL_BITS) - 1)) -#define PT64_BASE_ADDR_MASK (((1ULL << 52) - 1) & PAGE...
ac1b714e78c8f0b252f8d8872e6ce6f898a123b3
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Fix guest writes to nonpae pde
Problem Details: KVM shadow page tables are always in pae mode, regardless of the guest setting. This means that a guest pde (mapping 4MB of memory) is mapped to two shadow pdes (mapping 2MB each). When the guest writes to a pte or pde, we intercept the write and emulate it. We also remove any shadowed mappings corre...
```diff diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index a1a93368f314..2cb48937be44 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -1093,22 +1093,40 @@ out: return r; } +static void mmu_pre_write_zap_pte(struct kvm_vcpu *vcpu, + struct kvm_mmu_page *page, + u64 *spte) +{ + u64 pte; + s...