id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
535653b1c22c29d4e8f554928efc87fe138f917d
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: mt9t031: use runtime pm support to restore ADDRESS_MODE registers
Problem Details: If the platform hooks are provided, soc_camera powers off the device on close and powers it on on open. This resets the ADDRESS_MODE registers which then can be different to the value the driver has computed for them. This patch setups runtime pm usage for mt9t031 and uses the resume function to write...
```diff diff --git a/drivers/media/video/mt9t031.c b/drivers/media/video/mt9t031.c index a9061bff79b2..78b4e091d2d5 100644 --- a/drivers/media/video/mt9t031.c +++ b/drivers/media/video/mt9t031.c @@ -8,14 +8,16 @@ * published by the Free Software Foundation. */ -#include <linux/videodev2.h> -#include <linux/slab.h...
02512fe33e9162713cd522937aabc81fcd97ad74
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: bugfix reading problems with demodulator zl10353
Problem Details: Reading from zl10353 with tm6000 has a bug. For example: regs w/o patch with patch 0x06 0x00 0x7f 0x07 0x33 0x30 0x08 0x00 0x00 0x09 0x58 0x50 0x0f 0x31 0x28 0x10 0x00 0x84 This patch provides the workaround for the bug [mchehab@re...
```diff diff --git a/drivers/staging/tm6000/tm6000-i2c.c b/drivers/staging/tm6000/tm6000-i2c.c index a5323303c34a..ec4c9381c14a 100644 --- a/drivers/staging/tm6000/tm6000-i2c.c +++ b/drivers/staging/tm6000/tm6000-i2c.c @@ -56,9 +56,23 @@ static int tm6000_i2c_recv_regs(struct tm6000_core *dev, unsigned char addr, ...
4e11502d4597c6252411dc1b5c16b47d08b5f246
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: add send and recv function
Problem Details: Split the i2c send and receive functions on separate functions [mchehab@redhat.com: CodingStyle and fix the logic for more than 2 read values] Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-i2c.c b/drivers/staging/tm6000/tm6000-i2c.c index fa11173e0fad..a5323303c34a 100644 --- a/drivers/staging/tm6000/tm6000-i2c.c +++ b/drivers/staging/tm6000/tm6000-i2c.c @@ -44,6 +44,36 @@ MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); printk(KERN_DEBUG ...
e28f49b0b2a8e678af62745ffdc4e4f36d7283a6
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: fix some info messages
Problem Details: Fix some messages for add information about TM6010 Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c index cf24340e0874..7cc2ac740d8a 100644 --- a/drivers/staging/tm6000/tm6000-alsa.c +++ b/drivers/staging/tm6000/tm6000-alsa.c @@ -1,6 +1,6 @@ /* * - * Support for audio capture for tm5600/6000 + * Support for audio cap...
685b122906069f9e7b9995bf2b128137c86b558c
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: fix i2c addr test
Problem Details: The i2c addr on I2C core is specified on 7-bit format, but tm6000 expects it on 8-bit format. Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-i2c.c b/drivers/staging/tm6000/tm6000-i2c.c index 656cd199d5e4..050cbe41c12b 100644 --- a/drivers/staging/tm6000/tm6000-i2c.c +++ b/drivers/staging/tm6000/tm6000-i2c.c @@ -87,7 +87,7 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap, msgs[i + 1].buf, msgs...
89eeda67118c10b0d3d0d94006919d7640b26ab4
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: remove hack.c hack.h, switch to zl10353 module
Problem Details: "hack" module were a temporary file with some zl10353 magic. This is not needed anymore. Just remove it. [mchehab@redhat.com: CodingStyle fixes] Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/Makefile b/drivers/staging/tm6000/Makefile index f904d5779c81..93370fccc073 100644 --- a/drivers/staging/tm6000/Makefile +++ b/drivers/staging/tm6000/Makefile @@ -5,8 +5,7 @@ tm6000-objs := tm6000-cards.o \ tm6000-stds.o ifeq ($(CONFIG_VIDEO_TM6000_DVB),y) -tm6000-ob...
583c871467a4ecad2b09030a3a68156065f9b934
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: add different tuner reset for terratec
Problem Details: [mchehab@redhat.com: Fix CodingStyle] Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 268a7de20d6d..0db31bc17813 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -269,12 +269,28 @@ int tm6000_tuner_callback(void *ptr, int component, int command, int ar...
dfd36d83d963f14c383067cb7fa23f85c7b981b9
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: fix mutex lock unbalance
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 43620a3f5ec1..268a7de20d6d 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -496,6 +496,7 @@ static int tm6000_init_dev(struct tm6000_core *dev) } #endif } + mu...
29ec15e90ba9e20ff33da4824c32721bbc6bcfad
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: fix build errors
Problem Details: (1) tm6000 uses usb_*() interfaces, so it should depend on USB. drivers/built-in.o: In function `tm6000_usb_disconnect': tm6000-cards.c:(.text+0x4abb44): undefined reference to `usb_put_dev' drivers/built-in.o: In function `tm6000_usb_probe': tm6000-cards.c:(.text+0x4ac923): undefined reference to `us...
```diff diff --git a/drivers/staging/tm6000/Kconfig b/drivers/staging/tm6000/Kconfig index cb2011536363..5fe759cc2ee9 100644 --- a/drivers/staging/tm6000/Kconfig +++ b/drivers/staging/tm6000/Kconfig @@ -1,6 +1,6 @@ config VIDEO_TM6000 tristate "TV Master TM5600/6000/6010 driver" - depends on VIDEO_DEV && I2C && INPU...
caa0d36cc7c5674c9b8dfab060ea6c36c2a8e62f
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: add a different set param values
Problem Details: Fix several parameter sets, in order to make dvb work Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/hack.c b/drivers/staging/tm6000/hack.c index f181fce6716b..fdc70788e491 100644 --- a/drivers/staging/tm6000/hack.c +++ b/drivers/staging/tm6000/hack.c @@ -37,7 +37,6 @@ static inline int tm6000_snd_control_msg(struct tm6000_core *dev, __u8 request, static int pseudo_zl1035...
08e60ba0c1c88f86f44909a1b3b8de9960b94c2e
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: Fix several bugs at the usb DVB transfer
Problem Details: Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-dvb.c b/drivers/staging/tm6000/tm6000-dvb.c index f54f6d9ea6f4..97bc2d14878e 100644 --- a/drivers/staging/tm6000/tm6000-dvb.c +++ b/drivers/staging/tm6000/tm6000-dvb.c @@ -17,7 +17,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <lin...
7b96640e8f79c0e382eba1a11486da11a60d0df3
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: typo fix: the identifer string is wrong
Problem Details: Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index e1a6c1666543..3f4eb0516406 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -479,7 +479,7 @@ static int tm6000_usb_probe(struct usb_interface *interface, /* Check t...
80af6bb73e52c614e0571f82e4dd88a6941066a4
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: fix: avoid unregister the driver after success
Problem Details: After successfully running tm6000_init_dev, due to a lack of a return(), the driver runs the error code, unregistering the device. Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index f6be4c5d88ca..e1a6c1666543 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -421,6 +421,7 @@ static int tm6000_init_dev(struct tm6000_core *dev) } #endif } + re...
7dcc51b7346c4d4730eb8ffe1b8a92ed31d263bf
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: tm6000: fix driver compilation
Problem Details: The name of xc5000.h include file were wrong Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index de1aa65ffb35..9e8f1fbcceb5 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -32,7 +32,7 @@ #include "tm6000.h" #include "tm6000-regs.h" #include "tuner-xc2028.h" -...
70ca3c4b9a722b24626ffe81bdfd7d1a6824f175
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: xc3028: fix regression in firmware loading time
Problem Details: Fix a regression in the firmware loading time where it went from 1080 ms to 4700 ms. This was noticed when the em28xx based HVR-950 took noticably longer to load the driver. Regression introduced in hg 12824. The developer added an msleep() call with an argument based on a newly introduced xc3028_ct...
```diff diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index 61a7e138c748..b6ce528e1889 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c @@ -100,7 +100,8 @@ struct xc2028_data { if (size != _rc) \ tun...
0a34df5359ea153bf6f756c0c9db2ca2bc002cf4
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13555a): v4l: Use video_device_node_name() instead of the minor number
Problem Details: Instead of using the minor number in kernel log messages, use the device node name as returned by the video_device_node_name() function. This makes debug, informational and error messages easier to understand for end users. [mchehab.redhat.com: apply just the tm6000 changes on a separate patch] Signe...
```diff diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index fc5a9089ab68..d853f82f443d 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -1311,18 +1311,18 @@ static int vidioc_s_frequency (struct file *file, void *priv, stat...
64d339d42d6165c3276b524b939f7866693b83e0
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12853): tm6000: Fix almost all warnings at the driver
Problem Details: Onr warning is left, since it is there for a purpose: tm6000-core.c:218: warning: ISO C90 forbids mixed declarations and code It indicates a place where a temporary hack were added. Tests are needed to be sure that we can remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 290296859620..f848840c8a85 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -191,6 +191,61 @@ struct usb_device_id tm6000_id_table [] = { { }, }; +/* Tuner callb...
427f7facb374b8651ff01b7700e690ef8ccae159
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12852): tm6000: Fix compilation against 2.6.31
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c index 052e2cc255f5..cf24340e0874 100644 --- a/drivers/staging/tm6000/tm6000-alsa.c +++ b/drivers/staging/tm6000/tm6000-alsa.c @@ -17,7 +17,6 @@ #include <linux/usb.h> #include <asm/delay.h> -#include <sound/driver.h> #...
0fb84ce0dbffee26dc0934496e6bcdce853fa0d0
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12846): tuner-xc2028: Fix skip code for devices with broken read (tm6000)
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index 53f0fbb33cc6..61a7e138c748 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c @@ -811,6 +811,10 @@ check_device: hwmodel, (version & 0xf000) >> 12...
e8a4845d2a797958b1e0cb6acc5e826985ee90ce
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12845): tm6000: more buffer handling fixes
Problem Details: Before this patch, we were writing outside vmalloced buffer Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 3723d832879b..932dfde6d69a 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -273,6 +273,11 @@ static int copy_packet(struct urb *urb, u32 header, u8 **ptr, u8 *endp, ...
edecce0a31b4447ee75dd0df34c7c5fc90ba6f6b
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12843): tm6000: cleanup: remove a test debug code
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index c56750338dd1..d467326b8692 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -51,8 +51,7 @@ int tm6000_read_write_usb (struct tm6000_core *dev, u8 req_type, u8 req, mem...
2a8145d4b82b347c9bf49402aad2c2b6184f0540
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12841): tm6000: Fix compilation with newer v4l2-dev API
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 98f68fe67e4c..2b30083b0860 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -33,6 +33,7 @@ #include <linux/version.h> #include <linux/usb.h> #include <linux/videod...
8ae1fc6e10cdf9be754cccee2a3ee551a981ab08
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12839): tm6000: Another trial to fix analog streaming
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index c4e1aeb0195b..c56750338dd1 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -51,7 +51,8 @@ int tm6000_read_write_usb (struct tm6000_core *dev, u8 req_type, u8 req, mem...
717ecd2b9a71970698c04f34239c6a1e5d08fbc2
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12838): tm6000: Fix color support on tm6010
Problem Details: TM6010 uses some different registers for format support. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index 179885a193e6..c4e1aeb0195b 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -140,12 +140,16 @@ int tm6000_get_reg16 (struct tm6000_core *dev, u8 req, u16 value, u16 index...
576d5739a44af5fcbacfe504a8d989a5c7ea8fc7
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12834): tm6000: Fix two warnings
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c index 2e48bb27a554..052e2cc255f5 100644 --- a/drivers/staging/tm6000/tm6000-alsa.c +++ b/drivers/staging/tm6000/tm6000-alsa.c @@ -333,20 +333,11 @@ static int __devinit snd_tm6000_pcm(struct snd_tm6000_card *chip, Basic...
c4acf48cad7f6654c55e53734440d67140cf4269
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12828): tm6000: fixes several CodingStyle and do some cleanups
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 528ac6e8b085..56dc001460bd 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -33,9 +33,6 @@ #include <linux/version.h> #include <linux/usb.h> #include <linux/videod...
204193d95974df3ea4a6309cc68948e3a9596e3c
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12827): tm6000: fix image hangs
Problem Details: A previous committed patch hanged image output. This patch corrects this issue. It also warrants that buffer is updated for each frame0+frame1 frame set. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index d081f1423152..650ed8e88f38 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -410,15 +410,6 @@ static int tm6000_usb_probe(struct usb_interface *interface, } } ...
cf9e1509c278c3d5005f222539813933e4dc345c
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12820): tm6000: fix i2c readings
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-i2c.c b/drivers/staging/tm6000/tm6000-i2c.c index c0327d724eb2..8569cfca8f82 100644 --- a/drivers/staging/tm6000/tm6000-i2c.c +++ b/drivers/staging/tm6000/tm6000-i2c.c @@ -94,7 +94,7 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap, { struct tm6000_core *d...
5b74c2c739064248bb9c78102e94751b317684d5
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12816): tm6000: fix tm6000 attach method and fix a few CodingStyles
Problem Details: Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-dvb.c b/drivers/staging/tm6000/tm6000-dvb.c index 9df93cfe3106..15133109f7ec 100644 --- a/drivers/staging/tm6000/tm6000-dvb.c +++ b/drivers/staging/tm6000/tm6000-dvb.c @@ -28,6 +28,8 @@ #include <media/tuner.h> +#include "tuner-xc2028.h" + static void tm6000_urb_...
d4e15bcd3de4bb5fccf5b1c0f512d57983c09623
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12814): tm6000: fix eeprom reading on tm6000
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-i2c.c b/drivers/staging/tm6000/tm6000-i2c.c index c53b7046c2ec..c0327d724eb2 100644 --- a/drivers/staging/tm6000/tm6000-i2c.c +++ b/drivers/staging/tm6000/tm6000-i2c.c @@ -163,8 +163,8 @@ err: } -static int tm6000_i2c_eeprom( struct tm6000_core *dev, - uns...
b1ce40b1392e2a20529ad2f01ab76145102c0ef1
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12812): tm6000: fix build dependencies for tm6000 and tuner-xc2028
Problem Details: Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/Kconfig b/drivers/staging/tm6000/Kconfig index 7e236a223b81..5e0c98189cc7 100644 --- a/drivers/staging/tm6000/Kconfig +++ b/drivers/staging/tm6000/Kconfig @@ -3,7 +3,6 @@ config VIDEO_TM6000 select VIDEO_V4L2 select VIDEO_TUNER select TUNER_XC2028 - select VIDEO_USB_ISO...
c1a1641450e769f534df4d1217f3feec8e38ea37
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12805): tm6000: Fix a memory leak at tm6000-video
Problem Details: if a transfer buffer allocation fails, the last allocated urb is leaked (it hasn't been stored in dev->urb[] yet so tm6000_uninit_isoc misses it). The patch also includes a small typo fix. Thanks to Florin Malita <fmalita@gmail.com> for pointing this. Signed-off-by: Mauro Carvalho Chehab <mchehab@red...
```diff diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 58fcf6ae6069..cdaf44806e3e 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -672,6 +672,7 @@ static int tm6000_prepare_isoc(struct tm6000_core *dev, if (!urb) { ...
a228618c1a2c15da35f8cc60286a25541fbc6348
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12800): tm6000: fix tm6000 analog video buffer handling
Problem Details: Previously, there were no sync between video buffer filling and received URBs. So, the presented image were a mix of frame and frame-1. Now, a filled buffer should contain only data for that frame. allocates a maximum of 64 KB per each URB area. This fixed two bugs: - Sometimes, there were no availab...
```diff diff --git a/drivers/staging/tm6000/tm6000-usb-isoc.h b/drivers/staging/tm6000/tm6000-usb-isoc.h index 83a4ed0d1bca..42de91715185 100644 --- a/drivers/staging/tm6000/tm6000-usb-isoc.h +++ b/drivers/staging/tm6000/tm6000-usb-isoc.h @@ -39,6 +39,13 @@ struct usb_isoc_ctl { /* Last field: ODD or EVEN? */ int ...
71e7cfae31e4eb25e127d034ec71922c661dc958
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12795): tm6000: Fix buffering size
Problem Details: At the first time an application were called, resolutions were wrong. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 3470a55a5796..65510d853814 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -1102,6 +1102,10 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *n...
4475c0444303842743049c420f41de04907e44d9
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12794): tm6000: handle also PAL/SECAM resolutions
Problem Details: Fix the resolutions for 625 line video standards (european PAL/SECAM) Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index 5e9325582bde..c650d3e926a3 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -421,9 +421,24 @@ REG PAL PAL_M PAL_N SECAM NTSC Comp. PAL PAL_M PAL_N SECAM NTSC 0x3f ...
88894cba79318fabc011a78094fe22ec953bfa97
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12793): tm6000: On some kernels, eeprom reading were generating a bug
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-i2c.c b/drivers/staging/tm6000/tm6000-i2c.c index e9e63df186fc..48473bdabb76 100644 --- a/drivers/staging/tm6000/tm6000-i2c.c +++ b/drivers/staging/tm6000/tm6000-i2c.c @@ -333,12 +333,6 @@ static int attach_inform(struct i2c_client *client) client->driver->driver.na...
dc6a02aa35cc3c1dd84e06fa4ff300ae50bc5a70
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12791): tm6000: fix poll() method
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 9557dfe95ef0..f96c7a77efb6 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -1449,9 +1449,8 @@ tm6000_poll(struct file *file, struct poll_table_struct *wait) buf =...
5c0d0b21fd3868672b5a550093efa7a72e458ed7
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12789): tm6000: fix DVB dependency
Problem Details: Compilation were causing errors, if DVB_CORE weren't selected. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/Kconfig b/drivers/staging/tm6000/Kconfig index 841e026ecef0..231dda3d4bbf 100644 --- a/drivers/staging/tm6000/Kconfig +++ b/drivers/staging/tm6000/Kconfig @@ -12,3 +12,9 @@ config VIDEO_TM6000 an external software decoder to watch TV on your computer. Say Y if you o...
526835d5b30a591578f2813a8837ac70172c0aa9
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12778): tm6000: Fix SMBus Read Byte command
Problem Details: Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-i2c.c b/drivers/staging/tm6000/tm6000-i2c.c index 5e165ed25eee..80252b746699 100644 --- a/drivers/staging/tm6000/tm6000-i2c.c +++ b/drivers/staging/tm6000/tm6000-i2c.c @@ -3,6 +3,9 @@ Copyright (C) 2006-2007 Mauro Carvalho Chehab <mchehab@infradead.org> + Cop...
2cd4fd1e57cb6897612ead8a3d39ecb444920a1a
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12775): tm6000: fix usb_submit_urb to be called inside interrupt context
Problem Details: Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index da2348e1c048..df973c0cc46a 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -229,11 +229,15 @@ static int tm6000_usb_probe(struct usb_interface *interface, /* Inc...
7c3f53ec491b64b3c3fa339e4e77e49782b0be9f
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12774): tm6000: fix module load/unload
Problem Details: Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 81f5ea613d80..da2348e1c048 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -359,14 +359,16 @@ static void tm6000_usb_disconnect(struct usb_interface *interface) ...
8c9d26fd55ac7378ad0e2afd2bd122fa060bdaee
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12773): tm6000: fix module unregister
Problem Details: Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index ffd2fe7ed984..41073ed2cb59 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -1535,7 +1535,7 @@ int tm6000_v4l2_unregister(struct tm6000_core *dev) list_for_each_saf...
22927e8e0007fe653dd2824cf86b799b43e3bff8
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (12772): tm6000: fix module load/unload
Problem Details: Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index b0719a52ef42..81f5ea613d80 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -230,6 +230,7 @@ static int tm6000_usb_probe(struct usb_interface *interface, /* Increme...
32ec6acfdcc066313261d0fbe6a966cb1804a7cd
Analyze and fix the following issue in the Linux kernel code: perf tui: Fix build problem with slang <= 2.0.6
Problem Details: slang versions <= 2.0.6 have a "#if HAVE_LONG_LONG" that breaks the build if it isn't defined. Use the equivalent one that glibc has on features.h. Reported-by: Steven Rostedt <rostedt@goodmis.org> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paul...
```diff diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index ccb7c5bb269e..9338d060ee49 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c @@ -1,7 +1,15 @@ #define _GNU_SOURCE #include <stdio.h> #undef _GNU_SOURCE - +/* + * slang versions <= 2.0.6 have a "#if HAVE_LONG_LONG" that breaks +...
26be1b7b317f1d6e9226ba3f450476b0a6d423a3
Analyze and fix the following issue in the Linux kernel code: ARM: h1940: framebuffer configuration fix
Problem Details: Seems like a typo, wrong setup leads to broken image on ipaq screen. Signed-off-by: Mike Solovyev <ms@sk.2-ch.org> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index b212561d2c57..03028b98f362 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c @@ -162,8 +162,8 @@ static struct s3c2410fb_display h1940_lcd __initdata = { .xres = 240, .yres = 3...
380fefb2ddabd4cd5f14dbe090481f0544e65078
Analyze and fix the following issue in the Linux kernel code: dm9000: fix "BUG: spinlock recursion"
Problem Details: dm9000_set_rx_csum and dm9000_hash_table are called from atomic context (in dm9000_init_dm9000), and from non-atomic context (via ethtool_ops and net_device_ops respectively). This causes a spinlock recursion BUG. Fix this by renaming these functions to *_unlocked for the atomic context, and make the o...
```diff diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 254b6f724c60..abcc838e18af 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c @@ -476,17 +476,13 @@ static uint32_t dm9000_get_rx_csum(struct net_device *dev) return dm->rx_csum; } -static int dm9000_set_rx_csum(struct net_device *dev...
08d18f3b62b4c05731a09eca2b432842a0a18da5
Analyze and fix the following issue in the Linux kernel code: fsl_pq_mdio: Fix mdiobus allocation handling
Problem Details: The driver could return success code even if mdiobus_alloc() failed. This patch fixes the issue. Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c index 3acac5f930c8..ff028f59b930 100644 --- a/drivers/net/fsl_pq_mdio.c +++ b/drivers/net/fsl_pq_mdio.c @@ -277,15 +277,17 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev, int tbiaddr = -1; const u32 *addrp; u64 addr = 0, size = 0;...
a2f79227138c71e08627af5f8961197364edbc98
Analyze and fix the following issue in the Linux kernel code: net_sched: sch_hfsc: fix classification loops
Problem Details: When attaching filters to a class pointing to a class higher up in the hierarchy, classification may enter an endless loop. Currently this is prevented for filters that are already resolved, but not for filters resolved at runtime. Only allow filters to point downwards in the hierarchy, similar to wha...
```diff diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index b38b39c60752..a435cf13cc27 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -1155,7 +1155,7 @@ static struct hfsc_class * hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) { struct hfsc_sched *q = qdisc_priv(sch); -...
ce26b4d1d52c9a881a99fd316c32e58cdf2d586e
Analyze and fix the following issue in the Linux kernel code: r6040: fix link checking with switches
Problem Details: The current link checking logic only works for one port, which is not correct for swiches were multiple ports can have different link status. As a result we would only check for link status on port 1 of the switch. Move the calls to mii_check_media in r6040_timer which will be polling a single PHY chip...
```diff diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 3cc7befa3eb1..9a251acf5ab8 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c @@ -400,9 +400,6 @@ static void r6040_init_mac_regs(struct net_device *dev) * we may got called by r6040_tx_timeout which has left * some unsent tx buffers */ ...
a0ba676008d9f050f1de9ede8d1ee4bf6820bfc9
Analyze and fix the following issue in the Linux kernel code: bnx2: Use netif_carrier_off() to prevent timeout.
Problem Details: Based on original patch from Stanislaw Gruszka <sgruszka@redhat.com>. Using netif_carrier_off() is better than updating all the ->trans_start on all the tx queues. netif_carrier_off() needs to be called after bnx2_disable_int_sync() to guarantee no race conditions with the serdes timers that can modi...
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index ab0068c7070a..188e356c30a3 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -656,19 +656,11 @@ bnx2_netif_stop(struct bnx2 *bp, bool stop_cnic) if (stop_cnic) bnx2_cnic_stop(bp); if (netif_running(bp->dev)) { - int i; - bnx2_napi_d...
b98eba52784fbd4a96241c5395c2c8d99fdb9433
Analyze and fix the following issue in the Linux kernel code: bnx2: Fix register printouts during NETEV_WATCHDOG.
Problem Details: Dump the correct MCP registers and add EMAC_RX_STATUS register during NETDEV_WATCHDOG for debugging. Signed-off-by: Eddie Wai <waie@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 667f4196dc29..c281218f6d5e 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -6301,14 +6301,23 @@ static void bnx2_dump_state(struct bnx2 *bp) { struct net_device *dev = bp->dev; + u32 mcp_p0, mcp_p1; netdev_err(dev, "DEBUG: intr_sem[%...
78ad38923094a479453f5b02b37a012377a36f34
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix internal loopback test
Problem Details: Reset/set DEV_UP bit during allocation and deallocation of resources. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index b076474389b9..dde1e8aaf20e 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -870,6 +870,7 @@ void qlcnic_diag_free_res(struct net_device *netdev, int max_sds_rings) struct qlcnic_host_...
7e382594a258f8733fd5b1790dc9362a05b9dbd9
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix rx bytes statistics
Problem Details: Added lrobytes to it. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index db0563557e19..0a52d24cae78 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -1702,7 +1702,7 @@ static struct net_device_stats *qlcnic_get_stats(struct net_device *netdev) stats->rx_p...
aadd8184ae4b3f0c7874929a1b0248aafc29e509
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix memory leaks
Problem Details: Fixes memory leak in error path when memory allocation for adapter data structures fails. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c index 0a6a39914aec..c2c1f5cc16c6 100644 --- a/drivers/net/qlcnic/qlcnic_ctx.c +++ b/drivers/net/qlcnic/qlcnic_ctx.c @@ -421,7 +421,8 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter) if (addr == NULL) { dev_err(...
0e995cd3d3c78377a0bc7d38236fc50e5438fabb
Analyze and fix the following issue in the Linux kernel code: netdev: bfin_mac: check for mii_bus platform data
Problem Details: If the platform data for the mii_bus is missing, gracefully error out rather than deference NULL pointers. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index 2538eaa891ad..39a54bad397f 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c @@ -1466,6 +1466,11 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev) } pd = pdev->dev.platform_data; lp->mii_bus = platform_get...
3f78d1f210ff89af77f042ab7f4a8fee39feb1c9
Analyze and fix the following issue in the Linux kernel code: drivers/net/usb/asix.c: Fix unaligned accesses
Problem Details: Using this driver can cause unaligned accesses in the IP layer This has been fixed by aligning the skb data correctly using the spare room left over by the 4 byte header inserted between packets by the device. Signed-off-by: Neil Jones <NeilJay@gmail.com> Signed-off-by: David S. Miller <davem@davemlof...
```diff diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 8e7d2374558b..66c5e89326c1 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c @@ -322,8 +322,29 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb) /* get the packet length */ size = (u16) (header & 0x0000fff...
058276303dbc4ed089c1f7dad0871810b1f5ddf1
Analyze and fix the following issue in the Linux kernel code: DMAENGINE: extend the control command to include an arg
Problem Details: This adds an argument to the DMAengine control function, so that we can later provide control commands that need some external data passed in through an argument akin to the ioctl() operation prototype. [dan.j.williams@intel.com: fix up some missed conversions] Signed-off-by: Linus Walleij <linus.wall...
```diff diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 93ed99c84cf1..ee805a43f879 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -759,7 +759,8 @@ err_desc_get: return NULL; } -static int atc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) +static int atc_control(struc...
162f3ec7f026784ff2e216f19147d67e2f8ccd56
Analyze and fix the following issue in the Linux kernel code: drbd: Fixes to the new delay_probes code
Problem Details: * Only send delay_probes with protocol 93 or newer * drbd_send_delay_probes() is called only from worker context, no atomic_t needed for delay_seq Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
```diff diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 37380d2c869d..45d9a4534c40 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -552,7 +552,7 @@ struct p_delay_probe { struct delay_probe { struct list_head list; - int seq_num; + unsigned int seq...
a8cdfd8d3bf0b6d2bbe792f5e74f54ccc6bc1d4f
Analyze and fix the following issue in the Linux kernel code: drbd: A fixes to the new resync speed code
Problem Details: * Mention P_DELAY_PROBE in the packet naming array * Do not corrupt the mdev->data.work list in case the timer goes off before delay_probe_work got handled by the worker * Do not mod_timer() twice for a single delay_probe pair Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by...
```diff diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 210870ed8a79..37380d2c869d 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -268,6 +268,7 @@ static inline const char *cmdname(enum drbd_packets cmd) [P_CSUM_RS_REQUEST] = "CsumRSRequest", ...
087c24925cf4209be1a91f8ede9241e17e9734c7
Analyze and fix the following issue in the Linux kernel code: drbd: bugfix: Make resize work, if remote's size was limiting and increased in the meantime
Problem Details: Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
```diff diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 19b9a2851e7b..6cb703686b28 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -1477,7 +1477,6 @@ static int drbd_nl_resize(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, { struct resize rs; int...
c3470cde57ea34d9b4bd34891ec040e46b9fb3bf
Analyze and fix the following issue in the Linux kernel code: drbd: fix potential protocol error
Problem Details: Don't forget to drain the digest in case we cannot satisfy a checksum based resync or online-verify request. It would additionally cause a protocoll error, dropping the connection. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
```diff diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 93106fb92be8..c7285e16b667 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -1331,6 +1331,9 @@ static int drbd_drain_block(struct drbd_conf *mdev, int data_size) int rr, rv = 1...
e0f83012dc510b0be92ee2d59227a573a36777b8
Analyze and fix the following issue in the Linux kernel code: drbd: fix regression: attach while connected failed
Problem Details: commit e4f925e12ea5daaa9baf2dd5af9c4951721dae95 Author: Philipp Reisner <philipp.reisner@linbit.com> Date: Wed Mar 17 14:18:41 2010 +0100 drbd: Do not upgrade state to Outdated if already Inconsistent prevented the necessary state transition for attaching while connected (Diskless -> Consistent...
```diff diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 8f84a9f58c99..b1ce5dc7c603 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -840,7 +840,12 @@ static union drbd_state sanitize_state(struct drbd_conf *mdev, union drbd_state break; case C...
e4f925e12ea5daaa9baf2dd5af9c4951721dae95
Analyze and fix the following issue in the Linux kernel code: drbd: Do not upgrade state to Outdated if already Inconsistent [Bugz 277]
Problem Details: There was a race condition: In a situation with a SyncSource+Primary and a SyncTarget+Secondary node, and a resync dependency to some other device. After both nodes decided to do the resync, the other device finishes its resync process. At that time SyncSource already sent the P_SYNC_UUID packe...
```diff diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index db7a07a9a2cf..8f84a9f58c99 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -840,7 +840,7 @@ static union drbd_state sanitize_state(struct drbd_conf *mdev, union drbd_state break; case C_...
4aed79b2818e7330b5d00143e4c20bc6555df91f
Analyze and fix the following issue in the Linux kernel code: DMAENGINE: DMA40 fix for allocation of logical channel 0
Problem Details: Fix for allocation failure of logical channel when event line happens to be number 0. Signed-off-by: Marcin Mielczarczyk <marcin.mielczarczyk@tieto.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
```diff diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 16a7d2b605ed..81fec95312b6 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -1039,11 +1039,11 @@ static int d40_validate_conf(struct d40_chan *d40c, } static bool d40_alloc_mask_set(struct d40_phy_res *phy, bool is_src...
1a75627896fe67d0124eab6fe2f83dd40188c40c
Analyze and fix the following issue in the Linux kernel code: ceph: use ceph. prefix for virtual xattrs
Problem Details: Drop the 'user.' prefix and use just 'ceph.' for fs virtual xattrs. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 7185d0794df3..68aeebc69681 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -7,7 +7,8 @@ static bool ceph_is_valid_xattr(const char *name) { - return !strncmp(name, XATTR_SECURITY_PREFIX, + return !strncmp(name, "ceph.", 5) || + !strncmp(name,...
1cd3935bedccf592d44343890251452a6dd74fc4
Analyze and fix the following issue in the Linux kernel code: ceph: set dn offset when spliced
Problem Details: We want to assign an offset when the dentry goes from null to linked, which is always done by splice_dentry(). Notably, we should NOT assign an offset when a dentry is first created and is still null. BUG if we try to splice a non-null dentry (we shouldn't). Signed-off-by: Sage Weil <sage@newdream.n...
```diff diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 0b0a39d05ca6..d3bb8132a1aa 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -128,7 +128,8 @@ more: dentry = list_entry(p, struct dentry, d_u.d_child); di = ceph_dentry(dentry); while (1) { - dout(" p %p/%p d_subdirs %p/%p\n", p->prev, p->next, + dout(" p...
a6424e48c8d54a5795430b07c4487f1ed280df4e
Analyze and fix the following issue in the Linux kernel code: ceph: fix xattr dangling pointer / double free
Problem Details: If we use the xattr_blob, clear the pointer so we don't release the memory at the bottom of the fuction. Reported-by: Henry C Chang <henry_c_chang@tcloudcomputing.com> Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index ef917232cf37..913cafd70cd0 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -619,6 +619,7 @@ static int fill_inode(struct inode *inode, memcpy(ci->i_xattrs.blob->vec.iov_base, iinfo->xattr_data, iinfo->xattr_len); ci->i_xattrs.version =...
8c6efb58a5bab880d45b2078cb55ec4320707daf
Analyze and fix the following issue in the Linux kernel code: ceph: fix memory leak due to possible dentry init race
Problem Details: Free dentry_info in error path. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 33feac75c532..422794fd10e0 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -51,8 +51,11 @@ int ceph_init_dentry(struct dentry *dentry) return -ENOMEM; /* oh well */ spin_lock(&dentry->d_lock); - if (dentry->d_fsdata) /* lost a race */ + if (dent...
a79832f26be370ee26ea81eecdfd42d10e49d66a
Analyze and fix the following issue in the Linux kernel code: ceph: make ceph_msg_new return NULL on failure; clean up, fix callers
Problem Details: Returning ERR_PTR(-ENOMEM) is useless extra work. Return NULL on failure instead, and fix up the callers (about half of which were wrong anyway). Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 51fd39da1470..8755e2d83d4c 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -939,8 +939,8 @@ static int send_cap_msg(struct ceph_mds_session *session, xattr_version, xattrs_buf ? (int)xattrs_buf->vec.iov_len : 0); msg = ceph_msg_new(CEPH_MSG_CLIEN...
3143edd3a185f1fd370ebdd21b4151aa9f3283a3
Analyze and fix the following issue in the Linux kernel code: ceph: clean up statfs
Problem Details: Avoid unnecessary msgpool. Preallocate reply. Fix use-after-free race. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/mon_client.c b/fs/ceph/mon_client.c index 8fdc011ca956..43cfab06fcee 100644 --- a/fs/ceph/mon_client.c +++ b/fs/ceph/mon_client.c @@ -393,16 +393,64 @@ static void __insert_statfs(struct ceph_mon_client *monc, rb_insert_color(&new->node, &monc->statfs_request_tree); } +static void rele...
6f46cb29350963527b663c9eb4fe964daa9ae707
Analyze and fix the following issue in the Linux kernel code: ceph: fix theoretically possible double-put on connection
Problem Details: This would only trigger if we bailed out before resetting r_con_filling_msg because the server reply was corrupt (oversized). Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index 22a33f8c8807..3d2bfbc232dc 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c @@ -1386,6 +1386,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con, req->r_reply, req->r_con_filling_msg); ceph_con_revoke_message(re...
104648ad3f2ebe8556c020e5f0344853076cd5ee
Analyze and fix the following issue in the Linux kernel code: ceph: reduce build_path debug output
Problem Details: Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 76995a960432..ccb4141e306f 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -1268,7 +1268,7 @@ retry: struct inode *inode = temp->d_inode; if (inode && ceph_snap(inode) == CEPH_SNAPDIR) { - dout("build_path_dentry path+%d: %...
c59bd5688299cddb71183e156e7a3c1409b90df2
Analyze and fix the following issue in the Linux kernel code: x86, hweight: Use a 32-bit popcnt for __arch_hweight32()
Problem Details: Use a 32-bit popcnt instruction for __arch_hweight32(), even on x86-64. Even though the input register will *usually* be zero-extended due to the standard operation of the hardware, it isn't necessarily so if the input value was the result of truncating a 64-bit operation. Note: the POPCNT32 variant ...
```diff diff --git a/arch/x86/include/asm/arch_hweight.h b/arch/x86/include/asm/arch_hweight.h index d1fc3c219ae6..9686c3d9ff73 100644 --- a/arch/x86/include/asm/arch_hweight.h +++ b/arch/x86/include/asm/arch_hweight.h @@ -2,13 +2,15 @@ #define _ASM_X86_HWEIGHT_H #ifdef CONFIG_64BIT +/* popcnt %edi, %eax -- redunda...
4065c802da7484fa36f8cdf10f18d087233ecb88
Analyze and fix the following issue in the Linux kernel code: cifs: fix noserverino handling when unix extensions are enabled
Problem Details: The uniqueid field sent by the server when unix extensions are enabled is currently used sometimes when it shouldn't be. The readdir codepath is correct, but most others are not. Fix it. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 2e07da9a46fa..fb1657e0fdb8 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h @@ -110,6 +110,7 @@ extern int cifs_posix_open(char *full_path, struct inode **pinode, struct super_block *sb, int mode, int oflags, __u32 *poplock, _...
f3c7f317c91e45aac0ef9d0b6474cd4637de69f0
Analyze and fix the following issue in the Linux kernel code: serial167: Kill unused variables
Problem Details: commits 638157bc1461f6718eeca06bedd9a09cf1f35c36 ("serial167: prepare to push BKL down into drivers") and 4165fe4ef7305609a96c7f248cefb9c414d0ede5 ("tty: Fix up char drivers request_room usage") removed code without removing the corresponding variables: | drivers/char/serial167.c: In function 'cd2401_...
```diff diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c index 8dfd24721a82..78a62ebe75c7 100644 --- a/drivers/char/serial167.c +++ b/drivers/char/serial167.c @@ -627,7 +627,6 @@ static irqreturn_t cd2401_rx_interrupt(int irq, void *dev_id) char data; int char_count; int save_cnt; - int len; /...
8035458fbb567ae138c77a5f710050107c6a7066
Analyze and fix the following issue in the Linux kernel code: perf options: Type check OPT_BOOLEAN and fix the offenders
Problem Details: Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carval...
```diff diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index a4c7cae45024..b1c6b38567f0 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c @@ -22,8 +22,8 @@ static char *file_name; static char name_buffer[256]; -int perf_host = 1; -int perf_guest; +bool perf_host = 1...
0f87ee08564b95389e609699990725efd282021c
Analyze and fix the following issue in the Linux kernel code: squashfs: xattr fix sparse warnings
Problem Details: Sparse does not like inline function declared without body, because it is not part of the standard kernel practice. The xattr_handler tables can be declared static. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
```diff diff --git a/fs/squashfs/xattr.c b/fs/squashfs/xattr.c index 147ecc3f69e3..de03889050b1 100644 --- a/fs/squashfs/xattr.c +++ b/fs/squashfs/xattr.c @@ -34,7 +34,7 @@ #include "squashfs_fs_i.h" #include "squashfs.h" -static inline struct xattr_handler *squashfs_xattr_handler(int); +static struct xattr_handler...
aa5b1894cbc700d7462947c017ca9b7bcda1e8ed
Analyze and fix the following issue in the Linux kernel code: squashfs: xattr_lookup sparse fix
Problem Details: Sparse detected that unsigned pointer was being passed as int pointer. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> [fixed up to deal with code refactoring] Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
```diff diff --git a/fs/squashfs/xattr.h b/fs/squashfs/xattr.h index 4a96366bfcc9..9da071ae181c 100644 --- a/fs/squashfs/xattr.h +++ b/fs/squashfs/xattr.h @@ -25,7 +25,7 @@ extern __le64 *squashfs_read_xattr_id_table(struct super_block *, u64, u64 *, int *); extern int squashfs_xattr_lookup(struct super_block *, u...
81a6cf2d30eac5d790f53cdff110892f7b18c7fe
Analyze and fix the following issue in the Linux kernel code: ceph: invalidate affected dentry leases on aborted requests
Problem Details: If we abort a request, we return to caller, but the request may still complete. And if we hold the dir FILE_EXCL bit, we may not release a lease when sending a request. A simple un-tar, control-c, un-tar again will reproduce the bug (manifested as a 'Cannot open: File exists'). Ensure we invalidate ...
```diff diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 650d2db5ed26..4b1a7a4bae0b 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -888,13 +888,22 @@ static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, /* ensure target dentry is invalidated, despite rehashing bug in vfs_rename_dir */ ...
b4556396fac5b3f063d5b8ac54dc02f7612a75e1
Analyze and fix the following issue in the Linux kernel code: ceph: fix race between aborted requests and fill_trace
Problem Details: When we abort requests we need to prevent fill_trace et al from doing anything that relies on locks held by the VFS caller. This fixes a race between the reply handler and the abort code, ensuring that continue holding the dir mutex until the reply handler completes. Signed-off-by: Sage Weil <sage@ne...
```diff diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index b3b19f05b821..c0568fe3c0ba 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -1181,6 +1181,7 @@ ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode) if (!req) return ERR_PTR(-ENOMEM); + mutex_init(&req->r_fil...
e1518c7c0a67a75727f7285780dbef0ca7121cc9
Analyze and fix the following issue in the Linux kernel code: ceph: clean up mds reply, error handling
Problem Details: We would occasionally BUG out in the reply handler because r_reply was nonzero, due to a race with ceph_mdsc_do_request temporarily setting r_reply to an ERR_PTR value. This is unnecessary, messy, and also wrong in the EIO case. Clean up by consistently using r_err for errors and r_reply for messages...
```diff diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 24561a557e01..b3b19f05b821 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -1517,7 +1517,7 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc, } msg = create_request_message(mdsc, req, mds); if (IS_ERR(msg)) { - ...
78f622377f7d31d988db350a43c5689dd5f31876
Analyze and fix the following issue in the Linux kernel code: powerpc/fsl-booke: Move loadcam_entry back to asm code to fix SMP ftrace
Problem Details: When we build with ftrace enabled its possible that loadcam_entry would have used the stack pointer (even though the code doesn't need it). We call loadcam_entry in __secondary_start before the stack is setup. To ensure that loadcam_entry doesn't use the stack pointer the easiest solution is to just ...
```diff diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 957ceb7059c5..0271b58ec31e 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -448,6 +448,14 @@ int main(void) DEFINE(PGD_T_LOG2, PGD_T_LOG2); DEFINE(PTE_T_LOG2, PTE_T_LOG2); #end...
78e2e68a2b79f394b7cd61e07987a8a89af907f7
Analyze and fix the following issue in the Linux kernel code: powerpc/fsl-booke: Fix InstructionTLBError execute permission check
Problem Details: In CONFIG_PTE_64BIT the PTE format has unique permission bits for user and supervisor execute. However on !CONFIG_PTE_64BIT we overload the supervisor bit to imply user execute with _PAGE_USER set. This allows us to use the same permission check mask for user or supervisor code on !CONFIG_PTE_64BIT. ...
```diff diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 725526547994..edd4a57fd29e 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S @@ -639,6 +639,13 @@ interrupt_base: rlwinm r12,r12,0,16,1 mtspr SPRN_MAS1,r12 + /* Make up...
0aedc0085146131da5b04476aab21834b1403b31
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Fix P1020RDB boot hang due USB2
Problem Details: Since USB2 is shared with local bus, either local bus or USB2 should be disabled. By default U-Boot enables local bus, so we have to disable USB2, otherwise kernel hangs: ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller fsl-ehci ...
```diff diff --git a/arch/powerpc/boot/dts/p1020rdb.dts b/arch/powerpc/boot/dts/p1020rdb.dts index 49848c545d86..22f64b62d7f6 100644 --- a/arch/powerpc/boot/dts/p1020rdb.dts +++ b/arch/powerpc/boot/dts/p1020rdb.dts @@ -475,6 +475,11 @@ phy_type = "ulpi"; }; + /* USB2 is shared with localbus, so it must be dis...
dc4ff19341126155c5714119396efbae62ab40bf
Analyze and fix the following issue in the Linux kernel code: perf tui: Add workaround for slang < 2.1.4
Problem Details: Older versions of the slang library didn't used the 'const' specifier, causing problems with modern compilers of this kind: util/newt.c:252: error: passing argument 1 of ‘SLsmg_printf’ discards qualifiers from pointer target type Fix it by using some wrappers that when needed const the affected param...
```diff diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index 2001d26a5579..ccb7c5bb269e 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c @@ -14,6 +14,17 @@ #include "sort.h" #include "symbol.h" +#if SLANG_VERSION < 20104 +#define slsmg_printf(msg, args...) SLsmg_printf((char *)msg, ##a...
3de29cab1f8d62db557a4afed0fb17eebfe64438
Analyze and fix the following issue in the Linux kernel code: perf record: Fix bug mismatch with -c option definition
Problem Details: The -c option defines the user requested sampling period. It was implemented using an unsigned int variable but the type of the option was OPT_LONG. Thus, the option parser was overwriting memory belonging to other variables, namely the mmap_pages leading to a zero page sampling buffer. The bug was exp...
```diff diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 0f467cf7aa72..b93573c7ac0b 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -33,8 +33,8 @@ enum write_mode_t { static int *fd[MAX_NR_CPUS][MAX_COUNTERS]; -static unsigned int user_interval = UINT...
81880d603d00c645e0890d0a44d50711c503b72b
Analyze and fix the following issue in the Linux kernel code: atomic_t: Remove volatile from atomic_t definition
Problem Details: When looking at a performance problem on PowerPC, I noticed some awful code generation: c00000000051fc98: 3b 60 00 01 li r27,1 ... c00000000051fca0: 3b 80 00 00 li r28,0 ... c00000000051fcdc: 93 61 00 70 stw r27,112(r1) c00000000051fce0: 93 81 00 74 ...
```diff diff --git a/include/linux/types.h b/include/linux/types.h index c42724f8c802..23d237a075e2 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -188,12 +188,12 @@ typedef u32 phys_addr_t; typedef phys_addr_t resource_size_t; typedef struct { - volatile int counter; + int counter; } atomic_t; ...
14ece1028b3ed53ffec1b1213ffc6acaf79ad77c
Analyze and fix the following issue in the Linux kernel code: ext4: Make fsync sync new parent directories in no-journal mode
Problem Details: Add a new ext4 state to tell us when a file has been newly created; use that state in ext4_sync_file in no-journal mode to tell us when we need to sync the parent directory as well as the inode and data itself. This fixes a problem in which a panic or power failure may lose the entire file even when u...
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 124ef771a618..60bd31026e7c 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1180,6 +1180,7 @@ enum { EXT4_STATE_DA_ALLOC_CLOSE, /* Alloc DA blks on close */ EXT4_STATE_EXT_MIGRATE, /* Inode is migrating */ EXT4_STATE_DIO_UNWRITTEN, /* need convert on...
5547e8aac6f71505d621a612de2fca0dd988b439
Analyze and fix the following issue in the Linux kernel code: writeback: Update dirty flags in two steps
Problem Details: Filesystems with delalloc support may dirty inode during writepages. As result inode will have dirty metadata flags even after write_inode. In fact we have two dedicated functions for proper data and metadata writeback. It is reasonable to separate flags updates in two stages. https://bugzilla.kernel....
```diff diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 67db89786e7d..0f629571234f 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -460,11 +460,9 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc) BUG_ON(inode->i_state & I_SYNC); - /* Set I_SYNC, reset I_DIRTY */ - di...
e913fc825dc685a444cb4c1d0f9d32f372f59861
Analyze and fix the following issue in the Linux kernel code: writeback: fix WB_SYNC_NONE writeback from umount
Problem Details: When umount calls sync_filesystem(), we first do a WB_SYNC_NONE writeback to kick off writeback of pending dirty inodes, then follow that up with a WB_SYNC_ALL to wait for it. Since umount already holds the sb s_umount mutex, WB_SYNC_NONE ends up doing nothing and all writeback happens as WB_SYNC_ALL. ...
```diff diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 760dc8d0b4ff..67db89786e7d 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -45,6 +45,7 @@ struct wb_writeback_args { int for_kupdate:1; int range_cyclic:1; int for_background:1; + int sb_pinned:1; }; /* @@ -230,6 +231,11 @@ static void...
4d92dc0f00a775dc2e1267b0e00befb783902fe7
Analyze and fix the following issue in the Linux kernel code: ext4: Fix compat EXT4_IOC_ADD_GROUP
Problem Details: struct ext4_new_group_input needs to be converted because u64 has only 32-bit alignment on some 32-bit architectures, notably i386. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index d8c28f658cb0..2c1165f731ac 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -29,6 +29,9 @@ #include <linux/wait.h> #include <linux/blockgroup_lock.h> #include <linux/percpu_counter.h> +#ifdef __KERNEL__ +#include <linux/compat.h> +#endif /* * The fou...
6d38c1cf520e9e1d544242e2ae471677d7a78463
Analyze and fix the following issue in the Linux kernel code: arm/mach-mx2/3: Fix watchdog-devices to match the current driver
Problem Details: Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index b91e412f7b3e..a9377cec662a 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c @@ -109,12 +109,7 @@ DEFINE_IMX_GPT_DEVICE(4, MX27_GPT5_BASE_ADDR, MX27_INT_GPT5); DEFINE_IMX_GPT_DEVICE(5, MX27_GPT6_BASE_ADDR, MX2...
4a31f2eff3b8fcf009db35f89eb222ed7835b6b9
Analyze and fix the following issue in the Linux kernel code: ARM: mx3: Fix a race condition in mxcmmc
Problem Details: From cefcdab08d1c9636c4a7290bc2bbe937d051bce4 Mon Sep 17 00:00:00 2001 From: Volker Ernst <volker.ernst@txtr.com> Date: Mon, 26 Apr 2010 22:51:07 +0200 Subject: [PATCH] ARM: mx3: Fix a race condition in mxcmmc This fixes a race condition regarding interrupt bits in the SDHC controller driver code. In...
```diff diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 2c53024ee439..ec18e3b60342 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -489,6 +489,9 @@ static void mxcmci_datawork(struct work_struct *work) struct mxcmci_host *host = container_of(work, struct mxcmci_host,...
df2fb6e7106dd0b76e3576bfaecbeb6f34843709
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: fix sp->unsync type error in trace event definition
Problem Details: sp->unsync is bool now, so update trace event declaration. Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/x86/kvm/mmutrace.h b/arch/x86/kvm/mmutrace.h index bc4f7f0be2b1..40a1786f36c7 100644 --- a/arch/x86/kvm/mmutrace.h +++ b/arch/x86/kvm/mmutrace.h @@ -11,7 +11,7 @@ __field(__u64, gfn) \ __field(__u32, role) \ __field(__u32, root_count) \ - __field(__u32, unsync) + __field(bool, unsync) ...
ce7ddec4bbbc08f0c2901cc103773aed864b09fd
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Allow marking an exception as reinjected
Problem Details: This patch adds logic to kvm/x86 which allows to mark an injected exception as reinjected. This allows to remove an ugly hack from svm_complete_interrupts that prevented exceptions from being reinjected at all in the nested case. The hack was necessary because an reinjected exception into the nested gu...
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 357573af974f..3f0007b076da 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -312,6 +312,7 @@ struct kvm_vcpu_arch { struct kvm_queued_exception { bool pending; bool has_error_code; +...
2041a06a50a2ef4062c8454482aa06e25f6cccde
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Make sure rip is synced to vmcb before nested vmexit
Problem Details: This patch fixes a bug where a nested guest always went over the same instruction because the rip was not advanced on a nested vmexit. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index ec205847be6a..c480d7f64a60 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -2960,6 +2960,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu) u16 gs_selector; u16 ldt_selector; + svm->vmcb->save.rax = vcpu->arch.regs[VCPU_REGS_RAX]; +...
924584ccb08c338ebd2f40936ff2321c1cce6a6d
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Fix nested nmi handling
Problem Details: The patch introducing nested nmi handling had a bug. The check does not belong to enable_nmi_window but must be in nmi_allowed. This patch fixes this. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index ab78eb8ba899..ec205847be6a 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -2771,8 +2771,12 @@ static int svm_nmi_allowed(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); struct vmcb *vmcb = svm->vmcb; - return !(vmcb->cont...
cdbecfc398a904ce9f5c126638b09a2429fb86ed
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: free vpid when fail to create vcpu
Problem Details: Fix bug of the exception path, free allocated vpid when fail to create vcpu. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d0a10b5612e9..54c0035a63f0 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2333,6 +2333,16 @@ static void allocate_vpid(struct vcpu_vmx *vmx) spin_unlock(&vmx_vpid_lock); } +static void free_vpid(struct vcpu_vmx *vmx) +{ + if (!enable_...
5156f274bb1ee1cfc22240445ef94f7dcfc9929d
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Fix Book3S_64 Host MMU debug output
Problem Details: We have some debug output in Book3S_64. Some of that was invalid though, partially not even compiling because it accessed incorrect variables. So let's fix that up, making debugging more fun again. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/powerpc/kvm/book3s_64_mmu_host.c b/arch/powerpc/kvm/book3s_64_mmu_host.c index 5545c45ea57f..e4b5744977f6 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_host.c +++ b/arch/powerpc/kvm/book3s_64_mmu_host.c @@ -48,8 +48,8 @@ static void invalidate_pte(struct hpte_cache *pte) { - dprintk_mmu("KVM...
6355644190f67326f5a16d0269c3e612fcfd6889
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Set VSID_PR also for Book3S_64
Problem Details: Book3S_64 didn't set VSID_PR when we're in PR=1. This lead to pretty bad behavior when searching for the shadow segment, as part of the code relied on VSID_PR being set. This patch fixes booting Book3S_64 guests. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/powerpc/kvm/book3s_64_mmu.c b/arch/powerpc/kvm/book3s_64_mmu.c index 612de6e4d74b..4025ea26b3c1 100644 --- a/arch/powerpc/kvm/book3s_64_mmu.c +++ b/arch/powerpc/kvm/book3s_64_mmu.c @@ -473,6 +473,9 @@ static int kvmppc_mmu_book3s_64_esid_to_vsid(struct kvm_vcpu *vcpu, ulong esid, break; }...