id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
fe23a2809d1f88887f7df7da38652826933b8ce6
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5082): Pvrusb2: Slight debug printing efficiency fixup
Problem Details: Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 4672199ae92d..776125491c81 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -2443,10 +2443,9 @@ static int pvr2_hdw_commit_ctl_internal(struct pvr2_hd...
6710fb868b289d21139bd68262388e0ea34601eb
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5078): Pvrusb2: It's safe to kfree() a null pointer
Problem Details: Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 0ecad5b3c029..4c2e4defd71e 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -1189,8 +1189,8 @@ struct pvr2_v4l2 *pvr2_v4l2_create(struct pvr2_cont...
13071f0a58f285eee81f63c917078bb2a48cf51e
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5076): Cpia.c: buffer overflow
Problem Details: If assigned minor is 10 or greater, terminator will be put beyound the end. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c index 735a52a9041a..78c9699eafbb 100644 --- a/drivers/media/video/cpia.c +++ b/drivers/media/video/cpia.c @@ -1350,13 +1350,13 @@ out: static void create_proc_cpia_cam(struct cam_data *cam) { - char name[7]; + char name[5 + 1 + 10 + 1]; ...
cdef8bd8c6ab69407afaf78226cc9861f916c83d
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5058): Pvrusb2: bug fix involving switch into radio mode
Problem Details: When the input is switched by opening /dev/radioX, we must also commit that change into the driver core. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 7a8b34dbc363..8b9089cc32fe 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -921,6 +921,7 @@ static int pvr2_v4l2_open(struct inode *inode, struct...
f13ed249ed8b880fe5497aaa05999bff8328a973
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5056): Pvrusb2: Fix cut/paste bug in auto_mode_switch control
Problem Details: Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index bb4c5150a4df..aa763028057b 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -834,7 +834,6 @@ static const struct pvr2_ctl_info control_defs[] = { ....
139eecf94cf5ab1f9749874cd362db5bff7dc09c
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5053): Pvrusb2: Change default volume to something sane
Problem Details: The default volume of 65535 is too high. Make is something smaller. Note that this _only_ changes the default value. Specifically, there are no scaling or other more intrusive changes here. I'm just sick of constantly having to reduce the volume every time I plug in and test the device! (And unfort...
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 38e165913dd6..bb4c5150a4df 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -770,7 +770,7 @@ static const struct pvr2_ctl_info control_defs[] = { ....
62f5fdace7774a45e75e4d651237e7e1e8f05327
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5052): Pvrusb2: Remove stream claiming hack from /dev/radio
Problem Details: Trying to temporarily check that the stream is not claimed during open of the radio device is at best a race condition. What's to stop another app from claiming the stream anyway the instant after the check is done? The implementation for this was dicey anyway. So it's removed. The only "price" for...
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c index 69786cdaa859..cf129746205d 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-context.c +++ b/drivers/media/video/pvrusb2/pvrusb2-context.c @@ -188,17 +188,6 @@ void pvr2_channel_done(struct pvr2_chann...
f1382122ab49a7f01fa107608eaf664b12055b8b
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5047): Pvrusb2: Fix tuning calculation when in radio mode
Problem Details: Frequency units in V4L2 are apparently different when in radio mode compared to tv mode. Why? Who knows. This change adapts the driver appropriately - so that internally we always only deal in Hz and don't have to muck with craziness like this. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off...
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c index c0920835d802..c885a9c25e76 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c @@ -146,10 +146,15 @@ static void set_fre...
5a8a0a16422eec744ec220ccea472eef74b67180
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5046): Pvrusb2: Fix tuner frequency calculation
Problem Details: A conversion from Hz to V4L frequency units was accidentally removed by an earlier change. Restore it. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c index 8d66ab144281..c0920835d802 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c @@ -146,7 +146,7 @@ static void set_frequ...
0f0f257b7b46cc65c0f8f6f30444005b9c255e79
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5045): Pvrusb2: Fix heap corruption introduced by radio mods
Problem Details: We can't allocate v4l device structures in a block, since the v4l core governs when each device actually gets freed. This bug was introduced as part of the core radio implementation. Fix it. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 28187fbb5414..d5a54e8b72d5 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -32,8 +32,6 @@ #include <media/v4l2-dev.h> #include <media/v4l2-comm...
f5156b06acaad13b74f72bf62025de7b76b1b8a4
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5043): Pvrusb2: video standard broadcast fix for radio mode
Problem Details: Ensure we don't accidentally broadcast the standard while in radio mode. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c index 93b8d077c11e..05121666b9ba 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c @@ -39,7 +39,6 @@ #define OP_AUD...
99cfdf5cc6dbe0bd748d810953874d4e08051a9f
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5038): Pvrusb2: Implement stream claim checking function
Problem Details: Add (and expose) a new function, pvr2_channel_check_stream_no_lock(), in pvrusb2-context.c. This is hopefully the last V4L2 interface related patch to change anything outside pvrusb2-v4l2.c. We need this to implement the open() for the radio device. The reason is that within the *enter_context() secti...
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c index cf129746205d..69786cdaa859 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-context.c +++ b/drivers/media/video/pvrusb2/pvrusb2-context.c @@ -188,6 +188,17 @@ void pvr2_channel_done(struct pvr2_chann...
6fcb5b3ef758ca78461d390dc07bed5a4667c521
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5036): Pvrusb2: Fix for min/max control value checking
Problem Details: In the previous patch we exploited the get_{min,max}_value facility to adjust min/max allowable frequencies on the fly, depending on tuner mode. Unfortunately, this facility was not used inside the *sym_to_val() function that translates what we echo to sysfs, which means we got an -ERANGE despite aski...
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index c77de859cc8e..5c9cf1523e23 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c @@ -498,10 +498,19 @@ int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, ...
0b600512860cab5a0bb4647f5f726a91bce2633c
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5074): Some fixes at stream waitqueue on vivi
Problem Details: There are several potential troubles on vivi waitqueue code: - Watchdog timer should be reset at every received frame; - Watchdog timer should be reset at the beginning of vivi_thread(); - Checks for errors when creating a newer thread with kernel_thread(); - Wake up vivi_thread() after creating it. S...
```diff diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 119cfd5ce312..178441922738 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -471,11 +471,12 @@ static void vivi_thread_tick(struct vivi_dmaqueue *dma_q) /* Fill buffer */ vivi_fillbuff(dev,buf); - } - ...
df3a710458462aa9427cdeec947bf71af257e8dd
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5073): Fix OOPS on some waitqueue conditions
Problem Details: If for some reason vivi_thread() fails, vivi will suffer an OOPS at thread stop code, since waitqueue wouldn't be properly initializated. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index cfb6b1f0402c..119cfd5ce312 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -538,7 +538,6 @@ static int vivi_start_thread(struct vivi_dmaqueue *dma_q) dma_q->ini_jiffies=jiffies; dprintk(1,"%s\n",__FUNCT...
43db48d3d2f6326c571984b7b30ab355596bb3cc
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5068): Fix authorship references
Problem Details: Bill Dirks asked me to update his entries at kernel files, since he change his e-mail. I've also updated a few web broken links or obsolete info to the curent sites where V4L drivers and API are being discussed currently. CC: Bill Dirks <bill@thedirks.org> Signed-off-by: Mauro Carvalho Chehab <mchehab...
```diff diff --git a/Documentation/video4linux/CQcam.txt b/Documentation/video4linux/CQcam.txt index ade8651e2443..04986efb731c 100644 --- a/Documentation/video4linux/CQcam.txt +++ b/Documentation/video4linux/CQcam.txt @@ -197,10 +197,10 @@ Use the ../../Maintainers file, particularly the VIDEO FOR LINUX and PARALLEL ...
c408a6f673e8fb0b67c81fc9cb29414265c1e6c1
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5017): DVB: fix compile error
Problem Details: This patch fixes the following compile error: <-- snip --> ... LD drivers/media/video/built-in.o drivers/media/video/saa7134/built-in.o:(.data+0x85ec): multiple definition of `ir_rc5_remote_gap' drivers/media/video/bt8xx/built-in.o:(.data+0x734c): first defined here drivers/media/video/saa7134...
```diff diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c index 14c07c606632..825161b9cb3f 100644 --- a/drivers/media/video/bt8xx/bttv-input.c +++ b/drivers/media/video/bt8xx/bttv-input.c @@ -36,9 +36,9 @@ module_param(repeat_delay, int, 0644); static int repeat_period = 33; ...
cb0e34ba59a1b883009d69673179c6cde70acc25
Analyze and fix the following issue in the Linux kernel code: pata_sil680: Assorted fixes
Problem Details: Correct iordy handling and DMA bit flag handling. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index ed79fabe025c..5f10a33f92f5 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c @@ -33,7 +33,7 @@ #include <linux/libata.h> #define DRV_NAME "pata_sil680" -#define DRV_VERSION "0.4.1" +#define DRV_VERSION "0.4.5" /...
3ddcc591e3501e49037f9ace9340697a9a414a5e
Analyze and fix the following issue in the Linux kernel code: pata_ixp4xx: Fix up set_mode() function and display Configured for PIO info
Problem Details: Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index 3222ac7b945d..bd8aaaf35d0a 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c @@ -23,15 +23,16 @@ #include <scsi/scsi_host.h> #define DRV_NAME "pata_ixp4xx_cf" -#define DRV_VERSION "0.1.1ac1" +#define DR...
5ce0cf6fafd02fb4c43fc1a1bee6069d6c0a36b1
Analyze and fix the following issue in the Linux kernel code: sata_nv: enable hotplug interrupt and fix some readl/readw mismatches
Problem Details: We already have code that handles hotplug interrupt indications in ADMA mode, this turns on the control flag that actually enables these interrupts. Also fixes some cases in the same functions where a 16-bit register was read using a readl instead of a readw. Signed-off-by: Robert Hancock <hancockr@sh...
```diff diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 745d85686f5e..b564ff84a390 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -1034,14 +1034,15 @@ static int nv_adma_port_start(struct ata_port *ap) /* clear GO for register mode, enable interrupt */ tmp = readw(mmio + NV_ADM...
e1be5d73e07dd6015b6ea255a36aae3b61b7b054
Analyze and fix the following issue in the Linux kernel code: sata_via: fix resource-managed iomap conversion
Problem Details: Conversion to resource-managed iomap was buggy causing init failures on both vt6420 and 6421 - BAR5 wasn't mapped for both controllers while on vt6420 sata_via tried to map BAR0-4 twice. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c index baca6d79bb0b..fe9101a1dadc 100644 --- a/drivers/ata/sata_via.c +++ b/drivers/ata/sata_via.c @@ -423,16 +423,21 @@ static struct ata_probe_ent *vt6420_init_probe_ent(struct pci_dev *pdev) { struct ata_probe_ent *probe_ent; struct ata_port_in...
c3c70c443c2ef1fce31f201a93780c884b903993
Analyze and fix the following issue in the Linux kernel code: libata: fix ata_scsi_change_queue_depth()
Problem Details: Fix ata_scsi_change_queue_depth() such that... * NCQ on/off is exactly determined using the same logic as the issue path. * queue depth is adjusted to 1 if NCQ is not enabled. * -EINVAL is returned if requested action is ignored due to limitations. This fixes the bug which allows queue depth to be ...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index aa6cb6dcec41..48e388800f5a 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -987,29 +987,32 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth) struct ata_port *ap = ata_shost_to_port(sd...
fcf1bf1584647f9fd864c193fee81840c4c5ce41
Analyze and fix the following issue in the Linux kernel code: libata: fix ata_scmd_need_defer()
Problem Details: Fix ata_scmd_need_defer() such that... * whether NCQ is used or not is exactly determined using the same criteria as the issue path. * defer-check is performed in all cases. This fixes race condition where turning off NCQ on the fly causes non-NCQ commands sneak into NCQ phase. Signed-off-by: Tej...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 7bb782b5ce0c..aa6cb6dcec41 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -1496,11 +1496,9 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) static int ata_scmd_need_defer(struct ata_device *dev, in...
4c90d9717ae27dddf4b02ed7d683e502b539cd1c
Analyze and fix the following issue in the Linux kernel code: libata: disable pdev on all suspend events
Problem Details: libata used disable pdev only on PM_EVENT_SUSPEND while re-enable pdev unconditionally. This was okay before ref-counted pdev enable update but it now makes the pdev pinned after swsusp cycle (enabled twice but disabled only once) and devres sanity check whines about it. Fix it by unconditionally dis...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 794f327e398a..b71a7ef3f92a 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -6054,11 +6054,10 @@ int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits) void ata_pci_device_do_suspend(struct pc...
cc0759103ff00c3dfc459059af4a1cfb0e865841
Analyze and fix the following issue in the Linux kernel code: libata: Fix Cell SATA driver dependencies
Problem Details: The driver requires in_be32(), and so should not be built on many PCI platforms. Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 376d2cdde009..d16b5b0c8b76 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -564,7 +564,7 @@ config PATA_IXP4XX_CF config PATA_SCC tristate "Toshiba's Cell Reference Set IDE support" - depends on PCI + depends on PCI && PPC_IBM_CELL_...
4d05447ec702364b8a2aebb4d625b16479268575
Analyze and fix the following issue in the Linux kernel code: libata: fix probe_ent alloc/free bugs
Problem Details: ata_probe_ent_alloc() had a temporary hack such that devm_kzalloc() was used for allocation if devres had been previously initialized on the device; otherwise, plain kzalloc() was used. This was to make the code useable from both the old and devres-aware libata drivers during transition. This hack ma...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 407e7e15c252..794f327e398a 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5948,11 +5948,7 @@ ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port) { struct ata_probe_ent *probe_ent; - /*...
8d9db2d2fbae9e05022825c32f86e00c8e342860
Analyze and fix the following issue in the Linux kernel code: SATA: use NULL for ptrs
Problem Details: Fix sparse warnings in SATA: drivers/ata/sata_sil.c:342:9: warning: Using plain integer as NULL pointer drivers/ata/sata_mv.c:2056:55: warning: Using plain integer as NULL pointer Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm...
```diff diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index d689df52eae3..c73aa3bbaa3e 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -2052,7 +2052,7 @@ static void mv_port_init(struct ata_ioports *port, void __iomem *port_mmio) port->altstatus_addr = port->ctl_addr = shd_base + SHD_C...
2cb27853b7cbf0c908444e25c61b62fa336b88cd
Analyze and fix the following issue in the Linux kernel code: sata_nv: add back some verbosity into ADMA error_handler
Problem Details: Some debug output in the ADMA error_handler function was removed recently, but it may be useful in certain cases, like NCQ commands timing out. Add it back in, but make it a bit more intelligent so that it only prints if command(s) are active and only prints the CPBs for those commands. That way it won...
```diff diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index ab92f208dae2..f1fea96e90bd 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -1446,6 +1446,26 @@ static void nv_adma_error_handler(struct ata_port *ap) void __iomem *mmio = pp->ctl_block; int i; u16 tmp; + + if(ata_tag_...
4bb64fb98168981d3e5a0e790c077ff511768e84
Analyze and fix the following issue in the Linux kernel code: SiS warning fixes
Problem Details: Somehow the sis_info133 external definition ended up in libata.h and that was included by both drivers. However libata.h contains libata-* specific internals and clashing defines like DRV_NAME so this makes a mess. Move the extern into the C file and remove the warnings [akpm@linux-foundation.org: c...
```diff diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 29bd7f80fc40..c42671493e8c 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h @@ -159,7 +159,5 @@ extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc); /* libata-sff.c */ extern u8 ata_irq_on(struct ata_port *ap); -/* pata_sis.c *...
2b06719153089aa8f5ac577f15f8aa8e5b5fe357
Analyze and fix the following issue in the Linux kernel code: libata bugfix: HDIO_DRIVE_TASK
Problem Details: I was trying to use HDIO_DRIVE_TASK for something today, and discovered that the libata implementation does not copy over the upper four LBA bits from args[6]. This is serious, as any tools using this ioctl would have their commands applied to the wrong sectors on the drive, possibly resulting in disk...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 0009818a4306..d1bf1ca4f717 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -333,6 +333,7 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg) scsi_cmd[8] = args[3]; scsi_cmd[10] = args[4]; s...
2b9329367504d19c7c166c5aec557d070caccd70
Analyze and fix the following issue in the Linux kernel code: [S390] Remove BUG() statement
Problem Details: To avoid ugly warings for older gccs, we replace BUG() with "return NULL", which is just as well. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index a2410423c226..ee6826a52d26 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c @@ -91,7 +91,7 @@ static char *shutdown_action_str(enum shutdown_action action) case SHUTDOWN_STOP: return SHUTDOWN_STOP_STR; default: - BUG(); +...
188596faf788f2881a0eb316f2604832df058ea8
Analyze and fix the following issue in the Linux kernel code: [S390] fix non-smp compile.
Problem Details: Fix compile of sclp_quiesce for CONFIG_SMP=n. Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/char/sclp_quiesce.c b/drivers/s390/char/sclp_quiesce.c index ffa9282ce97a..baa8fe669ed2 100644 --- a/drivers/s390/char/sclp_quiesce.c +++ b/drivers/s390/char/sclp_quiesce.c @@ -16,6 +16,7 @@ #include <asm/atomic.h> #include <asm/ptrace.h> #include <asm/sigp.h> +#include <asm/smp.h> ...
7292576043666ff39946dee14641fe719ba8c7e8
Analyze and fix the following issue in the Linux kernel code: ACPI: fix S3 fan resume issue
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=7570#c14 Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 1ef338545dfe..547eee7537bc 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -436,8 +436,6 @@ int acpi_power_transition(struct acpi_device *device, int state) cl = &device->power.states[device->power.state].resources; tl = &device-...
f1d2120487de3620ff47367d7bc0e290dc868c47
Analyze and fix the following issue in the Linux kernel code: [PATCH] i810fb: fix i810_check_params section mismatch
Problem Details: WARNING: drivers/video/i810/i810fb.o - Section mismatch: reference to .init.data: from .text between 'i810_check_params' (at offset 0x1123) and 'encode_fix' yres cannot be declared __devinitdata as it is used in i810_check_params(), which isn't __devinit. Signed-off-by: Jean Delvare <khali@linux-fr.o...
```diff diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index ab1b8fe34d6d..7e760197cf29 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c @@ -142,7 +142,7 @@ static int hsync2 __devinitdata; static int vsync1 __devinitdata; static int vsync2 __d...
5b7e42b2d38e4c4d0cb105a2ad83d43f6957f59e
Analyze and fix the following issue in the Linux kernel code: [PATCH] GPIO API: SA1100 wrapper cleanup
Problem Details: Based on the discussion last december (http://lkml.org/lkml/2006/12/20/241), this patch - adds gpio_direction_input/output functions to generic.c instead of making them inline, - fixes comment and includes and uses inline functions instead of macros in gpio.h Signed-off-by: Philipp Zabel <...
```diff diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index e510295c2580..192a5a26cf2b 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c @@ -138,6 +138,36 @@ unsigned long long sched_clock(void) return v; } +int gpio_direction_input(unsigned gpio) +{ + ...
adff264fe66d78a166dc887f861e7273d0cb1654
Analyze and fix the following issue in the Linux kernel code: [PATCH] GPIO API: S3C2410 wrapper cleanup
Problem Details: this one adds an #include <asm/arch/regs-gpio.h>. Tested by Roman Moravcik on s3c2440. Based on the discussion last december (http://lkml.org/lkml/2006/12/20/243), this patch - fixes comment and includes in gpio.h - adds the gpio_to_irq definition for S3C2400 - includes asm/arch/regs-gpio.h for pin...
```diff diff --git a/include/asm-arm/arch-s3c2410/gpio.h b/include/asm-arm/arch-s3c2410/gpio.h index 67b8b9ab22e9..d47ae453f8ca 100644 --- a/include/asm-arm/arch-s3c2410/gpio.h +++ b/include/asm-arm/arch-s3c2410/gpio.h @@ -1,7 +1,7 @@ /* - * linux/include/asm-arm/arch-pxa/gpio.h + * linux/include/asm-arm/arch-s3c2410/...
bb2d1c36c7f3a78d482622289c8de0c1a5fe790f
Analyze and fix the following issue in the Linux kernel code: [PATCH] SPI controller build/warning fixes
Problem Details: The signature of the per-device cleanup() routine changed to remove its const-ness. Three new SPI controller drivers now need that change, to eliminate build warnings. This also fixes a build bug with atmel_spi on AT91 systems. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-o...
```diff diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index c2a9fef58edc..6fa260d1a9be 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c @@ -23,6 +23,10 @@ #include <asm/arch/board.h> #include <asm/arch/gpio.h> +#ifdef CONFIG_ARCH_AT91 +#include <asm/arch/cpu.h> +#endif + #include...
0bb92e6cd313cf209ea0c164952d1f65c5b3ea46
Analyze and fix the following issue in the Linux kernel code: [PATCH] parport_pc: fix parport_pc_probe_port section warning
Problem Details: WARNING: drivers/parport/parport_pc.o - Section mismatch: reference to .init.text: from .text between 'parport_pc_probe_port' (at offset 0x14f7) and 'parport_pc_unregister_port' parport_dma_probe() cannot be declared __devinit as it is called from parport_pc_probe_port() which isn't. Signed-off-by: J...
```diff diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index b61c17b3e298..3de2623afa13 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -1546,7 +1546,7 @@ static void __devinit detect_and_report_smsc (void) } #endif /* CONFIG_PARPORT_PC_SUPERIO */ -static in...
6d740cd5b18bc8128e70f98cfde8c74ebd21cea1
Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep: annotate BLKPG_DEL_PARTITION
Problem Details: >============================================= >[ INFO: possible recursive locking detected ] >2.6.19-1.2909.fc7 #1 >--------------------------------------------- >anaconda/587 is trying to acquire lock: > (&bdev->bd_mutex){--..}, at: [<c05fb380>] mutex_lock+0x21/0x24 > >but task is already holding loc...
```diff diff --git a/block/ioctl.c b/block/ioctl.c index e3f5eb9882cf..e06dbe9bc858 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -82,7 +82,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user fsync_bdev(bdevp); invalidate_bdev(bdevp, 0); - mutex_lock(&bdev->bd_mutex); + ...
da68d61f89e275260cc993a0d4a39e63700098fb
Analyze and fix the following issue in the Linux kernel code: [PATCH] remove modpost false warnings on ARM
Problem Details: This patch stops "modpost" from issuing erroneous modpost warnings on ARM builds, which it's been doing since since maybe last summer. A canonical example would be driver method table entries: WARNING: <path> - Section mismatch: reference to .exit.text:<name>_remove from .data after '$d' (at offse...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 569e68410d7a..c4b5398687b8 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -686,6 +686,30 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf_Addr addr, return NULL; } +static inline int is_arm_mapping_symbol(const ...
3deac046e2883686a732960050ab74fca0db11fa
Analyze and fix the following issue in the Linux kernel code: [PATCH] GPIO API: PXA wrapper cleanup
Problem Details: Based on the discussion last december (http://lkml.org/lkml/2006/12/20/242), this patch: - moves the PXA_LAST_GPIO check into pxa_gpio_mode - fixes comment and includes in gpio.h - replaces the gpio_set/get_value macros with inline functions and adds a non-inline version to avoid code ex...
```diff diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 390524c4710f..b8cb79f899d5 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c @@ -36,6 +36,7 @@ #include <asm/mach/map.h> #include <asm/arch/pxa-regs.h> +#include <asm/arch/gpio.h> #include <asm/arch/udc.h>...
5d4675a811fb71fd922109d7ebae3f987401ace1
Analyze and fix the following issue in the Linux kernel code: [PATCH] at91_rtc updates
Problem Details: Various bug fixes to the at91rm9200 RTC: - alarm: setalarm() should pay attention to the "enabled" flag - init: cleaner handling of the wakeup flags, which cpu init should really have set up. Doing it here is just a workaround. - linkage: since the at91_rtc driver probe() routine is in the...
```diff diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index a724ab49a797..ac0e68e2f025 100644 --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c @@ -164,6 +164,7 @@ static int at91_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) tm.tm_min = alrm->time.tm_min; ...
32b49da46caa8067ea47eea8b7aee6559e452125
Analyze and fix the following issue in the Linux kernel code: [PATCH] rtc-sa1100 rtc_wklarm.enabled bugfixes
Problem Details: Some rtc-sa1100 bugfixes: - The read_alarm() method reports the rtc_wkalrm.enabled field properly. This patch is already in the handhelds.org tree. - And the set_alarm() method now handles that flag correctly, rather than making mismatched {en,dis}able_irq_wake() calls, which trigger runtime ...
```diff diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index 9c8ead43a59c..677bae820dc3 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c @@ -263,8 +263,12 @@ static int sa1100_rtc_set_time(struct device *dev, struct rtc_time *tm) static int sa1100_rtc_read_alarm(struct device *d...
96c62d51cc5a3ea31ddef606544f014922591a64
Analyze and fix the following issue in the Linux kernel code: [PATCH] genalloc warning fixes
Problem Details: lib/genalloc.c: In function 'gen_pool_alloc': lib/genalloc.c:151: warning: passing argument 2 of '__set_bit' from incompatible pointer type lib/genalloc.c: In function 'gen_pool_free': lib/genalloc.c:190: warning: passing argument 2 of '__clear_bit' from incompatible pointer type Signed-off-by: Andrew...
```diff diff --git a/lib/genalloc.c b/lib/genalloc.c index 75ae68ce03e1..eb7c2bab9ebf 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c @@ -148,7 +148,7 @@ unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size) addr = chunk->start_addr + ((unsigned long)start_bit << order); while (nbits--) - ...
f50b6f8691cae2e0064c499dd3ef3f31142987f0
Analyze and fix the following issue in the Linux kernel code: [PATCH] autofs4: fix another race between mount and expire
Problem Details: Jeff Moyer has identified a race between mount and expire. What happens is that during an expire the situation can arise that a directory is removed and another lookup is done before the expire issues a completion status to the kernel module. In this case, since the the lookup gets a new dentry, it d...
```diff diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index 6b4cec3f272f..d85f42fa9206 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h @@ -52,6 +52,8 @@ struct autofs_info { int flags; + struct list_head rehash; + struct autofs_sb_info *sbi; unsigned long last_used; atomic_t cou...
e8514478f63b95548a49576ba96b47edeb8596e0
Analyze and fix the following issue in the Linux kernel code: [PATCH] autofs4: header file update
Problem Details: The current header file definitions for autofs version 5 have caused a couple of problems for application builds downstream. This fixes the problem by separating the definitions. Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus T...
```diff diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index 1e4a539f4417..0d041a9cb348 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c @@ -84,7 +84,11 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi, struct autofs_wait_queue *wq, int type) { - union autofs_packet_union pkt; ...
22c8ca78f20724676b6006232bf06cc3e9299539
Analyze and fix the following issue in the Linux kernel code: [PATCH] fs: fix nobh data leak
Problem Details: nobh_prepare_write leaks data similarly to how simple_prepare_write did. Fix by not marking the page uptodate until nobh_commit_write time. Again, this could break weird use-cases, but none appear to exist in the tree. We can safely remove the set_page_dirty, because as the comment says, nobh_commit_w...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index e95fe4f8d11a..e8504b65176c 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2248,7 +2248,6 @@ int nobh_prepare_write(struct page *page, unsigned from, unsigned to, int i; int ret = 0; int is_mapped_to_disk = 1; - int dirtied_it = 0; if (PageMappedToDisk(page)...
955eff5acc8b8cd1c7d4eec0229c35eaabe013db
Analyze and fix the following issue in the Linux kernel code: [PATCH] fs: fix libfs data leak
Problem Details: simple_prepare_write leaks uninitialised kernel data. This happens because the it leaves an uninitialised "hole" over the part of the page that the write is expected to go to. This is fine, but it then marks the page uptodate, which means a concurrent read can come in and copy the uninitialised memor...
```diff diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 7737bfd03cf8..ea271f2d3954 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -617,6 +617,11 @@ struct address_space_operations { In this case the prepare_write will be retried one t...
cc79aa9d282b34279731a522d074bfea4833e5b5
Analyze and fix the following issue in the Linux kernel code: [PATCH] 8250: Fix GCC4 signed/unsigned mismatch warning
Problem Details: Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 98ec86185328..c129a0e8e807 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -1196,7 +1196,7 @@ static void serial8250_enable_ms(struct uart_port *port) } static void -receive_chars(struct uart_8250_port *up, int *status) +rece...
0cba01db647fa87d14aeccac5267aebfeb2fc1d2
Analyze and fix the following issue in the Linux kernel code: [PATCH] cdrom: use unsigned bitfields
Problem Details: Fix 23 of these sparse warnings on x86_64 allmodconfig: include/linux/cdrom.h:942:19: error: dubious bitfield without explicit `signed' or `unsigned' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off...
```diff diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index bbbe7b4da0bb..f50f04bdbc16 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h @@ -939,7 +939,7 @@ struct cdrom_device_info { int speed; /* maximum speed for reading data */ int capacity; /* number of discs in jukebox */ /* dev...
23cac8debcdb34e97c01350b55ddf65161997a06
Analyze and fix the following issue in the Linux kernel code: [PATCH] tty: use NULL for ptrs
Problem Details: Fix sparse warning in tty_io: drivers/char/tty_io.c:1536:34: warning: Using plain integer as NULL pointer Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index df467284ff4e..f24c26d2dba1 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1533,7 +1533,7 @@ void disassociate_ctty(int on_exit) spin_lock_irq(&current->sighand->siglock); tty_pgrp = current->signal->tty_old_pgrp; - curren...
34173a4aad7a641e72b70f9927ca797746fbce69
Analyze and fix the following issue in the Linux kernel code: [PATCH] cfag12864b: fix crash when built-in and no parport present
Problem Details: The problem comes when ks0108/cfag12864b are built-in and no parallel port is present. ks0108_init() is called first, as it should be, but fails to load (as there is no parallel port to use). After that, cfag12864b_init() gets called, without knowing anything about ks0108 failed, and calls ks0108_wri...
```diff diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c index 889583dfc1a6..cb44cb4f6a47 100644 --- a/drivers/auxdisplay/cfag12864b.c +++ b/drivers/auxdisplay/cfag12864b.c @@ -311,6 +311,17 @@ EXPORT_SYMBOL_GPL(cfag12864b_enable); EXPORT_SYMBOL_GPL(cfag12864b_disable); EXPORT_SYMBOL_GPL...
91e4ee381d23ef67196a03924485aeceb32d6753
Analyze and fix the following issue in the Linux kernel code: [PATCH] pktcdvd: Correctly set cmd_len field in pkt_generic_packet
Problem Details: Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7810 - a silly copy-paste bug introduced by the latest change. Signed-off-by: Gerhard Dirschl <gd@spherenet.de> Cc: Peter Osterlund <petero2@telia.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus...
```diff diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 93fb6ed4ed52..a4fb70383188 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -765,7 +765,7 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command * goto out; } - rq->cmd_len = COMMAND_SIZE...
1df49008f4ddec9d4f6862b47ea5bdba82078aa4
Analyze and fix the following issue in the Linux kernel code: [PATCH] fault injection: split up stacktrace filter Kconfig option
Problem Details: There is no prompt for CONFIG_STACKTRACE, so FAULT_INJECTION cannot be selected without LOCKDEP enabled. (found by Paolo 'Blaisorblade' Giarrusso) In order to fix such broken Kconfig dependency, this patch splits up the stacktrace filter support for fault injection by new Kconfig option, which enable...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 4448f91b865c..3f3e7403dcac 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -411,8 +411,6 @@ config LKDTM config FAULT_INJECTION bool "Fault-injection framework" depends on DEBUG_KERNEL - depends on STACKTRACE - select FRAME_POINTER help ...
346fd59bab28093276be102632f72691a2c243fe
Analyze and fix the following issue in the Linux kernel code: [PATCH] kprobes: list all active probes in the system
Problem Details: This patch lists all active probes in the system by scanning through kprobe_table[]. It takes care of aggregate handlers and prints the type of the probe. Letter "k" for kprobes, "j" for jprobes, "r" for kretprobes. It also lists address of the instruction,its symbolic name(function name + offset) an...
```diff diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 6fcf8dd148d0..d25a9ada3f8e 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -39,6 +39,8 @@ #include <linux/moduleloader.h> #include <linux/kallsyms.h> #include <linux/freezer.h> +#include <linux/seq_file.h> +#include <linux/debugfs.h> #include <a...
ffda9d302267dbb7fc9bc38f6e4c1b3d61a536a9
Analyze and fix the following issue in the Linux kernel code: [PATCH] fs: fix __block_write_full_page error case buffer submission
Problem Details: Andrew noticed that unlocking the page before submitting all buffers for writeout could cause problems if the IO completes before we've finished messing around with the page buffers, and they subsequently get freed. Even if there were no bug, it is a good idea to bring the error case into line with th...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index f99c509697cd..e95fe4f8d11a 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1743,7 +1743,6 @@ recover: SetPageError(page); BUG_ON(PageWriteback(page)); set_page_writeback(page); - unlock_page(page); do { struct buffer_head *next = bh->b_this_page; if (buf...
bc56bba8f31bd99f350a5ebfd43d50f411b620c7
Analyze and fix the following issue in the Linux kernel code: [PATCH] shm: make sysv ipc shared memory use stacked files
Problem Details: The current ipc shared memory code runs into several problems because it does not quite use files like the rest of the kernel. With the option of backing ipc shared memory with either hugetlbfs or ordinary shared memory the problems got worse. With the added support for ipc namespaces things behaved ...
```diff diff --git a/ipc/shm.c b/ipc/shm.c index 5bb617f6306e..eb57e2254304 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -37,11 +37,21 @@ #include <linux/seq_file.h> #include <linux/mutex.h> #include <linux/nsproxy.h> +#include <linux/mount.h> #include <asm/uaccess.h> #include "util.h" +struct shm_file_data { +...
74c7aa8b8581e0ba8d6d17c623b9279aaabbb0cf
Analyze and fix the following issue in the Linux kernel code: [PATCH] Replace highest_possible_node_id() with nr_node_ids
Problem Details: highest_possible_node_id() is currently used to calculate the last possible node idso that the network subsystem can figure out how to size per node arrays. I think having the ability to determine the maximum amount of nodes in a system at runtime is useful but then we should name this entry correspon...
```diff diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index b1063e9cdb1b..52c54a5720f3 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h @@ -352,7 +352,7 @@ extern nodemask_t node_possible_map; #define node_possible(node) node_isset((node), node_possible_map) #define first_online...
5ec553a90448b3edbd26c1acc72464f877614bfa
Analyze and fix the following issue in the Linux kernel code: [PATCH] mincore warning fix
Problem Details: allnoconfig: mm/mincore.c: In function 'do_mincore': mm/mincore.c:122: warning: unused variable 'entry' Yet another entry in the why-macros-are-wrong encyclopedia. Cc: Christoph Lameter <clameter@engr.sgi.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundat...
```diff diff --git a/include/linux/swapops.h b/include/linux/swapops.h index ec639aa3a1d3..ceb6cc5ceebb 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h @@ -108,7 +108,10 @@ extern void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, #else #define make_migration_entry(page, write) swp_entry...
8af5e2eb3cc4450ffba9496c875beac41bf4f4f8
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix mempolicy's check on a system with memory-less-node
Problem Details: bind_zonelist() can create zero-length zonelist if there is a memory-less-node. This patch checks the length of zonelist. If length is 0, returns -EINVAL. tested on ia64/NUMA with memory-less-node. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Andi Kleen <ak@suse.de> C...
```diff diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 259a706bd83e..cf2a5381030a 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -144,7 +144,7 @@ static struct zonelist *bind_zonelist(nodemask_t *nodes) max++; /* space for zlcache_ptr (see mmzone.h) */ zl = kmalloc(sizeof(struct zone *) * max, GFP_KERNEL...
b446b60e4eb5e5457120c4728ada871b1209c1d0
Analyze and fix the following issue in the Linux kernel code: [PATCH] rework reserved major handling
Problem Details: Several people have reported failures in dynamic major device number handling due to the recent changes in there to avoid handing out the local/experimental majors. Rolf reports that this is due to a gcc-4.1.0 bug. The patch refactors that code a lot in an attempt to provoke the compiler into behavin...
```diff diff --git a/block/genhd.c b/block/genhd.c index 36bd3e12a6d4..050a1f0f3a86 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -5,6 +5,7 @@ #include <linux/module.h> #include <linux/fs.h> #include <linux/genhd.h> +#include <linux/kdev_t.h> #include <linux/kernel.h> #include <linux/blkdev.h> #include <linux...
f4fa27c16ba9b6910c5b815e5c13a7e8249277f0
Analyze and fix the following issue in the Linux kernel code: [PATCH] minix v3: fix superblock definition
Problem Details: Somehow we got the layout of the v3 superblock wrong, which causes crashes due to overindexing of the buffer_head array in statfs on large fielsystems. Cc: "Cedric Augonnet" <cedric.augonnet@gmail.com> Cc: "Daniel Aragones" <danarag@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> S...
```diff diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index 9850d513ff60..0e39745f5111 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h @@ -78,8 +78,7 @@ struct minix_super_block { * V3 minix super-block data on disk */ struct minix3_super_block { - __u16 s_ninodes; - __u16 s...
5085b607fb6c03d7668126b55cb54f20969c203c
Analyze and fix the following issue in the Linux kernel code: [PATCH] xfs warning fix
Problem Details: fs/xfs/linux-2.6/xfs_super.c:903: warning: 'noinline' attribute ignored Cc: David Chinner <dgc@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 1a4103ca593c..2f2c40db562e 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c @@ -900,7 +900,7 @@ static struct quotactl_ops xfs_quotactl_operations = { .set_xquota = xfs_fs_setxquota, }; -STATIC struc...
7b8f850bebe093e37d283ed791039b39fa241e6d
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix build errors if bitop functions are do {} while macros
Problem Details: If one of clear_bit, change_bit or set_bit is defined as a do { } while (0) function usage of these functions in parenthesis like (foo_bit(23, &var)) while be expaned to something like (do { ... } while (0)}). resulting in a build error. This patch removes the useless parenthesis. Signed-off-...
```diff diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 3f1b38276e96..5231ed7e723f 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -297,17 +297,17 @@ static int initialising = 1; #define DRS (&drive_state[current_drive]) #define DRWE (&write_errors[current_drive]) #define FDCS ...
b077ffb3b767c3efb44d00b998385a9cb127255c
Analyze and fix the following issue in the Linux kernel code: rdmsr_on_cpu, wrmsr_on_cpu
Problem Details: There was OpenVZ specific bug rendering some cpufreq drivers unusable on SMP. In short, when cpufreq code thinks it confined itself to needed cpu by means of set_cpus_allowed() to execute rdmsr, some "virtual cpu" feature can migrate process to anywhere. This triggers bugons and does wrong things in g...
```diff diff --git a/arch/i386/lib/Makefile b/arch/i386/lib/Makefile index d86a548b8d54..0d41223472c2 100644 --- a/arch/i386/lib/Makefile +++ b/arch/i386/lib/Makefile @@ -7,3 +7,5 @@ lib-y = checksum.o delay.o usercopy.o getuser.o putuser.o memcpy.o strstr.o \ bitops.o semaphore.o lib-$(CONFIG_X86_USE_3DNOW) += mm...
21d31f1f7c8f832324fb55eb4b1397b16258904e
Analyze and fix the following issue in the Linux kernel code: [PATCH] [MTD] block2mtd: remove readahead code
Problem Details: Over the years there was a slow trickle of complaints against the readahead code. Most of them concerned performance, Peter Zijlstra stumbled over it when working unrelated changes and I believe there was an actual bug report. Oh, Andrew Morton also complained about duplicating code from mm/readahead....
```diff diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index 3bc92153e2b6..ce47544dc120 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c @@ -40,56 +40,9 @@ struct block2mtd_dev { static LIST_HEAD(blkmtd_device_list); -#define PAGE_READAHEAD 64 -stat...
a5220b463e957c9a434295503cdf635d93454d78
Analyze and fix the following issue in the Linux kernel code: [AGPGART] Fix modular agpgart ia64 allmodconfig
Problem Details: My previous compat AGP patch broke modular AGPGART. Test built on; i386 CONFIG_AGP=y,m x86_64 CONFIG_AGP=y ia64 CONFIG_AGP=m Signed-off-by: Zwane Mwaikambo <zwane@infradead.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Jones <d...
```diff diff --git a/drivers/char/agp/Makefile b/drivers/char/agp/Makefile index a0d04a23dacd..627f542827c7 100644 --- a/drivers/char/agp/Makefile +++ b/drivers/char/agp/Makefile @@ -1,7 +1,8 @@ agpgart-y := backend.o frontend.o generic.o isoch.o +agpgart-$(CONFIG_COMPAT) += compat_ioctl.o + obj-$(CONFIG_AGP) += a...
4afffe5eabc4005674a1ef4f4c96f1ae9f4a979b
Analyze and fix the following issue in the Linux kernel code: [PATCH] ARM: fix mach-at91 build breakage
Problem Details: The rename of the AT91 subtree from mach-at91rm9200 to mach-at91 (to accomodate at91sam926x processors) was incomplete. It needs this patch to be able to build again. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 1320418b5d6f..ab9f2d4bd04e 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -124,7 +124,7 @@ endif machine-$(CONFIG_ARCH_H720X) := h720x machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 machine-$(CONFIG_ARCH_REALVIEW) := realview - machin...
a9b69d0c0c928b4a78a0da32a903ae47b0ad09e7
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix Kconfig typo bug
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/oprofile/Kconfig b/arch/mips/oprofile/Kconfig index ca395ef06d4e..fb6f235348b0 100644 --- a/arch/mips/oprofile/Kconfig +++ b/arch/mips/oprofile/Kconfig @@ -11,7 +11,7 @@ config PROFILING config OPROFILE tristate "OProfile system profiling (EXPERIMENTAL)" - depends on PROFILING && !!M...
90fccb1363f96790034c69f0703a36241f9197dc
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix double signal on trap and break instruction
Problem Details: This commit broke gdb, since any BREAK or TRAP instruction cause SIGSEGV. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index f663c63d5dd3..2aa208b99da8 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -704,6 +704,7 @@ asmlinkage void do_bp(struct pt_regs *regs) die_if_kernel("Break instruction in kernel code", regs); force_sig(SIGTRAP,...
208491d8f92e5aa129acb27e223e75d0173a3edd
Analyze and fix the following issue in the Linux kernel code: skge: race with workq and RTNL
Problem Details: If a workqueue function that needs RTNL is running when skge_down is called then a deadlock is possible. Fix by only clearing the timer, and handling the flush_scheduled_work on removal. This work queue is only ever used for the old fiber based boards. Signed-off-by: Stephen Hemminger <shemminger@linu...
```diff diff --git a/drivers/net/skge.c b/drivers/net/skge.c index e482e7fcbb2b..c3d2e0a2c4e6 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -1419,7 +1419,8 @@ static void xm_link_timer(struct work_struct *work) mutex_unlock(&hw->phy_mutex); nochange: - schedule_delayed_work(&skge->link_thread, LINK_H...
22747d6b41f31c71abc2b351bc9f6bfa6bae5d5e
Analyze and fix the following issue in the Linux kernel code: s2io: RTNL and flush_scheduled_work deadlock
Problem Details: Mantra: don't use flush_scheduled_work with RTNL held. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index e8e0d94e9bdd..fd85648d98d1 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -3758,7 +3758,6 @@ static int s2io_close(struct net_device *dev) { struct s2io_nic *sp = dev->priv; - flush_scheduled_work(); netif_stop_queue(dev); /* Reset...
83cbb4d2577174e27a91e63a47a2a27c3af50d4e
Analyze and fix the following issue in the Linux kernel code: 8139too: RTNL and flush_scheduled_work deadlock
Problem Details: Your usual dont-flush_scheduled_work-with-RTNL-held stuff. It is a bit different here since the thread runs permanently or is only occasionally kicked for recovery depending on the hardware revision. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 35ad5cff18e6..99304b2aa86e 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c @@ -1109,6 +1109,8 @@ static void __devexit rtl8139_remove_one (struct pci_dev *pdev) assert (dev != NULL); + flush_scheduled_work(); + unregister_ne...
c014f6c8f870271a8dcfe6e4139d6a651633aaf4
Analyze and fix the following issue in the Linux kernel code: sis190: RTNL and flush_scheduled_work deadlock
Problem Details: Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 45d91b159100..b08508b35833 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c @@ -909,6 +909,9 @@ static void sis190_phy_task(struct work_struct *work) rtnl_lock(); + if (!netif_running(dev)) + goto out_unlock; + val = mdio_read(i...
eb2a021c4710b98081daa797d5a729ac23c240cd
Analyze and fix the following issue in the Linux kernel code: r8169: RTNL and flush_scheduled_work deadlock
Problem Details: flush_scheduled_work() in net_device->close has a slight tendency to deadlock with tasks on the workqueue that hold RTNL. rtl8169_close/down simply need the recovery tasks to not meddle with the hardware while the device is going down. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-...
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 5598d86380b4..13cf06ee97f7 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1733,6 +1733,8 @@ rtl8169_remove_one(struct pci_dev *pdev) assert(dev != NULL); assert(tp != NULL); + flush_scheduled_work(); + unregister_netdev(dev); ...
97e412fa9e31414030c1e9ac5e96a985d946af83
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix s3c2410 ALSA audio for typedef elimination
Problem Details: Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-s3c2410/audio.h b/include/asm-arm/arch-s3c2410/audio.h index 65e0acffa1ad..0a6977fb5770 100644 --- a/include/asm-arm/arch-s3c2410/audio.h +++ b/include/asm-arm/arch-s3c2410/audio.h @@ -31,9 +31,9 @@ struct s3c24xx_iis_ops { int (*suspend)(struct s3c24xx_iis_ops *me); int (*...
8a371840f825be20354007537b6568b77448b685
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix ARM AACI ALSA driver
Problem Details: CC [M] sound/arm/aaci.o sound/arm/aaci.c:729: error: parse error before '*' token sound/arm/aaci.c:731: warning: function declaration isn't a prototype ... sound/arm/aaci.c:786: error: parse error before '*' token sound/arm/aaci.c:786: warning: function declaration isn't a prototype ... sound/arm/aaci...
```diff diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 5190d7acdb9f..b9eca9f3dd25 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -726,8 +726,8 @@ static struct snd_pcm_ops aaci_playback_ops = { .mmap = aaci_pcm_mmap, }; -static int aaci_pcm_capture_hw_params(snd_pcm_substream_t *substream, - ...
25ccb569ee52114c01e28a2fe2d451cd43de309c
Analyze and fix the following issue in the Linux kernel code: [ARM] fix mach-at91 build breakage
Problem Details: The rename of the AT91 subtree from mach-at91rm9200 to mach-at91 (to accomodate at91sam926x processors) was incomplete. It needs this patch to be able to build again. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 1320418b5d6f..ab9f2d4bd04e 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -124,7 +124,7 @@ endif machine-$(CONFIG_ARCH_H720X) := h720x machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 machine-$(CONFIG_ARCH_REALVIEW) := realview - machin...
4f2849e49cbaf8373163211bb811a8457b46cc4e
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix jornada720 build errors
Problem Details: kernel/built-in.o: In function `pm_suspend': utsname_sysctl.c:(.text+0x23008): multiple definition of `pm_suspend' arch/arm/mach-sa1100/built-in.o:arch/arm/mach-sa1100/sleep.S:(.text+0xf68): first defined here arm-linux-ld: Warning: size of symbol `pm_suspend' changed from 20 in arch/arm/mach-sa1100/bu...
```diff diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c index 54ecdaa373d6..64067cd58d36 100644 --- a/arch/arm/mach-sa1100/jornada720.c +++ b/arch/arm/mach-sa1100/jornada720.c @@ -231,12 +231,6 @@ static struct platform_device *devices[] __initdata = { &s1d13xxxfb_device, }; -/* ...
6a32b935f8f8eb31877b73f76290ae051279df33
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix iop13xx build error
Problem Details: CC arch/arm/mach-iop13xx/setup.o arch/arm/mach-iop13xx/setup.c: In function 'iq8134x_probe_flash_size': arch/arm/mach-iop13xx/setup.c:210: warning: implicit declaration of function 'ioremap' arch/arm/mach-iop13xx/setup.c:210: warning: initialization makes pointer from integer without a cast arch/a...
```diff diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c index 5fbeb28d04bb..9a46bcd5f18e 100644 --- a/arch/arm/mach-iop13xx/setup.c +++ b/arch/arm/mach-iop13xx/setup.c @@ -24,6 +24,7 @@ #include <asm/mach/map.h> #include <asm/hardware.h> #include <asm/irq.h> +#include <asm/io.h> #define...
d608e52c361271ccd841b629ca50462756f7b078
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix build error caused by move of apm
Problem Details: CC arch/arm/common/sharpsl_pm.o arch/arm/common/sharpsl_pm.c:30:31: error: asm/apm-emulation.h: No such file or directory ... Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c index a3b450f8ef17..a9bc5b52218f 100644 --- a/arch/arm/common/sharpsl_pm.c +++ b/arch/arm/common/sharpsl_pm.c @@ -23,11 +23,11 @@ #include <linux/interrupt.h> #include <linux/platform_device.h> #include <linux/leds.h> +#include <linux/a...
37985b449310b17a815511045455934ede5a90c0
Analyze and fix the following issue in the Linux kernel code: [ARM] 4223/1: ixdp2351 : Fix for a define error
Problem Details: Fix syntax error for a define in ixdp2351.h Signed-off-by: ozzy <linux-ozzy@gmx.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-ixp23xx/ixdp2351.h b/include/asm-arm/arch-ixp23xx/ixdp2351.h index 4a24f8f15655..d5e8a43d7bbd 100644 --- a/include/asm-arm/arch-ixp23xx/ixdp2351.h +++ b/include/asm-arm/arch-ixp23xx/ixdp2351.h @@ -46,7 +46,7 @@ #define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0) #defi...
37ce69a57ff217a4ca0871e9ee5aa58c052b7d86
Analyze and fix the following issue in the Linux kernel code: backlight: Rework backlight/fb interaction simplifying, lots
Problem Details: fb_info->bl_mutex is badly thought out and the backlight class doesn't need it if the framebuffer/backlight register/unregister order is consistent, particularly after the backlight locking fixes. Fix the drivers to use the order: backlight_device_register() register_framebuffer() unregister_framebuf...
```diff diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 1c77cfb8e683..ef3e7861c27a 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c @@ -1697,7 +1697,6 @@ static int __devinit aty128fb_setup(char *options) static struct backlight_properties aty128_bl_data; ...
34f18a71d9bc55e8210c3fe02938336f82f40b30
Analyze and fix the following issue in the Linux kernel code: backlight: Fix Kconfig entries
Problem Details: Currently its possible to build the backlight core as a module yet compile the drivers into the kernel which gives missing symbols. Fix. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
```diff diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index cda32399c039..47d15b5d985a 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -19,11 +19,6 @@ config BACKLIGHT_CLASS_DEVICE To have support for your specific LCD panel you will have to ...
28ee086d5b36aab2931f6740e409bb0fb6c65e5f
Analyze and fix the following issue in the Linux kernel code: backlight: Fix external uses of backlight internal semaphore
Problem Details: backlight_device->sem has a very specific use as documented in the header file. The external users of this are using it for a different reason, to serialise access to the update_status() method. backlight users were supposed to implement their own internal serialisation of update_status() if needed bu...
```diff diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index dcc6f159fd94..35ce07b6a5bc 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -107,12 +107,10 @@ int die(const char *str, struct pt_regs *regs, long err) if (machine_is(powermac) && pmac_backlight) { str...
2fd5a15489dd2e58009ffd4ecbadb36a40f67d2b
Analyze and fix the following issue in the Linux kernel code: backlight: Fix error handling
Problem Details: Fix error handling when registering new device Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
```diff diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 9601bfe309ac..71056f8b621a 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -240,13 +240,16 @@ struct backlight_device *backlight_device_register(const char *name, rc = c...
0cfd5267476ce8051c4447988d2b0377d09188e8
Analyze and fix the following issue in the Linux kernel code: [MIPS] Cobalt: Fix UART I/O type
Problem Details: The Cobalt UART is actually connected to memory resource area. Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c index a4b69b543bd9..415ff8710b55 100644 --- a/arch/mips/cobalt/setup.c +++ b/arch/mips/cobalt/setup.c @@ -130,7 +130,7 @@ void __init plat_mem_setup(void) set_io_port_base(CKSEG1ADDR(GT_DEF_PCI0_IO_BASE)); - /* I/O port resource must include...
269dd2b2526d046d8b43554ff27b486e2ddb3f08
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix struct sigcontext for N32 userland
Problem Details: The kernel use 64-bit for sc_regs[0], and both N32/N64 userland expects it was 64-bit. But size of 'long' on N32 is actually 32-bit. So this definition make some confusion. Use __u32 and __u64 for N32/N64 sigcontext to get rid of this confusion. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Si...
```diff diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h index 3c175a7e4345..972947474eb7 100644 --- a/include/asm-mips/sigcontext.h +++ b/include/asm-mips/sigcontext.h @@ -42,6 +42,7 @@ struct sigcontext { #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 +#include <linux...
f49a747c4adadd96addf4dbf4a44f439513fb29b
Analyze and fix the following issue in the Linux kernel code: [MIPS] Make some __setup functions static
Problem Details: This fixes some sparse warnings. ("warning: symbol 'foo' was not declared. Should it be static?") Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 50ed6d58ae71..ab755ea26c6a 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -98,7 +98,7 @@ static void au1k_wait(void) static int __initdata nowait = 0; -int __init wait_disable(char *s) +static in...
c9ce228306fda4448f5f495b4f36c07956f45acd
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix a free-wrong-pointer bug in nfs/acl server.
Problem Details: Due to type confusion, when an nfsacl verison 2 'ACCESS' request finishes and tries to clean up, it calls fh_put on entiredly the wrong thing and this can cause an oops. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c index edde5dc5f796..b61742885011 100644 --- a/fs/nfsd/nfs2acl.c +++ b/fs/nfsd/nfs2acl.c @@ -287,13 +287,20 @@ static int nfsaclsvc_release_getacl(struct svc_rqst *rqstp, __be32 *p, return 1; } -static int nfsaclsvc_release_fhandle(struct svc_rqst *rqstp, _...
6168a702ab0be181e5e57a0b2d0e7376f7a47f0b
Analyze and fix the following issue in the Linux kernel code: [PATCH] Declare init_irq_proc before we use it.
Problem Details: powerpc gets: init/main.c: In function `do_basic_setup': init/main.c:714: warning: implicit declaration of function `init_irq_proc' but we cannot include linux/irq.h in generic code. Fix it by moving the declaration into linux/interrupt.h instead. And make sure all code that defines init_irq_proc()...
```diff diff --git a/arch/h8300/kernel/ints.c b/arch/h8300/kernel/ints.c index 587ef7f4fcc7..3e4f479271c9 100644 --- a/arch/h8300/kernel/ints.c +++ b/arch/h8300/kernel/ints.c @@ -19,6 +19,7 @@ #include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/seq_file.h> +#include <linux/interrupt.h> #include ...
bc5393a6c9c0e70b4b43fb2fb63e3315e9a15c8f
Analyze and fix the following issue in the Linux kernel code: [PATCH] NOHZ: Produce debug output instead of a BUG()
Problem Details: The BUG_ON() in tick_nohz_stop_sched_tick() triggers on some boxen. Remove the BUG_ON and print information about the pending softirq to allow better debugging of the problem. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 9234e44fc94a..512a4a906467 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -165,7 +165,9 @@ void tick_nohz_stop_sched_tick(void) goto end; cpu = smp_processor_id(); - BUG_ON(local_softirq_pending()); + if (unli...
6ba9b346e1e0eca65ec589d32de3a9fe32dc5de6
Analyze and fix the following issue in the Linux kernel code: [PATCH] NOHZ: Fix RCU handling
Problem Details: When a CPU is needed for RCU the tick has to continue even when it was stopped before. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 95e41f7f850b..9234e44fc94a 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -191,19 +191,19 @@ void tick_nohz_stop_sched_tick(void) next_jiffies = get_next_timer_interrupt(last_jiffies); delta_jiffies = next_jiffie...
6a1e552947b0d73310e534bf4eb09e14db1e5056
Analyze and fix the following issue in the Linux kernel code: [MIPS] Add external declaration of pagetable_init() to pgalloc.h
Problem Details: This fixes some sparse warnings. pgtable-32.c:15:6: warning: symbol 'pgd_init' was not declared. Should it be static? pgtable-32.c:32:13: warning: symbol 'pagetable_init' was not declared. Should it be static? Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux...
```diff diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 125a4a85ec05..13a420844436 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -314,8 +314,6 @@ void __init fixrange_init(unsigned long start, unsigned long end, } #ifndef CONFIG_NEED_MULTIPLE_NODES -extern void pagetable_init(void); - ...
38201fb23cd554f942702cd938c3215a76296c87
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix CONFIG_MIPS32_N32=y CONFIG_MIPS32_O32=n build
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 1bf2c8448912..8faf1b40cd66 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile @@ -53,9 +53,9 @@ obj-$(CONFIG_MIPS_BOARDS_GEN) += irq-msc01.o obj-$(CONFIG_32BIT) += scall32-o32.o obj-$(CONFIG_64BIT) += scall64-64.o ...
f8aeb85f158fa98f8c2c9a24effb00adc06c0e85
Analyze and fix the following issue in the Linux kernel code: [MIPS] IP27: Fix warning.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index 9ce513629b14..8c3c78c63ccd 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c @@ -190,7 +190,7 @@ static struct irq_chip rt_irq_type = { }; static struct irqaction rt_irqaction = { - .handler...
755f21bb894d3fe57017f5aa8f7ace8808fcb1e3
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.
Problem Details: access_ok in compat-signal.h is wrong (checking destination instead of source) and redundant (already checked before calling this function). Also sf_mask in struct sigframe32 should be compat_sigset_t type. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mi...
```diff diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index c28cb21514c8..9f829f63024b 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -150,7 +150,7 @@ struct sigframe32 { u32 sf_ass[4]; /* argument save space for o32 */ u32 sf_code[2]; /* signal trampoline *...
4f65992381112acd7d2732665a9eae492c2c9de6
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] S3C2412 fix hw ecc
Problem Details: S3C2412 use differents registers than s3c2440 for hw ecc handling. Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.fr> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index e8e030171ec4..0ddfd6de75c5 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -418,6 +418,15 @@ static void s3c2410_nand_enable_hwecc(struct mtd_info *mtd, int mode) writel(ctrl, info->regs + S3C2410_NFCONF); ...
7be26bfb2ef3b3a768232d11d9aad9222b053d0a
Analyze and fix the following issue in the Linux kernel code: [JFFS2] printk warning fixes
Problem Details: fs/jffs2/wbuf.c: In function 'jffs2_check_oob_empty': fs/jffs2/wbuf.c:993: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' fs/jffs2/wbuf.c:993: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' fs/jffs2/wbuf.c: In function 'jffs2_check_nand_cleanmarker'...
```diff diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 58cb77baed8e..de718e3a1692 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c @@ -988,9 +988,9 @@ int jffs2_check_oob_empty(struct jffs2_sb_info *c, ret = c->mtd->read_oob(c->mtd, jeb->offset, &ops); if (ret || ops.oobretlen != ops.ooblen) { - printk(K...
3a38d3af92c423687fa3c916ad3e1288980024e3
Analyze and fix the following issue in the Linux kernel code: [MTD] [MAPS] ichxrom warning fix
Problem Details: drivers/mtd/maps/ichxrom.c: In function 'ichxrom_init_one': drivers/mtd/maps/ichxrom.c:231: warning: format '%08lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t' drivers/mtd/maps/ichxrom.c:231: warning: format '%08lx' expects type 'long unsigned int', but argument 4 has ty...
```diff diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c index 2bb3e63606e5..2c884c49e84a 100644 --- a/drivers/mtd/maps/ichxrom.c +++ b/drivers/mtd/maps/ichxrom.c @@ -227,8 +227,8 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev, (((unsigned long)(window->virt)) + offset); map->...