id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
bc0da3fcec1cec11dc451b8fcb9c9ad7e4ca6e12
Analyze and fix the following issue in the Linux kernel code: de2104x: wrong MAC address fix
Problem Details: The de2104x returns sometimes a wrong MAC address. The wrong one is like the original one, but it comes with an one byte shift. I found this bug on an older alpha ev5 cpu. More details are available in Gentoo bugreport #240718. It seems the hardware is sometimes a little bit too slow for an immediate ...
```diff diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index f54c45049d50..124d5d690dde 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c @@ -1688,6 +1688,7 @@ static void __devinit de21040_get_mac_address (struct de_private *de) unsigned i; dw32 (ROMCmd, 0); /* Re...
892871dcc39c23d3e30f8c317a5bfbab74084a40
Analyze and fix the following issue in the Linux kernel code: net: export genphy_restart_aneg
Problem Details: This patch fixes the following build error caused by commit ed94493fb38a665cebcf750dfabe8a6dd13e136f (mv643xx_eth: convert to phylib): <-- snip --> ... Building modules, stage 2. MODPOST 1280 modules ERROR: "genphy_restart_aneg" [drivers/net/mv643xx_eth.ko] undefined! ... make[2]: *** [__modpos...
```diff diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 171627480058..f11e900b437b 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -557,6 +557,7 @@ int genphy_restart_aneg(struct phy_device *phydev) return ctl; } +EXPORT_SYMBOL(genphy_restart_aneg); ...
78c36b15a02941403be5f1d28c06074f1e192079
Analyze and fix the following issue in the Linux kernel code: net/phy: add missing kernel-doc
Problem Details: Fix kernel-doc warning, missing description: Warning(lin2627-g3-kdocfixes//drivers/net/phy/mdio_bus.c:63): No description found for parameter 'd' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 6671e2da0d57..d0ed1ef284a8 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -55,6 +55,7 @@ EXPORT_SYMBOL(mdiobus_alloc); /** * mdiobus_release - mii_bus device release callback + * @d: the target struct de...
b4bb4ac8cb05ab5c13dfb7b47ef243982d3ad526
Analyze and fix the following issue in the Linux kernel code: pktgen: fix skb leak in case of failure
Problem Details: Seems that skb goes into void unless something magic happened in pskb_expand_head in case of failure. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/pktgen.c b/net/core/pktgen.c index a756847e3814..99f656d35b4f 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2474,7 +2474,7 @@ static inline int process_ipsec(struct pktgen_dev *pkt_dev, if (ret < 0) { printk(KERN_ERR "Error expanding " "ipsec packet %d\...
9e9540b8f7b91c8818e2386add3b58a961459166
Analyze and fix the following issue in the Linux kernel code: mISDN/dsp_cmx.c: fix size checks
Problem Details: The checks for ensuring that the array indices are inside the range were flipped. Reported-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c index e92b1ba4b45e..c2f51cc50760 100644 --- a/drivers/isdn/mISDN/dsp_cmx.c +++ b/drivers/isdn/mISDN/dsp_cmx.c @@ -452,10 +452,10 @@ one_member: if (finddsp->features.pcm_id == dsp->features.pcm_id) { if (finddsp->pcm_slot_rx >= 0 ...
b7c6bfb710cfd6552c3186cb8ce1ac9eef7a0e3d
Analyze and fix the following issue in the Linux kernel code: net: fix driver build errors due to missing net/ip6_checksum.h include
Problem Details: 2.6.27-git2 kernel build fails with allyesconfig on powerpc with build error <introduced by commit 01f2e4ead2c51226ed1283ef6a8388ca6f4cff8f> CC drivers/net/enic/enic_main.o drivers/net/enic/enic_main.c: In function ‘enic_queue_wq_skb_tso’: drivers/net/enic/enic_main.c:576: error: implicit d...
```diff diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index f3a47a87dbbe..180e968dc54d 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -34,6 +34,7 @@ #include <linux/ip.h> #include <linux/ipv6.h> #include <linux/tcp.h> +#include <net/ip6_checksum.h> #incl...
936b8834366ec05f2a6993f73afd8348cac9718e
Analyze and fix the following issue in the Linux kernel code: ocfs2: Refactor xattr list and remove ocfs2_xattr_handler().
Problem Details: According to Christoph Hellwig's advice, we really don't need a ->list to handle one xattr's list. Just a map from index to xattr prefix is enough. And I also refactor the old list method with the reference from fs/xfs/linux-2.6/xfs_xattr.c and the xattr list method in btrfs. Signed-off-by: Tao Ma <ta...
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 092a12318986..8f522f2f84a5 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -137,14 +137,14 @@ static int ocfs2_xattr_set_entry_index_block(struct inode *inode, static int ocfs2_delete_xattr_index_block(struct inode *inode, struct buffer_hea...
2057e5c6780d86939a199031cdbafb81e6f88aac
Analyze and fix the following issue in the Linux kernel code: ocfs2: Calculate EA hash only by its suffix.
Problem Details: According to Christoph Hellwig's advice, the hash value of EA is only calculated by its suffix. 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 0f556b00235e..092a12318986 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -148,21 +148,13 @@ static inline struct xattr_handler *ocfs2_xattr_handler(int name_index) } static u32 ocfs2_xattr_name_hash(struct inode *inode, - char *prefix, - ...
06b240d8af21ddee4cfec3b0f02b81d9f168a98a
Analyze and fix the following issue in the Linux kernel code: ocfs2/xattr.c: Fix a bug when inserting xattr.
Problem Details: During the process of xatt insertion, we use binary search to find the right place and "low" is set to it. But when there is one xattr which has the same name hash as the inserted one, low is the wrong value. So set it to the right position. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Mar...
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index b2e25a828e38..b1f2a164e7dc 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -4003,8 +4003,10 @@ static void ocfs2_xattr_set_entry_normal(struct inode *inode, else if (name_hash < le32_to_cpu(tmp_xe->xe_name_hash)) high = tmp - 1; - e...
08413899db89d8d636c2a2d4ba5c356ab587d7ef
Analyze and fix the following issue in the Linux kernel code: ocfs2: Resolve deadlock in ocfs2_xattr_free_block.
Problem Details: In ocfs2_xattr_free_block, we take a cluster lock on xb_alloc_inode while we have a transaction open. This will deadlock the downconvert thread, so fix it. We can clean up how xattr blocks are removed while here - this patch also moves the mechanism of releasing xattr block (including both value, xatt...
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 38e3e5e216bd..b2e25a828e38 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -1427,51 +1427,6 @@ out: } -static int ocfs2_xattr_free_block(handle_t *handle, - struct ocfs2_super *osb, - struct ocfs2_xattr_block *xb) -{ - struct inode *x...
28b8ca0b7f70b1b048d03dc0b9d87f58619e9791
Analyze and fix the following issue in the Linux kernel code: ocfs2: bug-fix for journal extend in xattr.
Problem Details: In ocfs2_extend_trans, when we can't extend the current transaction, it will commit current transaction and restart a new one. So if the previous credits we have allocated aren't used(the block isn't dirtied before our extend), we will not have enough credits for any future operation(it will cause jbd ...
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 1a4de3dc2ba9..38e3e5e216bd 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -1336,8 +1336,9 @@ static int ocfs2_xattr_set_entry(struct inode *inode, } if (!(flag & OCFS2_INLINE_XATTR_FL)) { - /*set extended attribue in external blcok*/ + /* s...
ce1d9ea621291ed5e985d6677278c6bb20d96a40
Analyze and fix the following issue in the Linux kernel code: ocfs2: Prefix the ocfs2_extent_tree structure.
Problem Details: The members of the ocfs2_extent_tree structure gain a prefix of 'et_'. All users are updated. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
```diff diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index f2e35a8f0197..4ade2b259e6d 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -75,28 +75,30 @@ struct ocfs2_extent_tree_operations { }; struct ocfs2_extent_tree { - enum ocfs2_extent_tree_type type; - struct ocfs2_extent_tree_operations *eops; - st...
35dc0aa3c5e7391319754e0c19cdfc0a28eb5b25
Analyze and fix the following issue in the Linux kernel code: ocfs2: Prefix the extent tree operations structure.
Problem Details: The ocfs2_extent_tree_operations structure gains a field prefix on its members. The ->eo_sanity_check() operation gains a wrapper function for completeness. All of the extent tree operation wrappers gain a consistent name (ocfs2_et_*()). Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off...
```diff diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index f65cb43edb7c..f2e35a8f0197 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -65,12 +65,13 @@ struct ocfs2_extent_tree; struct ocfs2_extent_tree_operations { - void (*set_last_eb_blk) (struct ocfs2_extent_tree *et, u64 blkno); - u64 (*get_last_eb_...
ff1ec20ef65d51cc3466e86912cdeaac16f3aaa0
Analyze and fix the following issue in the Linux kernel code: ocfs2: fix printk format warnings
Problem Details: This patch fixes the following build warnings: fs/ocfs2/xattr.c: In function 'ocfs2_half_xattr_bucket': fs/ocfs2/xattr.c:3282: warning: format '%d' expects type 'int', but argument 7 has type 'long int' fs/ocfs2/xattr.c:3282: warning: format '%d' expects type 'int', but argument 8 has type 'long int' ...
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 090449f9263e..1b349c7367a9 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -3264,7 +3264,8 @@ static int ocfs2_half_xattr_bucket(struct inode *inode, xe = &xh->xh_entries[start]; len = sizeof(struct ocfs2_xattr_entry) * (count - start); mlog(0...
f5ea64dcbad89875d130596df14c9b25d994a737
Analyze and fix the following issue in the Linux kernel code: powerpc: Get USE_STRICT_MM_TYPECHECKS working again
Problem Details: The typesafe version of the powerpc pagetable handling (with USE_STRICT_MM_TYPECHECKS defined) has bitrotted again. This patch makes a bunch of small fixes to get it back to building status. It's still not enabled by default as gcc still generates worse code with it for some reason. Signed-off-by: D...
```diff diff --git a/arch/powerpc/include/asm/mman.h b/arch/powerpc/include/asm/mman.h index 9209f755763e..e7b99bac9f48 100644 --- a/arch/powerpc/include/asm/mman.h +++ b/arch/powerpc/include/asm/mman.h @@ -44,7 +44,7 @@ static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot) static inline pgprot_t ar...
8aa2659009714cf5f9ffe7f3e16ccfa8ff0e0d61
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix DMA offset for non-coherent DMA
Problem Details: After Becky's work we can almost have different DMA offsets between on-chip devices and PCI. Almost because there's a problem with the non-coherent DMA code that basically ignores the programmed offset to use the global one for everything. This fixes it. Signed-off-by: Benjamin Herrenschmidt <benh@ker...
```diff diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 41fdd48bf433..1562daf8839a 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c @@ -30,11 +30,15 @@ static unsigned long get_dma_direct_offset(struct device *dev) void *dma_direct_alloc_coherent(struct device *dev, size_...
86f69fe9c069dd8608d238581eea259caa1dfc99
Analyze and fix the following issue in the Linux kernel code: Staging: workaround build system bug
Problem Details: This is needed as CONFIG_STAGING is set to y, yet there is no code in drivers/staging/ to build, so the build-in.o doesn't get created properly. Create a "dummy" module in drivers/staging called staging.c to work around this bug. Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Greg Kroah-Hartman <...
```diff diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index 93decb89b1d8..7c466e94fd93 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -1,5 +1,8 @@ # Makefile for staging directory +# fix for build system bug... +obj-$(CONFIG_STAGING) += staging.o + obj-$(CONFIG_ET131X) ...
9a8ff578fb430a8816dfbc73c77e5e09c6d9c343
Analyze and fix the following issue in the Linux kernel code: ocfs2: track local alloc state via debugfs
Problem Details: A per-mount debugfs file, "local_alloc" is created which when read will expose live state of the nodes local alloc file. Performance impact is minimal, only a bit of memory overhead per mount point. Still, the code is hidden behind CONFIG_OCFS2_FS_STATS. This feature will help us debug local alloc perf...
```diff diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index f71658adddb5..b889f10d8090 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c @@ -28,6 +28,7 @@ #include <linux/slab.h> #include <linux/highmem.h> #include <linux/bitops.h> +#include <linux/debugfs.h> #define MLOG_MASK_PREFIX ML_...
caf1859199e4360ffa826179bc0e881b0348f3ce
Analyze and fix the following issue in the Linux kernel code: mfd: Fix warning in WM8350
Problem Details: Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@openedhand.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c index 382e38c66914..25a7a5d08bce 100644 --- a/drivers/mfd/wm8350-core.c +++ b/drivers/mfd/wm8350-core.c @@ -1161,7 +1161,6 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq, { int ret = -EINVAL; u16 id1, id2, mask, mode; - int i; ...
3de89609a82aa68f543cba263eb28725e0fde511
Analyze and fix the following issue in the Linux kernel code: regulator: Fix typo
Problem Details: Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index bc01b42a8583..e37d80561985 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -51,7 +51,7 @@ struct regulator_ops { int output_uV, int load_uA); /* the operations below are for...
4abdc6ee7c47a1a6e12f95717e461baeebee5df7
Analyze and fix the following issue in the Linux kernel code: ide: Implement disk shock protection support (v4)
Problem Details: On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD FEATURE as specified in ATA-7 is issued to the device and processing of the request queue is stopped thereafter until the specified timeout expires or user space asks to resume normal operation. This is supposed to prevent the head...
```diff diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile index 0c30adb115c8..ceaf779054ea 100644 --- a/drivers/ide/Makefile +++ b/drivers/ide/Makefile @@ -5,7 +5,7 @@ EXTRA_CFLAGS += -Idrivers/ide ide-core-y += ide.o ide-ioctls.o ide-io.o ide-iops.o ide-lib.o ide-probe.o \ - ide-taskfile.o ide-pio-...
08243ba731ee08ff42cf1589379c81567690218f
Analyze and fix the following issue in the Linux kernel code: ide-cd: fix printk format warning
Problem Details: Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Cc: Borislav Petkov <petkovbb@googlemail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 3a08a2ba6b17..3308b1cd3a33 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1268,7 +1268,7 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, int xferlen; ide_debug_log(IDE_DBG_RQ, "Call %s, rq-...
fc8323f793852ca1fcb58d96512fd71d39af2e9b
Analyze and fix the following issue in the Linux kernel code: ide-cd: convert driver to new ide debugging macro (v3)
Problem Details: Also, - leave in the possibility for optimizing away all debugging macros - add a PFX macro and prepend all printk calls with it for consistency - add debug macro calls in important driver paths - remove #if 0-ed code - mv restore_request -> ide_cd_restore_request - add a driver registration printk v...
```diff diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 880d6d042fc8..52e4bbdfd4a8 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -23,6 +23,9 @@ * Documentation/ide/ChangeLog.ide-cd.1994-2004 */ +#define DRV_NAME "ide-cd" +#define PFX DRV_NAME ": " + #define IDECD_VERSION "5.00" ...
db3f99ef7c30d541e4a78931acf2c64abe3e26d1
Analyze and fix the following issue in the Linux kernel code: ide: cleanup ide-dma.c
Problem Details: - s/HWIF(drive)/drive->hwif/ - s/HWGROUP(drive)/[drive->]hwif->hwgroup/ - fixup error messages in ide_dma_intr() & dma_timer_expiry() - fix checkpatch.pl errors/warnings Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 4d212b867c35..d935a6ec022f 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -33,11 +33,9 @@ #include <linux/ide.h> #include <linux/scatterlist.h> #include <linux/dma-mapping.h> +#include <linux/io.h> -#include <asm/io.h> - -s...
14c123f37187aba0b4e0e893a969efc6820c4170
Analyze and fix the following issue in the Linux kernel code: ide: cleanup ide_build_dmatable()
Problem Details: - use for_each_sg() - move printing 'DMA table too small' message below use_pio_instead label - merge '64KB bug' comment with function documentation - fix intendation There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 83885ba0496c..4d212b867c35 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -153,8 +153,11 @@ EXPORT_SYMBOL_GPL(ide_build_sglist); * * ide_build_dmatable() prepares a dma request. We map the command * to get the pci bus addr...
2bbd57cad3d72334c9fcc4e229a5a5b04dc6aebc
Analyze and fix the following issue in the Linux kernel code: ide: switch to DMA-mapping API part #2
Problem Details: Follow-up to commit 5c05ff68b9a9b40a9be949497e0aa980185565cf ("ide: switch to DMA-mapping API"): * pci_{alloc,free}_consistent() -> dma_{alloc,free}_coherent() in ide_{allocate,release}_dma_engine(). * Add ->prd_max_nents and ->prd_ent_size fields to ide_hwif_t (+ set default values in ide_alloca...
```diff diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 244b61b573ce..3f949b5db353 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -844,36 +844,43 @@ void ide_dma_timeout(ide_drive_t *drive) } EXPORT_SYMBOL_GPL(ide_dma_timeout); -#ifdef CONFIG_BLK_DEV_IDEDMA_SFF void ide_release_...
e415e495f8294e536e09e6a15fba897cce4c0748
Analyze and fix the following issue in the Linux kernel code: ide: Two fixes regarding memory allocation
Problem Details: In function ide_devset_execute() we should use __GFP_WAIT rather than GFP_KERNEL. Also, the allocation cannot possibly fail at that point. More importantly, there is a potential memory leak in the device probing code. The infrastructure seems rather complex and I hope I haven't messed anything up by tr...
```diff diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index d0579f1abddd..e205f46c3c7a 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -655,10 +655,7 @@ int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting, if (!(setting->flags & DS_SYNC)) return setting->set(drive...
06b89518fa69fb7243dc98c31f9a9cfa61bfe788
Analyze and fix the following issue in the Linux kernel code: ide-disk: move /proc handling to ide-disk_proc.c (take 3)
Problem Details: While at it: - idedisk_capacity() -> ide_disk_capacity() - idedisk_proc[] -> ide_disk_proc[] - idedisk_settings[] -> ide_disk_settings[] v2/3: Build fix for CONFIG_IDE_PROC_FS=n from Elias Oltmanns. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile index 57b252b8e792..e6e7811812d2 100644 --- a/drivers/ide/Makefile +++ b/drivers/ide/Makefile @@ -41,6 +41,7 @@ ide-cd_mod-y += ide-cd.o ide-cd_ioctl.o ide-cd_verbose.o ide-floppy_mod-y += ide-floppy.o ide-floppy_ioctl.o ifeq ($(CONFIG_IDE_PROC_FS), y...
b9103da463f72d03c513acdb18f1aebd7931ed1e
Analyze and fix the following issue in the Linux kernel code: ide-floppy: move /proc handling to ide-floppy_proc.c (take 2)
Problem Details: While at it: - idefloppy_capacity() -> ide_floppy_capacity() - idefloppy_proc[] -> ide_floppy_proc[] - idefloppy_settings[] -> ide_floppy_settings[] v2: Build fix for CONFIG_IDE_PROC_FS=n from Elias Oltmanns. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...
```diff diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile index f408983f89f3..06e7867052d3 100644 --- a/drivers/ide/Makefile +++ b/drivers/ide/Makefile @@ -39,6 +39,10 @@ obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o ide-cd_mod-y += ide-cd.o ide-cd_ioctl.o ide-cd_verbose.o ide-floppy_mod-y += ide-floppy.o ide-flo...
5bb1536a07cca0b66f2bb41dfdf84140939b8f1f
Analyze and fix the following issue in the Linux kernel code: ide-floppy: move all ioctl handling to ide-floppy_ioctl.c (take 2)
Problem Details: While at it: - idefloppy_ioctl() -> ide_floppy_ioctl() v2: Fix for idefloppy_ioctl name change from Stephen Rothwell. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 9f2c6b2af98f..169d4d93a6a9 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c @@ -765,56 +765,6 @@ static int idefloppy_getgeo(struct block_device *bdev, struct hd_geometry *geo) return 0; } -static int ide_floppy_lock...
0e3d84a500d4e1672332b4961b98c35f6168e6f1
Analyze and fix the following issue in the Linux kernel code: ide: factor out reset error reporting from reset_pollfunc()
Problem Details: Factor out reset error reporting from reset_pollfunc() to ide_reset_report_error() helper. While at it: - fix KERN_* printk() levels - remove 'switch ()' Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 925fd037cdde..91182ebed468 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -940,6 +940,25 @@ static ide_startstop_t atapi_reset_pollfunc (ide_drive_t *drive) return ide_stopped; } +static void ide_reset_report_error(ide_...
0d346ba0730d84f04022f9f984d3f606f69cef37
Analyze and fix the following issue in the Linux kernel code: ide: sanitize ide*_pm_* enums
Problem Details: * Move ide*_pm_* enums from ide-io.c to <linux/ide.h>. * idedisk_pm_* -> ide_pm_* * ide_pm_state_* -> ide_pm_* * No need to set ide_pm_* enums to the fixed values. * Uppercase ide_pm_* enums. * Fix/update comments. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 623f6c246cf5..f8d8642903da 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -132,21 +132,6 @@ int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors) } EXPORT_SYMBOL(ide_end_request); -/* - * Power Management state ...
d1d76714e2f0c520b6c2a84ab5b050d0b3244949
Analyze and fix the following issue in the Linux kernel code: ide: fix HDIO_DRIVE_TASK[FILE] ioctls for CHS commands on LBA devices
Problem Details: Add IDE_DFLAG_LBA device flag and use it instead of ->select.b.lba. Since ->tf_load uses ->select.all for ATA Device/Head register this fixes HDIO_DRIVE_TASK[FILE] ioctls for CHS commands on LBA devices. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index c35de54dfc22..6eb9fea32a56 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -162,7 +162,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, memset(&task, 0, sizeof(task)); task.tf_flags = I...
35c137531245118962eb40a550661afe317bec03
Analyze and fix the following issue in the Linux kernel code: ide-disk: set_addressing() fixes
Problem Details: * Return -EIO if arg > 0 and LBA48 is unsupported. * No need to reset ->addressing. * Make ->addressing a single bit flag. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 01846f244b40..65c499aab664 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -686,14 +686,13 @@ static int set_addressing(ide_drive_t *drive, int arg) if (arg < 0 || arg > 2) return -EINVAL; - drive->addressing = 0; - -...
1ea1031cf92b8b8bfbe796d8e8d38b68300475d2
Analyze and fix the following issue in the Linux kernel code: ide: fix IDE ACPI for slave device-only configurations
Problem Details: ACPI _GTM / _PS0 / _STM were not called if only slave device was present. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 9dcf5aed92cb..64997873b6d7 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -365,15 +365,15 @@ __IDE_DEVSET(pio_mode, 0, NULL, set_pio_mode); static int generic_ide_suspend(struct device *dev, pm_message_t mesg) { - ide_drive_t *drive = dev->...
0964dbe60c98f483567ac9a1220f6ab01a15c954
Analyze and fix the following issue in the Linux kernel code: ide-floppy: add a debug_mask module parameter
Problem Details: ... with which to control to verbosity of debug messages on module load time. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> [bart: no need to zero debug_mask + move module_param() closer debug_mask] [bart: init drive->debug_mask in ide_floppy_probe() not in idefloppy_open()] Signed-off-by: Bartl...
```diff diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 3de9478fe306..a11ec86925a3 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c @@ -49,6 +49,10 @@ #include "ide-floppy.h" +/* module parameters */ +static unsigned long debug_mask; +module_param(debug_mask, ulong, 0644)...
7b35572628bb807bf95e4d6282c67af95267928e
Analyze and fix the following issue in the Linux kernel code: ide-floppy: convert driver to the new debugging macro
Problem Details: Also: - leave in the possibility for optimizing away all debugging macros - add a PFX macro and prepend all printk calls with it for consistency - change idefloppy_create_rw_cmd's 1st arg from idefloppy_floppy_t * to ide_drive_t *. - add a missing printk-level in idefloppy_init - fix minor checkpatch ...
```diff diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 2a54a25090cb..3de9478fe306 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c @@ -16,6 +16,7 @@ */ #define DRV_NAME "ide-floppy" +#define PFX DRV_NAME ": " #define IDEFLOPPY_VERSION "1.00" @@ -49,16 +50,12 @@ #in...
452a8ed8ce752a423013cfade1bbca5f13fd16eb
Analyze and fix the following issue in the Linux kernel code: ide: remove CONFIG_BLK_DEV_IDE config option (take 2)
Problem Details: Because hd.c was moved to drivers/block/ this config option is superfluous now and may be removed. v2: Fix drivers/ide/Makefile (noticed by Adrian Bunk). Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index b50b5dac95b0..6c6dd2facede 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -54,38 +54,6 @@ menuconfig IDE if IDE -config BLK_DEV_IDE - tristate "Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support" - ---help--- - If you say Y here...
9b5a18e19f8c610c270ee9a0ba03177d737f6aa5
Analyze and fix the following issue in the Linux kernel code: sgiioc4: fix messages
Problem Details: Fix several issues with the log messages printed by ide_dma_sgiioc4() and sgiioc4_ide_setup_pci_device(): - IOC4 registers are memory-mapped but the "BM-DMA at" format corresponds to I/O mapped registers; - "%p" format specifiers and type casts used to print non-pointer values; - using KERN_INFO ...
```diff diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 12ad4ca4b037..84cd986810cf 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c @@ -339,23 +339,20 @@ ide_dma_sgiioc4(ide_hwif_t *hwif, const struct ide_port_info *d) if (dma_base == 0) return -1; - printk(KERN_INF...
aa95f0e76571dc1b067d2839c11f2e5589d063d7
Analyze and fix the following issue in the Linux kernel code: sgiioc4: sgiioc4_read_status drive busy check fix
Problem Details: Fix the drive non-busy criterion used by sgiioc4_read_status(): neither of the bits it expects to be set guarantees that the drive is not busy (and might be interrupting), only the BSY bit itself being zero gurantees that. While at it, use ATA_BUSY instead of hardcoded value everywhere... Signed-off-b...
```diff diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 1017fb4f6317..12ad4ca4b037 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (C) 2008 MontaVista Software, Inc....
402fda9201ac619ea1f120996b1a142c57aeeb6b
Analyze and fix the following issue in the Linux kernel code: tty: tty_io.c shadows sparse fix
Problem Details: drivers/char/tty_io.c:1413:17: warning: symbol 'buf' shadows an earlier one drivers/char/tty_io.c:1379:20: originally declared here Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 502cad68f83c..7053d6333692 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1026,19 +1026,19 @@ static inline ssize_t do_tty_write( /* write_buf/write_cnt is protected by the atomic_write_lock mutex */ if (tty->write_cnt < ...
8440838bc5337243917f13bc14ea2445da5e0197
Analyze and fix the following issue in the Linux kernel code: serial: fix device name reporting when minor space is shared between drivers
Problem Details: The multiple drivers share the minor space occupied by a particular major number, the actual index within the device name's space is indicated by the tty_driver->name_base + uart_port->line Another usable formula is (uart_driver->minor - MINOR_BASE) + port->line Use those to print the device names pr...
```diff diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index db2cdc103c88..d4104a3bbe87 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -57,6 +57,13 @@ static unsigned int share_irqs = SERIAL8250_SHARE_IRQS; static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS; +static stru...
a7be18d436f0c7007794965e5af29fa1ffff1e05
Analyze and fix the following issue in the Linux kernel code: applicom: Fix an unchecked user ioctl range and an error return
Problem Details: Closes bug #11408 by checking the card index range for command 0 Fixes the ioctl to return ENOTTY which is correct for unknown ioctls Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c index 31d08b641f5b..b899d9182c7d 100644 --- a/drivers/char/applicom.c +++ b/drivers/char/applicom.c @@ -712,8 +712,7 @@ static int ac_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un IndexCard = adgl->num_card-1; - if(cmd ...
17b820606e7bdd3be31b001265d0177423fea5eb
Analyze and fix the following issue in the Linux kernel code: tty: Minor tidyups and document fixes for n_tty
Problem Details: Remove/fix some bogus NULL checks, comment some locking etc Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index b4f5dccad2a6..c0285b95cf94 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c @@ -99,6 +99,7 @@ static inline int tty_put_user(struct tty_struct *tty, unsigned char x, static void n_tty_set_room(struct tty_struct *tty) { + /* tty->read...
51383f69ec56fe3f425d5255fb43e18c445e061c
Analyze and fix the following issue in the Linux kernel code: tty: Remove lots of NULL checks
Problem Details: Many tty drivers contain 'can't happen' checks against NULL pointers passed in by the tty layer. These have never been possible to occur. Even more importantly if they ever do occur we want to know as it would be a serious bug. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <t...
```diff diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c index 6e763e3f5a81..98821f97583c 100644 --- a/drivers/char/amiserial.c +++ b/drivers/char/amiserial.c @@ -837,9 +837,6 @@ static int rs_put_char(struct tty_struct *tty, unsigned char ch) struct async_struct *info; unsigned long flags; - if (...
ea1afd256258f04a290aaa7fd5c2d4deb2e79e26
Analyze and fix the following issue in the Linux kernel code: tty: fix up gigaset a bit
Problem Details: Stephen's fixes reminded me that gigaset is still rather broken so fix it up a bit Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c index cc4f4e44ffe4..07052ed2a0c5 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c @@ -571,6 +571,7 @@ gigaset_tty_close(struct tty_struct *tty) } /* prevent other callers from enter...
335adde689150d2fcf4df3cb26a6fc6740ed1f3e
Analyze and fix the following issue in the Linux kernel code: pty: Fix allocation failure double free
Problem Details: The updating and moving around of the pty code added a bug where both the helper and caller free the main tty struct (the pty driver must free the o_tty pair itself however). Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/pty.c b/drivers/char/pty.c index c3ab8c3110c9..3c6b7911665f 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -544,8 +544,6 @@ free_mem_out: module_put(o_tty->driver->owner); free_tty_struct(o_tty); pty_unix98_shutdown(tty); - free_tty_struct(tty); - module_put(driver->...
99f1fe189daf8e99a847e420567e49dd7ee2aae7
Analyze and fix the following issue in the Linux kernel code: tty: Clean up the tty_init_dev changes further
Problem Details: Fix up the naming, style and extract some bits of code into the driver specific code Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/pty.c b/drivers/char/pty.c index 328e8ac12306..6e148ade7353 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -391,6 +391,41 @@ static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file, return -ENOIOCTLCMD; } +/** + * ptm_unix98_lookup - find a pty master + ...
dbda4c0b97b18fd59b3964548361b4f92357f730
Analyze and fix the following issue in the Linux kernel code: tty: Fix abusers of current->sighand->tty
Problem Details: Various people outside the tty layer still stick their noses in behind the scenes. We need to make sure they also obey the locking and referencing rules. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/acct.c b/kernel/acct.c index dd68b9059418..f6006a60df5d 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -548,7 +548,7 @@ static void do_acct_process(struct bsd_acct_struct *acct, #endif spin_lock_irq(&current->sighand->siglock); - tty = current->signal->tty; + tty = current->signal->t...
934e6ebf96e8c1a0f299e64129fdaebc1132a427
Analyze and fix the following issue in the Linux kernel code: tty: Redo current tty locking
Problem Details: Currently it is sometimes locked by the tty mutex and sometimes by the sighand lock. The latter is in fact correct and now we can hand back referenced objects we can fix this up without problems around sleeping functions. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvald...
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index b5f57d0b30ee..f40298e9873a 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -739,13 +739,11 @@ void tty_vhangup_self(void) { struct tty_struct *tty; - mutex_lock(&tty_mutex); tty = get_current_tty(); if (tty) { tty_vha...
452a00d2ee288f2cbc36f676edd06cb14d2878c1
Analyze and fix the following issue in the Linux kernel code: tty: Make get_current_tty use a kref
Problem Details: We now return a kref covered tty reference. That ensures the tty structure doesn't go away when you have a return from get_current_tty. This is not enough to protect you from most of the resources being freed behind your back - yet. [Updated to include fixes for SELinux problems found by Andrew Morton...
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 9a76db3cda1c..4c0e4ed31a48 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -786,12 +786,12 @@ void disassociate_ctty(int on_exit) tty = get_current_tty(); if (tty) { tty_pgrp = get_pid(tty->pgrp); - lock_kernel(); mute...
5aaa70a80f5bbfcc4d6a1f844bdd1c5d6b445b5f
Analyze and fix the following issue in the Linux kernel code: tty: ipw need reworking
Problem Details: This came in via another tree and unfortunately is rather broken on the tty side. Comment the apparent locking problems for someone who knows the driver to look at. Fix the termios and other ioctl handling. The driver was calling the wrong methods for what it wanted to do but the right ones existed so...
```diff diff --git a/drivers/char/pcmcia/ipwireless/tty.c b/drivers/char/pcmcia/ipwireless/tty.c index 3a23e7694d55..569f2f7743a7 100644 --- a/drivers/char/pcmcia/ipwireless/tty.c +++ b/drivers/char/pcmcia/ipwireless/tty.c @@ -276,6 +276,7 @@ static int ipw_write_room(struct tty_struct *linux_tty) struct ipw_tty *tty...
43b11d33f2c20c33fcf197780edb2e5d8a1b6a67
Analyze and fix the following issue in the Linux kernel code: ftdi: A few errors are err() that should be debug which causes much spewage
Problem Details: Fixes #10783 Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 3dc93b542b30..1ac7e802b4b6 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -860,7 +860,7 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, kfree(buf); if (rv < 0) { -...
4ad6de0b3f5d050b70e4c94a0cc8b26503f8cf28
Analyze and fix the following issue in the Linux kernel code: usb: fix pl2303 initialization
Problem Details: This patch removes the private check for the termios_initialized for the pl2303 usb driver. It forced the baud to 9600 on the first call to pl2303_set_termios() Based on the tty changes in the 2.6.27 kernel, the termios passed to the *_set_termios functions is always populated the first time. This m...
```diff diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 1ede1441cb1b..8d6006894bf5 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -154,7 +154,6 @@ struct pl2303_private { wait_queue_head_t delta_msr_wait; u8 line_control; u8 line_status; - u8 termios_ini...
9bde10a4b8c54804236d3d6b4b75e98825a921e7
Analyze and fix the following issue in the Linux kernel code: serial-make-uart_ports-ioport-unsigned-long-fix
Problem Details: Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index f977c98cfa95..308588e2072b 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -2154,12 +2154,11 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port) switch (port->iotype) { case UPIO...
716da631ae91fc5e9f8d5815f8ef5fbfed862b80
Analyze and fix the following issue in the Linux kernel code: nozomi: Fix close on error
Problem Details: Nozomi assumes the close method isn't called if open errors. The tty layer is different to other drives in this respect however. Pointed out by Denis J Barrow. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c index 66a0f931c66c..9a34a1935283 100644 --- a/drivers/char/nozomi.c +++ b/drivers/char/nozomi.c @@ -1599,7 +1599,10 @@ static int ntty_open(struct tty_struct *tty, struct file *file) return 0; } -/* Called when the userspace process close the tty, ...
9d020a2e5fd2c79f5b08a6cab2b02e7231d7cb84
Analyze and fix the following issue in the Linux kernel code: ip2: avoid add_timer with pending timer
Problem Details: add_timer() is not supposed to be called when the timer is pending. ip2 driver attempts to avoid that condition by setting and resetting a flag (TimerOn) in timer function. But there is some gap between add_timer() and setting TimerOn. This patch fix this problem by using mod_timer() and remove TimerO...
```diff diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 39269d19a02d..66f52a28c40b 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c @@ -249,7 +249,6 @@ static unsigned long bh_counter; */ #define POLL_TIMEOUT (jiffies + 1) static DEFINE_TIMER(PollTimer, ip2_poll...
7ccd7020ef188b62781fe2f0a68131aa066d59a5
Analyze and fix the following issue in the Linux kernel code: ip2: fix sparse warnings
Problem Details: Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 1d4628499641..098c9de3022d 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c @@ -375,9 +375,7 @@ have_requested_irq( char irq ) /* handle subsequent installations of the driver. All memory allocated by the */ /* ...
1361b7d3592b006574fb3cfeb21a02d520cca315
Analyze and fix the following issue in the Linux kernel code: Char: sx, fix io unmapping
Problem Details: board->base is increased for CF cards after mapping. Use board->base2 for unmapping the region, since it holds the original/correct address. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by:...
```diff diff --git a/drivers/char/sx.c b/drivers/char/sx.c index c385206f9db5..5b8d7a1aa3e6 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c @@ -2504,7 +2504,7 @@ static void __devexit sx_remove_card(struct sx_board *board, del_timer(&board->timer); if (pdev) { #ifdef CONFIG_PCI - pci_iounmap(pdev, board...
7aef709bf6f7a0886ee044960a7a86ea76dc6e2b
Analyze and fix the following issue in the Linux kernel code: Fix oti6858 debug level
Problem Details: For some reason the oti6858 driver undefines and redefines the dbg macro. This makes it spew debugging messages at KERN_INFO instead of KERN_DEBUG. This patch removes the undef and define making the driver log like every other USB serial driver. Signed-off-by: Scott Ashcroft <scott.ashcroft@talk21.co...
```diff diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index 81db5715ee25..42f92815c6e5 100644 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c @@ -224,10 +224,6 @@ struct oti6858_private { struct usb_serial_port *port; /* USB port with which associated */ }; -#unde...
ab2375f2fe256358a982e357d298801cf1adbd00
Analyze and fix the following issue in the Linux kernel code: Blackfin Serial Driver: Fix bug - request UART2/3 peripheral mapped interrupts in PIO mode
Problem Details: Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index 93229b3d6e3e..339293d677cc 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c @@ -117,15 +117,14 @@ int request_dma(unsigned int channel, char *device_id) #ifdef CONFIG_BF54x ...
b3ef5aba64aed5be0fccca3ff39c8f2282111ce5
Analyze and fix the following issue in the Linux kernel code: Blackfin Serial Driver: Fix bug - ircp fails on sir over Blackfin UART
Problem Details: We now use the sir_dev/irtty_sir/uart/bfin_serial drivers framework to monitor the TX status. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h index a23d04750810..75722d6008b0 100644 --- a/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h +++ b/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h @@ -78,6 +78,9 @@ # ...
5ffdeea2f99ed9d46bf954c9fdc64da7da57e81b
Analyze and fix the following issue in the Linux kernel code: Blackfin Serial Driver: Fix bug - Don't call tx_stop in tx_transfer.
Problem Details: Disable irq and return immediately. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index 8d2d75706685..5e20f50342a9 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c @@ -301,7 +301,11 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart) bfin_serial_mctrl_check(uart); if (uart_circ_empty...
ccfbc3e1c860cce62e0b1c6c291647ecfe9ef296
Analyze and fix the following issue in the Linux kernel code: Blackfin Serial Driver: Fix bug - should suspend/resume/remove all uart ports.
Problem Details: Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index 4a023c65e9f4..04eeef05e93c 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c @@ -1100,20 +1100,26 @@ static struct uart_driver bfin_serial_reg = { static int bfin_serial_suspend(struct platform_device *dev, pm_messa...
c0da99d5f7b0349cb11f970b3283c0d57beb5ec9
Analyze and fix the following issue in the Linux kernel code: powerpc: fix fsl_upm nand driver modular build
Problem Details: The fsl_upm nand driver fails to build because fsl_lbc_lock isn't exported, the lock is needed by the inlined fsl_upm_run_pattern() function: ERROR: "fsl_lbc_lock" [drivers/mtd/nand/fsl_upm.ko] undefined! Dave Jones purposed to export the lock, but it is better to just uninline the fsl_upm_run_patter...
```diff diff --git a/arch/powerpc/include/asm/fsl_lbc.h b/arch/powerpc/include/asm/fsl_lbc.h index 303f5484c050..63a4f779f531 100644 --- a/arch/powerpc/include/asm/fsl_lbc.h +++ b/arch/powerpc/include/asm/fsl_lbc.h @@ -23,9 +23,9 @@ #ifndef __ASM_FSL_LBC_H #define __ASM_FSL_LBC_H +#include <linux/compiler.h> #incl...
891cffbd6bcba26409869c19c07ecd4bfc0c2460
Analyze and fix the following issue in the Linux kernel code: x86/mm: do not trigger a kernel warning if user-space disables interrupts and generates a page fault
Problem Details: Arjan reported a spike in the following bug pattern in v2.6.27: http://www.kerneloops.org/searchweek.php?search=lock_page which happens because hwclock started triggering warnings due to a (correct) might_sleep() check in the MM code. The warning occurs because hwclock uses this dubious sequence ...
```diff diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index a742d753d5b0..ac2ad781da00 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -645,24 +645,23 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) } -#ifdef CONFIG_X86_32 - /* It's safe to allow irq's after ...
dc4304f7deee29fcdf6a2b62f7146ea7f505fd42
Analyze and fix the following issue in the Linux kernel code: rangetimers: fix the bug reported by Ingo for real
Problem Details: and please hand me a brown paper bag (thanks to Thomas for pointing out this very obvious bug) Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
```diff diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index b17657d8d81a..2bd230be1cb5 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1395,15 +1395,11 @@ void hrtimer_peek_ahead_timers(void) unsigned long flags; struct tick_device *td; struct clock_event_device *dev; - struct hrtimer_cpu_base *cpu_ba...
239cfbde1f5843c4a24199f117d5f67f637d72d5
Analyze and fix the following issue in the Linux kernel code: Fix autoloading of MacBook Pro backlight driver.
Problem Details: Use new MODULE_DEVICE_TABLE(dmi, ...) facility. There's no need for every driver to screw it up for themselves, when the alias can be generated automatically. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/video/backlight/mbp_nvidia_bl.c b/drivers/video/backlight/mbp_nvidia_bl.c index 385cba40ea87..06964af761c6 100644 --- a/drivers/video/backlight/mbp_nvidia_bl.c +++ b/drivers/video/backlight/mbp_nvidia_bl.c @@ -111,6 +111,4 @@ module_exit(mbp_exit); MODULE_AUTHOR("Matthew Garrett <mjg@redha...
198f29358a31cdca1a496d19da90bd5d6c8527ce
Analyze and fix the following issue in the Linux kernel code: avr32: Fix MIMC200 board use of SPD network pins
Problem Details: The MIMC200 board uses the SPD output pin from the Ethernet MACs for other purposes. One of these is as a board-reset, so I've had to #define off the SPD output pin declaration. This is probably not the best way of achieving this, but works in the current framework. Signed-off-by: Mark Jackson <mpfj...
```diff diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 813b6844cdf6..caec25a2eec6 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c @@ -1091,7 +1091,9 @@ at32_add_device_eth(unsigned int id, struct eth_platform_data *data) pin_ma...
ceab2fe84987a9b2dbe6107f83ac99c98040abcc
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9175): Remove NULL pointer in stb6000 driver.
Problem Details: Remove NULL pointer in stb6000 driver, as it raises error for DvbWorld USB card. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/stb6000.c b/drivers/media/dvb/frontends/stb6000.c index 7d65123b4ec9..0e2cb0df1441 100644 --- a/drivers/media/dvb/frontends/stb6000.c +++ b/drivers/media/dvb/frontends/stb6000.c @@ -201,12 +201,13 @@ struct dvb_frontend *stb6000_attach(struct dvb_frontend *fe, int addr, ...
e5cefa82ce31b14574947e570d638a6d58225338
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9172): S2API: Bugfix related to DVB-S / DVB-S2 tuning for the legacy API.
Problem Details: Fixes switching from S2API to legacy where legacy params given to S2API aware demods are cached ones and not those implied in the legacy API. It was found (on an S2API aware demod at least) that after using an S2API aware application and then switching to a legacy application that prior S2API params w...
```diff diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index f44b64b8e614..ff8cda0ac333 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -900,6 +900,8 @@ void dtv_property_cache_sync(struct dvb_frontend *fe, str...
4aae8efb4908fa3f80dc1177d093443bc09adf5f
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9171): S2API: Stop an OOPS if illegal commands are dumped in S2API.
Problem Details: Quick fix to stop an OOPS if illegal commands are dumped in S2API. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 4c3f0d7e355c..f44b64b8e614 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -848,6 +848,13 @@ void dtv_property_dump(struct dtv_property *tvp) { in...
01a8f038c07c4119029c63f1ed1c6ac986665d48
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9170): cx24116: Sanity checking to data input via S2API to the cx24116 demod.
Problem Details: Add some sanity checking to data input via S2API to the cx24116 demod. This patch is valid for both s2-mfe and s2. It was found when testing KAFFEINE with S2API support that invalid modulation modes amongst other parameters were being delivered to the demod. In order to debug this sanity checking has ...
```diff diff --git a/drivers/media/dvb/frontends/cx24116.c b/drivers/media/dvb/frontends/cx24116.c index 02ed4ef79c67..808ef2995d80 100644 --- a/drivers/media/dvb/frontends/cx24116.c +++ b/drivers/media/dvb/frontends/cx24116.c @@ -84,7 +84,8 @@ static int debug = 0; #define CX24116_ROLLOFF_035 (0x02) /* pilot bit *...
a343914831a8e29d89af3b26495ab1136a9e3153
Analyze and fix the following issue in the Linux kernel code: libiscsi: fix locking in iscsi_eh_device_reset
Problem Details: We must be using the bh spin locking functions in iscsi_eh_device_reset becuase the session lock interacts with a thread and softirq. This patch also fixes up a bogus comment and check in fail_command, because no one drops the lock (bnx2i did but it is not going upstream yet and there were other refco...
```diff diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 5aa0db150436..801c7cf54d2e 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -404,11 +404,6 @@ static void fail_command(struct iscsi_conn *conn, struct iscsi_task *task, conn->session->queued_cmdsn--; else conn->ses...
21536062d98938dfcfbae593a26c154e359749dc
Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi class: fix endpoint id handling
Problem Details: Some endpoint code was using unsigned int and some was using uint64_t. This converts it all to uint64_t. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index f9e45f83e467..4a803ebaf508 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -138,7 +138,7 @@ static ssize_t show_ep_handle(struct device *dev, struct device_attribute *attr,...
1d9edf0270cb5a434d32e95279ce9493581906b3
Analyze and fix the following issue in the Linux kernel code: [SCSI] libiscsi: fix data corruption when target has to resend data-in packets
Problem Details: iscsi_tcp was updating the exp_statsn (exp_statsn acknowledges status and tells the target it is ok to let the resources for a iscsi pdu to be reused) before it got all the data for pdu read into OS buffers. Data corruption was occuring if something happens to a packet and the network layer requests a ...
```diff diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 2a2f0094570f..e960f00da93a 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -523,22 +523,20 @@ iscsi_tcp_cleanup_task(struct iscsi_conn *conn, struct iscsi_task *task) } /** - * iscsi_data_rsp - SCSI Data-In Respon...
bd623e79fb6bca7ab685bb1f7376476a81ce10bb
Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: Issue correct protection operation
Problem Details: Use the same logic to prepare RD/WRPROTECT and the protection operation. Fixes a corner case where we could issue an unprotected CDB and yet tell the HBA to do DIF to the drive. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartne...
```diff diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index a7b53be63367..fec034557c38 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -384,7 +384,7 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq) sector_t block = rq->sector; sector_t threshold; unsigned int this_count = rq->n...
c82dc88ddaf17112841dd3a6b08352968555ee08
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_error: fix target reset handling
Problem Details: There's a target reset bug. This loop: for (id = 0; id <= shost->max_id; id++) { Never terminates if shost->max_id is set to ~0, like aic94xx does. It's also pretty inefficient since you mostly have compact target numbers, but the max_id can be very high. The best way would be to sort the recover...
```diff diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index ad019ece2139..94ed262bdf0c 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1065,10 +1065,10 @@ static int scsi_eh_target_reset(struct Scsi_Host *shost, struct list_head *done_q) { struct scsi_cmnd *scmd, ...
90160e010b6f3a91a9bb044bbe6723731e6f366c
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.2.8 : Miscellaneous Discovery Fixes
Problem Details: Miscellaneous Discovery fixes: - Fix rejection followed by acceptance in handling RPL and RPS unsolicited events - Fix for vport delete crash - Fix PLOGI vs ADISC race condition Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 43049b9d64c9..2e24b4fe2be5 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1555,6 +1555,83 @@ lpfc_issue_els_prli(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, return 0; } +/** + * lpfc_r...
fff9d40ce0eb4b46f3e186823ceab6bc02c3e5d3
Analyze and fix the following issue in the Linux kernel code: [SCSI] fc class: unblock target after calling terminate callback (take 2)
Problem Details: When we block a rport and the driver implements the terminate callback we will fail IO that was running quickly. However IO that was in the scsi_device/block queue sits there until the dev_loss_tmo fires, and this can make it look like IO is lost because new IO will get executed but that IO stuck in th...
```diff diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index d5f7653bb94b..1e71abf0607a 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -2133,8 +2133,7 @@ fc_attach_transport(struct fc_function_template *ft) SETUP_PRIVATE_RPORT_ATTRIBUTE_RD(rol...
f0c0a376d0fcd4c5579ecf5e95f88387cba85211
Analyze and fix the following issue in the Linux kernel code: [SCSI] Add helper code so transport classes/driver can control queueing (v3)
Problem Details: SCSI-ml manages the queueing limits for the device and host, but does not do so at the target level. However something something similar can come in userful when a driver is transitioning a transport object to the the blocked state, becuase at that time we do not want to queue io and we do not want the...
```diff diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 2ac3cb2b9081..f8b79d401d58 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -754,8 +754,12 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd) } spin_unlock_irqrestore(host->host_lock, flags); if (rtn) { - scsi_queue_insert(cmd, (rtn =...
4aa02396f934b355a4002ea9bc524aa42d6b53d6
Analyze and fix the following issue in the Linux kernel code: ALSA: ASoC: Fix compile-time warning for tlv320aic23.c
Problem Details: Fixes this warning: sound/soc/codecs/tlv320aic23.c: In function 'tlv320aic23_write': sound/soc/codecs/tlv320aic23.c:104: warning: passing argument 2 of 'codec->hw_write' makes pointer from integer without a cast Replaces i2c smbus write function with standard i2c write function Signed-off-by: Arun K...
```diff diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index bac7815e00fb..44308dac9e18 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c @@ -84,7 +84,7 @@ static int tlv320aic23_write(struct snd_soc_codec *codec, unsigned int reg, unsigned int value...
ba340b40a5f65261731583f67d7ec8cafbf5cfaa
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9168): Add support for MSI TV@nywhere Plus remote
Problem Details: The IR controller has a couple quirks. It won't respond until some other device on the bus is probed. To work around that, probe 0x50 first. Then, since it won't respond to a zero-byte read, probe with a one-byte read. Signed-off-by: Brian Rogers <brian_rogers@comcast.net> [mchehab.redhat.com: Fix mer...
```diff diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c index b7ed88c59b54..4952aeb5dd80 100644 --- a/drivers/media/common/ir-keymaps.c +++ b/drivers/media/common/ir-keymaps.c @@ -517,7 +517,8 @@ EXPORT_SYMBOL_GPL(ir_codes_adstech_dvb_t_pci); /* ------------------------------------...
2bd7ac55c31cb4f42e331d69dde9fc034a68944f
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9166): ivtv - Fix potential race condition in yuv handler
Problem Details: Modified yuv register update handling to remove a potential race condition which could occur with the first video frame. Also removed a forced yuv position update, since changing the source video dimensions or interlace settings doesn't affect the frame already being displayed. Signed-off-by: Ian Arm...
```diff diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h index be2d779dba12..bc29436e8a3c 100644 --- a/drivers/media/video/ivtv/ivtv-driver.h +++ b/drivers/media/video/ivtv/ivtv-driver.h @@ -506,6 +506,8 @@ struct yuv_playback_info struct v4l2_rect main_rect; u32 v4l2_src...
ec9faa1cfac1dd64a2a865dc7c577f3d483656bd
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9165): ivtv: V4L2_FBUF_FLAG_OVERLAY status fix
Problem Details: When the framebuffer format was queried via VIDIOC_G_FBUF, V4L2_FBUF_FLAG_OVERLAY would only be correctly returned for certain screen depths. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index 3d0013bdd1fd..3c2628a63015 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c @@ -1363,6 +1363,9 @@ static int ivtv_g_fbuf(struct file *file, void *fh, struct v4l2_framebu...
c777549fc9c5c704707394b0235a9a6794247b83
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9163): ivtvfb: fix sparse warnings and improve write function
Problem Details: Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/video/ivtv/ivtvfb.c index bdfda48e56bf..249758e53f5f 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c @@ -275,7 +275,6 @@ static int ivtvfb_prep_dec_dma_to_device(struct ivtv *itv, int size_in_bytes) { ...
a8b864354e060dda1000e62d1fea7c1274581caf
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9162): ivtv: fix raw/sliced VBI mixup
Problem Details: The service_set field was used in saa7115 and cx25840 to determine whether raw or sliced VBI was desired. This is incorrect since it is perfectly valid to select sliced VBI with a service_set of 0. Instead these drivers should checked on VIDIOC_S_FMT whether the type field matches the raw or sliced VB...
```diff diff --git a/drivers/media/video/cx25840/cx25840-vbi.c b/drivers/media/video/cx25840/cx25840-vbi.c index 69f2bbdbb929..58e6ef1c28a0 100644 --- a/drivers/media/video/cx25840/cx25840-vbi.c +++ b/drivers/media/video/cx25840/cx25840-vbi.c @@ -141,10 +141,11 @@ int cx25840_vbi(struct i2c_client *client, unsigned int...
d4f59de43ee5dd632d4068b6486e45802e6e853d
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9159): saa5249: fix compile errors
Problem Details: Add missing include. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 421071cc99b8..3bb959c25d9d 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c @@ -48,6 +48,7 @@ #include <linux/i2c.h> #include <linux/smp_lock.h> #include <linux/mutex.h> +#include <linux/delay.h> #...
741e1f3b81c22c81f4ef401856cd22cad0bbd554
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9157): cx18/ivtv: add 'PCI:' prefix to bus_info.
Problem Details: Suggested by Martin Dauskardt. This is conform what the other drivers do. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/cx18/cx18-ioctl.c b/drivers/media/video/cx18/cx18-ioctl.c index 83aa9cb02e00..f0ca50f5fdde 100644 --- a/drivers/media/video/cx18/cx18-ioctl.c +++ b/drivers/media/video/cx18/cx18-ioctl.c @@ -346,7 +346,7 @@ static int cx18_querycap(struct file *file, void *fh, strlcpy(vcap->d...
deffc6edacb74f080ca5918ef9c2cd30c2c9686e
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - some serial header files set RTS to an input when they should all be outputs
Problem Details: Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
```diff diff --git a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h index 34ab0e4e4242..f3d9e495230c 100644 --- a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h +++ b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h @@ -158,7 +158,7 @@ s...
90b698dd47f3929f20746f828e2cd648bc6539dd
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9151): dsbr100: Add returns and fix codingstyle for vidioc_s_ctrl
Problem Details: Added return -EBUSY and fixed codingstyle issue Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c index b3a5cb1adf3a..66783fffe4c1 100644 --- a/drivers/media/radio/dsbr100.c +++ b/drivers/media/radio/dsbr100.c @@ -360,11 +360,15 @@ static int vidioc_s_ctrl(struct file *file, void *priv, switch (ctrl->id) { case V4L2_CID_AUDIO_MUT...
541dfa87f9285b2ff7e703a5eab81ad821de7f6e
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9146): af901x: fix some compiler errors and warnings
Problem Details: - cast firmware data to u8 - remove cpu_to_le16 from switch-case label Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index 8c183e55daa4..67b13062a148 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c @@ -661,7 +661,7 @@ static int af9015_download_firmware(struct usb_device *udev, len = remainder; ...
2dcd4e4766697f3d15284c48d2ef5192bf58131e
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9143): af9015: fix wrong GPIO
Problem Details: - fix wrong GPIO that causes 2nd FE not to work ater warmboot Thanks to Andrew Williams <andrew.williams@joratech.com> for reporting this. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index 3f6217bd0638..87752ca9772a 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c @@ -54,7 +54,6 @@ static struct af9013_config af9015_af9013_config[] = { .output_mode = AF9013_OUTPUT_...
6a2ae2d9f9212de47c16e23080162aada882c8b6
Analyze and fix the following issue in the Linux kernel code: dumpstack: x86: various small unification steps, fix
Problem Details: After "dumpstack: x86: various small unification steps", the assembler gives the following compile error. The error is in dumpstack_64.c. {standard input}: Assembler messages: {standard input}:720: Error: Incorrect register `%rbx' used with `l' suffix {standard input}:1340: Error: Incorrect register `...
```diff diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index 13379a988292..086cc8118e39 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c @@ -17,7 +17,7 @@ #include <asm/stacktrace.h> #define STACKSLOTS_PER_LINE 4 -#define get_bp(bp) asm("movl %%rbp, %0" ...
699d2937d45d9dabc1772d0d07501ccc43885c23
Analyze and fix the following issue in the Linux kernel code: traps: x86: converge trap_init functions
Problem Details: - set_system_gate on i386 is really set_system_trap_gate - set_system_gate on x86_64 is really set_system_intr_gate - ist=0 means no special stack switch is done: - introduce STACKFAULT_STACK, DOUBLEFAULT_STACK, NMI_STACK, DEBUG_STACK and MCE_STACK as on x86_64. - use the _ist variants with XXX_S...
```diff diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index 953172af6e51..2c7ea3827713 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c @@ -847,10 +847,12 @@ void __init trap_init(void) #endif set_intr_gate(0, &divide_error); - set_intr_gate(1, &debug); - set_intr_gat...
3d2a71a596bd9c761c8487a2178e95f8a61da083
Analyze and fix the following issue in the Linux kernel code: x86, traps: converge do_debug handlers
Problem Details: Make the x86_64-version and the i386-version of do_debug more similar. - introduce preempt_conditional_sti/cli to i386. The preempt-count is now elevated during the trap handler, like on x86_64. It does not run on a separate stack, however. - replace an open-coded "send_sigtrap" - copy some comme...
```diff diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index 7eb1203c909d..953172af6e51 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c @@ -88,6 +88,20 @@ static inline void conditional_sti(struct pt_regs *regs) local_irq_enable(); } +static inline void preempt_condi...
a28680b4b821a262fd3b5e57a28c148b5f9e662a
Analyze and fix the following issue in the Linux kernel code: x86, traps: split out math_error and simd_math_error
Problem Details: Split out math_error from do_coprocessor_error and simd_math_error from do_simd_coprocessor_error, like on i386. While at it, add the "error_code" parameter to do_coprocessor_error, do_simd_coprocessor_error and do_spurious_interrupt_bug. This does not change the generated code, but brings the declara...
```diff diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c index 1cd61ddd90be..b295ebf0cb3f 100644 --- a/arch/x86/kernel/traps_64.c +++ b/arch/x86/kernel/traps_64.c @@ -452,18 +452,12 @@ static int kernel_math_error(struct pt_regs *regs, const char *str, int trapnr) * the correct behaviour even in t...
af5c2bd16ac2e5688c3bf46ea1f95112d696d294
Analyze and fix the following issue in the Linux kernel code: x86: fix virt_addr_valid() with CONFIG_DEBUG_VIRTUAL=y, v2
Problem Details: virt_addr_valid() calls __pa(), which calls __phys_addr(). With CONFIG_DEBUG_VIRTUAL=y, __phys_addr() will kill the kernel if the address *isn't* valid. That's clearly wrong for virt_addr_valid(). We also incorporate the debugging checks into virt_addr_valid(). Signed-off-by: Vegard Nossum <vegardno@...
```diff diff --git a/arch/x86/kernel/doublefault_32.c b/arch/x86/kernel/doublefault_32.c index 395acb12b0d1..b4f14c6c09d9 100644 --- a/arch/x86/kernel/doublefault_32.c +++ b/arch/x86/kernel/doublefault_32.c @@ -66,6 +66,6 @@ struct tss_struct doublefault_tss __cacheline_aligned = { .ds = __USER_DS, .fs = __KERN...
14adf855baefad5ac3b545be23a64e6b61d6b74a
Analyze and fix the following issue in the Linux kernel code: x86: move prefill_possible_map calling early, fix, V2
Problem Details: Commit 4a701737 ("x86: move prefill_possible_map calling early, fix") is the wrong fix: prefill_possible_map() needs to be available even when CONFIG_HOTPLUG_CPU is not set. A followon patch will do that. Fix this correctly by making prefill_possible_map() available even when CONFIG_HOTPLUG_CPU is not...
```diff diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index a778e221ccfb..23913785c262 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1261,39 +1261,8 @@ void __init native_smp_cpus_done(unsigned int max_cpus) check_nmi_watchdog(); } -#ifdef CONFIG_HOTPLUG_CPU - -sta...
d2f904bb9a1ba88a58a03612abd8c6c54bdaf73a
Analyze and fix the following issue in the Linux kernel code: x86, uv: fix for size of hub mappings
Problem Details: Fix the size of the mappings of UV hub registers. Size must be a function of the maximum node number within the SSI. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c index ae2ffc8a400c..8cf4ec2a37d9 100644 --- a/arch/x86/kernel/genx2apic_uv_x.c +++ b/arch/x86/kernel/genx2apic_uv_x.c @@ -286,12 +286,13 @@ static __init void map_low_mmrs(void) enum map_type {map_wb, map_uc}; -static __init v...