id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
164f98adbbd50c67177b096a59f55c1a56a45c82
Analyze and fix the following issue in the Linux kernel code: lockd: fix race in nlm_release()
Problem Details: The sm_count is decremented to zero but left on the nsm_handles list. So in the space between decrementing sm_count and acquiring nsm_mutex, it is possible for another task to find this nsm_handle, increment the use count and then enter nsm_release itself. Thus there's nothing to prevent the nsm being...
```diff diff --git a/fs/lockd/host.c b/fs/lockd/host.c index c3f119426d83..960911c4a11c 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -529,12 +529,10 @@ nsm_release(struct nsm_handle *nsm) { if (!nsm) return; + mutex_lock(&nsm_mutex); if (atomic_dec_and_test(&nsm->sm_count)) { - mutex_lock(&nsm_mutex);...
93245d11fcaccdebccabe86a2b92db524f82d8b4
Analyze and fix the following issue in the Linux kernel code: lockd: fix sparse warning in svcshare.c
Problem Details: fs/lockd/svcshare.c:74:50: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
```diff diff --git a/fs/lockd/svcshare.c b/fs/lockd/svcshare.c index 068886de4dda..b0ae07008700 100644 --- a/fs/lockd/svcshare.c +++ b/fs/lockd/svcshare.c @@ -71,7 +71,8 @@ nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file, struct nlm_share *share, **shpp; struct xdr_netobj *oh = &argp->lock.oh; - ...
3dc5063786b273f1aee545844f6bd4e9651ebffe
Analyze and fix the following issue in the Linux kernel code: slab_err: Pass parameters correctly to slab_bug
Problem Details: Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/mm/slub.c b/mm/slub.c index 7f8aaa291a4e..39592b5ce68a 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -521,7 +521,7 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p) static void object_err(struct kmem_cache *s, struct page *page, u8 *object, char *reason) { - slab_bug(s,...
0093cb1199ec551f179562ca9fbd6f64fb750645
Analyze and fix the following issue in the Linux kernel code: pnpacpi: fix potential corruption on "pnpacpi: exceeded the max number of IRQ resources 2"
Problem Details: PNP_MAX_IRQ is 2 If a device invokes pnpacpi_parse_allocated_irqresource() 0, 1, or 2 times, we are happy. The 3rd time, we will fail and print "pnpacpi: exceeded the max number of IRQ resources: 2" The 4th and subsequent calls (if this ever happened) would silently scribble on irq_resource[2], which d...
```diff diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 2dcd1960aca8..98cbc9f18eed 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c @@ -84,10 +84,12 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, while (!(res->irq_r...
31d1e340f0e8d53804d737571b2f2bb28a74ecc5
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Remove volatile qualifier from struct nes_hw_cq.cq_vbase
Problem Details: Remove the volatile qualifier from the cq_vbase member of struct nes_hw_cq, and add an rmb() in the one place where it looks like access order might make a difference. As usual, removing a volatile qualifier in a declaration is actually a bug fix, since a volatile qualifier is not sufficient to make s...
```diff diff --git a/drivers/infiniband/hw/nes/nes_hw.h b/drivers/infiniband/hw/nes/nes_hw.h index b7e2844f096b..8f36e231bdf5 100644 --- a/drivers/infiniband/hw/nes/nes_hw.h +++ b/drivers/infiniband/hw/nes/nes_hw.h @@ -905,7 +905,7 @@ struct nes_hw_qp { }; struct nes_hw_cq { - struct nes_hw_cqe volatile *cq_vbase; ...
4da27d6d5b92c8fe4b3a3e5bcf42606d9e4a6fc8
Analyze and fix the following issue in the Linux kernel code: IB/ehca: Move high-volume debug output to higher debug levels
Problem Details: Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index b5ca94c6b8d9..ca5eb0cb628c 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c @@ -633,7 +633,7 @@ static inline int find_next_online_cpu(struct ehca_comp_pool *pool) uns...
bc5698f3ecc9587e1edb343a2878f8d228c49e0e
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix adapter reset after PXE boot
Problem Details: After PXE boot, the iw_nes driver does a full reset to ensure the card is in a clean state. However, it doesn't wait for firmware to complete its work before issuing a port reset to enable the ports, which leads to problems bringing up the ports. The solution is to wait for firmware to complete its w...
```diff diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 38ea14cc7077..d940fc27129a 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -1849,8 +1849,10 @@ static int mini_cm_recv_pkt(struct nes_cm_core *cm_core, struct nes_vnic *nesvni ...
422b120238130307da64fa44c9fb722bfaf5f1af
Analyze and fix the following issue in the Linux kernel code: [JFFS2] Fix jffs2_reserve_space() when all blocks are pending erasure.
Problem Details: When _all_ the blocks were on the erase_pending_list, we could't find a block to GC from but there was no _actually_ free space, and jffs2_reserve_space() would get a little unhappy. Handle this case by returning -EAGAIN from jffs2_garbage_collect_pass(). There are two callers of that function -- jffs...
```diff diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c index 26c7992c45ca..bad005664e30 100644 --- a/fs/jffs2/gc.c +++ b/fs/jffs2/gc.c @@ -221,7 +221,13 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) jeb = jffs2_find_gc_block(c); if (!jeb) { - D1 (printk(KERN_NOTICE "jffs2: Couldn't find erase block to ...
aaad2b0c757f3e6e02552cb0bdcd91a5ec0d6305
Analyze and fix the following issue in the Linux kernel code: HID: fix report descriptor handling for MS Wireless model 1028
Problem Details: Fix a typo in report descriptor fixup, which results in improper substitution and leaving old value in place. Reported-by: Juha Motorsportcom <juha_motorsportcom@luukku.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 28ddc3fdd3d1..8d2bc93f8161 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -1113,7 +1113,7 @@ static void usbhid_fixup_microsoft_descriptor(unsigned char *rdesc, int rsize) && rdesc[55...
e2bc322bf05936ec7160d62bc3fd45cbf4aa405a
Analyze and fix the following issue in the Linux kernel code: [JFFS2] Add erase_checking_list to hold blocks being marked.
Problem Details: Just to keep the debug code happy when it's adding all the blocks up. Otherwise, they disappear for a while while the locks are dropped to check them and write the cleanmarker. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c index 722a6b682951..d58f845ccb85 100644 --- a/fs/jffs2/build.c +++ b/fs/jffs2/build.c @@ -345,6 +345,7 @@ int jffs2_do_mount_fs(struct jffs2_sb_info *c) INIT_LIST_HEAD(&c->dirty_list); INIT_LIST_HEAD(&c->erasable_list); INIT_LIST_HEAD(&c->erasing_list); + I...
d7d313000ba2fc94a5383511a17ff38a39bab928
Analyze and fix the following issue in the Linux kernel code: iwlwifi: Fix built-in compilation of iwlcore
Problem Details: This patch fixes problem in Makefile that prevented built-in compilation of iwlcore Commit that caused this problem: eadd3c4b ("iwlwifi: make Makefile more concise") Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Yi Zhu <yi.zhu@intel.com> Signed-off-by: David S. Miller <davem@d...
```diff diff --git a/drivers/net/wireless/iwlwifi/Makefile b/drivers/net/wireless/iwlwifi/Makefile index 4f3e88b12e3a..ec6187b75c3b 100644 --- a/drivers/net/wireless/iwlwifi/Makefile +++ b/drivers/net/wireless/iwlwifi/Makefile @@ -1,4 +1,4 @@ -obj-$(CONFIG_IWLCORE) := iwlcore.o +obj-$(CONFIG_IWLCORE) += iwlcore.o iwlc...
cca97b81564c5edbc8700ebb64fc2b4e13dfa51f
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for some local named nodes not marked temporary and to disallow duplicates
Problem Details: Fixed a problem with the CreateField, CreateXXXField (Bit, Byte, Word, Dword, Qword), Field, BankField, and IndexField operators when invoked from inside an executing control method. In this case, these operators created namespace nodes that were incorrectly left marked as permanent nodes instead of te...
```diff diff --git a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c index e87f6bfbfa5c..0befcff19f5a 100644 --- a/drivers/acpi/dispatcher/dsfield.c +++ b/drivers/acpi/dispatcher/dsfield.c @@ -89,12 +89,16 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op, ACPI_FUNCTION_TRACE(ds_creat...
514d18d79b1da052ed4553ceec1f7e1197a5bb51
Analyze and fix the following issue in the Linux kernel code: ACPICA: Update for new Notify values
Problem Details: Implemented several changes for Notify handling: Added support for new Notify values (ACPI 2.0+) and improved the Notify debug output. Notify on PowerResource objects is no longer allowed, as per the ACPI specification. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Bob Moore <robert.mo...
```diff diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c index 4e7a13afe80c..16cf2700c16f 100644 --- a/drivers/acpi/events/evmisc.c +++ b/drivers/acpi/events/evmisc.c @@ -49,22 +49,7 @@ #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME("evmisc") -/* Names for Notify() values, used for...
1a3a4c7130d6f39b56efc259d653f6dec4990ea3
Analyze and fix the following issue in the Linux kernel code: Blackfin Serial Driver: Fix bug - kernel hangs when accessing uart 0 on bf537 when booting u-boot and linux on uart 1
Problem Details: Wait only when this UART is enabled. http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3995 Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
```diff diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index b773764ddab9..1dc9b583fa62 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c @@ -806,10 +806,6 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_...
934b7024f0ed29003c95cef447d92737ab86dc4f
Analyze and fix the following issue in the Linux kernel code: Fix cardbus resource allocation
Problem Details: Commit 884525655d07fdee9245716b998ecdc45cdd8007 ("PCI: clean up resource alignment management") didn't set the alignment information for the cardbus window resources, causing their subsequent allocations to fail miserably with a message like yenta_cardbus 0000:15:00.0: device not available because o...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index f9b7bdd27829..8ddb918f5f57 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -416,13 +416,13 @@ static void pci_bus_size_cardbus(struct pci_bus *bus) * Reserve some resources for CardBus. We reserve * a fixed amount ...
fe224668dff97dd8899bd559d1608cc9285db67b
Analyze and fix the following issue in the Linux kernel code: [MTD] [NOR] Fix Intel CFI driver for collie flash
Problem Details: collie seems to contain LH28F640BF flash chips. According to http://sharp-world.com/products/device/flash/pdf/*FUM00701*@E.pdf (page 83) if they have 0x51 of Extended Query Table (number of hardware partitions) set to zero, they have a single fixed partition. This patch makes those chips work. Signed-...
```diff diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index eb0e30824ddb..e812df607a5c 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -619,6 +619,9 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd, sizeof(struc...
85a62db6245a82f07a31b387915ee2180b9ea11a
Analyze and fix the following issue in the Linux kernel code: [JFFS2] Add paranoia debugging for superblock counts
Problem Details: The problem fixed in commit 014b164e1392a166fe96e003d2f0e7ad2e2a0bb7 (space leak with in-band cleanmarkers) would have been caught a lot quicker if our paranoid debugging mode had included adding up the size counts from all the eraseblocks and comparing the totals with the counts in the superblock. Add...
```diff diff --git a/fs/jffs2/debug.c b/fs/jffs2/debug.c index 660793107e92..590bdd6e0147 100644 --- a/fs/jffs2/debug.c +++ b/fs/jffs2/debug.c @@ -153,6 +153,135 @@ __jffs2_dbg_prewrite_paranoia_check(struct jffs2_sb_info *c, kfree(buf); } +void __jffs2_dbg_superblock_counts(struct jffs2_sb_info *c) +{ + struct jf...
9b4f526cdc0f95f635607dfba6ac788b3deca188
Analyze and fix the following issue in the Linux kernel code: [PATCH] proc_readfd_common() race fix
Problem Details: Since we drop the rcu_read_lock inside the loop, we can't assume that files->fdt will remain unchanged (and not freed) between iterations. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index 81d7d145292a..7313c62e3e9d 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1626,7 +1626,6 @@ static int proc_readfd_common(struct file * filp, void * dirent, unsigned int fd, ino; int retval; struct files_struct * files; - struct fdtable *fdt; re...
ed1524371716466e9c762808b02601d0d0276a92
Analyze and fix the following issue in the Linux kernel code: [PATCH] double-free of inode on alloc_file() failure exit in create_write_pipe()
Problem Details: Duh... Fortunately, the bug is quite recent (post-2.6.25) and, embarrassingly, mine ;-/ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/pipe.c b/fs/pipe.c index 8be381bbcb54..f73492b6817e 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -988,7 +988,10 @@ struct file *create_write_pipe(void) return f; err_dentry: + free_pipe_info(inode); dput(dentry); + return ERR_PTR(err); + err_inode: free_pipe_info(inode); iput(inode); ...
66d3ca9ea28e1b3d591083772fd797b9b46410b8
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fixes for size of StartDependent resource descriptor
Problem Details: Fixed a couple of size calculation issues with the variable-length Start Dependent resource descriptor. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c index db0a835e3317..d801823de016 100644 --- a/drivers/acpi/resources/rscalc.c +++ b/drivers/acpi/resources/rscalc.c @@ -213,11 +213,22 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) switch (res...
d8846574ed4a81be319bf68728f9cca9af595afd
Analyze and fix the following issue in the Linux kernel code: ACPICA: Updates for Debug object output
Problem Details: Implemented several improvements for the output of the ASL "Debug" object to clarify and keep all data for a given object on one output line. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c index 36c0fccb137a..dbc5e18ee150 100644 --- a/drivers/acpi/executer/exstore.c +++ b/drivers/acpi/executer/exstore.c @@ -84,8 +84,12 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc, ACPI_FUNCTION_TRACE_PTR(ex_do_...
cd0b2248241f4146152fb04a6bf4bccb6ce0478a
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fixes for external Reference Objects
Problem Details: All Reference Objects returned via the AcpiEvaluteObject interface are now marked as type "REFERENCE" instead of "ANY". The type ANY is now reservered for NULL objects - either NULL package elements or unresolved named references. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey...
```diff diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index e6ce262b5d44..464ee6ea8c61 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -677,9 +677,8 @@ acpi_bus_extract_wakeup_device_power_package(struct acpi_device *device, device->wakeup.resources.count = package->package.count - 2; for (i ...
014b164e1392a166fe96e003d2f0e7ad2e2a0bb7
Analyze and fix the following issue in the Linux kernel code: [JFFS2] Fix free space leak with in-band cleanmarkers
Problem Details: We were accounting for the cleanmarker by calling jffs2_link_node_ref() (without locking!), which adjusted both superblock and per-eraseblock accounting, subtracting the size of the cleanmarker from {jeb,c}->free_size and adding it to {jeb,c}->used_size. But only _then_ were we adding the size of the ...
```diff diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c index 96d9ad56e573..bdc6a7bec802 100644 --- a/fs/jffs2/erase.c +++ b/fs/jffs2/erase.c @@ -419,9 +419,6 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb if (jffs2_write_nand_cleanmarker(c, jeb)) goto filebad; } - - /...
73486722b70a83bba17be722677519b0855abedf
Analyze and fix the following issue in the Linux kernel code: kernel-doc: fix sched.c missing parameter
Problem Details: Add missing kernel-doc in kernel/sched.c: Warning(linux-2.6.25-git3//kernel/sched.c:7044): No description found for parameter 'span' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 57ba7ea9b744..0014b03adaca 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -7035,6 +7035,7 @@ static int find_next_best_node(int node, nodemask_t *used_nodes) /** * sched_domain_node_span - get a cpumask for a node's sched_domain * @node: node whose cp...
26defe34e48e18b058b773f60467729c64917490
Analyze and fix the following issue in the Linux kernel code: fix brd allocation flags
Problem Details: While looking at the implementation of the Ram backed block device driver, I stumbled across a write-only local variable, which makes little sense, so I assume it should actually work like this: Signed-off-by: Petr Tesarik <ptesarik@suse.cz> Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: ...
```diff diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 85364804364f..7bd76639544c 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c @@ -108,7 +108,7 @@ static struct page *brd_insert_page(struct brd_device *brd, sector_t sector) #ifndef CONFIG_BLK_DEV_XIP gfp_flags |= __GFP_HIGHMEM; #endif - ...
0916083210039bf3d186a87522cc806dc21b7097
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] S3C2410 Fix previous nFCE suspend save patch
Problem Details: Commit 03680b1e00d146df718c8a4eac34438566b70c85 incorrectly was assuming S3C2410_NFCONF was being used to select the NAND chip. Fix this error by ising the sel_reg. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index f3fa1be22ddf..8557c68dbb42 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -119,8 +119,7 @@ struct s3c2410_nand_info { void __iomem *sel_reg; int sel_bit; int mtd_count; - - unsigned long save_...
f1ebe4eba40e0ee862767893277d1b1a1e4cc85f
Analyze and fix the following issue in the Linux kernel code: [MTD] [MAPS] omap_nor section fixes
Problem Details: Minor tweaks to omap_nor ... as with most platform drivers, its probe and remove logic can (and should!) safely vanish in most configs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c index 676248ff4a75..240b0e2d095d 100644 --- a/drivers/mtd/maps/omap_nor.c +++ b/drivers/mtd/maps/omap_nor.c @@ -70,7 +70,7 @@ static void omap_set_vpp(struct map_info *map, int enable) } } -static int __devinit omapflash_probe(struct pl...
70b072550a59e787b46030ab104ac64e25fcc732
Analyze and fix the following issue in the Linux kernel code: [MTD] [NOR] Fixup for incorrect CFI data in Spansion S29GL064/32N flash chips
Problem Details: This is a known erratum confirmed by Spansion. I have an errata document, but I can't find a link to it anywhere on their site to include here. Some of the S29GL064N chips report 64 sectors when they should report 128, and some of S29GL032N chips report 127 sectors when they should report 63. Note t...
```diff diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 5cd657322bc4..f7fcc6389533 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -220,6 +220,28 @@ static void fixup_use_atmel_lock(struct mtd_info *mtd, void *param) mtd->flags...
add8eda7f2be781af0224241e870715cf0cfd75a
Analyze and fix the following issue in the Linux kernel code: i2c: Fix platform driver hotplug/coldplug
Problem Details: Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable I2C platform drivers, to allow module auto loading. [ db: add some more drivers ] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David Brownell ...
```diff diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index c09b036913bd..73d61946a534 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c @@ -298,7 +298,7 @@ static int at91_i2c_resume(struct platform_device *pdev) #endif /* work with "modprobe at91_i2c" from...
dec1a998bdafb4e4a18c1259bf01ffe85db368c2
Analyze and fix the following issue in the Linux kernel code: i2c/scx200_acb: Don't use 0 as NULL pointer
Problem Details: Don't use 0 as NULL pointer. Spotted by sparse. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index f5e7a70da831..61abe0f33255 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c @@ -527,7 +527,7 @@ static int __init scx200_create_isa(const char *text, unsigned long base, if (iface == NULL) ...
afc13b765ea71d316ce4974d3dc5a96cc73a0e95
Analyze and fix the following issue in the Linux kernel code: i2c-bfin-twi: Fix mismatch in add timer and delete timer
Problem Details: Move init_completion to just before i2c transfer. http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3385 Signed-off-by: Hans Schillstrom <hans.schillstrom@shlsys.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney...
```diff diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 4ea31c018ef6..0cd4d36240db 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -308,6 +308,7 @@ static int bfin_twi_master_xfer(struct i2c_adapter *adap, iface->writeNum = iface->read...
93c20a59af4624aedf53f8320606b355aa951bc1
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_transport_sas: fix the lifetime of sas bsg objects
Problem Details: scsi_transport_sas calls blk_cleanup_queue too early for bsg queues. If a user holds a sas_host, end_device, or expander device open, remove the device, then send a request to it, we get a kernel crash. We need to call blk_cleanup_queue in the release callback as we do with scsi devices. This patch mo...
```diff diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 94ff29f7c34b..7899e3dda9bf 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -192,6 +192,16 @@ static void sas_non_host_smp_request(struct request_queue *q) sas_smp_request(q, rphy_...
97f46ae45c70857e459b7f8df1fc2807e7bd90a9
Analyze and fix the following issue in the Linux kernel code: [SCSI] bsg: add release callback support
Problem Details: This patch adds release callback support, which is called when a bsg device goes away. bsg_register_queue() takes a pointer to a callback function. This feature is useful for stuff like sas_host that can't use the release callback in struct device. If a caller doesn't need bsg's release callback, it c...
```diff diff --git a/block/bsg.c b/block/bsg.c index f51172ed27c2..23ea4fd1a66d 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -699,14 +699,26 @@ static struct bsg_device *bsg_alloc_device(void) return bd; } +static void bsg_kref_release_function(struct kref *kref) +{ + struct bsg_class_device *bcd = + container_o...
352f6bb422bd31a80b4a0f1c3f19b6993df2508c
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_transport_spi: fix the attribute settings
Problem Details: We now take advantage of the mode_t return of is_valid, and also update the attributes when the target is configured. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index bc12b5d5d676..3a26f7489b48 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c @@ -1374,11 +1374,11 @@ static int spi_host_configure(struct transport_container *tc, * overloads the retur...
0f4238958d28044b335644b69df6071cdb04b5ce
Analyze and fix the following issue in the Linux kernel code: [SCSI] sysfs: make group is_valid return a mode_t
Problem Details: We have a problem in scsi_transport_spi in that we need to customise not only the visibility of the attributes, but also their mode. Fix this by making the is_visible() callback return a mode, with 0 indicating is not visible. Also add a sysfs_update_group() API to allow us to change either the visib...
```diff diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index ade9a7e6a757..dbdfabbfd609 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -477,11 +477,10 @@ const struct file_operations sysfs_file_operations = { .poll = sysfs_poll, }; - -int sysfs_add_file(struct sysfs_dirent *dir_sd, const struct attribute *...
cb6b7f40630f94126233194847a86bf5501fb63c
Analyze and fix the following issue in the Linux kernel code: [SCSI] ses: fix up functionality after class_device->device conversion
Problem Details: ses uses an unusual two level class hierarchy which broke in this conversion. Fix it up still with a two level hierarchy, but this time let the ses device manage the links to and from the real device in the enclosure. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c index fafb57fed761..0736cff9d97a 100644 --- a/drivers/misc/enclosure.c +++ b/drivers/misc/enclosure.c @@ -31,7 +31,6 @@ static LIST_HEAD(container_list); static DEFINE_MUTEX(container_list_lock); static struct class enclosure_class; -static str...
7d15d6a4dc08dfd456d834e33ef6c1d798fb2edc
Analyze and fix the following issue in the Linux kernel code: [SCSI] st: fix up after class_device removal
Problem Details: There's a change in the SCSI tree that adds another class_device, so change it to an ordinary device [jejb: this one got rebased until it's basically cosmetic only] Cc: Kai Makisara <Kai.Makisara@kolumbus.fi> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index a860c3a9ae99..e8db66ad0bde 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -4322,7 +4322,7 @@ static void do_remove_sysfs_files(void) static ssize_t st_defined_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct st_m...
1938de46cb7e108120ffbf5155678a2a5e05b377
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] corrected MPC8313 NAND fixes
Problem Details: Fix a race condition in fsl_elbc_run_command Fix incorrect usage of clearbits32 that bashed option register Remove work around for bashed register Signed-off-by: Mike Hench <mhench@elutions.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index cb12b67ce5ef..919c192b8f27 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -184,11 +184,11 @@ static int fsl_elbc_run_command(struct mtd_info *mtd) in_be32(&lbc->fbar), in_be...
9ebed3e60f9991e980e6c38b0edbdf9c8ff2ff6d
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] fsl_elbc_nand: fix mtd name
Problem Details: Currently fsl_elbc_nand doesn't initialize mtd->name, and this causes nand_get_flash_type() to assign name that is equal to chip type, like this: root@b1:~# cat /proc/mtd dev: size erasesize name mtd0: 00800000 00010000 "fe000000.flash" mtd1: 02000000 00004000 "NAND 32MiB 3,3V 8-bit"...
```diff diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index b9f9f22cd860..cb12b67ce5ef 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -780,6 +780,8 @@ static int fsl_elbc_chip_remove(struct fsl_elbc_mtd *priv) nand_release(&priv->mtd); + ...
a1c06ee11f0b83e372c958b165338f579d17e3d4
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] Fix checkpatch errors in pxa3xx_nand
Problem Details: Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 138e219c2304..fceb468ccdec 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -18,8 +18,8 @@ #include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> -#include <...
7a5bb9964512c5313af19310c6a3002ec54f7336
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix to handle NULL package elements correctly
Problem Details: Fixed problem where NULL package elements were not returned to the AcpiEvaluateObject interface correctly. Instead of returning a NULL ACPI_OBJECT package element, the element was simply ignored, potentially causing a buffer overflow and/or confusing the caller who expected a fixed number of elements. ...
```diff diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index 1eccd3db876f..cdb8ff5b92d1 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c @@ -470,9 +470,8 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, case ACPI_TY...
0ba7d25c70699cdd3e06fc049d8884ee54b9d5db
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for extraneous debug message for packages
Problem Details: Fixed a problem where an extraneous debug message was produced for package objects (when debugging enabled). The message "Package List length larger than NumElements count" is now produced in the correct case, and is also an error message rather than a debug message. Added a debug message for the oppos...
```diff diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c index 58d4d91c8e97..7562823b3b76 100644 --- a/drivers/acpi/dispatcher/dsobject.c +++ b/drivers/acpi/dispatcher/dsobject.c @@ -373,7 +373,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state, union acpi_p...
24a3157a90ddf851a0880c0b8963bc43481cd85b
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for possible error when packages/buffers are passed to methods externally
Problem Details: Fixed a problem where buffer and package objects passed as arguments to a control method via the external AcpiEvaluateObject interface could cause an AE_AML_INTERNAL exception depending on the order and type of operators executed by the target control method. Signed-off-by: Bob Moore <robert.moore@int...
```diff diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index 4c4021d82f99..4e9a62b34aef 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c @@ -511,6 +511,10 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, external_object->buf...
a3df4dadd446c0d7195f2bbe86dd5174426d8090
Analyze and fix the following issue in the Linux kernel code: ACPICA: Update behavior of CopyObject to match ACPI spec
Problem Details: Fixed a problem where a CopyObject to RegionField, BankField, and IndexField objects did not perform an implicit conversion as it should. These types must retain their initial type permanently as per the ACPI specification. However, a CopyObject to all other object types should not perform an implicit ...
```diff diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c index 725614e277f8..36c0fccb137a 100644 --- a/drivers/acpi/executer/exstore.c +++ b/drivers/acpi/executer/exstore.c @@ -603,10 +603,17 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc, /* If no implicit conv...
1d5b285da1893b90507b081664ac27f1a8a3dc5b
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for resource descriptor optimization issues for _CRS/_SRC
Problem Details: Fixed a problem where resource descriptor size optimization could cause a problem when a _CRS resource template is passed to a _SRS method. The _SRS resource template must use the same descriptors (with the same size) as returned from _CRS. This change affects the following resource descriptors: IRQ/IR...
```diff diff --git a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c index dcc51e92ac92..db0a835e3317 100644 --- a/drivers/acpi/resources/rscalc.c +++ b/drivers/acpi/resources/rscalc.c @@ -211,6 +211,13 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) * variable-...
7823665eccdc7e230d0a904c6ec01d5c70ee099b
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for ACPI_HIDWORD macro
Problem Details: Fixed a regression introduced in version 20071114. The ACPI_HIDWORD macro was inadvertently changed to return a 16-bit value instead of a 32-bit value, truncating the upper Dword of a 64-bit value. This macro is only used to display debug output, so no incorrect calculations were made. Signed-off-by: ...
```diff diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index dc6a037311db..1f0fdbf6e09f 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h @@ -61,30 +61,6 @@ #define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) -/* - * Full 64-bit integer must be available on both 32...
bc7a36ab74e09da7bb63e2477b0740ac992b290e
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fixes for Unload and DDBHandles
Problem Details: Implemented support for the use of DDBHandles as an Indexed Reference, as per the ACPI spec. http://www.acpica.org/bugzilla/show_bug.cgi?id=486. Implemented support for UserTerm (Method invocation) for the Unload operator as per the ACPI spec. http://www.acpica.org/bugzilla/show_bug.cgi?id=580 Sign...
```diff diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index 251d84ba79b3..ed560e656f9a 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c @@ -895,14 +895,25 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) } else if (obj_desc->...
47c08729bf1c60d522d020a7f8bc15d1c70e6ecb
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for LoadTable operator, input strings
Problem Details: Fixed a problem with the LoadTable operator where the OemId and OemTableId input strings could cause unexpected failures if they were shorter than the maximum lengths allowed. http://www.acpica.org/bugzilla/show_bug.cgi?id=576 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <r...
```diff diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 52b1e95837fa..ed92fb5a1d2b 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c @@ -236,7 +236,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, status = acpi_get_table_by_index(...
200cce6a75061a3bf8d2e6b27c5cdcc7730893f1
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for Load operator
Problem Details: Fixed a problem with the Load operator where an exception was not returned in the case where the table is already loaded. http://www.acpica.org/bugzilla/show_bug.cgi?id=463 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovs...
```diff diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index 6a6ee1f06c76..c4a9abb072c0 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c @@ -169,6 +169,7 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, acpi_tb_delete_table(table_desc); *tabl...
9accd46459b8c068540451fdab07dbfcefaf7280
Analyze and fix the following issue in the Linux kernel code: ACPICA: Methods now implicitly return 0 in slack mode
Problem Details: Implemented an enhancement to the interpreter "slack mode". In the absence of an explicit return or an implicitly returned object from the last executed opcode, a control method will now implicitly return an integer of value 0 for Microsoft compatibility. http://www.acpica.org/bugzilla/show_bug.cgi?id...
```diff diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index a8995ca52ee7..a4c4020c40e9 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c @@ -594,6 +594,30 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) * The object is deleted */...
8246934b7cf99d1f0c053d57890775e5d0df9c33
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for SizeOf when used with Buffers and Packages
Problem Details: Fixed a problem with the SizeOf operator when used with Package and Buffer objects. These objects have deferred execution for some arguments, and the execution is now completed before the SizeOf is executed. This problem caused unexpected AE_PACKAGE_LIMIT errors on some systems. http://bugzilla.kernel...
```diff diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index ab5c03724527..313803b53125 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c @@ -740,26 +740,38 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) value = acpi_gb...
ef805d956320ffa36d068673d5c5eb2a7d13209b
Analyze and fix the following issue in the Linux kernel code: ACPICA: Implemented full argument resolution support for the BankValue argument to BankField
Problem Details: Previously, only constants were supported, now any TermArg may be used. http://www.acpica.org/bugzilla/show_bug.cgi?id=387 http://www.acpica.org/bugzilla/show_bug.cgi?id=393 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikov...
```diff diff --git a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c index f049639bac35..e87f6bfbfa5c 100644 --- a/drivers/acpi/dispatcher/dsfield.c +++ b/drivers/acpi/dispatcher/dsfield.c @@ -281,11 +281,17 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, arg->common.node = in...
941f48bb465b0b291f8435b1e3de95b0975b84bc
Analyze and fix the following issue in the Linux kernel code: ACPICA: Implemented full support for deferred execution for the TermArg string arguments for DataTableRegion
Problem Details: This enables forward references and full operand resolution for the three string arguments. Similar to OperationRegion deferred argument execution.) http://www.acpica.org/bugzilla/show_bug.cgi?id=430 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Sign...
```diff diff --git a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c index f0847eed5f3a..a3f29798d1d1 100644 --- a/drivers/acpi/dispatcher/dsopcode.c +++ b/drivers/acpi/dispatcher/dsopcode.c @@ -49,6 +49,7 @@ #include <acpi/acinterp.h> #include <acpi/acnamesp.h> #include <acpi/acevents.h> +#i...
1cb2ef6606e0abd8565f66b5f95267de1b390694
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fixed a problem with CopyObject used in conjunction with the Index operator
Problem Details: The reference was incorrectly dereferenced before the copy. The reference is now correctly copied. http://bugzilla.kernel.org/show_bug.cgi?id=5391 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de...
```diff diff --git a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c index 79a0d281f96b..42c8a0f8894c 100644 --- a/drivers/acpi/executer/exresnte.c +++ b/drivers/acpi/executer/exresnte.c @@ -239,13 +239,12 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, case ACPI_TYPE_LOC...
e5bcc811f78f294e7be8a0721b3fb513028c5af4
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fixed a problem with Index references passed as method arguments
Problem Details: References passed as arguments to control methods were dereferenced immediately (before control was passed to the called method). The references are now correctly passed directly to the called method. http://bugzilla.kernel.org/show_bug.cgi?id=5389 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signe...
```diff diff --git a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c index 74ab220a5924..795ec8c7363c 100644 --- a/drivers/acpi/executer/exresolv.c +++ b/drivers/acpi/executer/exresolv.c @@ -194,6 +194,12 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, case ACPI_TYPE_...
1f549a240ccb2755066587e1e6ef9f74f485a46a
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fixed a problem with FromBCD and ToBCD with some compilers
Problem Details: On some compilers, the ShortDivide function worked incorrectly, causing problems with the BCD functions with large input values. (Truncation from 64-bit to 32-bit occurred.) Internal http://www.acpica.org/bugzilla/show_bug.cgi?id=435 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Ale...
```diff diff --git a/drivers/acpi/utilities/utmath.c b/drivers/acpi/utilities/utmath.c index 0c56a0d20b29..16dbf665927b 100644 --- a/drivers/acpi/utilities/utmath.c +++ b/drivers/acpi/utilities/utmath.c @@ -276,7 +276,7 @@ acpi_ut_short_divide(acpi_integer in_dividend, *out_quotient = in_dividend / divisor; } if...
b160987df7f49ee9c048a43b70ebae613a7e1437
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fixes a problem with control method references within packages
Problem Details: Completes the package changes started with version 20071019. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c index 514b9d2eb3a7..6af4671e51a1 100644 --- a/drivers/acpi/dispatcher/dswexec.c +++ b/drivers/acpi/dispatcher/dswexec.c @@ -493,7 +493,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) op->common.nod...
f2d69559b31c368cfe3a51607d9cd5e8c0168875
Analyze and fix the following issue in the Linux kernel code: ACPICA: Cleanup of debug output
Problem Details: Improved output of object dump routine. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index e48d91634295..251d84ba79b3 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c @@ -514,8 +514,14 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) case AML_REF_OF_OP: ...
b7f9f04228eae2cf5adc2ffeb494d4970a8dd8a5
Analyze and fix the following issue in the Linux kernel code: ACPICA: Cosmetic changes only, no functional changes
Problem Details: Lint changes, fix compiler warnings, etc. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index 3db651c7f582..7a99740248c7 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c @@ -42,7 +42,6 @@ */ #include <acpi/acpi.h> -#include <acpi/acparser.h> #include <acpi/amlcode.h> ...
1d18c05825c3f2b8933a7fc7f7528881e98deb04
Analyze and fix the following issue in the Linux kernel code: ACPICA: Cosmetic changes only, no functional changes
Problem Details: Lint changes, fix compiler warnings, etc. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c index d075062f5b89..4e7a13afe80c 100644 --- a/drivers/acpi/events/evmisc.c +++ b/drivers/acpi/events/evmisc.c @@ -349,9 +349,10 @@ acpi_status acpi_ev_init_global_lock_handler(void) ACPI_FUNCTION_TRACE(ev_init_global_lock_handler); -...
49718b1741cb74d86eb8b1bd8f52ad6a013b40df
Analyze and fix the following issue in the Linux kernel code: ACPICA: Added additional parameter validation for LoadTable
Problem Details: Implemented additional parameter validation for the LoadTable operator. The length of the input strings SignatureString, OemIdString, and OemTableId are now checked for maximum lengths. http://www.acpica.org/bugzilla/show_bug.cgi?id=582 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bo...
```diff diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index b9543a7f5d21..3370aad3ee14 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c @@ -138,6 +138,14 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, ACPI_FUNCTION_TRACE(ex_load_ta...
fe4078af56a7b7f37391712cf188df3202b03776
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for Increment/Decrement operator, incorrect type change
Problem Details: Fixed a problem with the Increment and Decrement operators where the type of the target object could be unexpectedly and incorrectly changed. http://www.acpica.org/bugzilla/show_bug.cgi?id=353 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-...
```diff diff --git a/include/acpi/acopcode.h b/include/acpi/acopcode.h index e6f76a280a94..ab5434945807 100644 --- a/include/acpi/acopcode.h +++ b/include/acpi/acopcode.h @@ -233,7 +233,7 @@ #define ARGI_CREATE_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) #define ARGI_DATA_REGI...
9e41d93c975d403380b7debe05517d630c8e2836
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fixed a memory leak when Device or Thermal objects referenced in packages
Problem Details: Problem introduced in fix for Package references. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c index fe28b9aeb65c..7556d919bf8b 100644 --- a/drivers/acpi/dispatcher/dsobject.c +++ b/drivers/acpi/dispatcher/dsobject.c @@ -172,7 +172,19 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, switch (op->co...
7f4ac9f91383a0707de559dc8fbca986fc2d302f
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for Load/LoadTable to specify load location
Problem Details: Fixed a problem with the Load and LoadTable operators where the table location within the namespace was ignored. Instead, the table was always loaded into the root or current scope. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-...
```diff diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index dbf1e6f33bba..b9543a7f5d21 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c @@ -368,7 +368,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, } status = - acpi_ex_add_table...
98af37fba9b3e601ca4bded51ef51a2be4e8c97b
Analyze and fix the following issue in the Linux kernel code: ACPICA: Add a table checksum verify for Load operator
Problem Details: Added a table checksum verification for the Load operator, in the case where the load is from a buffer. http://www.acpica.org/bugzilla/show_bug.cgi?id=578 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@i...
```diff diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index a0f34b467a22..dbf1e6f33bba 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c @@ -275,6 +275,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, struct acpi_table_desc table_desc; a...
a13b8460c5b43a68192b599ce437168cc2ff04de
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for memory leak related to DdbHandle objects
Problem Details: Fixed a memory leak where DdbHandle objects were not deleted automatically at control method exit. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 8cc410ce9208..a0f34b467a22 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c @@ -366,6 +366,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, /* table_ptr was deallocated above ...
61ce421bb761f607b802c268bd8bd6a0c928a661
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix a fault when storing DdbHandle to Debug object
Problem Details: Fixed a problem with the Debug object where a store of a DdbHandle reference object to the Debug object could cause a fault. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c index f88b18163206..912889ed45ed 100644 --- a/drivers/acpi/executer/exstore.c +++ b/drivers/acpi/executer/exstore.c @@ -123,6 +123,8 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc, return_VOID; } + /* source...
5eb691805f7ec5960fe9d5d7fc57a7fc3097bbd0
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for fault if Load() fails
Problem Details: Fixed a problem with the Load operator when loading a table from a buffer object. The input buffer was prematurely zeroed and/or deleted. http://www.acpica.org/bugzilla/show_bug.cgi?id=577 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Sig...
```diff diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 009aef5fcbfc..8cc410ce9208 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c @@ -285,16 +285,16 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, switch (ACPI_GET_OBJECT_TYPE(obj_des...
53cf174409a24e8388e1d554d27436275fc81fe7
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for Alias operator to see target child objects
Problem Details: Fixed a problem with the Alias operator when the target of the alias is a named ASL operator that opens a new scope -- Scope, Device, PowerResource, Processor, and ThermalZone. In these cases, any children of the original operator could not be accessed via the alias, potentially causing unexpected AE_N...
```diff diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c index 6e9a23e47fef..b3914395851b 100644 --- a/drivers/acpi/executer/excreate.c +++ b/drivers/acpi/executer/excreate.c @@ -96,16 +96,28 @@ acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state) * to the original Nod...
14808822a9cea782c2e6f8d39e438cc3891f6472
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for namespace lookup problem
Problem Details: Fixed a problem where objects of certain types (Device, ThermalZone, Processor, PowerResource) can be not found if they are declared and referenced from within the same control method http://www.acpica.org/bugzilla/show_bug.cgi?id=341. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob...
```diff diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c index c2b9835c890b..442880f5600e 100644 --- a/drivers/acpi/parser/psargs.c +++ b/drivers/acpi/parser/psargs.c @@ -230,12 +230,11 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, struct acpi_parse_state *parser_state, ...
e5567afa5cfa19e45f93c9c8796e46187a2d12f4
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for update of the Global Lock Handle
Problem Details: Fixed a problem where the global lock handle was not properly updated if a thread that acquired the global lock via executing AML code then attempted to acquire the lock via the AcpiAcquireGlobalLock interface. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astar...
```diff diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c index 2d34663dc1ed..d075062f5b89 100644 --- a/drivers/acpi/events/evmisc.c +++ b/drivers/acpi/events/evmisc.c @@ -460,6 +460,19 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout) acpi_ev_global_lock_thread_id = acpi_os_get_thread_id...
91d02132fea3a60d3db7bd72933e38e36cd9e4c7
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for package reference counts
Problem Details: Prevents infinite loop of 'Large Reference Count' messages in aslts-bdemo-b286 test. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c index 954ac8ce958a..fe28b9aeb65c 100644 --- a/drivers/acpi/dispatcher/dsobject.c +++ b/drivers/acpi/dispatcher/dsobject.c @@ -370,6 +370,8 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state, union acpi_o...
f02e9fa1ceee045f7d5c53d475032815752a2510
Analyze and fix the following issue in the Linux kernel code: ACPICA: Misc fixes for recent global lock code update
Problem Details: Fixes as a result of running full validation test suite. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c index dbf34a5fc1e0..e210aa2d76da 100644 --- a/drivers/acpi/events/evxface.c +++ b/drivers/acpi/events/evxface.c @@ -816,7 +816,7 @@ acpi_status acpi_release_global_lock(u32 handle) { acpi_status status; - if (handle != acpi_gbl_glob...
8e2537e4cb4e80b7032372a42069899b90a06e90
Analyze and fix the following issue in the Linux kernel code: [MTD] fix minor typo in the MTD map driver for SHARP SL series
Problem Details: Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/maps/sharpsl-flash.c b/drivers/mtd/maps/sharpsl-flash.c index 12fe53c0d2fc..917dc778f24e 100644 --- a/drivers/mtd/maps/sharpsl-flash.c +++ b/drivers/mtd/maps/sharpsl-flash.c @@ -92,7 +92,7 @@ int __init init_sharpsl(void) parts = sharpsl_partitions; nb_parts = ARRAY_SIZE(sharpsl_par...
9010eff0eadfe4eb60c3f0c71573f0fc505c31e3
Analyze and fix the following issue in the Linux kernel code: [IA64] minor irq handler cleanups
Problem Details: - remove unused 'irq' argument from pfm_do_interrupt_handler() - remove pointless cast to void* - add KERN_xxx prefix to printk() - remove braces around singleton C statement - in tioce_provider.c, start tioce_dma_consistent() and tioce_error_intr_handler() function declarations in column 0 This...
```diff diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index d1d24f4598da..c8e403752a0c 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -5511,7 +5511,7 @@ stop_monitoring: } static int -pfm_do_interrupt_handler(int irq, void *arg, struct pt_regs *regs) +pfm_do_inter...
38477ad75188b2a7370fef7145f956e6c446928b
Analyze and fix the following issue in the Linux kernel code: [IA64] disable interrupts on exit of ia64_trace_syscall
Problem Details: While testing with CONFIG_VIRT_CPU_ACCOUNTING=y, I found that I occasionally get very huge system time in some threads. So I dug the issue and finally noticed that it was caused because of an interrupt which interrupt in the following window: > [arch/ia64/kernel/entry.S: (!CONFIG_PREEMPT && CONFIG_VI...
```diff diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index b0be4a280174..e49ad8c5dc69 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S @@ -570,6 +570,7 @@ GLOBAL_ENTRY(ia64_trace_syscall) br.call.sptk.many rp=syscall_trace_leave // give parent a chance to catch return value .r...
576506645df01f3c1a9c2c9064201aa0ba4cb0ea
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] fsl_elbc_nand: Fix SEQIN handling for large pages.
Problem Details: Previously, a READ command was erroneously issued rather than SEQIN. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 378b7aa63812..b9f9f22cd860 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -346,19 +346,20 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command, ctrl->column = ...
1ff184225b15930ea118ac2130f074c741d34f08
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] fix platform driver hotplug/coldplug
Problem Details: Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable MTD NAND platform drivers, to re-enable auto loading. NOTE: at91_nand for some reason disallows modular builds. I'm assuming that's just an oversight that will b...
```diff diff --git a/drivers/mtd/nand/at91_nand.c b/drivers/mtd/nand/at91_nand.c index c9fb2acf4056..7ea1a74a52b7 100644 --- a/drivers/mtd/nand/at91_nand.c +++ b/drivers/mtd/nand/at91_nand.c @@ -234,3 +234,4 @@ module_exit(at91_nand_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Rick Bronson"); MODULE_DESCRIPTION("NAN...
41d867c9ac852ce17069f8ae680f25877be97942
Analyze and fix the following issue in the Linux kernel code: [MTD] [MAPS] fix platform driver hotplug/coldplug
Problem Details: Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable MTD mapping platform drivers, to re-enable auto loading. NOTE oddness with physmap ... it's a legacy driver in some configs, which means it can't always support ...
```diff diff --git a/drivers/mtd/maps/bast-flash.c b/drivers/mtd/maps/bast-flash.c index 59fea2a89804..1f492062f8ca 100644 --- a/drivers/mtd/maps/bast-flash.c +++ b/drivers/mtd/maps/bast-flash.c @@ -223,3 +223,4 @@ module_exit(bast_flash_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); MO...
c27e9b80bee039cfefa51c7af08b01eaab3dfb61
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] fix possible Ooops in rfc_from4
Problem Details: I found this while I was looking how the rs_lib is working. The rs_decoder is initialized _after_ the nand core code read the BBT table and _after_ the partition table has been added. The driver has a private BBT description which is in located in flash data so we Ooops if there is a bit flip _or_ if...
```diff diff --git a/drivers/mtd/nand/rtc_from4.c b/drivers/mtd/nand/rtc_from4.c index 0f6ac250f434..26f88215bc47 100644 --- a/drivers/mtd/nand/rtc_from4.c +++ b/drivers/mtd/nand/rtc_from4.c @@ -478,6 +478,7 @@ static int __init rtc_from4_init(void) struct nand_chip *this; unsigned short bcr1, bcr2, wcr2; int i; ...
35d086b143e52f43a70c85ab86c054cbf1c4ff26
Analyze and fix the following issue in the Linux kernel code: [MTD] [JEDEC] Fix whitespace noise in chip table
Problem Details: Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c index 8a00de506664..880a2fd734ff 100644 --- a/drivers/mtd/chips/jedec_probe.c +++ b/drivers/mtd/chips/jedec_probe.c @@ -1115,7 +1115,7 @@ static const struct amd_flash_info jedec_table[] = { .regions = { ERASEINFO(0x10000,8), ...
0bc88c59cc2f031a38ad5902d5764497549217c5
Analyze and fix the following issue in the Linux kernel code: [MTD] block2mtd: logging typo fixes
Problem Details: Address a number of small issues mainly regarding the output made by this driver to dmesg: - Some of the blkmtd's had not been changed to block2mtd which caused display problem - the parse_err() macro was displaying "block2mtd: " twice Signed-off-by: Stéphane Chazelas <stephane.chazelas@emerson.co...
```diff diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index ad1880c67518..519d942e7940 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c @@ -305,7 +305,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size) } list_add(&dev->list,...
25dc30b4cd68df1de8932fe77ca574227d42a259
Analyze and fix the following issue in the Linux kernel code: [JFFS2] fix sparse warnings in gc.c
Problem Details: fs/jffs2/gc.c:1147:29: warning: symbol 'jeb' shadows an earlier one fs/jffs2/gc.c:1084:89: originally declared here fs/jffs2/gc.c:1197:29: warning: symbol 'jeb' shadows an earlier one fs/jffs2/gc.c:1084:89: originally declared here Rename the unused 'jeb' argument to avoid this. We could potentially r...
```diff diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c index 32ff0373aa04..59aeb9820435 100644 --- a/fs/jffs2/gc.c +++ b/fs/jffs2/gc.c @@ -1081,7 +1081,7 @@ static int jffs2_garbage_collect_hole(struct jffs2_sb_info *c, struct jffs2_eras return 0; } -static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, stru...
bf66737ca85c41442e99c9d380eb7807d88bac1f
Analyze and fix the following issue in the Linux kernel code: [JFFS2] fix sparse warning in write.c
Problem Details: fs/jffs2/write.c:585:28: warning: symbol 'fd' shadows an earlier one fs/jffs2/write.c:536:27: originally declared here No need to redeclare fd, use the original one, after this point, fd is always reassigned before it used again. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-b...
```diff diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c index 776f13cbf2b5..beade550909c 100644 --- a/fs/jffs2/write.c +++ b/fs/jffs2/write.c @@ -582,9 +582,9 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, jffs2_add_fd_to_list(c, fd, &dir_f->dents); up(&dir_f->sem); } else { - ...
8ca646abb4503f39a7d235b89b9f8015e3ab4631
Analyze and fix the following issue in the Linux kernel code: [JFFS2] Fix sparse warning in nodemgmt.c
Problem Details: fs/jffs2/nodemgmt.c:60:8: warning: symbol 'ret' shadows an earlier one fs/jffs2/nodemgmt.c:45:6: originally declared here (reported by Harvey Harrison) Just remove the offending declaration of 'int ret' and use the earlier one. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c index a0313fa8748e..a3e67a4ed675 100644 --- a/fs/jffs2/nodemgmt.c +++ b/fs/jffs2/nodemgmt.c @@ -57,7 +57,6 @@ int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, /* this needs a little more thought (true <tglx> :)) */ while(ret == -EAGAIN...
69626f23bce6521367ac1e6a2a6e8fba8f0a848a
Analyze and fix the following issue in the Linux kernel code: HID: fix race between open() and disconnect() in usbhid
Problem Details: There is a window: task A task B spin_lock_irq(&usbhid->inlock); /* Sync with error handler */ usb_set_intfdata(intf, NULL); spin_unlock_irq(&usbhid->inlock); usb_kill_urb(usbhid->urbin); usb_kill_urb(usbhid->urbout); usb_kill_urb(usbhid->urbctrl); del_timer_sync(&usbhid->io_retry); cancel_work_s...
```diff diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index f6a5d8930348..e0d805f1b2bf 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -82,6 +82,7 @@ static int hid_start_in(struct hid_device *hid) spin_lock_irqsave(&usbhid->inlock, flags); if (hid->o...
671d994cfbe10a9b2a474d26db2cef3c878846dc
Analyze and fix the following issue in the Linux kernel code: HID: fix misplaced rdesc quirk
Problem Details: This moves the misplaced rdesc quirk to the place where it belongs. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index e55b20b01993..6ad33fe2c165 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -1163,6 +1163,9 @@ static void __usbhid_fixup_report_descriptor(__u32 quirks, char *rdesc, unsigned if (quirks...
1b184cf37f5cf098f07725b483a2055e95725476
Analyze and fix the following issue in the Linux kernel code: HID: make function from dbg_hid
Problem Details: To check paramters even if debug is disabled, convert dbg_hid to inline function with __attribute__(format) checking. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/include/linux/hid.h b/include/linux/hid.h index 5bf6282f1635..69ba58434dcb 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -569,7 +569,11 @@ static inline int hid_ff_init(struct hid_device *hid) { return -1; } #define dbg_hid_line(format, arg...) if (hid_debug) \ printk(format, ...
282bfd4cbcc2bbeb1a2cad1f42debd378e0b5ac9
Analyze and fix the following issue in the Linux kernel code: HID: fix sparse warnings
Problem Details: Fix these sparse warnings: .../hid/hid-core.c:100:15: warning: incorrect type in assignment (different signedness) .../hid/hid-core.c:100:15: expected signed int [usertype] *value .../hid/hid-core.c:100:15: got unsigned int *<noident> by unsigned -> s32 .../hid/hid-input-quirks.c:336:10:...
```diff diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 538bf28e4dd5..d7b2f6868a6d 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -97,7 +97,7 @@ static struct hid_field *hid_register_field(struct hid_report *report, unsigned field->index = report->maxfield++; report->field[fi...
377e10fbb4ef219f540d06796e9fb0d3ec35a58f
Analyze and fix the following issue in the Linux kernel code: HID: only dump report traffic with debug level 2
Problem Details: Currently using debug=1 with hid module prints out all sent and received reports to the kernel log, while in many cases we only want to see the report descriptors and hid-input mappings that are printed when a device is probed. Add new level debug=2, and only dump the report traffic with that level. ...
```diff diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index f0b00ec1e47e..538bf28e4dd5 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -44,8 +44,8 @@ #ifdef CONFIG_HID_DEBUG int hid_debug = 0; -module_param_named(debug, hid_debug, bool, 0600); -MODULE_PARM_DESC(debug, "Turn HID de...
02008faa031f7a87b6c9df8b503a64288c8b5493
Analyze and fix the following issue in the Linux kernel code: HID: patch to add NOGET for DMI/Acomdata
Problem Details: This must be the weirdest failure yet. My external disk stops processing the storage commands the moment it receives a GET_REPORT. The firmware does not crash; if I do rmmod hid, then SET-INTERFACE restores normal operations. Still, I cannot live without the keyboard when I want backup my files. Adding...
```diff diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index f06356512067..e55b20b01993 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -127,6 +127,9 @@ #define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100 #define USB_DEVICE_ID_DELORME_EM_LT20 0x0200 +...
974faac46455076c709a745f546b348017ad18dc
Analyze and fix the following issue in the Linux kernel code: HID: quirk for MS Wireless Desktop Receiver (model 1028)
Problem Details: Microsoft's wireless desktop receiver (Model 1028) has a bug in the report descriptor -- namely, in four seperate places it uses USAGE_MIN and _MAX when it quite obviously doesn't intend to. In other words, it reports that it has pretty much _everything_ in 'consumer' and 'generic desktop'. And then ...
```diff diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 54b8f8311f94..81dc5e353dd8 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -335,6 +335,7 @@ #define USB_VENDOR_ID_MICROSOFT 0x045e #define USB_DEVICE_ID_SIDEWINDER_GV 0x003b #define USB...
f345c37c37641beceb0e52f61bb4cbc72904ee09
Analyze and fix the following issue in the Linux kernel code: HID: fixup fullspeed interval on highspeed Afatech DVB-T IR kbd
Problem Details: Many vendors highspeed devices give erroneously fullspeed interval value in endpoint descriptor for interrupt endpoints. This quirk fixes up that by recalculating the right value for highspeed device. At the time of hid configuration this quirk calculates which highspeed interval value gives same inte...
```diff diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index d95979f0e028..b4ad5d175280 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -800,6 +800,22 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) goto fail; } + hid->name[...
cf2a299e48cbeb6c942e1f765b92ca6058355f68
Analyze and fix the following issue in the Linux kernel code: HID: fix build failure in hiddev_ioctl with gcc 3.2
Problem Details: Fix build failure in hiddev_ioctl with gcc 3.2: http://bugzilla.kernel.org/show_bug.cgi?id=10121 The trick is to move the handling of ioctls which need to allocate memory to separate functions. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 5fc4019956ba..95cc192bc7af 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c @@ -393,6 +393,153 @@ static unsigned int hiddev_poll(struct file *file, poll_table *wait) /* * "ioctl" file op */ +static noinl...
c5d18e984a313adf5a1a4ae69e0b1d93cf410229
Analyze and fix the following issue in the Linux kernel code: [IPSEC]: Fix catch-22 with algorithm IDs above 31
Problem Details: As it stands it's impossible to use any authentication algorithms with an ID above 31 portably. It just happens to work on x86 but fails miserably on ppc64. The reason is that we're using a bit mask to check the algorithm ID but the mask is only 32 bits wide. After looking at how this is used in the...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index b56b6a10fe5e..baa9f372cfd1 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -436,6 +436,9 @@ struct xfrm_tmpl /* May skip this transfomration if no SA is found */ __u8 optional; +/* Skip aalgos/ealgos/calgos checks. */ + __u8 allalgs...
618442509128fe4514be94de70ce54075cd9a706
Analyze and fix the following issue in the Linux kernel code: SELinux fixups needed for preemptable RCU from -rt
Problem Details: The attached patch needs to move from -rt to mainline given preemptable RCU. This patch fixes SELinux code that implicitly assumes that disabling preemption prevents an RCU grace period from completing, an assumption that is valid for Classic RCU, but not necessarily for preemptable RCU. Explicit rcu_...
```diff diff --git a/security/selinux/avc.c b/security/selinux/avc.c index 1d69f6649bff..95a8ef4a5073 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c @@ -312,6 +312,7 @@ static inline int avc_reclaim_node(void) if (!spin_trylock_irqsave(&avc_cache.slots_lock[hvalue], flags)) continue; + rcu_r...
37a6ab5227d856c175d8f3586050997bb10628d8
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Build IBA7220 code unconditionally
Problem Details: The new IBA7220 code added a call to ipath_init_iba7220_funcs() that is compiled unconditionally, but only built the IBA7220 code if PCI_MSI is enabled. Fix this by building the IBA7220 file unconditonally. This fixes build breakage when PCI_MSI=n, HT_IRQ=y and INFINIBAND_IPATH=y reported by Ingo Mol...
```diff diff --git a/drivers/infiniband/hw/ipath/Makefile b/drivers/infiniband/hw/ipath/Makefile index 75a6c91944c4..bf9450061986 100644 --- a/drivers/infiniband/hw/ipath/Makefile +++ b/drivers/infiniband/hw/ipath/Makefile @@ -29,11 +29,13 @@ ib_ipath-y := \ ipath_user_pages.o \ ipath_user_sdma.o \ ipath_verbs_mc...
9862874d2138135dad9e78f61dbe415a4364945b
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix module parameter description for disable_sma
Problem Details: Describe disable_sma parameter with its name rather than the internal ib_ipath_disable_sma variable name, so that the description shows up properly in modinfo. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisc...
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index c38f9aa8be8d..2de8446bd375 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c @@ -109,7 +109,7 @@ MODULE_PARM_DESC(max_srq_wrs, "Maximum number of SRQ WRs ...
bc3c26fe65ecaa3fa96844219a9070a3e079697a
Analyze and fix the following issue in the Linux kernel code: fix typo "is" -> "if" in Makefile
Problem Details: It should be "if" but is written as "is".. Signed-off-by: Uwe Kleine-Koenig <Uwe.Kleine-Koenig@digi.com> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
```diff diff --git a/Makefile b/Makefile index 39516bfad958..3dbc826bb8e6 100644 --- a/Makefile +++ b/Makefile @@ -1538,7 +1538,7 @@ quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) cmd_rmfiles = rm -...
e16b27816462de700f9508d86954410c41105dc2
Analyze and fix the following issue in the Linux kernel code: ptrace: compat_ptrace_request siginfo
Problem Details: This adds support for PTRACE_GETSIGINFO and PTRACE_SETSIGINFO in compat_ptrace_request. It relies on existing arch definitions for copy_siginfo_to_user32 and copy_siginfo_from_user32. On powerpc, this fixes a longstanding regression of 32-bit ptrace calls on 64-bit kernels vs native calls (64-bit cal...
```diff diff --git a/kernel/ptrace.c b/kernel/ptrace.c index fdb34e86f923..67e392ed5496 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -323,9 +323,8 @@ static int ptrace_setoptions(struct task_struct *child, long data) return (data & ~PTRACE_O_MASK) ? -EINVAL : 0; } -static int ptrace_getsiginfo(struct task...