id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
9bbf1ecdb36e2395eecbf04229eaaedce3589db5
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: Fixes rounding issues in vis.c
Problem Details: This patches fixes two rounding issues in vis.c for sending and purging vis packets. Before, the timers and timeouts always got rounded down to seconds, though we want a precision in milliseconds. This also fixes a kernel panic that occures when lowering the timer for sending vis packets (vis_interval...
```diff diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c index 086da871cd59..054631012138 100644 --- a/drivers/staging/batman-adv/vis.c +++ b/drivers/staging/batman-adv/vis.c @@ -377,7 +377,7 @@ static void purge_vis_packets(void) if (info == my_vis_info) /* never purge own data. */ ...
b6c359767bc743a7b6830660daa8f7e5c4273ad8
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: initialize static hash iterators
Problem Details: instead of dynamically registering hash iterators, calling functions are changed to register the iterator objects statically. The two advantages are: * no memory leaks when aborting from hash_iterate() * no calls to kmalloc/kfree, therefore a little faster/safer Tested with 9 QEMU instances, no obv...
```diff diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index 28d02f68a3f8..7c885926b167 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -318,7 +318,7 @@ int hardif_add_interface(char *dev, int if_num) ...
4ce21a7faf320bdb750a2e1639f8f2dbb27bdb89
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: Replace KERN_DEBUG with bat_dbg
Problem Details: Ameya Palande requested we replace printk(KERN_DEBUG "") by pr_debug() I decided it was better to use our debug macro. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/batman-adv/TODO b/drivers/staging/batman-adv/TODO index ea6dcf94d661..8c2b89e82ad7 100644 --- a/drivers/staging/batman-adv/TODO +++ b/drivers/staging/batman-adv/TODO @@ -29,12 +29,6 @@ -> PRIMARY) => logging -* the log level LOG_TYPE_CRIT, LOG_TYPE_WARN & LOG_TYPE_NOTICE will be...
acdfd0e088502dc225f594b5a5598cab53ffd375
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: Remove NULL pointer check
Problem Details: It is safe to call kfree(NULL) which makes this extra check unneeded. It was found using checkpatch.pl from linux-2.6 Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman...
```diff diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index e9cb977d0016..28d02f68a3f8 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -399,8 +399,7 @@ int hardif_add_interface(char *dev, int if_num) ...
1769fd86e13eadeca64881fb8494a17afeccbbbf
Analyze and fix the following issue in the Linux kernel code: Staging: dt3155: coding style cleanups for allocator code
Problem Details: This fixes up the worst of the coding style errors for the allocator code. Cc: Scott Smedley <ss@aao.gov.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c index 90429db1c5f7..c1b85447c0e0 100644 --- a/drivers/staging/dt3155/allocator.c +++ b/drivers/staging/dt3155/allocator.c @@ -26,7 +26,7 @@ Date Programmer Description of changes made ------------------------------...
d512a142f0a3d5ce138880fb2a70462542d5f711
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192su: Use z format qualifier for output of sizeof()
Problem Details: $ gcc --version gcc (Debian 4.4.2-5) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/rtl8192su/ieee80211/rtl819x_BAP...
```diff diff --git a/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c index 6eb1096866af..5a3888450ab3 100644 --- a/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c @@ -339,7 +339,10 @@ int ieee8021...
3fc0d278e3198c8aa9baa71c49a8364d31686ba9
Analyze and fix the following issue in the Linux kernel code: staging: Fix misspelling of "invocation" in comment.
Problem Details: A comment misspells "invocation"; this fixes it. No code changes. Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 925678babd9e..c6a9e17ec79b 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -52,7 +52,7 @@ * around the register accesses. The next higher level represents C-callab...
39cfb97b0d89a99c8e50782b17e65114b89c2e59
Analyze and fix the following issue in the Linux kernel code: staging: Fix misspelling of "should" and "shouldn't" in comments.
Problem Details: Some comments misspell "should" or "shouldn't"; this fixes them. No code changes. Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c index 0af12fd2a40a..fbc26a027de4 100644 --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c @@ -17,7 ...
2ed71d5a14c887b7632aa21579ff7fc5770381d8
Analyze and fix the following issue in the Linux kernel code: staging: Fix misspelling of "successful" and variants.
Problem Details: Some comments and one message misspell "successful" or variants of the word; this fixes them. No change in functionality. Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/altpciechdma/altpciechdma.c b/drivers/staging/altpciechdma/altpciechdma.c index 2f07dd4563ac..2a02f8e625f7 100644 --- a/drivers/staging/altpciechdma/altpciechdma.c +++ b/drivers/staging/altpciechdma/altpciechdma.c @@ -894,7 +894,7 @@ static int __devinit probe(struct pci_dev *dev, c...
da94a755cabe96d2c00af2b1b1aff84307c437fe
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Small code fixes for r819xE_firmware.c
Problem Details: Signed-off-by: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rtl8192e/r819xE_firmware.c b/drivers/staging/rtl8192e/r819xE_firmware.c index 1f9e413bcd49..e05ba1748d30 100644 --- a/drivers/staging/rtl8192e/r819xE_firmware.c +++ b/drivers/staging/rtl8192e/r819xE_firmware.c @@ -1,5 +1,5 @@ /* - * Procedure: Init boot code/firmware code/data s...
4db3d5e4e7fce813648215d99fdc5d0fcb73128c
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Code style fixes for r819xE_phy.h
Problem Details: Signed-off-by: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rtl8192e/r819xE_phy.h b/drivers/staging/rtl8192e/r819xE_phy.h index fa77abe88827..41e0d777eabd 100644 --- a/drivers/staging/rtl8192e/r819xE_phy.h +++ b/drivers/staging/rtl8192e/r819xE_phy.h @@ -1,43 +1,46 @@ #ifndef _R819XU_PHY_H #define _R819XU_PHY_H -/* Channel switch:The size o...
8f2668418f182ac6b50b994851c36bd0a116e4f8
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: fix more coding style issues.
Problem Details: Fixes to the way code looks. Signed-off-by: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rtl8192e/r8190_rtl8256.h b/drivers/staging/rtl8192e/r8190_rtl8256.h index 7d9095a70aec..ce49c606521a 100644 --- a/drivers/staging/rtl8192e/r8190_rtl8256.h +++ b/drivers/staging/rtl8192e/r8190_rtl8256.h @@ -1,28 +1,33 @@ -/* - This is part of the rtl8180-sa2400 driver - released un...
789d9dbdad5cb24fbf0c0e4fa5c5f1b792e4e81e
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: fix some codingstyle issues
Problem Details: dot11d.h needed a good refactoring - I've dropped some of the // comments or transformed them to match the kernel documentation. r8180_93cx6.h - fixed a little bit the copyright section. Signed-off-by: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h index 15b7a4ba37b6..5b0e2dbc2bb8 100644 --- a/drivers/staging/rtl8192e/dot11d.h +++ b/drivers/staging/rtl8192e/dot11d.h @@ -1,102 +1,96 @@ -#ifndef __INC_DOT11D_H -#define __INC_DOT11D_H +#ifndef INC_DOT11D_H +#define INC_DOT11D_...
c4ad074f11acc46a4ded25dec4f4c2b8d2d4ebb8
Analyze and fix the following issue in the Linux kernel code: Staging: iio: checkinclude.pl fix
Problem Details: Remove <linux/device.h> which is included twice Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index 359ff9208f36..b746cf603225 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c @@ -8,7 +8,6 @@ */ #include <linux/kernel.h> -#include <linux/device.h> #include <linux/module.h> #include <linux/devi...
734cc82a65cd5abc1b616fb0699eb2c251de7831
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: Fix the naming of the debug option.
Problem Details: So that the configuration hierarchy is correct, set the debug option to have the same base as the main BATMAN option. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/batman-adv/Kconfig b/drivers/staging/batman-adv/Kconfig index 1d74dabf9511..69e8fb039be0 100644 --- a/drivers/staging/batman-adv/Kconfig +++ b/drivers/staging/batman-adv/Kconfig @@ -14,10 +14,10 @@ config BATMAN_ADV http://www.open-mesh.org/ for more information and user sp...
8a2e042c2d9b4f1252dbbbb7c31bd3f8af19c8f2
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: Split originator handling parts out of routing.c
Problem Details: Bug found and fixed in origional version by Linus Luessing. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Linus Luessing <linus.luessing@web.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/batman-adv/Makefile b/drivers/staging/batman-adv/Makefile index 64bdb7828e99..42b4e6370263 100644 --- a/drivers/staging/batman-adv/Makefile +++ b/drivers/staging/batman-adv/Makefile @@ -19,4 +19,4 @@ # obj-m += batman-adv.o -batman-adv-objs := main.o proc.o send.o routing.o soft...
8d4ecdda9870d0999ebb8ed59293f420b5d244fd
Analyze and fix the following issue in the Linux kernel code: Staging: mimio: checkpatch.pl line > 80 chars fixes
Problem Details: Rearrange code and cleanup the information to get rid of checkpatch.pl line > 80 chars complaints. Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/mimio/mimio.c b/drivers/staging/mimio/mimio.c index 5bdbe02eb793..2cfef4a0851f 100644 --- a/drivers/staging/mimio/mimio.c +++ b/drivers/staging/mimio/mimio.c @@ -1,47 +1,46 @@ /* * Hardware event => input event mapping: * + * BTN_TOOL_PEN 0x140 black + * BTN_TOOL_RUB...
d753fa1df300fe9215a08603f1f8ac18825839eb
Analyze and fix the following issue in the Linux kernel code: Staging: mimio: Fix checkpatch.pl spacing errors
Problem Details: Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/mimio/mimio.c b/drivers/staging/mimio/mimio.c index 1ba8103f5003..4d7a602a919c 100644 --- a/drivers/staging/mimio/mimio.c +++ b/drivers/staging/mimio/mimio.c @@ -145,7 +145,7 @@ static void mimio_rx_handler(struct mimio *, unsigned char *, unsigned int); static int mimio_tx(struct ...
ead1f3e301e2d886ef89f8d0c82b4d495f2a81c2
Analyze and fix the following issue in the Linux kernel code: Staging: vme: Fix checkpatch errors on VME core.
Problem Details: Running checkpatch on the core VME code highlights many errors. Fix them. Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c index 994fdb9b2127..c915e9285780 100644 --- a/drivers/staging/vme/vme.c +++ b/drivers/staging/vme/vme.c @@ -37,8 +37,8 @@ static unsigned int vme_bus_numbers; DEFINE_MUTEX(vme_bus_num_mtx); -static void __exit vme_exit (void); -static int __...
1c47faa0af6f9316e863174f6d30ede60ebf7e36
Analyze and fix the following issue in the Linux kernel code: Staging: otus: Fix branch in zfProtRspSim()
Problem Details: This semicolon is misplaced. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/otus/80211core/ctxrx.c b/drivers/staging/otus/80211core/ctxrx.c index ac54d5a636b0..7fa4f48fc8ca 100644 --- a/drivers/staging/otus/80211core/ctxrx.c +++ b/drivers/staging/otus/80211core/ctxrx.c @@ -536,8 +536,7 @@ void zfProtRspSim(zdev_t* dev, zbuf_t* buf) zm_msg2_rx(ZM_LV...
cb13887657ec7130ff3e4ea7f78cda2e8a943b30
Analyze and fix the following issue in the Linux kernel code: Staging: otus: fix some sparse warnings
Problem Details: *apdbg.c: use NULL pointer instead of 0 interger. Also make two functions private. Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/otus/apdbg.c b/drivers/staging/otus/apdbg.c index 0eb93f19958a..b59028e7e33c 100644 --- a/drivers/staging/otus/apdbg.c +++ b/drivers/staging/otus/apdbg.c @@ -90,8 +90,27 @@ struct zdap_ioctl { #endif -char hex(char); -unsigned char asctohex(char *str); +static char hex(char v) ...
ccf972bd6bcb35ebd38e0a530c86088e45102aa4
Analyze and fix the following issue in the Linux kernel code: Staging: dream: fix memory leak in camera error path
Problem Details: cppcheck found that ctrl_pmsm is leaked if the open operation fails. Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index 7d938772eacc..87e118d18827 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c @@ -1885,8 +1885,10 @@ static int msm_open_control(struct inode *inode, struc...
e61e642c2a0dc283c52cec76a223ac0699773633
Analyze and fix the following issue in the Linux kernel code: ALSA: usbaudio - remove debug "SAMPLE BYTES" printk line
Problem Details: Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index ea3eaa53d637..11b0826b8fe6 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2483,7 +2483,6 @@ static int parse_audio_format_i_type(struct snd_usb_audio *chip, sample_width, sample_bytes); } /* check the format byte size...
8d75da8afd068fa58b35e69c7c8c46770d9e7a98
Analyze and fix the following issue in the Linux kernel code: nfsd4: fix minor memory leak
Problem Details: There's no need to allocate this cred more than once. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
```diff diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 8fa412ce8021..4bc22c763de7 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -525,6 +525,8 @@ static struct rpc_cred *callback_cred; int set_callback_cred(void) { + if (callback_cred) + return 0; callback_cred = rpc_look...
4fa004373133ece3d9b1c0a7e243b0e53760b165
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix HT rate control configuration
Problem Details: Handling HT configuration changes involved setting the channel with the new HT parameters and then issuing a rate_update() notification to the driver. This behavior changed after the off-channel changes. Now, the channel is not updated with the new HT params in enable_ht() - instead, it is now done wh...
```diff diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index ac34a055c713..0e79e58cf4c9 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c @@ -1323,7 +1323,7 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband, ...
3010673ef5f7bef4b4685566a0713de1b4306c93
Analyze and fix the following issue in the Linux kernel code: x86, mrst: Fix APB timer per cpu clockevent
Problem Details: The current APB timer code incorrectly registers a static copy of the clockevent device for the boot CPU. The per cpu clockevent should be used instead. This bug was hidden by zero-initialized data; as such it did not get exposed in testing, but was discovered by code review. Signed-off-by: Jacob Pan...
```diff diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c index 83a345b0256c..6f27f8b75795 100644 --- a/arch/x86/kernel/apb_timer.c +++ b/arch/x86/kernel/apb_timer.c @@ -84,9 +84,10 @@ struct apbt_dev { int disable_apbt_percpu __cpuinitdata; +static DEFINE_PER_CPU(struct apbt_dev, cpu_apbt_dev...
2329e392accdb1b277927e8d9cbf568ba3f3856d
Analyze and fix the following issue in the Linux kernel code: mqueue: fix typo "failues" -> "failures"
Problem Details: Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 547d9c8631f5..b6cb06451f4b 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -1296,7 +1296,7 @@ static int __init init_mqueue_fs(void) if (mqueue_inode_cachep == NULL) return -ENOMEM; - /* ignore failues - they are not fatal */ + /* ignore failures - they are ...
4294a8eedb17bbc45e1e7447c2a4d05332943248
Analyze and fix the following issue in the Linux kernel code: mqueue: fix mq_open() file descriptor leak on user-space processes
Problem Details: We leak fd on lookup_one_len() failure Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/ipc/mqueue.c b/ipc/mqueue.c index c79bd57353e7..04985a7256c2 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -705,7 +705,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode, dentry = lookup_one_len(name, ipc_ns->mq_mnt->mnt_root, strlen(name)); if (IS_ERR(dentry)...
e555317c083fda01f516d2153589e82514e20e70
Analyze and fix the following issue in the Linux kernel code: ASoC: fix ak4104 register array access
Problem Details: Don't touch the variable 'reg' to construct the value for the actual SPI transport. This variable is again used to access the driver's register cache, and so random memory is overwritten. Compute the value in-place instead. Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Liam Girdwood <lrg@slim...
```diff diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c index b9ef7e45891d..b68d99fb6af0 100644 --- a/sound/soc/codecs/ak4104.c +++ b/sound/soc/codecs/ak4104.c @@ -90,12 +90,10 @@ static int ak4104_spi_write(struct snd_soc_codec *codec, unsigned int reg, if (reg >= codec->reg_cache_size) return ...
4919c5e45a91b5db5a41695fe0357fbdff0d5767
Analyze and fix the following issue in the Linux kernel code: fix race in d_splice_alias()
Problem Details: rehashing the negative placeholder opens a race with d_lookup(); we unhash it almost immediately (by d_move()), but the race window is there. Since d_move() doesn't rely on target being hashed, we don't need that d_rehash() at all. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/dcache.c b/fs/dcache.c index 74da947b160b..f1358e5c3a59 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1222,7 +1222,6 @@ struct dentry *d_splice_alias(struct inode *inode, struct dentry *dentry) BUG_ON(!(new->d_flags & DCACHE_DISCONNECTED)); spin_unlock(&dcache_lock); security_d_inst...
462d60577a997aa87c935ae4521bd303733a9f2b
Analyze and fix the following issue in the Linux kernel code: fix NFS4 handling of mountpoint stat
Problem Details: RFC says we need to follow the chain of mounts if there's more than one stacked on that point. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index a8587e90fd5a..bbf72d8f9fc0 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2121,9 +2121,15 @@ out_acl: * and this is the root of a cross-mounted filesystem. */ if (ignore_crossmnt == 0 && - exp->ex_path.mnt->mnt_root->d_inode ==...
de27a5bf9caef3f1fca1f315aa58eee54fbf929a
Analyze and fix the following issue in the Linux kernel code: fix mnt_mountpoint abuse in smack
Problem Details: (mnt,mnt_mountpoint) pair is conceptually wrong; if you want to use it for generating pathname and for nothing else *and* if you know that vfsmount tree is unchanging, you can get away with that, but the right solution for that is (mnt,mnt_root). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 529c9ca65878..8dffcb7c9d81 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -387,7 +387,7 @@ static int smack_sb_umount(struct vfsmount *mnt, int flags) struct smk_audit_info ad; smk_ad_init(&ad, __func__...
495d6c9c6595ec7b37910dfd42634839431d21fd
Analyze and fix the following issue in the Linux kernel code: VFS: Clean up shared mount flag propagation
Problem Details: The handling of mount flags in set_mnt_shared() got a little tangled up during previous cleanups, with the following problems: * MNT_PNODE_MASK is defined as a literal constant when it should be a bitwise xor of other MNT_* flags * set_mnt_shared() clears and then sets MNT_SHARED (part of MNT_PNODE_MA...
```diff diff --git a/fs/namespace.c b/fs/namespace.c index 25c1dcf9e9eb..d25d4602ab50 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1538,7 +1538,7 @@ static int do_remount(struct path *path, int flags, int mnt_flags, err = do_remount_sb(sb, flags, data, 0); if (!err) { spin_lock(&vfsmount_lock); - mnt_f...
796a6b521d0eadb338adf8cf7e482351c3a8a7b4
Analyze and fix the following issue in the Linux kernel code: Kill CL_PROPAGATION, sanitize fs/pnode.c:get_source()
Problem Details: First of all, get_source() never results in CL_PROPAGATION alone. We either get CL_MAKE_SHARED (for the continuation of peer group) or CL_SLAVE (slave that is not shared) or both (beginning of peer group among slaves). Massage the code to make that explicit, kill CL_PROPAGATION test in clone_mnt() (n...
```diff diff --git a/fs/namespace.c b/fs/namespace.c index c768f733c8d6..25c1dcf9e9eb 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -573,7 +573,7 @@ static struct vfsmount *clone_mnt(struct vfsmount *old, struct dentry *root, mnt->mnt_master = old; CLEAR_MNT_SHARED(mnt); } else if (!(flag & CL_PRIVATE)...
d208bbdda991b8808d9c033ce4d31cb1bd87dcfc
Analyze and fix the following issue in the Linux kernel code: fs: improve remount,ro vs buffercache coherency
Problem Details: Invalidate sb->s_bdev on remount,ro. Fixes a problem reported by Jorge Boncompte who is seeing corruption trying to snapshot a minix filesystem image. Some filesystems modify their metadata via a path other than the bdev buffer cache (eg. they may use a private linear mapping for their metadata, or ...
```diff diff --git a/fs/super.c b/fs/super.c index aff046b0fe78..903896ec7c73 100644 --- a/fs/super.c +++ b/fs/super.c @@ -568,7 +568,7 @@ out: int do_remount_sb(struct super_block *sb, int flags, void *data, int force) { int retval; - int remount_rw; + int remount_rw, remount_ro; if (sb->s_frozen != SB_UNFROZE...
50831450503b828b3f8c031aa664340062afb3b0
Analyze and fix the following issue in the Linux kernel code: ASoC: core: fix tailing whitespace in soc_pcm_apply_symmetry
Problem Details: My editor removes the tailing spaces, which causes problems when changing the soc-core.c Removing the space. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index f30959cc954a..7b4179eca893 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -315,7 +315,7 @@ static int soc_pcm_apply_symmetry(struct snd_pcm_substream *substream) if (codec_dai->symmetric_rates || cpu_dai->symmetric_rates || ...
8a4fd1e4922413cfdfa6c51a59efb720d904a5eb
Analyze and fix the following issue in the Linux kernel code: sparc64: Make prom entry spinlock NMI safe.
Problem Details: If we do something like try to print to the OF console from an NMI while we're already in OpenFirmware, we'll deadlock on the spinlock. Use a raw spinlock and disable NMIs when we take it. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/prom/p1275.c b/arch/sparc/prom/p1275.c index 4b7c937bba61..2d8b70d397f1 100644 --- a/arch/sparc/prom/p1275.c +++ b/arch/sparc/prom/p1275.c @@ -32,10 +32,9 @@ extern void prom_cif_interface(void); extern void prom_cif_callback(void); /* - * This provides SMP safety on the p1275buf. pr...
fac829fdcaf451a20106cbc468ff886466320956
Analyze and fix the following issue in the Linux kernel code: [SCSI] raid_attrs: fix dependency problems
Problem Details: RAID attributes uses scsi_is_sdev_device() to gate some SCSI specific checking code. This causes two problems. Firstly if SCSI == n just defining scsi_is_sdev_device() to return false might not be enough to prevent gcc from emitting the code (and thus referring to undefined symbols), so this needs su...
```diff diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 9191d1ea6451..75f2336807cb 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -1,9 +1,15 @@ menu "SCSI device support" +config SCSI_MOD + tristate + default y if SCSI=n || SCSI=y + default m if SCSI=m + config RAID...
98e1e0f07c3f1820b8ac424569ee9e9916d3665b
Analyze and fix the following issue in the Linux kernel code: [SCSI] libosd: Fix unchecked err return found by smatch
Problem Details: Doing CHECK="smatch --two-passes gives: drivers/scsi/osd/osd_initiator.c +1435 osd_finalize_request warning: assignment to 'ret' was never used Which is an unchecked possible allocation failure, Fixed. Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> S...
```diff diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index 24223473f573..60de85091502 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -1433,6 +1433,10 @@ int osd_finalize_request(struct osd_request *or, cdbh->command_specific_options |= or->a...
88b68033b99b16b42e734ab56a4ed6bc1d53516a
Analyze and fix the following issue in the Linux kernel code: docbook: fix errors from x86 headers merger
Problem Details: Fix docbook errors for x86 headers that were recently merged: docproc: arch/x86/include/asm/atomic_32.h: No such file or directory docproc: arch/x86/include/asm/io_32.h: No such file or directory Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Brian Gerst <brgerst@gmail.com> Signed-off-by: ...
```diff diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index f9a6e2c75f12..1b2dd4fc3db2 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl @@ -45,7 +45,7 @@ </sect1> <sect1><title>Atomic and pointer man...
98bf7c057b35eaf418ac063c4aba4f9f86220b09
Analyze and fix the following issue in the Linux kernel code: Regulators: ab3100 - fix probe and remove annotations
Problem Details: Probe and remove methods should not be marked as __init/__exit but rather __devinit/__devexit so that the needed sections stay in memory in presence of CONFIG_HOTPLUG. This is needed even on non hotpluggable buses. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Mark Brown <broonie@opensource....
```diff diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c index b349db4504b7..7de950959ed2 100644 --- a/drivers/regulator/ab3100.c +++ b/drivers/regulator/ab3100.c @@ -561,7 +561,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = { * for all the different regulators. */ -static int __init ab31...
79ac9bc32094be15732c421ea1d9a18751ec1ecf
Analyze and fix the following issue in the Linux kernel code: regulator: trivial: fix typos in user-visible Kconfig text
Problem Details: Fix Kconfig text for some Wolfson Micro devices. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Alex Chiang <achiang@hp.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 262f62eec837..c565e0d87287 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -91,14 +91,14 @@ config REGULATOR_WM831X of PMIC devices. config REGULATOR_WM8350 - tristate "Wolfson Microelectroncis WM8350 Audio...
50beceba7fdf5f10a04d8a053e62d40b742099ad
Analyze and fix the following issue in the Linux kernel code: crypto: authenc - Move saved IV in front of the ablkcipher request
Problem Details: In crypto_authenc_encrypt() we save the IV behind the ablkcipher request. To save space on the request, we overwrite the ablkcipher request with a ahash request after encryption. So the IV may be overwritten by the ahash request. This patch fixes this by placing the IV in front of the ablkcipher/ahash ...
```diff diff --git a/crypto/authenc.c b/crypto/authenc.c index 6287cfd4d7a0..2bb7348d8d55 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c @@ -386,11 +386,13 @@ static int crypto_authenc_encrypt(struct aead_request *req) { struct crypto_aead *authenc = crypto_aead_reqtfm(req); struct crypto_authenc_ctx *ctx = ...
bb2d3de1885cd69a5fc92af99c4e0c05eb5fc122
Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: Fix VPD buffer allocations
Problem Details: Commit e3deec09 incorrectly assumed that the B0 and B1 page lengths were limited to 32 bytes. The B0 VPD page length is defined to be 64 bytes when the device supports thin provisioning. B1 is always defined to be 64 bytes. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Reported-by: ...
```diff diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 1dd4d8407694..f9995388a574 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1948,7 +1948,7 @@ static void sd_read_block_limits(struct scsi_disk *sdkp) { struct request_queue *q = sdkp->disk->queue; unsigned int sector_sz = sdkp->device->sec...
fc2b989be9190f3311a5ae41289828e24897a20e
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.10: Fix Discovery issues
Problem Details: - Prevent Vport discovery after reg_new_vport completes when physical logged in using FDISC. - Remove fast FCF failover fabric name matching. Allow failover to FCFs connected to different fabrics. - Added fast FCF failover in response to FCF DEAD event on current FCF record. Signed-off-by: James...
```diff diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index e7f548281b94..39739a707ed4 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h @@ -221,6 +221,7 @@ void lpfc_unregister_fcf_rescan(struct lpfc_hba *); void lpfc_unregister_unused_fcf(struct lpfc_hba *); ...
e40a02c12581f710877da372b5d7e15b68a1c5c3
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.10: Fix user interface issues
Problem Details: - Add Logging message for critial errors. - Remove unused variable from lpfc_nodev_tmo_show - Update supress_link_up parameter with #define values. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 84b696463a58..ce0599dcc814 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -623,6 +623,9 @@ struct lpfc_hba { uint32_t cfg_log_verbose; uint32_t cfg_aer_support; uint32_t cfg_suppress_link_up; +#define LPFC_INIT...
9f1177a3f8eee22427eb97e6e00b62ff0be2871f
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.10: Fix Initialization issues
Problem Details: - Add NULL checks to the pointers for the config_async mailbox and dump_wakeup_params mailbox. - Add code to check return value of lpfc_read_sparams everywhere and handle failures appropriately. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@sus...
```diff diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 2359d0bfb734..e58d8aeec09e 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -2024,8 +2024,6 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, READ_LA_VAR *la) int rc; struct fcf_rec...
5512672f75611e9239669c6a4dce648b8d60fedd
Analyze and fix the following issue in the Linux kernel code: [SCSI] hpsa: fix scsi status mis-shift
Problem Details: The SCSI status does not need to be shifted. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 3734f31d08a8..604b4c95a440 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -1006,7 +1006,7 @@ static void complete_scsi_command(struct CommandList *cp, cmd->result = (DID_OK << 16); /* host byte */ cmd->result |= (COMMAND_COMPLET...
f0edafc6628f924a424ab4059df74f46f4f4241e
Analyze and fix the following issue in the Linux kernel code: [SCSI] hpsa: fix firmwart typo
Problem Details: Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 745c62444d25..3734f31d08a8 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -2982,7 +2982,7 @@ static irqreturn_t do_hpsa_intr(int irq, void *dev_id) return IRQ_HANDLED; } -/* Send a message CDB to the firmwart. */ +/* Send a message...
ed58ea2ab58c7d80a07a829a1cc2c4161c300494
Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: Fixing memory allocation for connection
Problem Details: This patch fixes some situations where enough resources were not avaialable when targets exceeded a certain limit Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index b5dca45bae96..5887d7a0e3ff 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -359,7 +359,7 @@ static void beiscsi_get_params(struct beiscsi_hba *phba) + BE2_TMFS + BE2_NOPOU...
90a289e87648f80b63178c463aa7daaf5205805c
Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: Remove debug code
Problem Details: This patch removes some debug lines which are unnecessary and also aligns some lines in code Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index 29a3aaf35f9f..c3928cb8b042 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -482,7 +482,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, tag = mgmt_open_connection(phba, ds...
944b2fbce26ce39555363fd092386807fa5ea08c
Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: Fix for a possible udelay while holding lock
Problem Details: This patch fixes a situation where we could call udelay while holding spin_lock Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index 67098578fba4..cda6642c7368 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -32,18 +32,11 @@ void be_mcc_notify(struct beiscsi_hba *phba) unsigned int alloc_mcc_tag(struct beiscsi_hba *phba...
6c71dcb28ff9b63b814a0b76a256f5dae08d3e0d
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_dh_emc: fix mode select request setup
Problem Details: This patch fixes the request setup code for mode selects. I got the fixes from Hannes Reinecke while trying to hunt down some problems and merged it into one patch. I am sending it because Hannes is busy with other things. The patch fixes: - setting of the length for mode selects. - setting of the dat...
```diff diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c index 61966750bd60..63032ec3db92 100644 --- a/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/drivers/scsi/device_handler/scsi_dh_emc.c @@ -272,7 +272,7 @@ static struct request *get_req(struct scsi_device *sdev, ...
4431d4ce996de2cd2c45583209ba0dbbc9bf2795
Analyze and fix the following issue in the Linux kernel code: tags: Fix spelling error in comment (is->if)
Problem Details: Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/tags.sh b/scripts/tags.sh index 9f459536f289..caa867dba16d 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -17,7 +17,7 @@ ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \ -name .git ) \ -prune -o" -# Do not use full p...
4d27b87785a743fdae653d395a3a4e763269c53c
Analyze and fix the following issue in the Linux kernel code: davinci_emac: off by one
Problem Details: This off by one error was found by smatch. drivers/net/davinci_emac.c +2390 emac_dev_open(13) error: buffer overflow 'priv->mac_addr' 6 <= 6 Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 1ac9440eb3fb..32960b9b02ae 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -2385,7 +2385,7 @@ static int emac_dev_open(struct net_device *ndev) struct emac_priv *priv = netdev_priv(ndev); netif_carrier_o...
bf829370a8d664d87a61697c8a0d6d780c336aa4
Analyze and fix the following issue in the Linux kernel code: cassini: fix off by one
Problem Details: There are only 6 link_modes. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 7cbcfb0ade1c..9bd155e4111c 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c @@ -5072,7 +5072,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, INIT_WORK(&cp->reset_task, cas_reset_task); /* Default link parameters */...
87c1e12b5eeb7b30b4b41291bef8e0b41fc3dde9
Analyze and fix the following issue in the Linux kernel code: ipsec: Fix bogus bundle flowi
Problem Details: When I merged the bundle creation code, I introduced a bogus flowi value in the bundle. Instead of getting from the caller, it was instead set to the flow in the route object, which is totally different. The end result is that the bundles we created never match, and we instead end up with an ever gro...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index a7df3275b860..d74e080ba6c9 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -275,7 +275,8 @@ struct xfrm_policy_afinfo { struct dst_entry *dst, int nfheader_len); int (*fill_dst)(struct xfrm_dst *xdst, - stru...
29044ad1509ecc229f1d5a31aeed7a8dc61a71c4
Analyze and fix the following issue in the Linux kernel code: x86/stacktrace: Don't dereference bad frame pointers
Problem Details: Callers of a stacktrace might pass bad frame pointers. Those are usually checked for safety in stack walking helpers before any dereferencing, but this is not the case when we need to go through one more frame pointer that backlinks the irq stack to the previous one, as we don't have any reliable addre...
```diff diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index 0ad9597073f5..a6c906c9b193 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c @@ -125,9 +125,15 @@ fixup_bp_irq_link(unsigned long bp, unsigned long *stack, { #ifdef CONFIG_FRAME_POINTER struct s...
ac91d85456372a90af5b85eb6620fd2efb1e431b
Analyze and fix the following issue in the Linux kernel code: tracing: Fix warning in s_next of trace file ops
Problem Details: This warning in s_next() can be triggered by lseek(): [<c018b3f7>] ? s_next+0x77/0x80 [<c013e3c1>] warn_slowpath_common+0x81/0xa0 [<c018b3f7>] ? s_next+0x77/0x80 [<c013e3fa>] warn_slowpath_null+0x1a/0x20 [<c018b3f7>] s_next+0x77/0x80 [<c01efa77>] traverse+0x117/0x200 [<c01eff13>] seq_lseek+0xa3/...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 032c57ca6502..5edf410bc540 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1703,6 +1703,7 @@ static void *s_start(struct seq_file *m, loff_t *pos) ftrace_enable_cpu(); + iter->leftover = 0; for (p = iter; p && l < *pos; p...
cbb9bf65ae25dee772e85589136e7dd1c3e743ae
Analyze and fix the following issue in the Linux kernel code: crypto: hash - Fix handling of unaligned buffers
Problem Details: The correct way to calculate the start of the aligned part of an unaligned buffer is: offset = ALIGN(offset, alignmask + 1); However, crypto_hash_walk_done() has: offset += alignmask - 1; offset = ALIGN(offset, alignmask + 1); which actually skips a whole block unless offset % (alignmask + 1)...
```diff diff --git a/crypto/ahash.c b/crypto/ahash.c index 33a4ff45f842..b8c59b889c6e 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -78,7 +78,6 @@ int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err) walk->data -= walk->offset; if (nbytes && walk->offset & alignmask && !err) { - walk->offset +...
2f41a7f11c4bb93c41715008a693cadaee5efd82
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix *staging* driver build with switcheroo off.
Problem Details: This driver is in *staging*. Fix the build with the switcheroo off. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index f5b3cbe7dc80..5f8d987af363 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -852,7 +852,7 @@ extern int nouveau_dma_init(struct nouveau_channel *); extern int nouv...
cedf8a78421943441b9011ce7bcdab55f07d2ea6
Analyze and fix the following issue in the Linux kernel code: USB: backlight, appledisplay: fix incomplete registration failure handling
Problem Details: On error while registering backlight, return it to caller instead of returning 0. Mark struct backlight_ops as const. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c index 516079d703b4..4d2952f1fb13 100644 --- a/drivers/usb/misc/appledisplay.c +++ b/drivers/usb/misc/appledisplay.c @@ -179,7 +179,7 @@ static int appledisplay_bl_get_brightness(struct backlight_device *bd) return pdata->msgdata[1...
8740cc7d0c532e098cc428251c08befd14f087d8
Analyze and fix the following issue in the Linux kernel code: USB: fix I2C API usage in ohci-pnx4008.
Problem Details: i2c_board_info doesn't contain a member called name. i2c_register_client call does not exist. Signed-off-by: Luotao Fu <l.fu@pengutronix.de> Acked-by: Jean Delvare <khali@linux-fr.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/ohci-pnx4008.c b/drivers/usb/host/ohci-pnx4008.c index 2769326da42e..cd74bbdd007c 100644 --- a/drivers/usb/host/ohci-pnx4008.c +++ b/drivers/usb/host/ohci-pnx4008.c @@ -327,7 +327,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) } i2c_adap = i2c_get...
47cb17089c059d24e5da03f2b44ee3a089075b78
Analyze and fix the following issue in the Linux kernel code: USB: usbmon: mask seconds properly in text API
Problem Details: The code does not implement the comment, so timestamps for long traces become confusing instead of wrapping neatly as expected. This was actually observed. Fortunately for API being in debugfs, we can just fix this instead of staying bug-for-bug compatible. Double fortunately, the stable binary API is ...
```diff diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index 16bfb61d24f9..31c11888ec6a 100644 --- a/drivers/usb/mon/mon_text.c +++ b/drivers/usb/mon/mon_text.c @@ -180,7 +180,7 @@ static inline unsigned int mon_get_timestamp(void) unsigned int stamp; do_gettimeofday(&tval); - stamp = tval.t...
67ccbd6f1af3025af3224be5c4f992aaf8811334
Analyze and fix the following issue in the Linux kernel code: USB: tty: sort out the request_room handling for whiteheat
Problem Details: This driver has its own (surplus) backup queue system which wants removing from the receive overflow logic. Do this at the same time as removing the request_room logic Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index e89e0d589eb6..12ed8209ca72 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c @@ -1492,21 +1492,9 @@ static void rx_data_softint(struct work_struct *work) wrap = list_entry(tmp, struct whiteheat_u...
5d3034ab8faea229942e79d867d18722d5375b12
Analyze and fix the following issue in the Linux kernel code: USB: storage: fix misplaced parenthesis
Problem Details: Due to a misplaced parenthesis the usbat_write_block() return value was not stored, but a boolean. USB_STOR_TRANSPORT_NO_SENSE and USB_STOR_TRANSPORT_ERROR were returned as USB_STOR_TRANSPORT_FAILED. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Joe Perches <joe@perches.com> Cc: Alan Stern <ste...
```diff diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c index b62a28814ebe..bd3f415893d8 100644 --- a/drivers/usb/storage/shuttle_usbat.c +++ b/drivers/usb/storage/shuttle_usbat.c @@ -1628,10 +1628,10 @@ static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us)...
cd780694920fbf869b23c8afb0bd083e7b0448c7
Analyze and fix the following issue in the Linux kernel code: USB: fix the idProduct value for USB-3.0 root hubs
Problem Details: This patch (as1346) changes the idProduct value for USB-3.0 root hubs from 0x0002 (which we already use for USB-2.0 root hubs) to 0x0003. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> CC: stable <stable@kernel.org> Signed-off-by: Greg Kroah...
```diff diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index b07ba051118d..2f8cedda8007 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -142,7 +142,7 @@ static const u8 usb3_rh_dev_descriptor[18] = { 0x09, /* __u8 bMaxPacketSize0; 2^9 = 512 Bytes */ 0x6b, 0x1d, /* __le16...
b87c6e86dac1bb5222279cc8ff7e09529e1c4ed9
Analyze and fix the following issue in the Linux kernel code: USB: serial: sierra driver indat_callback fix
Problem Details: A crash has been reported with sierra driver on disconnect with Ubuntu/Lucid distribution based on kernel-2.6.32. The cause of the crash was determined as "NULL tty pointer was being referenced" and the NULL pointer was passed by sierra_indat_callback(). This patch modifies sierra_indat_callback() fun...
```diff diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 6aeea40081c2..fcec46603558 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -594,14 +594,17 @@ static void sierra_indat_callback(struct urb *urb) } else { if (urb->actual_length) { tty = tty_port_t...
05197921ff3dad52d99fd1647974c57d9c28d40e
Analyze and fix the following issue in the Linux kernel code: USB: xhci: Fix finding extended capabilities registers
Problem Details: According "5.3.6 Capability Parameters (HCCPARAMS)" of xHCI rev0.96 spec, value of xECP register indicates a relative offset, in 32-bit words, from Base to the beginning of the first extended capability. The wrong calculation will cause BIOS handoff fail (not handoff from BIOS) in some platform with BI...
```diff diff --git a/drivers/usb/host/xhci-ext-caps.h b/drivers/usb/host/xhci-ext-caps.h index ecc131c3fe33..78c4edac1db1 100644 --- a/drivers/usb/host/xhci-ext-caps.h +++ b/drivers/usb/host/xhci-ext-caps.h @@ -101,12 +101,15 @@ static inline int xhci_find_next_cap_offset(void __iomem *base, int ext_offset) next = ...
49d3380e3f1297ff7bdc700c0a7fe6c3a036b3ab
Analyze and fix the following issue in the Linux kernel code: tty: Fix various bogus WARN checks in the usb serial layer
Problem Details: We are now refcounted and all the port.count checking is no longer valid and in fact produces false warnings. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 9c7e1d563e56..3873660d8217 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -358,10 +358,6 @@ static int serial_write(struct tty_struct *tty, const unsigned char *buf, dbg("%s - port %d,...
bd07c551aae5d2200c7b195142e5ba63f26424da
Analyze and fix the following issue in the Linux kernel code: USB: cp210x: Add 81E8 (Zephyr Bioharness)
Problem Details: As reported in http://bugzilla.kernel.org/show_bug.cgi?id=10980 Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index e2600e7ce4ea..507382b0a9ed 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -91,11 +91,12 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektron...
efcbd3df079a6f8a8a2d5207c4e8429e02356c79
Analyze and fix the following issue in the Linux kernel code: USB: Extend and neaten dbg macros
Problem Details: Add format/argument validation for #ifndef DEBUG dbg macro Neaten dbg macro definitions Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/include/linux/usb.h b/include/linux/usb.h index ad50fc8a7ad3..3492abf82e75 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1566,14 +1566,18 @@ extern void usb_register_notify(struct notifier_block *nb); extern void usb_unregister_notify(struct notifier_block *nb); #ifdef DEBUG -#...
815e173e1d71742f1135fb4d4931e8115a3ca0ef
Analyze and fix the following issue in the Linux kernel code: USB: ehci-dbgp: split PID register updates for IN and OUT pipes
Problem Details: This patch addresses two problems: 1) Bulk reads should always use the DATA0 for the pid, and the write PID should toggle between DATA0 and DATA1. The fix is using dbgp_pid_write_update() and dbgp_pid_read_update(). 2) The delay loop for waiting for a transaction was not long enough to alwa...
```diff diff --git a/drivers/usb/early/ehci-dbgp.c b/drivers/usb/early/ehci-dbgp.c index 2958a1271b20..6e98a3697844 100644 --- a/drivers/usb/early/ehci-dbgp.c +++ b/drivers/usb/early/ehci-dbgp.c @@ -66,8 +66,6 @@ static struct ehci_dev ehci_dev; #define USB_DEBUG_DEVNUM 127 -#define DBGP_DATA_TOGGLE 0x8800 - #ifd...
8e7e61dfbf1ec6418bf89505980b158a8d00d877
Analyze and fix the following issue in the Linux kernel code: USB: f_mass_storage: fix crash on bind() error
Problem Details: init_completion() hasn't been called yet and the thread isn't created if we end up here, so don't call complete() on thread_notifier. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartm...
```diff diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 0553d9a5536b..e6abde39857d 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -2865,7 +2865,6 @@ error_release: /* Call fsg_common_release() directly, ref might be not * i...
2b626dc134d38d0001b98acf8c7293b6bc5ee86d
Analyze and fix the following issue in the Linux kernel code: USB: cdc-acm: fix possible deadlock with multiple openers
Problem Details: The lock must be dropped before usb_autopm_interface_put() is called Signed-off-by: Oliver Neukum <oliver@neukum.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 5155ff2b2282..b97f9309c827 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -553,7 +553,7 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp) acm = acm_table[tty->index]; if (!acm ||...
d7e18a9f2c506467ec7a9c066da45a0f60c6f5a6
Analyze and fix the following issue in the Linux kernel code: USB: g_mass_storage: min(...) warning fixed
Problem Details: This patch fixes warning caused by calling min() macro with arguments of different types: drivers/usb/gadget/f_mass_storage.c:623: warning: \ comparison of distinct pointer types lacks a cast Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsu...
```diff diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 3c835503ffb1..0553d9a5536b 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -620,7 +620,7 @@ static int fsg_setup(struct usb_function *f, *(u8 *) req->buf = fsg->common->n...
5e23e90f33888769ffe253663cc5f3ea0bb6da49
Analyze and fix the following issue in the Linux kernel code: USB: pxa27x_udc: Fix deadlocks on request queueing
Problem Details: As reported by Antonio, there are cases where the ep->lock can be taken twice, triggering a deadlock. The typical sequence is : irq_handler \ -> gadget.complete() \ -> pxa27x_udc.pxa_ep_queue() : ep->lock is taken \ -> gadget.complete() \ ...
```diff diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index e8b4b6992a9d..05b892c3d686 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c @@ -742,13 +742,17 @@ static void ep_del_request(struct pxa_ep *ep, struct pxa27x_request *req) * @ep: pxa physical...
5b520259ab6d661b8d5eb39dd17cc5e4e4553c62
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsotg: replace deprecated dma_sync_single()
Problem Details: This replaces deprecated dma_sync_single() with dma_sync_single_for_cpu(). There is no functional change because dma_sync_single() simply calls dma_sync_single_for_cpu(): static inline void __deprecated dma_sync_single(struct device *dev, dma_addr_t addr, size_t size, enum...
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 2a5ea06f89c8..7e5bf593d386 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -374,7 +374,7 @@ static void s3c_hsotg_unmap_dma(struct s3c_hsotg *hsotg, req->dma = DMA_ADDR_INVALID; hs_req->m...
511e2d0218d04f544065eb277ad475bf14881efe
Analyze and fix the following issue in the Linux kernel code: USB: BKL removal: rio500
Problem Details: This driver had used BKL to guard against disconnect but was incorrectly converted leaving an SMP race. BKL was added to disconnect() to fix this race BKL was removed from ioctl() as the mutex is sufficient on its own. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman ...
```diff diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c index 47ce46bb5b01..a85771b1563d 100644 --- a/drivers/usb/misc/rio500.c +++ b/drivers/usb/misc/rio500.c @@ -77,11 +77,14 @@ static struct rio_usb_data rio_instance; static int open_rio(struct inode *inode, struct file *file) { struct rio_usb...
f7410ced7f931bb1ad79d1336412cf7b7a33cb14
Analyze and fix the following issue in the Linux kernel code: USB: Move hcd free_dev call into usb_disconnect to fix oops
Problem Details: USB: Move hcd free_dev call into usb_disconnect I found a way to oops the kernel: 1. Open a USB device through devio. 2. Remove the hcd module in the host kernel. 3. Close the devio file descriptor. The problem is that closing the file descriptor does usb_release_dev as it is the last reference. us...
```diff diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h index 8953ded69541..a3cdb09734ab 100644 --- a/drivers/usb/core/hcd.h +++ b/drivers/usb/core/hcd.h @@ -248,7 +248,7 @@ struct hc_driver { /* xHCI specific functions */ /* Called by usb_alloc_dev to alloc HC device structures */ int (*alloc_dev)(...
d23356da714595b888686d22cd19061323c09190
Analyze and fix the following issue in the Linux kernel code: USB: fix crash in uhci_scan_schedule
Problem Details: When hardware is removed on a Stratus, the system may crash like this: ACPI: PCI interrupt for device 0000:7c:00.1 disabled Trying to free nonexistent resource <00000000a8000000-00000000afffffff> Trying to free nonexistent resource <00000000a4800000-00000000a480ffff> uhci_hcd 0000:7e:1d.0: remove, sta...
```diff diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 99cd00fd3514..09197067fe6b 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c @@ -735,6 +735,7 @@ static void uhci_stop(struct usb_hcd *hcd) uhci_hc_died(uhci); uhci_scan_schedule(uhci); spin_unlock_irq(&...
9c9a7dbf9a73191a24a13b9a0412355254a122c7
Analyze and fix the following issue in the Linux kernel code: USB: xhci: Fix compile issues with xhci_get_slot_state()
Problem Details: Randy Dunlap reported this error when compiling the xHCI driver: linux-next-20100104/drivers/usb/host/xhci.h:1214: sorry, unimplemented: inlining failed in call to 'xhci_get_slot_state': function body not available The xhci_get_slot_state() function belongs in xhci-dbg.c, since it involves debugging ...
```diff diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c index b2915aea47ee..105fa8b025bb 100644 --- a/drivers/usb/host/xhci-dbg.c +++ b/drivers/usb/host/xhci-dbg.c @@ -406,7 +406,7 @@ static void dbg_rsvd64(struct xhci_hcd *xhci, u64 *ctx, dma_addr_t dma) } } -inline char *xhci_get_slot_stat...
d0ef90b49857b403c1cfa62fce229c967dd4be40
Analyze and fix the following issue in the Linux kernel code: USB: serial: fix DMA buffers on stack for io_edgeport.c
Problem Details: The original code was passing a stack variable as a dma buffer, so I made it an allocated variable. Instead of adding a bunch of kfree() calls, I changed all the error return paths to gotos. Also I noticed that the error checking wasn't correct because usb_get_descriptor() can return negative values....
```diff diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index b97960ac92f2..09456002bac0 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c @@ -372,31 +372,32 @@ static void update_edgeport_E2PROM(struct edgeport_serial *edge_serial) *****************...
401711cb575bbbdb100bc1a14cb2024dfc9b4869
Analyze and fix the following issue in the Linux kernel code: USB: visor: fix DMA buffers on stack
Problem Details: Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index ad1f9232292d..178e4d9abb27 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c @@ -807,10 +807,14 @@ static int clie_3_5_startup(struct usb_serial *serial) { struct device *dev = &serial->dev->dev; int result; -...
d2126326bd71b56fcaa5e86474433d11e253f84d
Analyze and fix the following issue in the Linux kernel code: USB: oti6858: fix DMA buffer on stack
Problem Details: Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index c644e26394b4..2ae97e7195c6 100644 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c @@ -302,7 +302,7 @@ void send_data(struct work_struct *work) struct usb_serial_port *port = priv->port; int count = 0, result...
9e221a35f82cbef0397d81fed588bafba95b550c
Analyze and fix the following issue in the Linux kernel code: USB: mos7840: fix DMA buffers on stack and endianess bugs
Problem Details: Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 2cfe2451ed97..04bef4bebc4a 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -283,12 +283,19 @@ static int mos7840_get_reg_sync(struct usb_serial_port *port, __u16 reg, { struct usb_device *dev = port...
eb771e2c6507e0a317e576a3147252ebcb64035a
Analyze and fix the following issue in the Linux kernel code: USB: mos7720: fix DMA buffers on stack and clean up send_mos_cmd
Problem Details: Change data-argument type from (void *) to (u8 *) to prevent endianess problems. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 763e32a44be0..e081dc0d21de 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -275,13 +275,11 @@ static void mos7720_bulk_out_data_callback(struct urb *urb) * this function will be used for sending comm...
abf492e7b3ae74873688cf9960283853a3054471
Analyze and fix the following issue in the Linux kernel code: USB: kl5kusb105: fix DMA buffers on stack
Problem Details: Cc: Oliver Neukum <oliver@neukum.name> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index 3a7873806f46..731964b5ded6 100644 --- a/drivers/usb/serial/kl5kusb105.c +++ b/drivers/usb/serial/kl5kusb105.c @@ -212,10 +212,19 @@ static int klsi_105_get_line_state(struct usb_serial_port *port, unsigned long *line_st...
ca65d256c8f1604f8ec8e258109d23280687186c
Analyze and fix the following issue in the Linux kernel code: USB: keyspan_pda: fix DMA buffers on stack
Problem Details: Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index 1296a097f5c3..427d377c9d3e 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -429,13 +429,20 @@ static int keyspan_pda_get_modem_info(struct usb_serial *serial, unsigned char *...
e9305d2f4b5ffa9ea0261212d542956bede2a2ff
Analyze and fix the following issue in the Linux kernel code: USB: io_ti: fix DMA buffers on stack
Problem Details: Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index d4cc0f7af400..1691f07548db 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c @@ -413,11 +413,18 @@ static int write_boot_mem(struct edgeport_serial *serial, { int status = 0; int i; - __u8 temp; + u8 *temp; ...
974fccb7aba8ca4ff887836e26c0ac4c99d041ca
Analyze and fix the following issue in the Linux kernel code: USB: cypress_m8: fix endianess bug
Problem Details: Cc: Lonnie Mendez <dignome@gmail.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 1ce1a3a3e21a..2457165304cb 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -376,7 +376,7 @@ static int cypress_serial_control(struct tty_struct *tty, __func__, new_baudrate); /* ...
0954644bf5a5a2281746516ce0f5df988d504c31
Analyze and fix the following issue in the Linux kernel code: USB: cypress_m8: fix DMA buffer on stack
Problem Details: Cc: Lonnie Mendez <dignome@gmail.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 60c200230bc8..1ce1a3a3e21a 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -344,7 +344,8 @@ static int cypress_serial_control(struct tty_struct *tty, { int new_baudrate = 0, retval = 0, ...
f2b5cc834b69d2999b749144481de9a94f01bc48
Analyze and fix the following issue in the Linux kernel code: USB: ch341: fix DMA buffer on stack
Problem Details: Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 5e455f4a792e..2942c6d381d0 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c @@ -392,16 +392,22 @@ static void ch341_break_ctl(struct tty_struct *tty, int break_state) struct usb_serial_port *port = tty->driver_d...
d3ae8562d43fe2b97d605dd67dc67bf8fa9b956a
Analyze and fix the following issue in the Linux kernel code: usb: host: ehci: fix missing kfree in remove path also
Problem Details: Added missing kfree() in ehci_hcd_omap_remove(). Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 74d07f4e8b7d..2460f0d82990 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -681,6 +681,7 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev) iounmap(omap->tll_base); iounmap(omap->uhh_...
565969237ab6e73ce7192684d00d5b890ee308fa
Analyze and fix the following issue in the Linux kernel code: usb: musb: Fix cppi_channel_abort() function to handle Tx abort correctly
Problem Details: This patch fixes the Tx abort/teardown logic. We now wait for the teardown completion interrupt and acknowledge the same by setting the tx_complete register to 0. This change is needed to ensure that abort processing works on DM365 platform. Without this change after completion of abort processing the...
```diff diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c index a44a450c860d..3c69a76ec392 100644 --- a/drivers/usb/musb/cppi_dma.c +++ b/drivers/usb/musb/cppi_dma.c @@ -1191,8 +1191,13 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id) bd = tx_ch->head; + /* + * If Head is null then th...
5274dab6cb99c529b2e7f16bbc8ff9a79be46e7f
Analyze and fix the following issue in the Linux kernel code: usb: musb: workaround toggle bug when doing bulk transfer after isoc
Problem Details: This patch implements the work around for a Mentor controller related bug where it's observed a BULK Tx toggle error on the bus when a BULK IO gets scheduled on an endpoint that was earlier used for handling ISOC transaction and needed to start on 1 toggle. When such a situation arises even if the TXC...
```diff diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 74c4c3698f1e..c3fdd6d69f5e 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -1771,6 +1771,9 @@ static int musb_schedule( int best_end, epnum; struct musb_hw_ep *hw_ep = NULL; struct list_head *h...
f933a0c0fe0ea5f49a35bcd45e3e4850e0606cba
Analyze and fix the following issue in the Linux kernel code: usb: musb: workaround MUSB DMA_INTR sometimes reads zero
Problem Details: MUSB DMA_INTR register may sometimes read zero when infact there was a pending interrupt. Workaround this by reading the DMA_COUNT values for all enabled channels when this condition occurs. Flag these channels as the ones needing to be serviced. Additionally, the absence of a debug print meant we wou...
```diff diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c index a237550f91bf..2fa7d5c00f31 100644 --- a/drivers/usb/musb/musbhsdma.c +++ b/drivers/usb/musb/musbhsdma.c @@ -250,20 +250,39 @@ static irqreturn_t dma_controller_irq(int irq, void *private_data) u8 bchannel; u8 int_hsdma; - u32 a...
66e47e6006a558b33c6f15bd2e072d52c40e0159
Analyze and fix the following issue in the Linux kernel code: USB: ftdi_sio: fix DMA buffers on stack
Problem Details: Also remove unnecessary buffer allocations for zero-length transfers. Reported-by: Matti Aarnio <matti.aarnio@zmailer.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 59b6cbf020a0..a6e5a0d95566 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -935,7 +935,6 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned int clear) { ...
54f328d0c7221675e3c1647e1918172fec1b92c9
Analyze and fix the following issue in the Linux kernel code: USB: ftdi_sio: fix latency-timeout endianess bug
Problem Details: Also fixes DMA transfer to stack for latency buffer. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index ec901ed5d93c..59b6cbf020a0 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1181,22 +1181,28 @@ static int read_latency_timer(struct usb_serial_port *port) { struct ftdi_private *priv = usb_get_...
2bc0d109326e9f2b25fa1dfcc9de2489e1e00e36
Analyze and fix the following issue in the Linux kernel code: usbmon: add bus number to text API
Problem Details: Due to a simple oversight when bus zero was added, the text API fails to deliver the bus number in 'E' messages (which are equivalent of 'C' messages, only for error case). This makes it harder, for instance, use a search-and-highlight in a text editor. So fix it. Also, Alan Stern requested adding tim...
```diff diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c index 385ec0520167..6dd44bc1f5ff 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c @@ -460,8 +460,8 @@ static void mon_bin_event(struct mon_reader_bin *rp, struct urb *urb, char ev_type, int status) { const struct us...