id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
64c1dd3bbf67c958992c098d5d464a014df3fa46
Analyze and fix the following issue in the Linux kernel code: [ARM] 4959/1: PXA: Fix misprint in CICR1_RGBT_CONV
Problem Details: This patch fixes misprint in definition of CICR1_RGBT_CONV in include/asm-arm/arch-pxa/pxa-regs.h Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index c28c5eaf04ac..a322012f16ac 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h @@ -1635,7 +1635,7 @@ #define CICR0_FOM (1 << 0) /* FIFO-overrun mask */ #define CICR1_TBIT (1 <<...
103a1754894eecf488103f7739061e7e767049ad
Analyze and fix the following issue in the Linux kernel code: [ARM] 4943/2: magician: fix magician.h GPIO header includes
Problem Details: PXA GPIO definitions were split from pxa-regs.h into pxa2xx-gpio.h. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-pxa/magician.h b/include/asm-arm/arch-pxa/magician.h index 337f51f06b3a..13762e80bf54 100644 --- a/include/asm-arm/arch-pxa/magician.h +++ b/include/asm-arm/arch-pxa/magician.h @@ -12,7 +12,7 @@ #ifndef _MAGICIAN_H_ #define _MAGICIAN_H_ -#include <asm/arch/pxa-regs.h> +#inc...
df56eacdd5b1018f3f2831ff245a7cb70c602454
Analyze and fix the following issue in the Linux kernel code: [ARM] 4942/1: magician: fix the backlight driver name
Problem Details: corgi_bl was renamed to generic_bl. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index d98ef7ada2f8..b0dc18110225 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -135,7 +135,7 @@ static struct generic_bl_info backlight_info = { }; static struct platform_device backlight = { - .name =...
dfa1067996390dfd4b1ce449676500fab4980ce2
Analyze and fix the following issue in the Linux kernel code: [ARM] pxa: cleanup the coding style of pxa_gpio_set_type()
Problem Details: by 1. wrapping long lines and making comments tidy 2. using IRQ_TYPE_* instead of migration macros __IRQT_* 3. introduce a pr_debug() for the commented printk(KERN_DEBUG ...) stuff Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index ce150bf00bdd..4fd4560dd3ad 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -121,39 +121,37 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) gpio = IRQ_TO_GPIO(irq); idx = gpio >> 5; - if (type ==...
28fab1a2fd5b1aa92f9ad1adc9e3b8914f89bc74
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix kernel mode preemption
Problem Details: Luc Van Oostenryck reported: The code removed by this patch tested the irq_cpustat_t members __local_irq_count and __local_bh_count but these fields have been removed some time ago: http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=3ab146c93e039dec99fec8d441a8dd046fe51...
```diff diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index a46d5b456765..65cef872c5f2 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -209,14 +209,12 @@ __irq_svc: irq_handler #ifdef CONFIG_PREEMPT + str r8, [tsk, #TI_PREEMPT] @ restore preempt count l...
0f9801463b0aa9ac7253a250ec6bc37e6f77d31d
Analyze and fix the following issue in the Linux kernel code: [ARM] 4854/1: fix the load address of uImage for CONFIG_ZBOOT_ROM=y
Problem Details: U-Boot puts an image at the load address specified in the uImage header before jumping to the entry point. In the CONFIG_ZBOOT_ROM case ZBOOT_ROM_TEXT is the right load address. Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 25f12303b106..da226abce2d0 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile @@ -61,9 +61,15 @@ endif quiet_cmd_uimage = UIMAGE $@ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ - -C none -a $(Z...
ad775f5a8faa5845377f093ca11caf577404add9
Analyze and fix the following issue in the Linux kernel code: [PATCH] r/o bind mounts: debugging for missed calls
Problem Details: There have been a few oopses caused by 'struct file's with NULL f_vfsmnts. There was also a set of potentially missed mnt_want_write()s from dentry_open() calls. This patch provides a very simple debugging framework to catch these kinds of bugs. It will WARN_ON() them, but should stop us from having ...
```diff diff --git a/fs/file_table.c b/fs/file_table.c index 71efc7000226..7a0a9b872251 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -42,6 +42,7 @@ static inline void file_free_rcu(struct rcu_head *head) static inline void file_free(struct file *f) { percpu_counter_dec(&nr_files); + file_check_state(f); ...
3d733633a633065729c9e4e254b2e5442c00ef7e
Analyze and fix the following issue in the Linux kernel code: [PATCH] r/o bind mounts: track numbers of writers to mounts
Problem Details: This is the real meat of the entire series. It actually implements the tracking of the number of writers to a mount. However, it causes scalability problems because there can be hundreds of cpus doing open()/close() on files on the same mnt at the same time. Even an atomic_t in the mnt has massive sc...
```diff diff --git a/fs/namespace.c b/fs/namespace.c index 066b393578c1..e3ce18d91aad 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -17,6 +17,7 @@ #include <linux/quotaops.h> #include <linux/acct.h> #include <linux/capability.h> +#include <linux/cpumask.h> #include <linux/module.h> #include <linux/sysfs.h> ...
4a3fd211ccfc08a88edc824300e25a87785c6a5f
Analyze and fix the following issue in the Linux kernel code: [PATCH] r/o bind mounts: elevate write count for open()s
Problem Details: This is the first really tricky patch in the series. It elevates the writer count on a mount each time a non-special file is opened for write. We used to do this in may_open(), but Miklos pointed out that __dentry_open() is used as well to create filps. This will cover even those cases, while a call...
```diff diff --git a/fs/file_table.c b/fs/file_table.c index 3f73eb1f195a..71efc7000226 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -199,6 +199,17 @@ int init_file(struct file *file, struct vfsmount *mnt, struct dentry *dentry, file->f_mapping = dentry->d_inode->i_mapping; file->f_mode = mode; file->f_o...
74f9fdfa1f229284ee1ea58fa47f2cdeeb12f6fe
Analyze and fix the following issue in the Linux kernel code: [PATCH] r/o bind mounts: elevate write count for do_utimes()
Problem Details: Now includes fix for oops seen by akpm. "never let a libc developer write your kernel code" - hch "nor, apparently, a kernel developer" - akpm Acked-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Cc: Balbir Singh <ba...
```diff diff --git a/fs/utimes.c b/fs/utimes.c index b18da9c0b97f..a2bef77dc9c9 100644 --- a/fs/utimes.c +++ b/fs/utimes.c @@ -2,6 +2,7 @@ #include <linux/file.h> #include <linux/fs.h> #include <linux/linkage.h> +#include <linux/mount.h> #include <linux/namei.h> #include <linux/sched.h> #include <linux/stat.h> @@...
463c3197263bd26ac59a00d2484990e17e35c50e
Analyze and fix the following issue in the Linux kernel code: [PATCH] r/o bind mounts: get callers of vfs_mknod/create/mkdir()
Problem Details: This takes care of all of the direct callers of vfs_mknod(). Since a few of these cases also handle normal file creation as well, this also covers some calls to vfs_create(). So that we don't have to make three mnt_want/drop_write() calls inside of the switch statement, we move some of its logic outsi...
```diff diff --git a/fs/namei.c b/fs/namei.c index 89ef3178eaaa..3fbcf2021a2e 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1984,6 +1984,23 @@ int vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) return error; } +static int may_mknod(mode_t mode) +{ + switch (mode & S_IFMT) { + case S_IFREG:...
5a6483feb0c5193519625d0ea8c4254364d423cc
Analyze and fix the following issue in the Linux kernel code: include: Remove unnecessary inclusions of asm/semaphore.h
Problem Details: None of these files use any of the functionality promised by asm/semaphore.h. It's possible that they (or some user of them) rely on it dragging in some unrelated header file, but I can't build all these files, so we'll have to fix any build failures as they come up. Signed-off-by: Matthew Wilcox <wi...
```diff diff --git a/include/asm-blackfin/dma.h b/include/asm-blackfin/dma.h index 5abaa2cee8db..16d493574ba8 100644 --- a/include/asm-blackfin/dma.h +++ b/include/asm-blackfin/dma.h @@ -33,7 +33,6 @@ #include <linux/slab.h> #include <asm/irq.h> #include <asm/signal.h> -#include <asm/semaphore.h> #include <linux/...
d3135846f6c1858dbad6ccb780a42e6c98953e6d
Analyze and fix the following issue in the Linux kernel code: drivers: Remove unnecessary inclusions of asm/semaphore.h
Problem Details: None of these files use any of the functionality promised by asm/semaphore.h. It's possible that they rely on it dragging in some unrelated header file, but I can't build all these files, so we'll have fix any build failures as they come up. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 733eb94d055e..b0b00af90d0e 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -61,7 +61,6 @@ #include <scsi/scsi_cmnd.h> #include <scsi/scsi_host.h> #include <linux/libata.h> -#include <asm/semaphore.h> #include ...
5f090dcb4d4fff373ce7165bce4ba5e87534d50a
Analyze and fix the following issue in the Linux kernel code: net: Remove unnecessary inclusions of asm/semaphore.h
Problem Details: None of these files use any of the functionality promised by asm/semaphore.h. It's possible that they rely on it dragging in some unrelated header file, but I can't build all these files, so we'll have fix any build failures as they come up. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
```diff diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h index eb305a0895fc..4fdb13f8447b 100644 --- a/drivers/net/cxgb3/adapter.h +++ b/drivers/net/cxgb3/adapter.h @@ -43,7 +43,6 @@ #include <linux/mutex.h> #include <linux/bitops.h> #include "t3cdev.h" -#include <asm/semaphore.h> #include <as...
950e4da32426859ee4b37b2c95026d4f1efa5d05
Analyze and fix the following issue in the Linux kernel code: arch: Remove unnecessary inclusions of asm/semaphore.h
Problem Details: None of these files use any of the functionality promised by asm/semaphore.h. It's possible that they rely on it dragging in some unrelated header file, but I can't build all these files, so we'll have fix any build failures as they come up. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
```diff diff --git a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c index f53bca46e23c..aa8f7739c822 100644 --- a/arch/arm/common/rtctime.c +++ b/arch/arm/common/rtctime.c @@ -22,7 +22,6 @@ #include <linux/mutex.h> #include <asm/rtc.h> -#include <asm/semaphore.h> static DECLARE_WAIT_QUEUE_HEAD(rtc_wait); ...
7cea51be4e91edad05bd834f3235b45c57783f0d
Analyze and fix the following issue in the Linux kernel code: security: fix up documentation for security_module_enable
Problem Details: security_module_enable() can only be called during kernel init. Signed-off-by: James Morris <jmorris@namei.org>
```diff diff --git a/security/security.c b/security/security.c index dd0c6baed494..4a6265ab3cc2 100644 --- a/security/security.c +++ b/security/security.c @@ -83,7 +83,7 @@ __setup("security=", choose_lsm); * * Each LSM must pass this method before registering its own operations * to avoid security registration r...
076d8423a98659a92837b07aa494cb74bfefe77c
Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix UNC path prefix on QueryUnixPathInfo to have correct slash
Problem Details: When a share was in DFS and the server was Unix/Linux, we were sending paths of the form \\server\share/dir/file rather than //server/share/dir/file There was some discussion between me and jra over whether we should use /server/share/dir/file as MS sometimes says - but the documentation f...
```diff diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index bc673c8c1e6b..e1031b9e2c55 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -161,12 +161,14 @@ static void cifs_unix_info_to_inode(struct inode *inode, spin_unlock(&inode->i_lock); } -static const unsigned char *cifs_get_search_path(struct cifsTconI...
d1643d24c61b725bef399cc1cf2944b4c9c23177
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix and allocate less memory for ->priv'less netdevices
Problem Details: This patch effectively reverts commit d0498d9ae1a5cebac363e38907266d5cd2eedf89 aka "[NET]: Do not allocate unneeded memory for dev->priv alignment." It was found to be buggy because of final unconditional += NETDEV_ALIGN_CONST removal. For example, for sizeof(struct net_device) being 2048 bytes, "allo...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index c16a07fde388..e1df1ab3e04a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3996,12 +3996,15 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, BUG_ON(strlen(name) >= sizeof(dev->name)); - /* ensure 32-byte alignment of both the ...
cb170a45d69b573a08247acfbbff3b9d6e6e2f8f
Analyze and fix the following issue in the Linux kernel code: Linux Thumb-2 support for user-space applications
Problem Details: This patch implements Thumb-2 application support in Linux. Original implementation by Paul Brook with fixes for VFP and Neon by Catalin Marinas. Signed-off-by: Paul Brook <paul@codesourcery.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
```diff diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 5e647eb6b3b9..6fd1460111ec 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -462,10 +462,6 @@ __irq_usr: __und_usr: usr_entry - tst r3, #PSR_T_BIT @ Thumb mode? - bne __und_usr_unknown @ ignore ...
d1a4be630fb068f251d64b62919f143c49ca8057
Analyze and fix the following issue in the Linux kernel code: x86 PAT: fix mmap() of holes
Problem Details: do not return a -EINVAL when mmap()-ing PCI holes. Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Acked-by: Suresh Siddha <suresh.b.siddha@intel.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-...
```diff diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 7d9517abc9af..f7823a172868 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -542,7 +542,7 @@ static int __change_page_attr(struct cpa_data *cpa, int primary) repeat: kpte = lookup_address(address, &level); if (!kpte) - r...
855d854a33fca71cf68bad258bd5e66e5b265d10
Analyze and fix the following issue in the Linux kernel code: libata: fix boot panic with SATAPI devices on non-SFF HBAs
Problem Details: The kernel now panics reliably on boot if you have a SATAPI device connected. The problem was introduced by the libata merge trying to pull out all the SFF code into a separate module. Unfortunately, if you're a satapi device you usually need to call atapi_request_sense, which has a bare invocation o...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index fedf62de9460..c16e3cea1d28 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2394,7 +2394,8 @@ static void atapi_request_sense(struct ata_queued_cmd *qc) memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); #i...
7584d276d47a55afaeb614ed16cf306cbe2d6117
Analyze and fix the following issue in the Linux kernel code: MMC: OMAP: Use tasklet instead of workqueue for cover switch notification
Problem Details: The cover waitqueue is occasionally scheduled twice from timer and the interrupt and oops follows. It would have been possible to fix this problem with spinlocks but using tasklet was a dropin solution with no need for locking. This path also adds some cleanups. Signed-off-by: Jarkko Lavinen <jarkko....
```diff diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index f7fb97802827..8f393e8ed42f 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -94,7 +94,7 @@ /* Specifies how often in millisecs to poll for card status changes * when the cover switch is open */ -#define OMAP_MMC_SWITC...
b8f9f0e90a6c3fb999d00301f45bb2213dbe8c00
Analyze and fix the following issue in the Linux kernel code: MMC: OMAP: Fix timeout calculation for MMC multislot support
Problem Details: Fix the data timeout calculation for MMC multislot support. Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pi...
```diff diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 90e9d68e7998..0d3cd3c23f8f 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -861,13 +861,12 @@ static inline void set_cmd_timeout(struct mmc_omap_host *host, struct mmc_reques static inline void set_data_timeout(struct ...
d365abe27db12df25660fe254e09876cea8a9ad8
Analyze and fix the following issue in the Linux kernel code: MMC: OMAP: Fix the BYTEBLOCK capability removal
Problem Details: According with commit 255d01af9a990fd5166f04ed0cc0b30b7b67e81e from Linux-OMAP tree, the BYTEBLOCK capability was removed by Pierre Ossman. MMC_CAP_BYTEBLOCK is not defined causing the compile error: drivers/mmc/host/omap.c: In function `mmc_omap_probe': drivers/mmc/host/omap.c:1077: error: `MMC_CAP_B...
```diff diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 472e977b7404..adf679a157eb 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1070,7 +1070,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev) mmc->f_min = 400000; mmc->f_max = 24000000; mmc->ocr_avail...
fda31d7d4b5a9c663ac3ed1ba244018a88deecaf
Analyze and fix the following issue in the Linux kernel code: x86: kgdb build fix
Problem Details: TF_MASK is no longer defined, use X86_EFLAGS_TF. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index 8c7e555f6d39..24362ecf5f9a 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c @@ -375,12 +375,12 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code, newPC = linux_regs->ip; /* clear the trace bit */ - ...
c07d444407de63b2f414a8be9428f88cadba503f
Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi: bidi support at the generic libiscsi level
Problem Details: - prepare the additional bidi_read rlength header. - access the right scsi_in() and/or scsi_out() side of things. also for resid. - Handle BIDI underflow overflow from target Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Reviewed-by: Pete Wyckoff <pw@osc.edu> Signed-off-by: Mike Christie <micha...
```diff diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 2f6b0955ff01..010c1b9b178c 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -176,6 +176,31 @@ static int iscsi_prep_ecdb_ahs(struct iscsi_cmd_task *ctask) return 0; } +static int iscsi_prep_bidi_ahs(struct iscsi_cmd_t...
57b7658aed76f1763416878ead9be4ffa288b7a3
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Fix error handling for blocked unit for send FCP command
Problem Details: In the case the unit is blocked, zfcp_unit_get has not been called yet, so the error handling path should not call zfcp_unit_put. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: Martin Peschke <mp3@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnersh...
```diff diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 3211dcc59543..7c3f02816e95 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -3562,8 +3562,8 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, send_failed: no_fit: failed_scsi_cmnd: -...
6071d7ec36054e78f02f7d5a66c3784aeb65ce92
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Remove zfcp_erp_wait from slave destory handler to fix deadlock
Problem Details: The testcase # chchp -v 0 0.da && sleep 59 && chchp -v 1 0.da results in this deadlock situation: STACK TRACE FOR TASK: 0x7e9a2048 (zfcperp0.0.c613) 0 schedule+816 [0x356b3c] 1 schedule_timeout+172 [0x357340] 2 wait_for_common+192 [0x3565fc] 3 flush_cpu_workqueue+116 [0x52af0] 4 flush_workqueue+116 [0...
```diff diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 3c9880e46e81..f81850624eed 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -181,7 +181,6 @@ static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) struct zfcp_unit *unit = (struct zfcp_un...
440fc172ae333c52c458401fe059afcc6e91eebf
Analyze and fix the following issue in the Linux kernel code: sh: Fix up L2 cache probe.
Problem Details: SH7723 is the first hard silicon to implement the L2, and unsurprisingly, does the precise inverse of what the specification alleges. XOR the URAM/L2 size bits to get back in line with the existing parsing logic. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c index 6ea87af7247e..ebceb0dadff5 100644 --- a/arch/sh/kernel/cpu/sh4/probe.c +++ b/arch/sh/kernel/cpu/sh4/probe.c @@ -220,6 +220,12 @@ int __init detect_cpu_and_cache_system(void) * SH-4A's have an optional PIPT L2. */ if (boot...
e5a4c65bef19366112ba002bc06d87450f02ad74
Analyze and fix the following issue in the Linux kernel code: sh: Fix up SH-4A part probe.
Problem Details: The SH-4A series probe we were relying on doesn't work any more on the newer parts, bump this up to use CVR.CHIP instead so we have consistent behaviour across all of the parts, which is what this should have been testing in the first place. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c index c478b16dbf4b..6ea87af7247e 100644 --- a/arch/sh/kernel/cpu/sh4/probe.c +++ b/arch/sh/kernel/cpu/sh4/probe.c @@ -53,7 +53,7 @@ int __init detect_cpu_and_cache_system(void) /* * Setup some generic flags we can probe on SH-4A p...
47aa8f493f94c6f60ebc5aa70eec90cc83f499f3
Analyze and fix the following issue in the Linux kernel code: sh: Fix up SH7763 build.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c index 07c988dc9de6..ae2b22219f02 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c @@ -231,12 +231,6 @@ static struct intc_group groups[] __initdata = { INTC_GROUP(GPIO, ...
8ed6dfdd0900dfd6ddc7ba3c766a80f7b88911c9
Analyze and fix the following issue in the Linux kernel code: sh: Fix up mach-types formatting from merge damage.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types index b9f6d74dcbe8..987c6682bf99 100644 --- a/arch/sh/tools/mach-types +++ b/arch/sh/tools/mach-types @@ -21,9 +21,9 @@ HD64465 HD64465 7206SE SH_7206_SOLUTION_ENGINE 7343SE SH_7343_SOLUTION_ENGINE 7619SE SH_7619_SOLUTION_ENGINE -7721SE...
6dea7814e1c6a27701a63b271fc580791e066537
Analyze and fix the following issue in the Linux kernel code: Fix sh_keysc double free
Problem Details: Avoid double free situation from happening by removing input_free_device() after input_unregister_device(). Suggested by Dmitry Torokhov. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c index 5d0864a9e94b..8486abc457ed 100644 --- a/drivers/input/keyboard/sh_keysc.c +++ b/drivers/input/keyboard/sh_keysc.c @@ -238,7 +238,6 @@ static int __devexit sh_keysc_remove(struct platform_device *pdev) input_unregister_d...
9460c0ce9b29825d279081d5078815a32c268ada
Analyze and fix the following issue in the Linux kernel code: sh: Fix up __access_ok() check for nommu.
Problem Details: Presently this only checks to see if an address is an RAM, but this doesn't work with XIP, so just always return 1. Follows m68knommu. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/uaccess_32.h b/include/asm-sh/uaccess_32.h index c0318b608893..1e41fda74bd3 100644 --- a/include/asm-sh/uaccess_32.h +++ b/include/asm-sh/uaccess_32.h @@ -55,13 +55,10 @@ static inline void set_fs(mm_segment_t s) * If we don't have an MMU (or if its disabled) the only thing we real...
b420b1a7a17ea88531d0e12b2f2679a0c8365803
Analyze and fix the following issue in the Linux kernel code: rtc: rtc-sh: Add support for periodic IRQs.
Problem Details: This adds support for periodic IRQs to the rtc-sh driver. RTC_IRQP_READ/RTC_IRQP_SET are added, with a number of other fixes and reordering across the rest of the code. Signed-off-by: Angelo Castello <angelo.castello@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Pau...
```diff diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index 9e9caa5d7f5f..c594b34c6767 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c @@ -1,8 +1,9 @@ /* * SuperH On-Chip RTC Support * - * Copyright (C) 2006, 2007 Paul Mundt + * Copyright (C) 2006, 2007, 2008 Paul Mundt * Copyright (C) ...
2309e9e040fe29469fb85a384636c455b62fe525
Analyze and fix the following issue in the Linux kernel code: ocfs2/net: Add debug interface to o2net
Problem Details: This patch exposes o2net information via debugfs. The information includes the list of sockets (sock_containers) as well as the list of outstanding messages (send_tracking). Useful for o2dlm debugging. (This patch is derived from an earlier one written by Zach Brown that exposed the same information v...
```diff diff --git a/fs/ocfs2/cluster/Makefile b/fs/ocfs2/cluster/Makefile index cdd162f13650..bc8c5e7d8608 100644 --- a/fs/ocfs2/cluster/Makefile +++ b/fs/ocfs2/cluster/Makefile @@ -1,4 +1,4 @@ obj-$(CONFIG_OCFS2_FS) += ocfs2_nodemanager.o ocfs2_nodemanager-objs := heartbeat.o masklog.o sys.o nodemanager.o \ - quo...
409753bf6da4a2db038027471abaf324e063db2f
Analyze and fix the following issue in the Linux kernel code: ocfs2/cluster: Get rid of arguments to the timeout routines
Problem Details: We keep seeing bug reports related to NULL pointer derefs in o2net_set_nn_state(). When I originally wrote up the configurable timeout patch, I had tried to plan for multiple clusters. This was silly. The timeout routines all use o2nm_single_cluster so there's no point in passing an argument at all. T...
```diff diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 4ea4b0a26975..1170918a9311 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c @@ -142,23 +142,17 @@ static void o2net_idle_timer(unsigned long data); static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); static voi...
b1f3550fa1471b691ad6c2f35b5b22e93eaa5855
Analyze and fix the following issue in the Linux kernel code: ocfs2: Use BUG_ON
Problem Details: if (...) BUG(); should be replaced with BUG_ON(...) when the test has no side-effects to allow a definition of BUG_ON that drops the code completely. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @ disable unlikely @ expression E,f; @@ ( ...
```diff diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index a26882144e8f..41f84c92094f 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -1029,8 +1029,7 @@ static void ocfs2_rotate_leaf(struct ocfs2_extent_list *el, BUG_ON(!next_free); /* The tree code before us didn't allow enough room in the leaf. */ -...
c834cdb15702dd0147875b352cc7d4df93d7d900
Analyze and fix the following issue in the Linux kernel code: ocfs2/dlm: Fix lockname in lockres print function
Problem Details: __dlm_print_one_lock_resource was printing lockname incorrectly. Also, we now use printk directly instead of mlog as the latter prints the line context which is not useful for this print. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed...
```diff diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c index 58e45795a6c6..53a9e6093e6f 100644 --- a/fs/ocfs2/dlm/dlmdebug.c +++ b/fs/ocfs2/dlm/dlmdebug.c @@ -5,7 +5,7 @@ * * debug functionality for the dlm * - * Copyright (C) 2004 Oracle. All rights reserved. + * Copyright (C) 2004, 2008 Oracle....
e5a0334cbd65e27f8dfd9985aa805874fe59e879
Analyze and fix the following issue in the Linux kernel code: ocfs2/dlm: Move dlm_print_one_mle() from dlmmaster.c to dlmdebug.c
Problem Details: This patch helps in consolidating debugging related functions in dlmdebug.c. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
```diff diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c index a109005f70da..58e45795a6c6 100644 --- a/fs/ocfs2/dlm/dlmdebug.c +++ b/fs/ocfs2/dlm/dlmdebug.c @@ -268,11 +268,6 @@ const char *dlm_errname(enum dlm_status err) } EXPORT_SYMBOL_GPL(dlm_errname); - -#ifdef CONFIG_DEBUG_FS - -static struct de...
8f318311faf57481452895448e6ffaec7c38a146
Analyze and fix the following issue in the Linux kernel code: ocfs2: Change mlog_bug_on to BUG_ON in ocfs2_lockid.h
Problem Details: The masklog code is in the o2cb stack, but ocfs2_lockid.h now needs to be included by the user stack. The BUG() in ocfs2_lock_type_string() does not need masklog support, so change it to a regular BUG_ON(). Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.c...
```diff diff --git a/fs/ocfs2/ocfs2_lockid.h b/fs/ocfs2/ocfs2_lockid.h index 86f3e3799c2b..82c200f7a8f1 100644 --- a/fs/ocfs2/ocfs2_lockid.h +++ b/fs/ocfs2/ocfs2_lockid.h @@ -100,7 +100,7 @@ static char *ocfs2_lock_type_strings[] = { static inline const char *ocfs2_lock_type_string(enum ocfs2_lock_type type) { #ifde...
1693a5c0117f8ccd010a666f97aaf0f14fb0a0e4
Analyze and fix the following issue in the Linux kernel code: ocfs2: handle async EAGAIN from NOQUEUE request
Problem Details: When using fsdlm, -EAGAIN is returned in the async callback for NOQUEUE requests. Fix up dlmglue to expect this. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
```diff diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 295c47f7aba2..b640423b936a 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -880,13 +880,20 @@ static void ocfs2_locking_ast(void *opaque) struct ocfs2_lock_res *lockres = opaque; struct ocfs2_super *osb = ocfs2_get_lockres_osb(lockres); ...
de551246e7bc5558371c3427889a8db1b8cc60f4
Analyze and fix the following issue in the Linux kernel code: ocfs2: Remove CANCELGRANT from the view of dlmglue.
Problem Details: o2dlm has the non-standard behavior of providing a cancel callback (unlock_ast) even when the cancel has failed (the locking operation succeeded without canceling). This is called CANCELGRANT after the status code sent to the callback. fs/dlm does not provide this callback, so dlmglue must be changed...
```diff diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index c7653bb343e1..295c47f7aba2 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -311,12 +311,13 @@ static int ocfs2_inode_lock_update(struct inode *inode, struct buffer_head **bh); static void ocfs2_drop_osb_locks(struct ocfs2_super *osb)...
7431cd7e8dd0e46e9b12bd6a1ac1286f4b420371
Analyze and fix the following issue in the Linux kernel code: ocfs2: Use -errno instead of dlm_status for ocfs2_dlm_lock/unlock() API.
Problem Details: Change the ocfs2_dlm_lock/unlock() functions to return -errno values. This is the first step towards elminiating dlm_status in fs/ocfs2/dlmglue.c. The change also passes -errno values to ->unlock_ast(). [ Fix a return code in dlmglue.c and change the error translation table into an array of ints. -...
```diff diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index b8ac903ef8ef..6a222a5c81da 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -329,10 +329,9 @@ static void ocfs2_schedule_blocked_lock(struct ocfs2_super *osb, struct ocfs2_lock_res *lockres); static inline void ocfs2_recover_from_dlm_e...
25b1c3d8889f982ebc6c7b996cfc7fa5f1dce533
Analyze and fix the following issue in the Linux kernel code: firewire: fix synchronization of gap counts
Problem Details: Fix: The fact that nodes had different gap counts would be overlooked if the bus manager code would pick gap count 63 because of beta repeaters or because of very large hop counts. In this case, the bus manager code would miss that it actually has to send the PHY config packet with gap count 63. Rel...
```diff diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c index 7e4012db6ad2..681bb8d4ef63 100644 --- a/drivers/firewire/fw-card.c +++ b/drivers/firewire/fw-card.c @@ -220,7 +220,7 @@ fw_card_bm_work(struct work_struct *work) struct bm_data bmd; unsigned long flags; int root_id, new_root_id, ir...
2a0a2590498be7b92e3e76409c9b8ee722e23c8f
Analyze and fix the following issue in the Linux kernel code: firewire: wait until PHY configuration packet was transmitted (fix bus reset loop)
Problem Details: We now exit fw_send_phy_config /after/ the PHY config packet has been transmitted, instead of before. A subsequent fw_core_initiate_bus_reset will therefore not overlap with the transmission. This is meant to make the send PHY config packet + reset bus routine more deterministic. Fixes bus reset loo...
```diff diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index 3682e75a09e1..051be78deaba 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c @@ -18,6 +18,7 @@ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <linux/...
d34316a4bdcd4fef050da584401c7f4ed22482f2
Analyze and fix the following issue in the Linux kernel code: firewire: fw-ohci: work around generation bug in TI controllers (fix AV/C and more)
Problem Details: Unlike the ohci1394 driver, fw-ohci uses the selfIDGeneration field of bus reset packets to determine the generation of incoming requests as per OHCI 1.1 clause 8.4.2.3. This is more precise --- provided that the controller inserts the correct generation. Texas Instruments chips often don't. This pr...
```diff diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index b98d81967f70..d5d8177da6d9 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c @@ -181,6 +181,7 @@ struct fw_ohci { int request_generation; u32 bus_seconds; bool old_uninorth; + bool bus_reset_packet_quirk; ...
a007bb857e0b26f5d8b73c2ff90782d9c0972620
Analyze and fix the following issue in the Linux kernel code: firewire: fw-ohci: conditionally log busReset interrupts
Problem Details: Add a debug option to watch bus reset interrupt events. Half of this patch is taken from Jarod Wilson's first version of the JMicron fix. BusReset interrupts are only generated if the respective module parameter flag was set before the controller is being initialized. Else we keep this event masked t...
```diff diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index 4789300b8241..46660ac0dac5 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c @@ -240,24 +240,32 @@ static char ohci_driver_name[] = KBUILD_MODNAME; #ifdef CONFIG_FIREWIRE_OHCI_DEBUG -#define OHCI_PARAM_DEBUG_I...
75f7832e3b032c6e4a83c14b58341abd9f2d81ef
Analyze and fix the following issue in the Linux kernel code: firewire: fw-ohci: log regAccessFail events
Problem Details: While trying to debug this piece of crap JMicron PCI-e controller in my possession, one thought was that perhaps I was encountering register access failures. I'm not, but logging them would be good, so we can see if they are a real problem we should be taking into account anywhere in the code. Signed-...
```diff diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index e88260b67611..ce18bab3f9d5 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c @@ -257,7 +257,7 @@ static void log_irqs(u32 evt) if (likely(!(param_debug & OHCI_PARAM_DEBUG_IRQS))) return; - printk(KERN_DEBUG ...
022147242ff6e4b7ab770f00716063f48c088391
Analyze and fix the following issue in the Linux kernel code: firewire: fw-ohci: make sure HCControl register LPS bit is set
Problem Details: I've now witnessed multiple occasions where one of my controllers (a very poorly working JMicron PCIe card) fails to get its registers properly set up in ohci_enable(), apparently due to an occasionally very slow to initiate SClk. The easy fix for this problem is to add a tiny while loop to try again a...
```diff diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index 973e762efc24..e88260b67611 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c @@ -1390,6 +1390,8 @@ static int ohci_enable(struct fw_card *card, u32 *config_rom, size_t length) { struct fw_ohci *ohci = fw_ohci(ca...
ad3c0fe8b8d1656a56ce2ef05ed5ccba790b4566
Analyze and fix the following issue in the Linux kernel code: firewire: debug interrupt events
Problem Details: This adds debug printks for asynchronous transmission and reception and for self ID reception. They can be enabled at module load time, and at runtime via /sys/module/firewire_ohci/parameters/debug. Signed-off-by: Jarod Wilson <jwilson@redhat.com> Also added: Logging of interrupt event codes and of...
```diff diff --git a/drivers/firewire/Kconfig b/drivers/firewire/Kconfig index 25bdc2dd9ce1..fb4d391810b6 100644 --- a/drivers/firewire/Kconfig +++ b/drivers/firewire/Kconfig @@ -54,6 +54,11 @@ config FIREWIRE_OHCI directive, use "install modulename /bin/true" for the modules to be blacklisted. +config FIREWI...
7c1fca336661aaeb70b9094c4b8eaae389027509
Analyze and fix the following issue in the Linux kernel code: firewire: fw-sbp2: fix reference counting
Problem Details: The reference count of the unit dropped too low in an error path in sbp2_probe. Fixed by moving the _get further up. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com>
```diff diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 62b4e47d0cc0..8fff18e05000 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c @@ -1119,6 +1119,7 @@ static int sbp2_probe(struct device *dev) goto fail_shost_put; fw_device_get(device); + get_device(&unit->de...
bd7dee6311156b7cdf884344feb34628909398ad
Analyze and fix the following issue in the Linux kernel code: firewire: remove superfluous reference counting
Problem Details: The card->kref became obsolete since patch "firewire: fix crash in automatic module unloading" added another counter of card users. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com>
```diff diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c index a03462750b95..140b34d477de 100644 --- a/drivers/firewire/fw-card.c +++ b/drivers/firewire/fw-card.c @@ -398,7 +398,6 @@ fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver, { static atomic_t index = ATOMIC_INI...
a6ca4f7081095e3cdeb1a45d66fbe4856eca10d3
Analyze and fix the following issue in the Linux kernel code: ieee1394: limit early node speed to host interface speed
Problem Details: The following patch limits the node speed to the host interface speed, before using it. Signed-off-by: Philippe De Muyter <phdm@macqel.be> It should actually suffice to do this only for the local node's speedcap[]. But there is another bug in the speed calculation: The local node's speed is not corr...
```diff diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c index 942bf1ff5214..dcdb71a7718d 100644 --- a/drivers/ieee1394/ieee1394_core.c +++ b/drivers/ieee1394/ieee1394_core.c @@ -373,6 +373,8 @@ static void build_speed_map(struct hpsb_host *host, int nodecount) if (sid->port2 == SELF...
0e04388f0189fa1f6812a8e1cb6172136eada87e
Analyze and fix the following issue in the Linux kernel code: cgroup: fix a race condition in manipulating tsk->cg_list
Problem Details: When I ran a test program to fork mass processes and at the same time 'cat /cgroup/tasks', I got the following oops: ------------[ cut here ]------------ kernel BUG at lib/list_debug.c:72! invalid opcode: 0000 [#1] SMP Pid: 4178, comm: a.out Not tainted (2.6.25-rc9 #72) ... Call Trace: ...
```diff diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 2727f9238359..6d8de051382b 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1722,7 +1722,12 @@ void cgroup_enable_task_cg_lists(void) use_task_css_set_links = 1; do_each_thread(g, p) { task_lock(p); - if (list_empty(&p->cg_list)) + /* + * We ...
eda4f69ca5a532b425db5a6c2c6bc50717b9b5fe
Analyze and fix the following issue in the Linux kernel code: SELinux: requesting no permissions in avc_has_perm_noaudit is a BUG()
Problem Details: This patch turns the case where we have a call into avc_has_perm with no requested permissions into a BUG_ON. All callers to this should be in the kernel and thus should be a function we need to fix if we ever hit this. The /selinux/access permission checking it done directly in the security server a...
```diff diff --git a/security/selinux/avc.c b/security/selinux/avc.c index 187964e88af1..cb3f0ce0b00a 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c @@ -871,6 +871,8 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid, int rc = 0; u32 denied; + BUG_ON(!requested); + rcu_read_lock(); node = avc_...
454d972c24e6efce3d7b07a97f1ad18b14845de9
Analyze and fix the following issue in the Linux kernel code: SELinux: unify printk messages
Problem Details: Replace "security:" prefixes in printk messages with "SELinux" to help users identify the source of the messages. Also fix a couple of minor formatting issues. Signed-off-by: James Morris <jmorris@namei.org>
```diff diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c index cd10e27fc9e6..916e73a18bc5 100644 --- a/security/selinux/ss/avtab.c +++ b/security/selinux/ss/avtab.c @@ -280,8 +280,8 @@ int avtab_alloc(struct avtab *h, u32 nrules) h->nel = 0; h->nslot = nslot; h->mask = mask; - printk(KERN_DE...
3c051235a7f115c34e675c9cf55820bd3435f860
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix dangling references on error in fib6_add().
Problem Details: Fixes bugzilla #8895 If a super-tree leaf has 'rt' assigned to it and we get an error from fib6_add_rt2node(), we'll leave a reference to 'rt' in pn->leaf and then do an unconditional dst_free(). We should prune such references. Based upon a report by Vincent Perrier. Signed-off-by: David S. Miller...
```diff diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index b3f6e03c454c..50f3f8f8a59b 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -772,6 +772,10 @@ out: * If fib6_add_1 has cleared the old leaf pointer in the * super-tree leaf node we have to find a new one for it. */ + if (pn != fn...
62be1f71677c53d5e51223807a06ac9052f49b0f
Analyze and fix the following issue in the Linux kernel code: [GFS2] fix assertion in log_refund()
Problem Details: since unsigned, unused >= 0 is always true. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index b335304fc5d6..548264b1836d 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -769,8 +769,8 @@ static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr) sdp->sd_log_commited_revoke += tr->tr_num_revoke - tr->tr_num_revoke_rm; gfs2_assert_withdraw(sdp...
794eb6bf20ebf992c040ea831cd3a9c64b0c1f7a
Analyze and fix the following issue in the Linux kernel code: [NETLABEL]: Fix NULL deref in netlbl_unlabel_staticlist_gen() if ifindex not found
Problem Details: dev_get_by_index() may return NULL if nothing is found. In net/netlabel/netlabel_unlabeled.c::netlbl_unlabel_staticlist_gen() the function is called, but the return value is never checked. If it returns NULL then we'll deref a NULL pointer on the very next line. I checked the callers, and I don't th...
```diff diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index a547c6320eb3..d282ad1570a7 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c @@ -1339,6 +1339,10 @@ static int netlbl_unlabel_staticlist_gen(u32 cmd, if (iface->ifindex > 0) { dev...
f5ba2d32170679eb9b7c251ac3d9687916a41c18
Analyze and fix the following issue in the Linux kernel code: [PKT_SCHED]: Fix datalen check in tcf_simp_init().
Problem Details: datalen is unsigned so it can never be less than zero, but that's ok because the attribute passed to nla_len() has been validated and therefore a negative return value is impossible. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index fbde461b716c..64b2d136c78e 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c @@ -115,7 +115,7 @@ static int tcf_simp_init(struct nlattr *nla, struct nlattr *est, return -EINVAL; datalen = nla_len(tb[TCA_DEF_DATA]); - if (da...
f4ac7b5eb79ef15819c966b1f6b84bf443949123
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix device-tree locking vs. interrupts
Problem Details: Lockdep found out that we can occasionally take the device-tree lock for reading from softirq time (from rtas_token called by the rtas real time clock code called by the NTP code), while we take it occasionally for writing without masking interrupts. The combination of those two can thus deadlock. Whi...
```diff diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 8a9359ae4718..3bfe7837e820 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -1332,12 +1332,14 @@ EXPORT_SYMBOL(of_node_put); */ void of_attach_node(struct device_node *np) { - write_lock(&devtree_lock); + u...
65e67f5165c8a156b34ee7adf65d5ed3b16a910d
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix merge failure
Problem Details:
```diff diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 640c8b6b1956..bf7759793856 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -1090,10 +1090,12 @@ xfs_ioctl( return xfs_ioc_fsgetxattr(ip, 0, arg); case XFS_IOC_FSGETXATTRA: return xfs_ioc_fsgetx...
6d1337b29bf09a97682d39db36ac2d0dfc6659c0
Analyze and fix the following issue in the Linux kernel code: [XFS] xfs_bmap_compute_maxlevels should be based on di_forkoff
Problem Details: Fix up xfs_bmap_compute_maxlevels() to account for the case when we go from using attr2 to using attr1. In that case attr1 will no longer necessarily be at m_attr_offset>>3, but could be at a different value for di_forkoff. Therefore, we return the worst case scenario using MINDBTPTRS and MINABTPTRS, a...
```diff diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 6d9b5448deb2..eb198c01c35d 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -4153,16 +4153,21 @@ xfs_bmap_compute_maxlevels( * number of leaf entries, is controlled by the type of di_nextents * (a signed 32-bit number, xfs_extnum_t), or by ...
cb49dbb130e17a6f9af4cb4714cf6976cf09afdf
Analyze and fix the following issue in the Linux kernel code: [XFS] Always use di_forkoff when checking for attr space.
Problem Details: In the case where we mount a filesystem which was previously using the attr2 format as attr1, returning the default mp->m_attroffset instead of the per-inode di_forkoff for inline attribute fit calculations, may result in corruption, if for example, the data fork is already taking more space than the d...
```diff diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index 96ba6aa4ed8c..303d41e4217b 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c @@ -166,7 +166,7 @@ xfs_attr_shortform_bytesfit(xfs_inode_t *dp, int bytes) if (!(mp->m_flags & XFS_MOUNT_ATTR2)) { if (bytes <= XFS_IFORK_ASIZE(d...
f6485057c5cfbc84e5eff639ddea1ce0d668607b
Analyze and fix the following issue in the Linux kernel code: [XFS] Ensure the inode is joined in xfs_itruncate_finish
Problem Details: On success, we still need to join the inode to the current transaction in xfs_itruncate_finish(). Fixes regression from error handling changes. SGI-PV: 980084 SGI-Modid: xfs-linux-melb:xfs-kern:30845a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Sign...
```diff diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 2bc22790d65a..ca12acb90394 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -1464,51 +1464,50 @@ xfs_itruncate_start( } /* - * Shrink the file to the given new_size. The new - * size must be smaller than the current size. - * This will f...
e6430037e9fd0b3d02ceaf5ab99bfe3ccb763be7
Analyze and fix the following issue in the Linux kernel code: [XFS] fix logic error in xfs_alloc_ag_vextent_near()
Problem Details: Fix a logic error in xfs_alloc_ag_vextent_near(). This is a regression introduced by the error handling changes. SGI-PV: 890084 SGI-Modid: xfs-linux-melb:xfs-kern:30838a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Barry Naujok <bnaujok@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sg...
```diff diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index facdae14edd0..1956f83489f1 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c @@ -838,7 +838,7 @@ xfs_alloc_ag_vextent_near( XFS_WANT_CORRUPTED_GOTO(i == 1, error0); xfs_alloc_compute_aligned(ltbno, ltlen, args->alignment, args->minl...
d4055947bd0913864f4d8ac96bf1197338071622
Analyze and fix the following issue in the Linux kernel code: [XFS] Don't error out on good I/Os.
Problem Details: xfsbdstrat() made all I/Os error out, good or bad. Fix it. SGI-PV: 980084 SGI-Modid: xfs-linux-melb:xfs-kern:30836a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Donald Douwsma <donaldd@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index f6dab5d8944e..21c0dbc74093 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c @@ -885,8 +885,10 @@ xfsbdstrat( struct xfs_buf *bp) { ASSERT(mp); - if (!XFS_FORCED_SHUTDOWN(mp)) + if (!XFS_FORCED_SHUTDOWN(mp)) ...
d87dd6360dce86cad9099aed74f14b4dd0143301
Analyze and fix the following issue in the Linux kernel code: [XFS] Warn if errors come from block_truncate_page().
Problem Details: block_truncate_page() can return errors that we currently ignore and silently discard. We should not ever get errors reported here - an error indicates a bug somewhere else. Hence catch the error and issue a stack dump to the syslog because we cannot propagate the error any further up the call chain. ...
```diff diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 53f8feb28e58..41e7baabfd9f 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -692,11 +692,19 @@ xfs_vn_setattr( return -error; } +/* + * block_truncate_page can return an error, but we can't propagate i...
6b1d1a732f886936fe515d911b1a01d9cc50e179
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix lock inversion in forced shutdown.
Problem Details: Recent changes to xlog_state_release_iclog() placed the grant_lock inside the icloglock. forced unmount of the log does this the opposite way around, but does not depend on the order for correct working. Fix the inversion by changing the order locks are gained in xfs_log_force_umount(). SGI-PV: 979661...
```diff diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 319b98eb410c..4a6f7c5d1459 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -3499,8 +3499,8 @@ xfs_log_force_umount( * before we mark the filesystem SHUTDOWN and wake * everybody up to tell the bad news. */ - spin_lock(&log->l_grant_lock); ...
4679b2d36d53ed508c956337972fbbea8db99a77
Analyze and fix the following issue in the Linux kernel code: [XFS] Reorganise xlog_t for better cacheline isolation of contention
Problem Details: To reduce contention on the log in large CPU count, separate out different parts of the xlog_t structure onto different cachelines. Move each lock onto a different cacheline along with all the members that are accessed/modified while that lock is held. Also, move the debugging code into debug code. S...
```diff diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 3cf115d8de75..319b98eb410c 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -1237,9 +1237,9 @@ xlog_alloc_log(xfs_mount_t *mp, XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1); iclog->ic_bp = bp; iclog->hic_data = bp->b_addr; - +#ifdef DEBUG ...
2abdb8c88110bab78bfe17e51346e735560daa02
Analyze and fix the following issue in the Linux kernel code: [XFS] Prevent xfs_bmap_check_leaf_extents() referencing unmapped memory.
Problem Details: While investigating the extent corruption bug I ran into this bug in debug only code. xfs_bmap_check_leaf_extents() loops through the leaf blocks of the extent btree checking that every extent is entirely before the next extent. It also compares the last extent in the previous block to the first extent...
```diff diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index bce8e3bd8ad1..7d683e0b8ef7 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -6194,7 +6194,7 @@ xfs_bmap_check_leaf_extents( xfs_mount_t *mp; /* file system mount structure */ __be64 *pp; /* pointer to block address */ xfs_bmbt_rec_t *ep...
59a33f9f776b051018ec98af95bd9fe8ba9d0f3e
Analyze and fix the following issue in the Linux kernel code: [XFS] Ensure a btree insert returns a valid cursor.
Problem Details: When writing into preallocated regions there is a case where XFS can oops or hang doing the unwritten extent conversion on I/O completion. It turns out that the problem is related to the btree cursor being invalid. When we do an insert into the tree, we may need to split blocks in the tree. When we on...
```diff diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c index bd18987326a3..93470b728dd0 100644 --- a/fs/xfs/xfs_bmap_btree.c +++ b/fs/xfs/xfs_bmap_btree.c @@ -2027,6 +2027,24 @@ xfs_bmbt_increment( /* * Insert the current record at the point referenced by cur. + * + * A multi-level split of the tre...
535f6b3735db6ef6026537bfe55ae00c3d9cc1ee
Analyze and fix the following issue in the Linux kernel code: [XFS] Replace custom AIL linked-list code with struct list_head
Problem Details: Replace the xfs_ail_entry_t with a struct list_head and clean the surrounding code up. Also fixes a livelock in xfs_trans_first_push_ail() by terminating the loop at the head of the list correctly. SGI-PV: 978682 SGI-Modid: xfs-linux-melb:xfs-kern:30636a Signed-off-by: Josef 'Jeff' Sipek <jeffpc@jose...
```diff diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 7b37fa009297..77b39f66cead 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h @@ -220,7 +220,7 @@ extern void xfs_icsb_sync_counters_flags(struct xfs_mount *, int); #endif typedef struct xfs_ail { - xfs_ail_entry_t xa_ail; + struct list_head ...
24bd861d1c3fff5248de7ba3bdddb3369087ad46
Analyze and fix the following issue in the Linux kernel code: [XFS] don't encode parent in nfs filehandles unless nessecary
Problem Details: As Dave pointed out after the export ops changes we now always encode the parent into the filehandle for regular files, but it's not actually needed when the filesystem is export with no_subtree_check. This one-liner fixes xfs_fs_encode_fh to skip encoding the parent unless nessecary. SGI-PV: 976035 S...
```diff diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c index ca4f66c4de16..21f0e8257590 100644 --- a/fs/xfs/linux-2.6/xfs_export.c +++ b/fs/xfs/linux-2.6/xfs_export.c @@ -66,7 +66,7 @@ xfs_fs_encode_fh( int len; /* Directories don't need their parent encoded, they have ".." */ - if (...
e9a56b7cdaf6129892fd7c8d950b71a1a4304bb0
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix regression due to refcache removal
Problem Details: SGI-PV: 971186 SGI-Modid: xfs-linux-melb:xfs-kern:30490a Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Donald Douwsma <donaldd@sgi.com>
```diff diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 35ac59dabf8b..40b95e3a88ba 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c @@ -3437,7 +3437,9 @@ xfs_rwunlock( { if (S_ISDIR(ip->i_d.di_mode)) return; - if (locktype != VRWLOCK_WRITE) { + if (locktype == VRWLOCK_WRITE) { + ...
6d3803b68e29d898c29eab5185261682f8f07650
Analyze and fix the following issue in the Linux kernel code: cmd640: init hwif->{io_ports,irq} explicitly
Problem Details: Do explicit port setup instead of depending on init_ide_data(). This way hwif->io_ports[] and hwif->irq are always correctly set regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI. While at it fix printk(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index 6b8e4061d3c4..dbf0fa733b76 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c @@ -714,6 +714,7 @@ static int __init cmd640x_init(void) unsigned int index; u8 b, cfr; u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; + hw_regs_t...
2661b13a21f609b279b4048978f8625d518df6e1
Analyze and fix the following issue in the Linux kernel code: ppc/mpc8xx: remove ppc_ide_md hooks
Problem Details: * Initialize IDE ports in mpc8xx_ide_probe(). * Remove m8xx_ide_init() and ppc_ide_md hooks - no need for them (IDE mpc8xx host driver takes care of all this setup). * Remove needless 'if (irq)' and 'if (data_port >= MAX_HWIFS)' checks from m8xx_ide_init_hwif_ports(). * Remove 'ctrl_port' and 'i...
```diff diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c index 9caf850c9b38..19749e9bcf91 100644 --- a/arch/ppc/syslib/m8xx_setup.c +++ b/arch/ppc/syslib/m8xx_setup.c @@ -87,8 +87,6 @@ void m8xx_calibrate_decr(void); unsigned char __res[sizeof(bd_t)]; -extern void m8xx_ide_init(void); - ex...
3d53ba87f079c078f608729120ada862cb0896e0
Analyze and fix the following issue in the Linux kernel code: scc_pata.c: do setup itself instead of ide_setup_pci_device()
Problem Details: scc_pata has the different BAR configuration and using ide_setup_pci_device() is inappropriate. (ide_setup_pci_device() expects a normal PCI IDE controller with BAR0..BAR3 either non-existant or being primary/secondary port bases in I/O space.) This patch do all needed setup itself instead of callin...
```diff diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index 085c1b58a99c..1a560dc1eac1 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c @@ -523,6 +523,43 @@ static int setup_mmio_scc (struct pci_dev *dev, const char *name) return -ENOMEM; } +static int scc_ide_setup_p...
93de00fd1c70e1a23a73a865e0f9abfe74a7a719
Analyze and fix the following issue in the Linux kernel code: ide: remove broken/dangerous HDIO_[UNREGISTER,SCAN]_HWIF ioctls (take 3)
Problem Details: hdparm explicitely marks HDIO_[UNREGISTER,SCAN]_HWIF ioctls as DANGEROUS and given the number of bugs we can assume that there are no real users: * DMA has no chance of working because DMA resources are released by ide_unregister() and they are never allocated again. * Since ide_init_hwif_ports() i...
```diff diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c index b73373216b0e..c70d0b6f666f 100644 --- a/block/compat_ioctl.c +++ b/block/compat_ioctl.c @@ -624,7 +624,6 @@ static int compat_blkdev_driver_ioctl(struct inode *inode, struct file *file, case HDIO_GET_IDENTITY: case HDIO_DRIVE_TASK: case HDIO_D...
9a0e77f28b50128df0c9e26ae489e44e29a7270a
Analyze and fix the following issue in the Linux kernel code: ide: remove obsoleted "idex=base[,ctl[,irq]]" kernel parameters (take 2)
Problem Details: * Remove obsoleted "idex=base[,ctl[,irq]]" kernel parameters and update Documentation/ide/ide.txt. * Remove no longer needed ide_forced chipset type. v2: * is_chipset_set[] -> is_chipset_set in ide.c. * Documentation/ide/ide.txt fix. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/Documentation/ide/ide.txt b/Documentation/ide/ide.txt index ae4f4f43c25c..18c02df2f78f 100644 --- a/Documentation/ide/ide.txt +++ b/Documentation/ide/ide.txt @@ -71,29 +71,6 @@ This driver automatically probes for most IDE interfaces (including all PCI ones), for the drives/geometries attached to ...
2dde7861afa23cd59db83515cb0b810b92b220aa
Analyze and fix the following issue in the Linux kernel code: ide: rework PowerMac media-bay support (take 2)
Problem Details: Rework PowerMac media-bay support in such way that instead of un/registering the IDE interface we un/register IDE devices: * Add ide_port_scan() helper for probing+registerering devices on a port. * Rename ide_port_unregister_devices() to __ide_port_unregister_devices(). * Add ide_port_unregister_de...
```diff diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index f3ee098b69c7..468c4ac4181d 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -1494,3 +1494,21 @@ int ide_device_add(u8 idx[4], const struct ide_port_info *d) return ide_device_add_all(idx_all, d); } EXPORT_SYMBOL_GPL(id...
2625cd52b6eafb63b72f2e53f933f41ba9e34dff
Analyze and fix the following issue in the Linux kernel code: ide: fix ide_find_port()
Problem Details: * Instead of checking for '->io_ports[IDE_DATA_OFFSET] == 0' check for '->chipset == ide_unknown' when looking for an empty ide_hwifs[] slot. * Do ide-pnp initialization after ide-generic when IDE is built-in (ide-pnp is the only user of ide_find_port() which needs such fixup). Acked-by: Sergei S...
```diff diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile index a4a4323be911..571544c37bb2 100644 --- a/drivers/ide/Makefile +++ b/drivers/ide/Makefile @@ -36,9 +36,9 @@ ifeq ($(CONFIG_BLK_DEV_CMD640), y) endif obj-$(CONFIG_BLK_DEV_IDE) += cris/ ppc/ -obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o obj-$(CONFIG...
8b73a07c8ffaa70683022566080f4df3328ea18d
Analyze and fix the following issue in the Linux kernel code: SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.
Problem Details: According to RFC4960 7.2.2, When all of the data transmitted by the sender has been acknowledged by the recerver, partial_bytes_acked is initialized to 0. This patch conforms to rfc requirement. Without this fix, cwnd might be error incremented. Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.c...
```diff diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index a7ba9e146dff..59edfd25a19c 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c @@ -1532,6 +1532,8 @@ static void sctp_check_transmitted(struct sctp_outq *q, bytes_acked); transport->flight_size -= bytes_acked; + if (transport->...
21e197f231343201368338603cb0909a13961bac
Analyze and fix the following issue in the Linux kernel code: r8169: fix oops in r8169_get_mac_version
Problem Details: r8169_get_mac_version crashes when it meets an unknown MAC due to tp->pci_dev not being set. Initialize it early. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 5e8ad634490f..657242504621 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1617,6 +1617,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) SET_NETDEV_DEV(dev, &pdev->dev); tp = netdev_priv(dev); tp->dev =...
cee60c377de6d9d10f0a2876794149bd79a15020
Analyze and fix the following issue in the Linux kernel code: r8169: fix past rtl_chip_info array size for unknown chipsets
Problem Details: 'i' is unsigned. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 3acfeeabdee1..5e8ad634490f 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1705,18 +1705,18 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) rtl8169_print_mac_version(tp); - for (i = ARRAY_SIZE(rtl_chip_i...
c4fe15541d0ef5cc8cc1ce43057663851f8fc387
Analyze and fix the following issue in the Linux kernel code: iop-adma: remove the workaround for missed interrupts on iop3xx
Problem Details: This workaround was covering the dependency submission bug in async_tx. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
```diff diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 2aa3df50c842..93252294f32b 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -255,8 +255,6 @@ static void __iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan) BUG_ON(!seen_current); - iop_chan_idle(busy, iop_chan); - ...
19242d7233df7d658405d4b7ee1758d21414cfaa
Analyze and fix the following issue in the Linux kernel code: async_tx: fix multiple dependency submission
Problem Details: Shrink struct dma_async_tx_descriptor and introduce async_tx_channel_switch to properly inject a channel switch interrupt in the descriptor stream. This simplifies the locking model as drivers no longer need to handle dma_async_tx_descriptor.lock. Acked-by: Shannon Nelson <shannon.nelson@intel.com> S...
```diff diff --git a/crypto/async_tx/async_tx.c b/crypto/async_tx/async_tx.c index 2be3bae89930..69756164b61d 100644 --- a/crypto/async_tx/async_tx.c +++ b/crypto/async_tx/async_tx.c @@ -89,13 +89,19 @@ dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) iter = tx; /* find the root of the unsubmitted depe...
e49856d82a887ce365637176f9f99ab68076eae8
Analyze and fix the following issue in the Linux kernel code: sata_mv add basic port multiplier support
Problem Details: Add basic port-multiplier support to sata_mv. This works in Command-based-switching mode for Gen-II chipsets, and in FIS-based-switching mode for Gen-IIe chipsets. Error handling remains at the primary port level for now (works okay, but not great). This will get fixed in a subsequent patch series fo...
```diff diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 6a7420546609..b822b8a40c65 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -40,7 +40,7 @@ 5) Investigate problems with PCI Message Signalled Interrupts (MSI). - 6) Add port multiplier support (intermediate) + 6) Cache fr...
02c1f32f1c524d2a389989f2482121f7c7d9b164
Analyze and fix the following issue in the Linux kernel code: sata_mv fix SOC flags, enable NCQ on SOC
Problem Details: The System-On-Chip (SOC) core supports all of the same features as the other recent Marvell chips, including NCQ and IRQ coalescing. Fix the chip_soc flags to enable these capabilities (note that the driver currently does nothing special for IRQ coalescing, though). Signed-off-by: Mark Lord <mlord@po...
```diff diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 162260d6fe19..6a7420546609 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -626,7 +626,8 @@ static const struct ata_port_info mv_port_info[] = { .port_ops = &mv_iie_ops, }, { /* chip_soc */ - .flags = MV_COMMON_FLAGS | ...
4f7faa3f2b99f8fb246c8cdeef971e55ceda4e52
Analyze and fix the following issue in the Linux kernel code: libata: make EH fail gracefully if no reset method is available
Problem Details: When no reset method is available, libata currently oopses. Although the condition can't happen unless there's a bug in a low level driver, oopsing isn't the best way to report the error condition. Complain, dump stack and fail reset instead. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by...
```diff diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index ecbb8e90cb8d..d94359a24d41 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2137,9 +2137,14 @@ int ata_eh_reset(struct ata_link *link, int classify, if (hardreset) { reset = hardreset; ehc->i.action = ATA_EH_HARDR...
e50e3ce5e70e36e6069a8cc8292df76058fa9e23
Analyze and fix the following issue in the Linux kernel code: pata_scc: fix build breakage
Problem Details: drivers/ata/pata_scc.c: In function 'scc_bus_softreset': drivers/ata/pata_scc.c:594: error: 'deadlien' undeclared (first use in this function) drivers/ata/pata_scc.c:594: error: (Each undeclared identifier is reported only once drivers/ata/pata_scc.c:594: error: for each function it appears in.) Signe...
```diff diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index accc275e74cc..7bdea8a4ca7e 100644 --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c @@ -591,7 +591,7 @@ static unsigned int scc_bus_softreset(struct ata_port *ap, unsigned int devmask, udelay(20); out_be32(ioaddr->ctl_addr, ap->ctl);...
ac371987a81c61c2efbd6931245cdcaf43baad89
Analyze and fix the following issue in the Linux kernel code: libata: clear SError after link resume
Problem Details: SError used to be cleared in ->postreset. This has small hotplug race condition. If a device is plugged in after reset is complete but postreset hasn't run yet, its hotplug event gets lost when SError is cleared. This patch makes sata_link_resume() clear SError. This kills the race condition and ma...
```diff diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 0f553aaa6f79..a69bcca4eb1b 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1377,7 +1377,6 @@ static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class, unsigned long deadline) { struct ata_port *ap = link->ap; - u...
b67a1064cb1c1d3b43e01e8b43a6a8dcdefed733
Analyze and fix the following issue in the Linux kernel code: sata_mv fix ifctl handling
Problem Details: Fix handling of the SATA_INTERFACE_CFG register to match datasheet requirements. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 5b9f937d0f87..16c15ed3536e 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -2242,6 +2242,16 @@ static void mv_soc_reset_bus(struct ata_host *host, void __iomem *mmio) return; } +static void mv_setup_ifctl(void __iomem *port_...
e12bef50b7660cf7c19d1cd3eac381b9eff734d7
Analyze and fix the following issue in the Linux kernel code: sata_mv cosmetic fixes
Problem Details: Various cosmetic fixes in preparation for real code changes later on. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 9a89390531b1..ee6ca97c4545 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -1,6 +1,7 @@ /* * sata_mv.c - Marvell SATA support * + * Copyright 2008: Marvell Corporation, all rights reserved. * Copyright 2005: EMC Corporatio...
9c0bf675054883acd10dec99c0c854514e139f06
Analyze and fix the following issue in the Linux kernel code: ata_piix: kill ich6_sata_ahci and clean up
Problem Details: ich6_sata_ahci and ich6_sata are identical. Kill ich6_sata_ahci and drop _ahci postfixes from controller ids, which doesn't really mean anything at this point. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index e6bf4fd51794..e113f2f80275 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -138,12 +138,11 @@ enum piix_controller_ids { ich_pata_100, /* ICH up to UDMA 100 */ ich5_sata, ich6_sata, - ich6_sata_ahci, - ich6m_sata_ahci,...
5016d7d212dbcc85cdc5130b1228d23f3423bd61
Analyze and fix the following issue in the Linux kernel code: ata_piix: don't attach to ICH6M in ahci mode
Problem Details: ata_piix when attached to ICH6M in AHCI mode doesn't provide any benefit over using ahci and has detection problems. Don't let ata_piix claim ICH6M if it's in AHCI mode. This change makes ICH6R the only one which ata_piix can attach to even when it's in ahci mode which is necessary as some devices do...
```diff diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index eafb984313f6..e6bf4fd51794 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -100,13 +100,11 @@ enum { PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ ICH5_PMR = 0x90, /* port mapping register */ ICH5_PCS = 0x9...
c1796d9850aaa97ee7492d090499b5508971514b
Analyze and fix the following issue in the Linux kernel code: pata_scc: fix compile warning
Problem Details: Missed one during mass conversion (dc14c0c5). Fix it. Spotted by Stephen Rothwell. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index 85d33637dff9..2ed480ef0ff8 100644 --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c @@ -960,7 +960,7 @@ static struct scsi_host_template scc_sht = { ATA_BMDMA_SHT(DRV_NAME), }; -static const struct ata_port_operations scc_pata_ops =...
d9c74fbead08de13e3965e1c6ffe289f24f45479
Analyze and fix the following issue in the Linux kernel code: pata_amd: fix sparse warning
Problem Details: Current code is essentially choosing between dividing by 1 or dividing by two, make the conditions a little more obvious. As a bonus, removes a sparse error: drivers/ata/pata_amd.c:59:11: warning: symbol '__x' shadows an earlier one drivers/ata/pata_amd.c:59:11: originally declared here Signed-off-by...
```diff diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index 09c8286b6890..33074c34105c 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c @@ -56,7 +56,9 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse u8 t; T = 1000000000 / amd_clock; - UT = T / min...
3d5a3d67a578d95ac3a11a862d16a054e2d4d9cd
Analyze and fix the following issue in the Linux kernel code: libata: kill ata_chk_status() call from ata_dev_configure()
Problem Details: ata_dev_configure() isn't tied to any controller interface except for the probe debug message printing at the end of the function. Kill the message. This is to help separating out SFF support from core layer. Signed-off-by: Tejun Heo <htejun@gmail.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 34c068f18350..54f85508bc6e 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2407,9 +2407,6 @@ int ata_dev_configure(struct ata_device *dev) } } - if (ata_msg_probe(ap)) - ata_dev_printk(dev, KERN_DEBUG, "%...