id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
8b5b8f4cea18cb30f748baa913234c62cdc64541
Analyze and fix the following issue in the Linux kernel code: trivial: Fix misspelling of "firmware" in docs for ncr53c8xx/sym53c8xx
Problem Details: Fix misspelling of "firmware" in docs for ncr53c8xx/sym53c8xx It's spelled "firmware". Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/scsi/ChangeLog.ncr53c8xx b/Documentation/scsi/ChangeLog.ncr53c8xx index a9f721aeb11c..8b278c10edfd 100644 --- a/Documentation/scsi/ChangeLog.ncr53c8xx +++ b/Documentation/scsi/ChangeLog.ncr53c8xx @@ -19,7 +19,7 @@ Sun Sep 24 21:30 2000 Gerard Roudier (groudier@club-internet.fr) Wed...
2a94739c70c95d13d3428fb5809d7037ed9ecb94
Analyze and fix the following issue in the Linux kernel code: trivial: Fix misspelling of "firmware" in powerpc Makefile
Problem Details: Fix misspelling of "firmware" in powerpc Makefile It's spelled "firmware". Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index f32829937aad..ab6dda372438 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -208,7 +208,7 @@ image-$(CONFIG_DEFAULT_UIMAGE) += uImage # # Theses are default targets to build images which embed device tree bl...
8eb09d8d24e7d71e9888e7a877f23d37fce65f2b
Analyze and fix the following issue in the Linux kernel code: trivial: Fix misspelling of "firmware" in usb.c
Problem Details: Fix misspelling of "firmware" in usb.c It's spelled "firmware". Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/uwb/i1480/dfu/usb.c b/drivers/uwb/i1480/dfu/usb.c index 686795e97195..c7080d497311 100644 --- a/drivers/uwb/i1480/dfu/usb.c +++ b/drivers/uwb/i1480/dfu/usb.c @@ -387,7 +387,7 @@ int i1480_usb_probe(struct usb_interface *iface, const struct usb_device_id *id) goto error_create; } - /*...
c3af1715928ce07300595b9e050728787f6a1718
Analyze and fix the following issue in the Linux kernel code: trivial: Fix misspelling of "firmware" in qla1280.c
Problem Details: Fix misspelling of "firmware" in qla1280.c It's spelled "firmware". Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 8cb9240596ab..df09820e8916 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -128,7 +128,7 @@ - Integrate ql12160_set_target_parameters() with 1280 version - Make qla1280_setup() non static - Do not call qla1280_check_for...
89546deb912ca9f8ad87afb3944e0239dc47a2df
Analyze and fix the following issue in the Linux kernel code: trivial: Fix misspelling of "firmware" in a100u2w.c
Problem Details: Fix misspelling of "firmware" in a100u2w.c It's spelled "firmware". Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index 3c298c7253ee..964769f66eac 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c @@ -633,7 +633,7 @@ static int orc_device_reset(struct orc_host * host, struct scsi_cmnd *cmd, unsig return FAILED; } - /* Reset device is handled...
d41ad93872adf345595c8e28b3de980b2ae15268
Analyze and fix the following issue in the Linux kernel code: trivial: Fix misspelling of "firmware" in megaraid.c
Problem Details: Fix misspelling of "firmware" in megaraid.c Fixed "firmware", "ownership" and grammar in the same comment. Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 7dc62deb4087..9fdcd60c5493 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -1967,8 +1967,8 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor) scb->state |= aor; /* - * Check if this comm...
11b918282faf118dc20fed42efb6925b5fd82a64
Analyze and fix the following issue in the Linux kernel code: trivial: Fix misspelling of "firmware" in ql4_mbx.c
Problem Details: Fix misspelling of "firmware" in ql4_mbx.c It's spelled "firmware". Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c index c577d79bd7e8..051b0f5e8c8e 100644 --- a/drivers/scsi/qla4xxx/ql4_mbx.c +++ b/drivers/scsi/qla4xxx/ql4_mbx.c @@ -392,7 +392,7 @@ int qla4xxx_get_firmware_status(struct scsi_qla_host * ha) ha->iocb_hiwat -= IOCB_HIWAT_CUSHION; ...
c7060d9e9e5aceaddaa58df87221befff963ec3f
Analyze and fix the following issue in the Linux kernel code: trivial: Fix misspelling of "firmware" in acpi_memhotplug.c
Problem Details: Fix misspelling of "firmware" in acpi_memhotplug.c It's spelled "firmware". Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 63a17b55b39b..7a0f4aa4fa1e 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -20,7 +20,7 @@ * * * ACPI based HotPlug driver that supports Memory Hotplug - * This driver fields notifications...
4407245ac5c5defa303c05828c57d7855aa7e5ee
Analyze and fix the following issue in the Linux kernel code: trivial: Fix misspelling of "firmware" in ipw2100.c
Problem Details: Fix misspelling of "firmware" in ipw2100.c It's spelled "firmware". Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 753de1a9c4b3..823c2bf5e31e 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c @@ -1830,7 +1830,7 @@ static void ipw2100_down(struct ipw2100_priv *priv) cancel_delay...
d535295b16710552e9e8f9923670a95c447e842a
Analyze and fix the following issue in the Linux kernel code: trivial: Fix misspelling of "firmware" in atmel.c
Problem Details: Fix misspelling of "firmware" in atmel.c It's spelled "firmware". Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 350157fcd080..4223672c4432 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c @@ -3836,7 +3836,7 @@ static int reset_atmel_card(struct net_device *dev) This routine is also responsible for initialising ...
11f1fbcf92ae19b547f499f50937be6068062f15
Analyze and fix the following issue in the Linux kernel code: trivial: Fix misspelled firmware in Kconfig
Problem Details: Fix misspelled firmware in Kconfig It's spelled "firmware". Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index d8e8c49c0cbd..8f006f96ff53 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -54,7 +54,7 @@ config FIRMWARE_IN_KERNEL such firmware, and do not wish to use an initrd. This single option controls the inclusion of firmware for ...
0211a9c8508b2183e0e539509aad60414f1c3813
Analyze and fix the following issue in the Linux kernel code: trivial: fix an -> a typos in documentation and comments
Problem Details: It is always "an" if there is a vowel _spoken_ (not written). So it is: "an hour" (spoken vowel) but "a uniform" (spoken 'j') Signed-off-by: Frederik Schwarzer <schwarzerf@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/dell_rbu.txt b/Documentation/dell_rbu.txt index 2c0d631de0cf..c11b931f8f98 100644 --- a/Documentation/dell_rbu.txt +++ b/Documentation/dell_rbu.txt @@ -81,8 +81,8 @@ Until this step is completed the driver cannot be unloaded. Also echoing either mono ,packet or init in to image_type ...
c03264a790acacb94839be11b95ff9363a768f6b
Analyze and fix the following issue in the Linux kernel code: trivial: fix singal -> signal typo
Problem Details: Typo fix. Signed-off-by: Frederik Schwarzer <schwarzerf@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c index da7d2be000ba..372d0ca6efbc 100644 --- a/arch/cris/arch-v32/kernel/signal.c +++ b/arch/cris/arch-v32/kernel/signal.c @@ -456,7 +456,7 @@ give_sigsegv: return -EFAULT; } -/* Invoke a singal handler to, well, handle the...
3a4e367832da8a2614f7ff1321483e30404d6dfe
Analyze and fix the following issue in the Linux kernel code: trivial: Fix incorrect use of "loose" in event.c
Problem Details: Fix incorrect use of loose in event.c It should be 'lose', not 'loose'. Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/misc/ibmasm/event.c b/drivers/misc/ibmasm/event.c index fda6a4d3bf23..68a0a5b94795 100644 --- a/drivers/misc/ibmasm/event.c +++ b/drivers/misc/ibmasm/event.c @@ -50,7 +50,7 @@ static void wake_up_event_readers(struct service_processor *sp) * Store the event in the circular event buffer, w...
edb123e16c6092bd08b67d1130ff03efeada0c89
Analyze and fix the following issue in the Linux kernel code: trivial: printk: fix indentation of new_text_line declaration
Problem Details: Remove bogus indentation of new_text_line declaration introduced in commit ac60ad741. Acked-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/kernel/printk.c b/kernel/printk.c index e651ab05655f..7015733793e8 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -619,7 +619,7 @@ static int acquire_console_semaphore_for_printk(unsigned int cpu) static const char recursion_bug_msg [] = KERN_CRIT "BUG: recent printk recursion!\n"; stat...
277835adca10a696ac3e2a103ea537658c141a3c
Analyze and fix the following issue in the Linux kernel code: trivial: rtc-stk17ta8: fix sparse warning
Problem Details: Fix this sparse warning: drivers/rtc/rtc-stk17ta8.c:403:2: warning: returning void-valued expression Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c index f4cd46e15af9..549990f33597 100644 --- a/drivers/rtc/rtc-stk17ta8.c +++ b/drivers/rtc/rtc-stk17ta8.c @@ -400,7 +400,7 @@ static __init int stk17ta8_init(void) static __exit void stk17ta8_exit(void) { - return platform_driver_unregiste...
4367fa510737fc95094f92f6c6fb068b0410431d
Analyze and fix the following issue in the Linux kernel code: trivial: rtc-ds1511: fix sparse warning
Problem Details: Fix this sparse warning: drivers/rtc/rtc-ds1511.c:634:2: warning: returning void-valued expression Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c index 25caada78398..062a1d11e3de 100644 --- a/drivers/rtc/rtc-ds1511.c +++ b/drivers/rtc/rtc-ds1511.c @@ -631,7 +631,7 @@ ds1511_rtc_init(void) static void __exit ds1511_rtc_exit(void) { - return platform_driver_unregister(&ds1511_rtc_driver);...
db2f59c8c9b315f2b88b1dac159b988c6009034d
Analyze and fix the following issue in the Linux kernel code: sched: fix section mismatch
Problem Details: init_rootdomain() calls alloc_bootmem_cpumask_var() at system boot, so does cpupri_init(). Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 973f97362ceb..2e3545f57e77 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -6957,7 +6957,7 @@ static void rq_attach_root(struct rq *rq, struct root_domain *rd) spin_unlock_irqrestore(&rq->lock, flags); } -static int init_rootdomain(struct root_domain *...
0c910d289567163dbe40ccc174b36afd1c7723bd
Analyze and fix the following issue in the Linux kernel code: sched: fix double kfree in failure path
Problem Details: It's not the responsibility of init_rootdomain() to free root_domain allocated by alloc_rootdomain(). Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/sched.c b/kernel/sched.c index c5019a5dcaa4..973f97362ceb 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -6970,7 +6970,7 @@ static int init_rootdomain(struct root_domain *rd, bool bootmem) } if (!alloc_cpumask_var(&rd->span, GFP_KERNEL)) - goto free_rd; + goto out; if (!alloc_...
3e80680208ba6ce9635ca7c21ad0019442ea166a
Analyze and fix the following issue in the Linux kernel code: kmemtrace: add kmemtrace_init()
Problem Details: Impact: build fix leftover from the relayfs version - but we want to keep it because this call is the earliest opportunity when we can start kmemtrace tracing. (after kmem_cache_init()). Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c index 2bfdcd326226..faaa5ae7e75a 100644 --- a/kernel/trace/kmemtrace.c +++ b/kernel/trace/kmemtrace.c @@ -337,6 +337,11 @@ static struct tracer kmem_tracer __read_mostly = { .flags = &kmem_tracer_flags }; +void kmemtrace_init(void) +{ + /* e...
4ec110281379826c5cf6ed14735e47027c3c5765
Analyze and fix the following issue in the Linux kernel code: ext4: Add sanity checks for the superblock before mounting the filesystem
Problem Details: This avoids insane superblock configurations that could lead to kernel oops due to null pointer derefences. http://bugzilla.kernel.org/show_bug.cgi?id=12371 Thanks to David Maciejak at Fortinet's FortiGuard Global Security Research Team who discovered this bug independently (but at approximately the ...
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 8ff8709828fd..517c90ad25bd 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2041,8 +2041,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) const char *descr; int ret = -EINVAL; int blocksize; - int db_count; - int i; ...
fe9cf30eb8186ef267d1868dc9f12f2d0f40835a
Analyze and fix the following issue in the Linux kernel code: dm mpath: move trigger_event to system workqueue
Problem Details: The same workqueue is used both for sending uevents and processing queued I/O. Deadlock has been reported in RHEL5 when sending a uevent was blocked waiting for the queued I/O to be processed. Use scheduled_work() for the asynchronous uevents instead. Signed-off-by: Alasdair G Kergon <agk@redhat.com>
```diff diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 345a26047ae0..095f77bf9681 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -889,7 +889,7 @@ static int fail_path(struct pgpath *pgpath) dm_path_uevent(DM_UEVENT_PATH_FAILED, m->ti, pgpath->path.dev->name, m->nr_valid_p...
10d3bd09a3c25df114f74f7f86e1b58d070bef32
Analyze and fix the following issue in the Linux kernel code: dm: consolidate target deregistration error handling
Problem Details: Change dm_unregister_target to return void and use BUG() for error reporting. dm_unregister_target can only fail because of programming bug in the target driver. It can't fail because of user's behavior or disk errors. This patch changes unregister_target to return void and use BUG if someone tries t...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 3326750ec02c..35bda49796fb 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1322,11 +1322,7 @@ static int __init dm_crypt_init(void) static void __exit dm_crypt_exit(void) { - int r = dm_unregister_target(&crypt_target); - - ...
d460c65a6a9ec9e0d284864ec3a9a2d1b73f0e43
Analyze and fix the following issue in the Linux kernel code: dm raid1: fix error count
Problem Details: Always increase the error count when I/O on a leg of a mirror fails. The error count is used to decide whether to select an alternative mirror leg. If the target doesn't use the "handle_errors" feature, the error count is not updated and the bio can get requeued forever by the read callback. Fix it ...
```diff diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index ec43f9fa4b2a..d0fed2b21b08 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c @@ -197,9 +197,6 @@ static void fail_mirror(struct mirror *m, enum dm_raid1_error error_type) struct mirror_set *ms = m->ms; struct mirror *new; - if (...
c7a2bd19b7c1e0bd2c7604c53d2583e91e536948
Analyze and fix the following issue in the Linux kernel code: dm log: fix dm_io_client leak on error paths
Problem Details: In create_log_context function, dm_io_client_destroy function needs to be called, when memory allocation of disk_header, sync_bits and recovering_bits failed, but dm_io_client_destroy is not called. Cc: stable@kernel.org Signed-off-by: Takahiro Yasui <tyasui@redhat.com> Acked-by: Jonathan Brassow <jbr...
```diff diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index a8c0fc79ca78..13e2a1a1a941 100644 --- a/drivers/md/dm-log.c +++ b/drivers/md/dm-log.c @@ -467,6 +467,7 @@ static int create_log_context(struct dm_dirty_log *log, struct dm_target *ti, lc->disk_header = vmalloc(buf_size); if (!lc->disk_header) { ...
e42e4ba07bc72c0eb7c7ab3bf9e5076db90d0f37
Analyze and fix the following issue in the Linux kernel code: igb: fix anoying type mismatch warning on rx/tx queue sizing
Problem Details: When using "min()", the types of both sides should match. With the cpu mask changes, the type of num_online_cpus() will now depend on config options. Use "min_t()" with an explicit type instead. And make the rx/tx case look the same too, just for sanity. Signed-off-by: Linus Torvalds <torvalds@linux...
```diff diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 022794e579c7..b82b0fb2056c 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -1457,8 +1457,8 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter) /* Number of supported queues. */ /* Having mor...
e8c82c2e23e3527e0c9dc195e432c16784d270fa
Analyze and fix the following issue in the Linux kernel code: mm lockless pagecache barrier fix
Problem Details: An XFS workload showed up a bug in the lockless pagecache patch. Basically it would go into an "infinite" loop, although it would sometimes be able to break out of the loop! The reason is a missing compiler barrier in the "increment reference count unless it was zero" case of the lockless pagecache pro...
```diff diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index a916c6660dfa..355f6e80db0d 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h @@ -136,7 +136,7 @@ do { \ */ static inline void *radix_tree_deref_slot(void **pslot) { - void *ret = *pslot; + void *ret = r...
3537d54c0c39de5738bba8d19f128478b0b96a71
Analyze and fix the following issue in the Linux kernel code: qlge: Fix sparse warnings for tx ring indexes.
Problem Details: Warnings: drivers/net/qlge/qlge_main.c:1474:34: warning: restricted degrades to integer drivers/net/qlge/qlge_main.c:1475:36: warning: restricted degrades to integer drivers/net/qlge/qlge_main.c:1592:51: warning: restricted degrades to integer drivers/net/qlge/qlge_main.c:1941:20: warning: incorrect ty...
```diff diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index 76ef2bc297cc..459663a4023d 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h @@ -851,8 +851,8 @@ struct ob_mac_iocb_req { __le16 frame_len; #define OB_MAC_IOCB_LEN_MASK 0x3ffff __le16 reserved2; - __le32 tid; - __le32 txq...
2c9a0d41e944807bf763f42e4a3526210e98c741
Analyze and fix the following issue in the Linux kernel code: qlge: Fix sparse warning regarding rx buffer queues.
Problem Details: Warnings: drivers/net/qlge/qlge_main.c:909:17: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:909:17: expected unsigned int [unsigned] [usertype] addr_lo drivers/net/qlge/qlge_main.c:909:17: got restricted unsigned int [usertype] <noident> drivers/net/ql...
```diff diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index 71cc48799b59..76ef2bc297cc 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h @@ -818,15 +818,6 @@ struct tx_doorbell_context { }; /* DATA STRUCTURES SHARED WITH HARDWARE. */ - -struct bq_element { - u32 addr_lo; -#define B...
fd2df4f7439cd3e87090e067d5aec8f1336f4f0e
Analyze and fix the following issue in the Linux kernel code: qlge: Fix sparse endian warning in ql_hw_csum_setup().
Problem Details: Changed u16 to __sum16 usage. Warnings: drivers/net/qlge/qlge_main.c:1897:9: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:1897:9: expected unsigned short [usertype] *check drivers/net/qlge/qlge_main.c:1897:9: got restricted unsigned short *<noident> d...
```diff diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 837be72efb02..d7894aa2ebe3 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -1884,7 +1884,7 @@ static void ql_hw_csum_setup(struct sk_buff *skb, { int len; struct iphdr *iph = ip_hdr(skb); - u16 *c...
a303ce0972d04036316e85568682a2b89fe123d9
Analyze and fix the following issue in the Linux kernel code: qlge: Fix sparse endian warning for inbound packet control block flags.
Problem Details: Changed flags element from __le32 to 3 reserved bytes and one byte of flags. Changed flags bit definitions to reflect byte width instead of __le32 width. Warnings: drivers/net/qlge/qlge_main.c:1206:16: warning: restricted degrades to integer drivers/net/qlge/qlge_main.c:1207:16: warning: restricted d...
```diff diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index 97321bb9600e..71cc48799b59 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h @@ -979,10 +979,11 @@ struct ib_mac_iocb_rsp { __le16 reserved1; __le32 reserved2[6]; - __le32 flags4; -#define IB_MAC_IOCB_RSP_HV 0x20000000 /...
8306c952a523ad2f87c101427c3ece91176b822c
Analyze and fix the following issue in the Linux kernel code: qlge: Fix sparse warnings for byte swapping in qlge_ethool.c
Problem Details: drivers/net/qlge/qlge_ethtool.c:59:23: warning: cast to restricted type drivers/net/qlge/qlge_ethtool.c:59:21: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_ethtool.c:59:21: expected restricted unsigned short [usertype] irq_delay drivers/net/qlge/qlge_ethtool.c:5...
```diff diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c index eefb81b13758..9d922e2ff226 100644 --- a/drivers/net/qlge/qlge_ethtool.c +++ b/drivers/net/qlge/qlge_ethtool.c @@ -56,9 +56,9 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev) for (i = 1; i < qdev->rss_ring_fir...
6f57321422e0d359e83c978c2b03db77b967b7d5
Analyze and fix the following issue in the Linux kernel code: pkt_sched: cls_u32: Fix locking in u32_change()
Problem Details: New nodes are inserted in u32_change() under rtnl_lock() with wmb(), so without tcf_tree_lock() like in other classifiers (e.g. cls_fw). This isn't enough without rmb() on the read side, but on the other hand adding such barriers doesn't give any savings, so the lock is added instead. Reported-by: m0s...
```diff diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 05d178008cbc..07372f60bee3 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c @@ -638,8 +638,9 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, break; n->next = *ins; - wmb(); + tcf_tree_lock(tp); *...
4696b64d234b84b5b70ffd49a76833aa5c49cb61
Analyze and fix the following issue in the Linux kernel code: sparc: Fix minor SPARC32 compile error
Problem Details: When CONFIG_PROC_FS is unset, include/linux/interrupt.h defines init_irq_proc() as an empty function. arch/sparc/kernel/irq_32.c defines this function unconditionally. Fix the latter so that it only defines this function when CONFIG_PROC_FS is set. This fixes the following error: arch/sparc/kernel/i...
```diff diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c index f3488c45d57a..1eff942fe22f 100644 --- a/arch/sparc/kernel/irq_32.c +++ b/arch/sparc/kernel/irq_32.c @@ -669,7 +669,9 @@ void __init init_IRQ(void) btfixup(); } +#ifdef CONFIG_PROC_FS void init_irq_proc(void) { /* For now, nothin...
f1d3e4dca3f8d4f55656477e83d0afe0ea7cbaed
Analyze and fix the following issue in the Linux kernel code: iucv: fix cpu hotplug
Problem Details: If the iucv module is compiled in/loaded but no user is registered cpu hot remove doesn't work. Reason for that is that the iucv cpu hotplug notifier on CPU_DOWN_PREPARE checks if the iucv_buffer_cpumask would be empty after the corresponding bit would be cleared. However the bit was never set since iu...
```diff diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 8f57d4f4328a..032f61e98595 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -517,6 +517,7 @@ static int iucv_enable(void) size_t alloc_size; int cpu, rc; + get_online_cpus(); rc = -ENOMEM; alloc_size = iucv_max_pathid * sizeof(struct iucv_path)...
7483cb7bbc02b9471dda28e54f41287d5374e3ac
Analyze and fix the following issue in the Linux kernel code: uml got broken by commit 30742d5c2277c325fb0e9d2d817d55a19995fe8f
Problem Details: ... if you revert a commit, revert the fixups elsewhere that had been triggered by it. Such as 8c56250f48347750c82ab18d98d647dcf99ca674 (lockdep, UML: fix compilation when CONFIG_TRACE_IRQFLAGS_SUPPORT is not set). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torval...
```diff diff --git a/arch/um/include/asm/system.h b/arch/um/include/asm/system.h index ae5f94d6317d..753346e2cdfd 100644 --- a/arch/um/include/asm/system.h +++ b/arch/um/include/asm/system.h @@ -11,21 +11,21 @@ extern int get_signals(void); extern void block_signals(void); extern void unblock_signals(void); -#defin...
c276e098d3ee33059b4a1c747354226cec58487c
Analyze and fix the following issue in the Linux kernel code: Revert "net: Fix for initial link state in 2.6.28"
Problem Details: This reverts commit 22604c866889c4b2e12b73cbf1683bda1b72a313. We can't fix this issue in this way, because we now can try to take the dev_base_lock rwlock as a writer in software interrupt context and that is not allowed without major surgery elsewhere. This initial link state problem needs to be sol...
```diff diff --git a/net/core/link_watch.c b/net/core/link_watch.c index 1e401e12dc72..bf8f7af699d7 100644 --- a/net/core/link_watch.c +++ b/net/core/link_watch.c @@ -178,6 +178,7 @@ static void __linkwatch_run_queue(int urgent_only) */ clear_bit(__LINK_STATE_LINKWATCH_PENDING, &dev->state); + rfc2863_policy(...
1f3c79a28c8837e8572b98f6d14142d9a6133c56
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix free block discard calls down to the block layer
Problem Details: This is a patch to fix discard semantic to make Btrfs work with FTL and SSD. We can improve FTL's performance by telling it which sectors are freed by file system. But if we don't tell FTL the information of free sectors in proper time, the transaction mechanism of Btrfs will be destroyed and Btrfs cou...
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index fe0e59ab33cc..780c1eeb8299 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -876,6 +876,38 @@ static void btrfs_issue_discard(struct block_device *bdev, } #endif +static int btrfs_discard_extent(struct btrfs_root *root, u6...
ec051c0f929afe5c42c24bb07abf577c616c208c
Analyze and fix the following issue in the Linux kernel code: Btrfs: avoid orphan inode caused by log replay
Problem Details: drop_one_dir_item does not properly update inode's link count. It can be reproduced by executing following commands: #touch test #sync #rm -f test #dd if=/dev/zero bs=4k count=1 of=test conv=fsync #echo b > /proc/sysrq-trigger This fixes it by adding an BTRFS_ORPHAN_ITEM_KEY for the inode Signed-off...
```diff diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 33eee256ee81..b1c2921f5bef 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -50,6 +50,9 @@ static int __btrfs_log_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct inode *inode, int inode_only); +s...
2d69a0f88459fae35df3ddef4934a2dad67e2765
Analyze and fix the following issue in the Linux kernel code: Btrfs: avoid potential super block corruption
Problem Details: The data in fs_info->super_for_commit are zeros before the first transaction commit. If tree log sync and system crash both occur before the first transaction commit, super block will get corrupted. This fixes it by properly filling in the super_for_commit field at open time. Signed-off-by: Yan Zheng...
```diff diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 40a540f31161..dae25e78a6b7 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1609,6 +1609,8 @@ struct btrfs_root *open_ctree(struct super_block *sb, goto fail_iput; memcpy(&fs_info->super_copy, bh->b_data, sizeof(fs_info->super_copy));...
1f48366084a7b046bcb7741ed4e607774f96e3da
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix a memory leak in btrfs_get_sb
Problem Details: subvol_name should be freed if error occurs. Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
```diff diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 3814238d6eba..ccdcb7bb7ad8 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -429,7 +429,7 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, error = btrfs_parse_early_options(data, mode, fs_type, &subvol_name, &fs_devic...
c584482b47f47b051cdc1d5236b99ad18f1b1cfb
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix typo in clear_state_cb
Problem Details: In clear_state_cb, we should check 'tree->ops->clear_bit_hook' instead of 'tree->ops->set_bit_hook'. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 25ce2d18e5b4..0bf7684207aa 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -340,7 +340,7 @@ static void clear_state_cb(struct extent_io_tree *tree, struct extent_state *state, unsigned long bits) { - if (tree->ops && t...
9aead43588f4bdb1bb61e348ad0f33794bbddc0f
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix memset length in btrfs_file_write
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 507081059d97..5908521922fb 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1094,7 +1094,7 @@ static ssize_t btrfs_file_write(struct file *file, const char __user *buf, PAGE_CACHE_SHIFT; WARN_ON(num_pages > nrptrs); - memset(pages, 0, sizeof...
c61c25eb02757ecf697015ef4ae3675c5e114e2e
Analyze and fix the following issue in the Linux kernel code: parisc: fix kernel crash (protection id trap) when compiling ruby1.9
Problem Details: On Wed, Dec 17, 2008 at 11:46:05PM +0100, Helge Deller wrote: > Honestly, I can't decide whether to apply this. It really should never happen in the kernel, since the kernel can guarantee it won't get the access rights failure (highest privilege level, and can set %sr and %protid to whatever it wants....
```diff diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index 4878b9501f24..1c6dbb6f6e56 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h @@ -241,4 +241,6 @@ unsigned long copy_in_user(void __user *dst, const void __user *src, unsigned lo #define...
7246c31e45021bc68688c4a8fd2bbb70b485d1ef
Analyze and fix the following issue in the Linux kernel code: parisc: add uevent helper for parisc bus
Problem Details: parisc: add uevent helper for parisc bus udev device-driver auto detection was failing to work on the GSC bus, since udev didn't knew wich driver to load due to a missing MODALIAS environment variable from kernel. This patch fixes this by adding the MODALIAS environment variable to the uevent kernel ...
```diff diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index 884b7ce16a3b..994bcd980909 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c @@ -549,6 +549,38 @@ static int parisc_generic_match(struct device *dev, struct device_driver *drv) return match_device(to_pari...
5fbf6635a951a75870be9874580c55da538fb025
Analyze and fix the following issue in the Linux kernel code: parisc: fix ipv6 checksum
Problem Details: ipv6 recently started exhibiting the same symptoms as ipv4 was, add a memory clobber around inline checksum assembly that fribbles memory to ensure gcc doesn't erroneously cache across it. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
```diff diff --git a/arch/parisc/include/asm/checksum.h b/arch/parisc/include/asm/checksum.h index e9639ccc3fce..c84b2fcb18a9 100644 --- a/arch/parisc/include/asm/checksum.h +++ b/arch/parisc/include/asm/checksum.h @@ -182,7 +182,7 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, #endif : "...
7f2347a44d2d5c8edf04d6950f4fb21ac868d256
Analyze and fix the following issue in the Linux kernel code: parisc: trivial fixes
Problem Details: trivial fixes: - use KERN_WARNING for printk() - use BUG_ON() instead of "if (xx) BUG();" Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca> -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.k...
```diff diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index 4cea935e2f99..13fc4cd5bfdf 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -421,5 +421,5 @@ void __init init_IRQ(void) void ack_bad_irq(unsigned int irq) { - printk("unexpected IRQ %d\n", irq); + printk(KERN_WARNI...
58607b30fc0f2230a189500112c7a7cca02804cf
Analyze and fix the following issue in the Linux kernel code: [SCSI] aha152x_cs: Fix regression that keeps driver from using shared interrupts
Problem Details: At some point since 2.6.22, the aha152x_cs driver stopped working and started erring on load with the following messages: kernel: pcmcia: request for exclusive IRQ could not be fulfilled. kernel: pcmcia: the driver needs updating to supported shared IRQ lines. With the following change, the driver wo...
```diff diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c index 165ff884f48e..67cde0138061 100644 --- a/drivers/scsi/pcmcia/aha152x_stub.c +++ b/drivers/scsi/pcmcia/aha152x_stub.c @@ -114,7 +114,7 @@ static int aha152x_probe(struct pcmcia_device *link) link->io.NumPorts1 = 0x20; ...
70da2d96306bea9ab56a1c6907b19f889dcdda5c
Analyze and fix the following issue in the Linux kernel code: parisc: fix braino in commit adding __space_to_prot
Problem Details: Shouldn't commit without building before morning coffee... Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
```diff diff --git a/arch/parisc/include/asm/mmu_context.h b/arch/parisc/include/asm/mmu_context.h index 93028975e2cf..354b2aca990e 100644 --- a/arch/parisc/include/asm/mmu_context.h +++ b/arch/parisc/include/asm/mmu_context.h @@ -34,7 +34,7 @@ destroy_context(struct mm_struct *mm) mm->context = 0; } -static inlin...
e0e7ed4811ce32d48ca8ee9fd136357d093243a9
Analyze and fix the following issue in the Linux kernel code: parisc: fix GFP_KERNEL use while atomic in unwinder
Problem Details: Since unwind_frame_init_from_blocked_task() may be called from interrupt/in_atomic context, it needs to kmalloc() memory with GFP_ATOMIC instead of GFP_KERNEL. This fixes this warning (ShowTasks called from sysrq handler): BUG: sleeping function called from invalid context at mm/slab.c:3044 in_atomic...
```diff diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c index 6773c582e457..69dad5a850a8 100644 --- a/arch/parisc/kernel/unwind.c +++ b/arch/parisc/kernel/unwind.c @@ -372,7 +372,7 @@ void unwind_frame_init_from_blocked_task(struct unwind_frame_info *info, struct struct pt_regs *r = &t->thread....
05d5e991a7290807e7d62a7d272bb4f37c27c6ae
Analyze and fix the following issue in the Linux kernel code: ASoC: Clocking fixes for davinci-evm.c
Problem Details: Let's have audio playback not sound like chipmunks, 'k? :) ASP1 on the DM355 EVM uses a 27 MHz external audio clock, not the slower clock used with ASP0 on the DM6446 EVM. Also, that slower ASP0 clock on the DM6446 is 12.288 MHz, not 22.5792 MHz ... 48 KHz sample rate (x256), not a double speed 44.1 ...
```diff diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c index 01b948bb55a1..54851f318568 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c @@ -26,7 +26,6 @@ #include "davinci-pcm.h" #include "davinci-i2s.h" -#define EVM_CODEC_CLOCK 22579200 #define ...
d304c6ef6e9888addde075acb5bdd87e3fb48c1a
Analyze and fix the following issue in the Linux kernel code: ASoC: OMAP: Select OMAP pin multiplexing when using Nokia N810 ASoC drivers
Problem Details: N810 bootloader muxes I2S pins for OMAP2420 EAC block while N810 ASoC drivers are using McBSP block so the kernel have to change configuration runtime. Author has not seen problems using kernel pin multiplexing on N810 but very many times unworking audio after forgotten to enable it and spending 15 mi...
```diff diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig index a7b1d77b2105..4f7f04014585 100644 --- a/sound/soc/omap/Kconfig +++ b/sound/soc/omap/Kconfig @@ -10,6 +10,7 @@ config SND_OMAP_SOC_N810 tristate "SoC Audio support for Nokia N810" depends on SND_OMAP_SOC && MACH_NOKIA_N810 select SND_OMAP_S...
8eca75382e012b74b98526a1679ada2a1849024b
Analyze and fix the following issue in the Linux kernel code: ALSA: ice1724 - Fix a typo in IEC958 PCM name
Problem Details: Fix trivial name string typo as reported in bug 2552. Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index 0dfa0540ce2c..bb8d8c766b9d 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c @@ -1239,7 +1239,7 @@ static int __devinit snd_vt1724_pcm_spdif(struct snd_ice1712 *ice, int device) if (ice->force_pdma4 || ice->f...
4ae8978cf92a96257cd8998a49e781be83571d64
Analyze and fix the following issue in the Linux kernel code: inotify: fix type errors in interfaces
Problem Details: The problems lie in the types used for some inotify interfaces, both at the kernel level and at the glibc level. This mail addresses the kernel problem. I will follow up with some suggestions for glibc changes. For the sys_inotify_rm_watch() interface, the type of the 'wd' argument is currently 'u32',...
```diff diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 400f8064a548..81b8644b0136 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c @@ -704,7 +704,7 @@ fput_and_out: return ret; } -asmlinkage long sys_inotify_rm_watch(int fd, u32 wd) +asmli...
2f1169e2dc0c70e213f79ada88a10912cc2fbe94
Analyze and fix the following issue in the Linux kernel code: fix breakage in reiserfs_new_inode()
Problem Details: now that we use ih.key earlier, we need to do all its setup early enough Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 145c2d3e5e01..1306d4f0f447 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -1782,6 +1782,12 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, goto out_bad_inode; } args.objectid = inode->i_ino = le32_to_cpu(ih.ih_k...
5b45d96bf963afeb931a75faf02fb424e446e5a9
Analyze and fix the following issue in the Linux kernel code: fix the treatment of jfs special inodes
Problem Details: We used to put them on a single list, without any locking. Racy. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index d6363d8309d0..0f94381ca6d0 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c @@ -58,9 +58,9 @@ /* * __mark_inode_dirty expects inodes to be hashed. Since we don't want - * special inodes in the fileset inode space, we hash them to a dummy head ...
5b6f1eb97d462a45be3b30759758b5fdbb562c8c
Analyze and fix the following issue in the Linux kernel code: vfs: lseek(fd, 0, SEEK_CUR) race condition
Problem Details: This patch fixes a race condition in lseek. While it is expected that unpredictable behaviour may result while repositioning the offset of a file descriptor concurrently with reading/writing to the same file descriptor, this should not happen when merely *reading* the file descriptor's offset. Unfortu...
```diff diff --git a/fs/read_write.c b/fs/read_write.c index 969a6d9c020b..5cc6924eb158 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -50,6 +50,14 @@ generic_file_llseek_unlocked(struct file *file, loff_t offset, int origin) offset += inode->i_size; break; case SEEK_CUR: + /* + * Here we special-case...
90cb546cada68bb8c2278afdb4b65c2ac11f2877
Analyze and fix the following issue in the Linux kernel code: ocfs2/xattr: fix credits calculation during index create
Problem Details: When creating a xattr index block, the old calculation forget to add credits for the meta change of the alloc file. So add more credits and more comments to explain it. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 3e2e92d70594..73fb9f762512 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -2359,13 +2359,21 @@ meta_guess: } else xb = (struct ocfs2_xattr_block *)xbs->xattr_bh->b_data; + /* + * If there is already an xattr tree, good, we can calculate...
4b3f6209bf9eec46fe5ebb168718fef5c443c157
Analyze and fix the following issue in the Linux kernel code: ocfs2/xattr: Always updating ctime during xattr set.
Problem Details: In xattr set, we should always update ctime if the operation goes sucessfully. The old one mistakenly put it in ocfs2_xattr_set_entry which is only called when we set xattr in inode or xattr block. The side benefit is that it resolve the bug 1052 since in that scenario, ocfs2_calc_xattr_set_need only c...
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 93a1ab4fe1da..3e2e92d70594 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -1651,10 +1651,6 @@ static int ocfs2_xattr_set_entry(struct inode *inode, oi->ip_dyn_features |= flag; di->i_dyn_features = cpu_to_le16(oi->ip_dyn_features); spin_unloc...
7b791d68562e4ce5ab57cbacb10a1ad4ee33956e
Analyze and fix the following issue in the Linux kernel code: ocfs2/dlm: Fix race during lockres mastery
Problem Details: dlm_get_lock_resource() is supposed to return a lock resource with a proper master. If multiple concurrent threads attempt to lookup the lockres for the same lockid while the lock mastery in underway, one or more threads are likely to return a lockres without a proper master. This patch makes the thre...
```diff diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index cbf3abe24cdb..54e182a27caf 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c @@ -732,14 +732,21 @@ lookup: if (tmpres) { int dropping_ref = 0; + spin_unlock(&dlm->spinlock); + spin_lock(&tmpres->spinlock); + /*...
b0d4f817ba5de8adb875ace594554a96d7737710
Analyze and fix the following issue in the Linux kernel code: ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list
Problem Details: This patch adds a new lock, dlm->tracking_lock, to protect adding/removing lockres' to/from the dlm->tracking_list. We were previously using dlm->spinlock for the same, but that proved inadequate as we could be freeing a lockres from a context that did not hold that lock. As the new lock only protects ...
```diff diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index d5a86fb81a49..bb53714813ab 100644 --- a/fs/ocfs2/dlm/dlmcommon.h +++ b/fs/ocfs2/dlm/dlmcommon.h @@ -140,6 +140,7 @@ struct dlm_ctxt unsigned int purge_count; spinlock_t spinlock; spinlock_t ast_lock; + spinlock_t track_lock; char *na...
d4f7e650e55af6b235871126f747da88600e8040
Analyze and fix the following issue in the Linux kernel code: ocfs2/dlm: Hold off sending lockres drop ref message while lockres is migrating
Problem Details: During lockres purge, o2dlm sends a drop reference message to the lockres master. This patch delays the message if the lockres is being migrated. Fixes oss bugzilla#1012 http://oss.oracle.com/bugzilla/show_bug.cgi?id=1012 Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fas...
```diff diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c index 4060bb328bc8..d1295203029f 100644 --- a/fs/ocfs2/dlm/dlmthread.c +++ b/fs/ocfs2/dlm/dlmthread.c @@ -181,7 +181,8 @@ static int dlm_purge_lockres(struct dlm_ctxt *dlm, spin_lock(&res->spinlock); /* This ensures that clear refmap is se...
2b83256407687613e906bee93d98a25339128a4d
Analyze and fix the following issue in the Linux kernel code: ocfs2/dlm: Fix a race between migrate request and exit domain
Problem Details: Patch address a racing migrate request message and an exit domain message. Instead of blocking exit domains for the duration of the migrate, we ignore failure to deliver that message. This is because an exiting domain should not have any active locks and thus has no role to play in the migration. Sign...
```diff diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 44f87caf3683..92fd1d7d6126 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c @@ -2949,7 +2949,7 @@ static int dlm_do_migrate_request(struct dlm_ctxt *dlm, struct dlm_node_iter *iter) { struct dlm_migrate_request ...
df32b3343aa11e0c7f54783594b24321d17d376f
Analyze and fix the following issue in the Linux kernel code: ocfs2/quota: sparse fixes for quota
Problem Details: Fix 2 minor things in quota. They are both found by sparse check. 1. an endian bug in ocfs2_local_quota_add_chunk. 2. change olq_alloc_dquot to static. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
```diff diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c index b5ddb22e6278..d451b715aefe 100644 --- a/fs/ocfs2/quota_local.c +++ b/fs/ocfs2/quota_local.c @@ -988,7 +988,7 @@ static struct ocfs2_quota_chunk *ocfs2_local_quota_add_chunk( goto out_trans; } lock_buffer(bh); - dchunk->dqc_free = ol_quota...
e35ff98f7c37b7bc901b4b90a66a0287565e456c
Analyze and fix the following issue in the Linux kernel code: ocfs2: fix indendation in ocfs2_dquot_drop_slow
Problem Details: Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
```diff diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index 054d52bd8258..a10faebe88a1 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c @@ -893,7 +893,7 @@ static int ocfs2_dquot_drop_slow(struct inode *inode) if (IS_ERR(handle)) { status = PTR_ERR(handle); mlog_errno(status);...
9a2f3866c825c67c3a5806799cdc93fb7517f0c4
Analyze and fix the following issue in the Linux kernel code: ocfs2: Fix build warnings (64-bit types vs long long)
Problem Details: fs/ocfs2/quota_local.c: In function 'olq_set_dquot': fs/ocfs2/quota_local.c:844: warning: format '%lld' expects type 'long long int', but argument 7 has type '__le64' fs/ocfs2/quota_local.c:844: warning: format '%lld' expects type 'long long int', but argument 8 has type '__le64' fs/ocfs2/quota_local.c...
```diff diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index e527ec6e0133..054d52bd8258 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c @@ -457,9 +457,9 @@ int __ocfs2_sync_dquot(struct dquot *dquot, int freeing) olditime = dquot->dq_dqb.dqb_itime; oldbtime = dquot->dq_dqb.dqb_bti...
af09e51b6810d3408db1c0e956b3b0687b0e3723
Analyze and fix the following issue in the Linux kernel code: ocfs2: Fix oops when extending quota files
Problem Details: We have to mark buffer as uptodate before calling ocfs2_journal_access() and ocfs2_set_buffer_uptodate() does not do this for us. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
```diff diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index 2bdcddd3f1c4..8fceb0c49b3e 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c @@ -174,7 +174,7 @@ ssize_t ocfs2_quota_write(struct super_block *sb, int type, struct inode *gqinode = oinfo->dqi_gqinode; int offset = off & (s...
85eb8b73d66530bb7b931789ae7a5ec9744eed34
Analyze and fix the following issue in the Linux kernel code: ocfs2: Fix ocfs2_read_quota_block() error handling.
Problem Details: ocfs2_bread() has become ocfs2_read_virt_blocks(), with a prototype to match ocfs2_read_blocks(). The quota code, converting from ocfs2_bread(), wraps the call to ocfs2_read_virt_blocks() in ocfs2_read_quota_block(). Unfortunately, the prototype of ocfs2_read_quota_block() matches the old prototype o...
```diff diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 058aa86490ae..b1c75911d8ad 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -3519,7 +3519,7 @@ static int ocfs2_refresh_qinfo(struct ocfs2_mem_dqinfo *oinfo) oinfo->dqi_gi.dqi_type); struct ocfs2_lock_res *lockres = &oinfo->dqi_gq...
bbbd0eb34bf801dee01e345785959a75258f6567
Analyze and fix the following issue in the Linux kernel code: ocfs2: Mark system files as not subject to quota accounting
Problem Details: Mark system files as not subject to quota accounting. This prevents possible recursions into quota code and thus deadlocks. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
```diff diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index ec25d9984192..50dbc486ef71 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -275,8 +275,10 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, inode->i_nlink = le16_to_cpu(fe->i_links_count); - if (fe->i_flags & cpu_to_le...
97aff52ae13d3c11a074bbbfc80ad0b59cb8cdeb
Analyze and fix the following issue in the Linux kernel code: ocfs2/xattr: Fix a bug in xattr allocation estimation
Problem Details: When we extend one xattr's value to a large size, the old value size might be smaller than the size of a value root. In those cases, we still need to guess the metadata allocation. Reported-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mfa...
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 8af29b3bd6de..d0b94edb9662 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -2270,6 +2270,7 @@ static int ocfs2_calc_xattr_set_need(struct inode *inode, value_size); xv = (struct ocfs2_xattr_value_root *) (base + name_offset + ...
4ac6032d6c92f0ac65cf5bc56b68557b3f099b66
Analyze and fix the following issue in the Linux kernel code: ocfs2: Field prefixes for the xattr_bucket structure
Problem Details: The ocfs2_xattr_bucket structure keeps track of the buffers for one xattr bucket. Let's prefix the fields for easier code navigation. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 74d7367ade13..9c0ee42eb931 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -61,8 +61,8 @@ struct ocfs2_xattr_def_value_root { }; struct ocfs2_xattr_bucket { - struct buffer_head *bhs[OCFS2_XATTR_MAX_BLOCKS_PER_BUCKET]; - struct ocfs2_xattr_heade...
647b0d3854d776485faea9de7e7ed7fd4bdc6f20
Analyze and fix the following issue in the Linux kernel code: [MTD] [TESTS] Fix some size_t printk format warnings
Problem Details: Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/tests/mtd_subpagetest.c b/drivers/mtd/tests/mtd_subpagetest.c index 4c5e04d0b328..5b889724268e 100644 --- a/drivers/mtd/tests/mtd_subpagetest.c +++ b/drivers/mtd/tests/mtd_subpagetest.c @@ -125,7 +125,7 @@ static int write_eraseblock(int ebnum) (long long)addr); if (written...
4209324a74fd234fa44bb18a3331356e41df773a
Analyze and fix the following issue in the Linux kernel code: avr32: data param to at32_add_device_mci() must be non-NULL
Problem Details: at32_add_device_mci() will refuse to add the mci device if the data parameter is NULL. Fix up the favr-32 and hammerhead boards so that this doesn't happen. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Alex Raimondi <mailinglist@miromico.ch> Cc: Hans-Christian Egtvedt <hans-chr...
```diff diff --git a/arch/avr32/boards/favr-32/setup.c b/arch/avr32/boards/favr-32/setup.c index 1a12930df8e7..745c408c2ac5 100644 --- a/arch/avr32/boards/favr-32/setup.c +++ b/arch/avr32/boards/favr-32/setup.c @@ -17,6 +17,7 @@ #include <linux/linkage.h> #include <linux/gpio.h> #include <linux/leds.h> +#include <li...
5db524bd469290212781e1cb0293b57a7a1c000a
Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: Correctly handle 6-byte commands with DIX
Problem Details: DIF does not work with 6-byte commands so we previously ignored those commands when preparing a request. However, DIX does not need RDPROTECT/WRPROTECT to be set and 6-byte commands are consequently perfectly valid in host-only mode. This patch fixes a problem where we would set the wrong DIX operati...
```diff diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi/sd_dif.c index c9b41077fca1..184dff492797 100644 --- a/drivers/scsi/sd_dif.c +++ b/drivers/scsi/sd_dif.c @@ -374,7 +374,10 @@ void sd_dif_op(struct scsi_cmnd *scmd, unsigned int dif, unsigned int dix, unsig else csum_convert = 0; + BUG_ON(dif && (scmd->cm...
becce74b8231f8b5e51165e797f6c950d1dbcf67
Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: DIF: Fix tagging on platforms with signed char
Problem Details: Switch tag arrays to u8 to prevent problems on platforms with signed char. Reported-by: Tim LaBerge <tim.laberge@Quantum.Com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi/sd_dif.c index 2fe590f095fc..c9b41077fca1 100644 --- a/drivers/scsi/sd_dif.c +++ b/drivers/scsi/sd_dif.c @@ -142,7 +142,7 @@ static int sd_dif_type1_verify_ip(struct blk_integrity_exchg *bix) static void sd_dif_type1_set_tag(void *prot, void *tag_buf, unsigned ...
3e695f89c5debb735e4ff051e9e58d8fb4e95110
Analyze and fix the following issue in the Linux kernel code: [SCSI] Fix error handling for DIF/DIX
Problem Details: patch commit b60af5b0adf0da24c673598c8d3fb4d4189a15ce Author: Alan Stern <stern@rowland.harvard.edu> Date: Mon Nov 3 15:56:47 2008 -0500 [SCSI] simplify scsi_io_completion() broke DIX error handling. Also, we are now using EILSEQ to indicate integrity errors to the upper layers (as opposed to...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 911514c1fea7..cc613bae4ad3 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -980,6 +980,8 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) return; this_count = blk_rq_bytes(req); + error = ...
4f5299ac4e3a03d5c596c00d726fa932c600609d
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_lib: don't decrement busy counters when inserting commands
Problem Details: A bug was introduced by commit b60af5b0adf0da24c673598c8d3fb4d4189a15ce Author: Alan Stern <stern@rowland.harvard.edu> Date: Mon Nov 3 15:56:47 2008 -0500 [SCSI] simplify scsi_io_completion() because the simplification uses scsi_queue_insert(). The problem with this function is that it expec...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 8c73bb4e0a2f..911514c1fea7 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -91,26 +91,19 @@ static void scsi_unprep_request(struct request *req) scsi_put_command(cmd); } -/* - * Function: scsi_queue_insert() - * -...
be92d7af38fb8a91f8575ab2272e00f2e51667ff
Analyze and fix the following issue in the Linux kernel code: genirq: provide irq_to_desc() to non-genirq architectures too
Problem Details: Impact: build fix on non-genirq architectures Sam Ravnborg reported this build failure on sparc32 allmodconfig, the GPIO drivers assume the presence of irq_to_desc(): drivers/gpio/gpiolib.c: In function `gpiolib_dbg_show': drivers/gpio/gpiolib.c:1146: error: implicit declaration of function 'irq_to...
```diff diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 5504a5c97836..86af92e9e84c 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h @@ -8,7 +8,12 @@ #ifndef CONFIG_GENERIC_HARDIRQS #include <asm/irq.h> -# define nr_irqs NR_IRQS + +/* + * Wrappers for non-genirq architectures: + */ +#...
82c5b7b527ccc4b5d3cf832437e842f9d2920a79
Analyze and fix the following issue in the Linux kernel code: hrtimer: splitout peek ahead functionality, fix
Problem Details: Impact: build fix on !CONFIG_HIGH_RES_TIMERS Fix: kernel/hrtimer.c:1586: error: implicit declaration of function '__hrtimer_peek_ahead_timers' Signen-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index aa024f2af78c..1455b7651b6b 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1268,7 +1268,11 @@ static void run_hrtimer_softirq(struct softirq_action *h) hrtimer_peek_ahead_timers(); } -#endif /* CONFIG_HIGH_RES_TIMERS */ +#else /* CONFIG_HIGH_R...
5cf1c00b0ef3ba964b2ad268a55c278cf43f798f
Analyze and fix the following issue in the Linux kernel code: ASoC: fix davinci-sffsdr buglet
Problem Details: Minor bugfix: now that DaVinci kernels can support multiple boards, board-specific ASoC components need to verify they're running on the right board before initializing. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-of...
```diff diff --git a/sound/soc/davinci/davinci-sffsdr.c b/sound/soc/davinci/davinci-sffsdr.c index f67579d52765..4935d1bcbd8d 100644 --- a/sound/soc/davinci/davinci-sffsdr.c +++ b/sound/soc/davinci/davinci-sffsdr.c @@ -24,6 +24,7 @@ #include <sound/soc-dapm.h> #include <asm/dma.h> +#include <asm/mach-types.h> #inc...
a6037b61c2f5fc99c57c15b26d7cfa58bbb34008
Analyze and fix the following issue in the Linux kernel code: hrtimer: fix recursion deadlock by re-introducing the softirq
Problem Details: Impact: fix rare runtime deadlock There are a few sites that do: spin_lock_irq(&foo) hrtimer_start(&bar) __run_hrtimer(&bar) func() spin_lock(&foo) which obviously deadlocks. In order to avoid this, never call __run_hrtimer() from hrtimer_start*() context, but instead defer thi...
```diff diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 0702c4d7bdf0..2062833f5f7a 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -253,7 +253,8 @@ enum BLOCK_SOFTIRQ, TASKLET_SOFTIRQ, SCHED_SOFTIRQ, - RCU_SOFTIRQ, /* Preferable RCU should always be the last sof...
d5fd43c4ae04523e1dcd7794f9c511b289851350
Analyze and fix the following issue in the Linux kernel code: hrtimer: fix HOTPLUG_CPU=n compile warning
Problem Details: Impact: cleanup kernel/hrtimer.c: In function 'hrtimer_cpu_notify': kernel/hrtimer.c:1574: warning: unused variable 'dcpu' Introduced by commit 37810659ea7d9572c5ac284ade272f806ef8f788 ("hrtimer: removing all ur callback modes, fix hotplug") from the timers. dcpu is only used if CONFIG_HOTPLUG_CPU...
```diff diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 8f7001c97e06..9c2bfa841281 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1504,6 +1504,11 @@ static void __cpuinit init_hrtimers_cpu(int cpu) #ifdef CONFIG_HOTPLUG_CPU +static void tickle_timers(void *arg) +{ + hrtimer_peek_ahead_timers(); +}...
c59ab97e9ecdee9084d2da09e5a8ceea9a396508
Analyze and fix the following issue in the Linux kernel code: rcu: fix rcutorture bug
Problem Details: Fix an rcutorture bug that prevents the shutdown notifier from ever actually having any effect, due to the fact that kthreads ignore all signals. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index 3245b40952c6..1cff28db56b6 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c @@ -136,7 +136,7 @@ static int stutter_pause_test = 0; #endif int rcutorture_runnable = RCUTORTURE_RUNNABLE_INIT; -#define FULLSTOP_SIGNALED 1 /* Bail due to sig...
7f9938d0fd6c778bd0ce296a3e3b50266de2b892
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] pxa3xx: fix non-page-aligned reads
Problem Details: Reads from non-page-aligned addresses were broken because while the address to read from was correctly written to NDCB*, a full page was always read. Fix this by ignoring the column and only using the page address. I suspect this whole-page behavior is due to the controller's need to read the entire p...
```diff diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index fc4144495610..7582581aefe3 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -368,14 +368,14 @@ static int prepare_read_prog_cmd(struct pxa3xx_nand_info *info, /* large block, 2 cycles for col...
a5cce42f357b3106fb0eacd85edec5ae31288956
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] fix nandsim sched.h references
Problem Details: Fix sched.h references: build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1326: error: dereferencing pointer to incomplete type build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1326: error: 'PF_MEMALLOC' undeclared (first use in this function) bui...
```diff diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 23b53fc405f5..cd0711b83ac4 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -38,6 +38,7 @@ #include <linux/delay.h> #include <linux/list.h> #include <linux/random.h> +#include <linux/sched.h> #include <linu...
dfe6b7d9406c631d697f8bbe1eae5569b808154f
Analyze and fix the following issue in the Linux kernel code: proc: fix sparse warning
Problem Details: fs/proc/base.c:312:4: warning: do-while statement is not a compound statement Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index eb7b4654d6aa..a9ccc1252731 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -306,9 +306,9 @@ static int proc_pid_auxv(struct task_struct *task, char *buffer) struct mm_struct *mm = get_task_mm(task); if (mm) { unsigned int nwords = 0; - do + do { ...
90a4d2c0106bb690f0b6af3d506febc35c658aa7
Analyze and fix the following issue in the Linux kernel code: rcu: make treercu safe for suspend and resume
Problem Details: Impact: fix kernel warnings [and potential crash] during suspend+resume Kudos to both Dhaval Giani and Jens Axboe for finding a bug in treercu that causes warnings after suspend-resume cycles in Dhaval's case and during stress tests in Jens's case. It would also probably cause failures if heavily str...
```diff diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 88d921c5c449..f2d8638e6c60 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -79,7 +79,10 @@ struct rcu_state rcu_bh_state = RCU_STATE_INITIALIZER(rcu_bh_state); DEFINE_PER_CPU(struct rcu_data, rcu_bh_data); #ifdef CONFIG_NO_HZ -DEFINE_PER_CPU(str...
c12172c0251761c54260376eb29a5f6547495580
Analyze and fix the following issue in the Linux kernel code: rcu: fix rcutree grace-period-latency bug on small systems
Problem Details: Impact: fix delays during bootup Kudos to Andi Kleen for finding a grace-period-latency problem! The problem was that the special-case code for small machines never updated the ->signaled field to indicate that grace-period initialization had completed, which prevented force_quiescent_state() from ev...
```diff diff --git a/kernel/rcutree.c b/kernel/rcutree.c index a342b032112c..88d921c5c449 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -572,6 +572,7 @@ rcu_start_gp(struct rcu_state *rsp, unsigned long flags) /* Special-case the common single-level case. */ if (NUM_RCU_NODES == 1) { rnp->qsmask = rnp-...
4f7d54f59bc470f0aaa932f747a95232d7ebf8b1
Analyze and fix the following issue in the Linux kernel code: tcp: don't mask EOF and socket errors on nonblocking splice receive
Problem Details: Currently, setting SPLICE_F_NONBLOCK on splice from a TCP socket results in masking of EOF (RDHUP) and error conditions on the socket by an -EAGAIN return. Move the NONBLOCK check in tcp_splice_read() to be after the EOF and error checks to fix this. Signed-off-by: Lennert Buytenhek <buytenh@marvell....
```diff diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 4d655e945413..bce1b068f2a7 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -580,10 +580,6 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos, else if (!ret) { if (spliced) break; - if (flags & SPLICE_F_NONBLOCK) { - ret = -EAGAIN;...
88a19ad066c1aab2f9713beb670525fcc06e1c09
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix use-after-free bug on umount (try #2)
Problem Details: This should solve the issue with the previous attempt at fixing this. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 4cae60f4a175..f91eebdde581 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -1263,17 +1263,21 @@ static int gfs2_get_sb_meta(struct file_system_type *fs_type, int flags, static void gfs2_kill_sb(struct super_block *sb) { struct gf...
fefc03bfedeff2002f14e848ecb7c0cd77ee0b15
Analyze and fix the following issue in the Linux kernel code: Revert "GFS2: Fix use-after-free bug on umount"
Problem Details: This reverts commit 78802499912f1ba31ce83a94c55b5a980f250a43. The original patch is causing problems in relation to order of operations at umount in relation to jdata files. I need to fix this a different way. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 5eae62e7f778..6e298b070117 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1547,9 +1547,8 @@ static void clear_glock(struct gfs2_glock *gl) * Called when unmounting the filesystem. */ -void gfs2_gl_hash_clear(struct super_block *sb) +void gfs2_gl...
3af165ac4d099385b12e3e75a9ee3ffd02da33e0
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix use-after-free bug on umount
Problem Details: There was a use-after-free with the GFS2 super block during umount. This patch moves almost all of the umount code from ->put_super into ->kill_sb, the only bit that cannot be moved being the glock hash clearing which has to remain as ->put_super due to umount ordering requirements. As a result its now...
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 6e298b070117..5eae62e7f778 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1547,8 +1547,9 @@ static void clear_glock(struct gfs2_glock *gl) * Called when unmounting the filesystem. */ -void gfs2_gl_hash_clear(struct gfs2_sbd *sdp) +void gfs2_gl_h...
b52896813c2f16bcc5c5b67bb3c3f75bc084439b
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix bug in gfs2_lock_fs_check_clean()
Problem Details: gfs2_lock_fs_check_clean() should not be calling gfs2_jindex_hold() since it doesn't work like rindex hold, despite the comment. That allows gfs2_jindex_hold() to be moved into ops_fstype.c where it can be made static. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h index 8a468cac9328..4f919440c3be 100644 --- a/fs/gfs2/dir.h +++ b/fs/gfs2/dir.h @@ -11,6 +11,7 @@ #define __DIR_DOT_H__ #include <linux/dcache.h> +#include <linux/crc32.h> struct inode; struct gfs2_inode; diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c...
813e0c46c9e2a0c6f0b6e774faac82afd7a2e812
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix "truncate in progress" hang
Problem Details: Following on from the recent clean up of gfs2_quotad, this patch moves the processing of "truncate in progress" inodes from the glock workqueue into gfs2_quotad. This fixes a hang due to the "truncate in progress" processing requiring glocks in order to complete. It might seem odd to use gfs2_quotad f...
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 27cb9cca9c08..4ddf3bd55dda 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -40,6 +40,7 @@ #include "quota.h" #include "super.h" #include "util.h" +#include "bmap.h" struct gfs2_gl_hash_bucket { struct hlist_head hb_list; @@ -289,7 +290,8 ...
1bb7322fd0d5abdce396de51cbc5dbc489523018
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix up jdata writepage/delete_inode
Problem Details: There is a bug in writepage and delete_inode which allows jdata files to invalidate pages from the address space without being in a transaction at the time. This causes problems in case the pages are in the journal. This patch fixes that case and prevents the resulting oops. Signed-off-by: Steven Whit...
```diff diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index 15f710f2d4da..574b222feefc 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c @@ -210,25 +210,23 @@ static int gfs2_jdata_writepage(struct page *page, struct writeback_control *wbc { struct inode *inode = page->mapping->host; stru...
858eb711ba64f8a001d7003295b8078bcab33b6d
Analyze and fix the following issue in the Linux kernel code: DCB: fix kfree(skb)
Problem Details: Use kfree_skb instead of kfree for struct sk_buff pointers. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index 5dbfe5fdc0d6..8379496de82b 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c @@ -191,7 +191,7 @@ static int dcbnl_reply(u8 value, u8 event, u8 cmd, u8 attr, u32 pid, return 0; nlmsg_failure: err: - kfree(dcbnl_skb); + kfree_skb(dcbnl_skb); return ret; ...
22604c866889c4b2e12b73cbf1683bda1b72a313
Analyze and fix the following issue in the Linux kernel code: net: Fix for initial link state in 2.6.28
Problem Details: From: Michael Marineau <mike@marineau.org> Commit b47300168e770b60ab96c8924854c3b0eb4260eb "Do not fire linkwatch events until the device is registered." was made as a workaround for drivers that call netif_carrier_off before registering the device. Unfortunately this causes these drivers to incorrect...
```diff diff --git a/net/core/link_watch.c b/net/core/link_watch.c index bf8f7af699d7..1e401e12dc72 100644 --- a/net/core/link_watch.c +++ b/net/core/link_watch.c @@ -178,7 +178,6 @@ static void __linkwatch_run_queue(int urgent_only) */ clear_bit(__LINK_STATE_LINKWATCH_PENDING, &dev->state); - rfc2863_policy(...
f32f8b72e02e851972a0172603104046aa5fec96
Analyze and fix the following issue in the Linux kernel code: net/rfkill/rfkill.c: fix unused rfkill_led_trigger() warning
Problem Details: commit 4dec9b807be757780ca3611a959ac22c28d292a7 ("rfkill: strip pointless notifier chain") removed the only user of rfkill_led_trigger() that was not guarded by #ifdef CONFIG_RFKILL_LEDS. Therefore, move rfkill_led_trigger() completely inside #ifdef CONFIG_RFKILL_LEDS and avoid the compile time warning...
```diff diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index 3c94f76d5525..3eaa39403c13 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c @@ -54,10 +54,10 @@ static unsigned long rfkill_states_lockdflt[BITS_TO_LONGS(RFKILL_TYPE_MAX)]; static bool rfkill_epo_lock_active; +#ifdef CONFIG_RFKILL_LEDS ...
939678f81a55c839ae58c9cc3d4ec6d0f60e7dc7
Analyze and fix the following issue in the Linux kernel code: qlge: bugfix: Fix register access error checking.
Problem Details: Some indexed registers do not have error bits. In these cases a value of zero should be used for error checking. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index ffa210074424..837be72efb02 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -257,7 +257,7 @@ int ql_get_mac_addr_reg(struct ql_adapter *qdev, u32 type, u16 index, { status = ql_wait_reg_r...
459caf5a99cd066598192a86f8f63d73f0b423a6
Analyze and fix the following issue in the Linux kernel code: qlge: bugfix: Fix ring length setting for rx ring, large/small
Problem Details: The length field for these rings is 16-bits. If the length is the max supported 65536 then the setting should be zero. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index c0e43c552d1f..ffa210074424 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -2491,7 +2491,8 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring) memset((void *)cqicb, 0, si...