id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
aed6abd662c2903733bea7fcd3856c306e650680
Analyze and fix the following issue in the Linux kernel code: V4L-DVB(7789a): cx18: fix symbol conflict with ivtv driver
Problem Details: LD drivers/media/video/built-in.o drivers/media/video/cx18/built-in.o: In function `get_service_set': /home/v4l/tokernel/git/drivers/media/video/cx18/cx18-ioctl.c:118: multiple definition of `get_service_set' drivers/media/video/ivtv/built-in.o:/home/v4l/tokernel/git/drivers/media/video/ivtv/ivtv-...
```diff diff --git a/drivers/media/video/cx18/cx18-controls.c b/drivers/media/video/cx18/cx18-controls.c index da299ae61cff..2bdac5ebbb0d 100644 --- a/drivers/media/video/cx18/cx18-controls.c +++ b/drivers/media/video/cx18/cx18-controls.c @@ -184,12 +184,12 @@ static int cx18_setup_vbi_fmt(struct cx18 *cx, enum v4l2_mp...
d74bee8b4776b5051c650a90f49a2022d46d8588
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7783): drivers/media/dvb/frontends/s5h1420.c: printk fix
Problem Details: drivers/media/dvb/frontends/s5h1420.c: In function `s5h1420_setsymbolrate': drivers/media/dvb/frontends/s5h1420.c:484: warning: long long unsigned int format, u64 arg (arg 2) We do not know what type the architecture uses for u64. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by...
```diff diff --git a/drivers/media/dvb/frontends/s5h1420.c b/drivers/media/dvb/frontends/s5h1420.c index 281e1cb2edc6..720ed9ff7c5f 100644 --- a/drivers/media/dvb/frontends/s5h1420.c +++ b/drivers/media/dvb/frontends/s5h1420.c @@ -481,7 +481,7 @@ static void s5h1420_setsymbolrate(struct s5h1420_state* state, val *= ...
485fcaed25ed42d064445f9a65faa79a1faa6b0c
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7779): pvrusb2-dvb: quiet down noise in kernel log for feed debug
Problem Details: Get rid of the noise in dmesg during dvb feed changes, unless the appropriate debug trace flag is enabled. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Reviewed-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-debug.h b/drivers/media/video/pvrusb2/pvrusb2-debug.h index 11537ddf8aa3..707d2d9635d7 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-debug.h +++ b/drivers/media/video/pvrusb2/pvrusb2-debug.h @@ -54,6 +54,7 @@ extern int pvrusb2_debug; #define PVR2_TRACE_DATA_...
f1784354f774e1fa4863fc6382296ef6ede26dc5
Analyze and fix the following issue in the Linux kernel code: Fix V4L/DVB core help messages
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index b5664927df91..ddf57e135c6c 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig @@ -14,13 +14,11 @@ comment "Multimedia core support" config VIDEO_DEV tristate "Video For Linux" ---help--- - Support for audio/video capture and ove...
a0bdd273a2fdb2a0debc90d5f8826073e2ddea4d
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7762): ivtv: fix tuner detection for PAL-N/Nc
Problem Details: Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/ivtv/ivtv-cards.c b/drivers/media/video/ivtv/ivtv-cards.c index 75b01e89e641..6266a09ea75f 100644 --- a/drivers/media/video/ivtv/ivtv-cards.c +++ b/drivers/media/video/ivtv/ivtv-cards.c @@ -40,6 +40,8 @@ #define MSP_MONO MSP_INPUT(MSP_IN_MONO, MSP_IN_TUNER1, \ MSP_DSP_IN...
94dee760823606ff6e191efc60e5bb98b81f1676
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7758): ivtv: fix oops when itv->speed == 0 and VIDEO_CMD_PLAY is called
Problem Details: Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index 6282387ca05c..d508b5d0538c 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c @@ -243,20 +243,31 @@ static int ivtv_validate_speed(int cur_speed, int new_speed) int fact...
d86e2ee98eeef61bdab8ca1bf4837c5709173790
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7754): ivtv: change initialization order to fix an oops when device registration failed
Problem Details: Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 065df53f80fd..06a1f3c4de4b 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c @@ -1195,13 +1195,6 @@ static int __devinit ivtv_probe(struct pci_dev *dev, ivtv_call_...
c117d05cd4c09342f97ba1c6ef63f0bae3239a39
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7753): saa7134: fix tuner setup
Problem Details: Tuner setup were happening during i2c attach callback. This means that it would happen on two conditions: 1) if tuner module weren't load, it will happen at request_module("tuner"); 2) if tuner is not compiled as a module, or it is already loaded (for example, on setups wit...
```diff diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 98375955a84b..4046b23a3139 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c @@ -47,6 +47,9 @@ static char name_svideo[] = "S-Video"; /* -------...
397be5c4d66e6583ce3d38b0f99a56eb9818492b
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7752): tuner-core: add a missing \n after a debug printk
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 2b72e10e6b9f..24ae2bc516ab 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -730,8 +730,10 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) struct dv...
4bf1226a7018bf79d05e0ce59244d702819529d1
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7749): cx88: fix tuner setup
Problem Details: Tuner setup were happening during i2c attach callback. This means that it would happen on two conditions: 1) if tuner module weren't load, it will happen at request_module("tuner"); 2) if tuner is not compiled as a module, or it is already loaded (for example, on setups with more than one tuner...
```diff diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index 2b6b283cda15..aeba26dc0a37 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c @@ -57,6 +57,9 @@ MODULE_PARM_DESC(latency,"pci latency timer"); /* ------------------------...
11f6400e92aa3fc0aa936f20f7cc363674a4e3c4
Analyze and fix the following issue in the Linux kernel code: pata_via: Fix 6410 misdetect
Problem Details: The discrete VIA ATA chips don't have 0x40 enable bits. We check that properly in one location but not another. This causes some users 6410 RAID cards to be incorrectly skipped. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index d4840748fb5c..2fea6cbe7755 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c @@ -464,11 +464,12 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) } pci_dev_put(isa); - /* 0x40 low bits indicate...
d7b5a23fc6e85456ed00a997ff2d925fb3f0dc52
Analyze and fix the following issue in the Linux kernel code: [libata] pata_atiixp: fix PIO timing data misprogramming
Problem Details: Use correct variable, achieve desired result... Spotted by LKML/linux-ide poster whose name I lost (apologies!) Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index 78738fb4223b..d7de7baf58a8 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c @@ -88,8 +88,8 @@ static void atiixp_set_pio_timing(struct ata_port *ap, struct ata_device *adev, pci_write_config_word(pdev, ATIIXP_IDE_PI...
ee56d977423a58b53fd0fc1ef0aca0c9cb564c53
Analyze and fix the following issue in the Linux kernel code: i2c-amd756-s4882: Fix an error path
Problem Details: If initialization fails, we want to restore the physical bus, not delete it again. Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c index e5e96c817566..c38a0a112208 100644 --- a/drivers/i2c/busses/i2c-amd756-s4882.c +++ b/drivers/i2c/busses/i2c-amd756-s4882.c @@ -1,7 +1,7 @@ /* * i2c-amd756-s4882.c - i2c-amd756 extras for the Tyan S4882 motherboard...
6d072d78f87e8fe0fe30d096991b83af07f8bdfe
Analyze and fix the following issue in the Linux kernel code: i2c/tps65010: Add missing intialization of client data
Problem Details: tps65010_remove() calls i2c_get_clientdata(client) but the client data is never set during initialization, so it gets a NULL pointer at best. I guess it was never spotted because the tps65010 driver is typically not built modular so this function is discarded. Signed-off-by: Jean Delvare <khali@linux...
```diff diff --git a/drivers/i2c/chips/tps65010.c b/drivers/i2c/chips/tps65010.c index b67f69c2e7f3..feabd12c081c 100644 --- a/drivers/i2c/chips/tps65010.c +++ b/drivers/i2c/chips/tps65010.c @@ -527,6 +527,7 @@ static int __exit tps65010_remove(struct i2c_client *client) flush_scheduled_work(); debugfs_remove(tps->...
c5d21b7fb747042cb2155698649cffccfd77d1f3
Analyze and fix the following issue in the Linux kernel code: i2c: Spelling fix (successful)
Problem Details: Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index 9bbe96cef719..4ae3a2cb6ace 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -223,7 +223,7 @@ static int piix4_transaction(void) dev_err(&piix4_adapter.dev, "Failed! (%02x)\n", temp); ret...
b26b0c590066f65ff3b1ff438502f3c40ea39520
Analyze and fix the following issue in the Linux kernel code: ide: fix crash at boot with siimage driver
Problem Details: Some change to the IDE layer are causing the siimage driver to crash at boot with a NULL dereference. This is due to the sil_dma_ops not containing all the necessary pointers. I suppose it used to just "override" the defaults while now, it needs to contain everything. [bart: while at it: sil_dma_ops s...
```diff diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 4cf8fc54aa2a..0006b9e58567 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c @@ -737,8 +737,15 @@ static const struct ide_port_ops sil_sata_port_ops = { .cable_detect = sil_cable_detect, }; -static struct ide_dma...
e617fce64e5faea149fcf3bffc1b42e4ba29e7e5
Analyze and fix the following issue in the Linux kernel code: [IA64] bugfix: nptcg breaks cpu-hotadd
Problem Details: If "max_purges" from PAL is 0, it actually means 1. However it was not handled later when a hot-added cpu pass the max_purges from PAL. This makes systems easy to go BUG_ON(). Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index d52ec4e83409..8caf42471f0d 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c @@ -168,7 +168,10 @@ setup_ptcg_sem(int max_purges, int nptcg_from) static int firstcpu = 1; if (toolatetochangeptcgsem) { - BUG_ON(max_purges < nptcg); + if (np...
baaad380c0aa955f7d62e846467316c94067f1a5
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Avoid changing userspace ABI to handle DMA write barrier attribute
Problem Details: Commit cb9fbc5c ("IB: expand ib_umem_get() prototype") changed the mthca userspace ABI to provide a way for userspace to indicate which memory regions need the DMA write barrier attribute. However, it is possible to handle this without breaking existing userspace, by having the mthca kernel driver rec...
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index 2a9f460cf061..be34f99ca625 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c @@ -39,6 +39,8 @@ #include <rdma/ib_smi.h> #include <rdma/ib_um...
d227fa7288adebe5ba37fa8e4a589c977d4e4a34
Analyze and fix the following issue in the Linux kernel code: IB/ehca: Allocate event queue size depending on max number of CQs and QPs
Problem Details: If a lot of QPs fall into Error state at once and the EQ of the respective HCA is too small, it might overrun, causing the eHCA driver to stop processing completion events and calling the application's completion handlers, effectively causing traffic to stop. Fix this by limiting available QPs and CQs...
```diff diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h index 3d6d9461c31d..00bab60f6de4 100644 --- a/drivers/infiniband/hw/ehca/ehca_classes.h +++ b/drivers/infiniband/hw/ehca/ehca_classes.h @@ -66,6 +66,7 @@ struct ehca_av; #include "ehca_irq.h" #define EHCA_EQE_...
6f735e36bad6fa4949271b3c3d0f331aad812313
Analyze and fix the following issue in the Linux kernel code: IB/iser: Move high-volume debug output to higher debug level
Problem Details: Add another level for debug. Signed-off-by: Eli Dorfman <elid@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h index 1ee867b1b341..a8c1b300e34d 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ b/drivers/infiniband/ulp/iser/iscsi_iser.h @@ -70,6 +70,13 @@ #define DRV_DATE "May 7th, 2006" #define iser_dbg(fmt, arg...
7df109d917e85d3da2e25bd495c4997e87ed2a4e
Analyze and fix the following issue in the Linux kernel code: IB/ehca: handle negative return value from ibmebus_request_irq() properly
Problem Details: ehca_create_eq() was assigning a signed return value to an unsiged local variable and then checking if the variable was < 0, which meant that errors were always ignored. Fix this by using one variable for signed integer return values and another for u64 hcall return values. Bug originally found by Ro...
```diff diff --git a/drivers/infiniband/hw/ehca/ehca_eq.c b/drivers/infiniband/hw/ehca/ehca_eq.c index b4ac617a70e6..49660dfa1867 100644 --- a/drivers/infiniband/hw/ehca/ehca_eq.c +++ b/drivers/infiniband/hw/ehca/ehca_eq.c @@ -54,7 +54,8 @@ int ehca_create_eq(struct ehca_shca *shca, struct ehca_eq *eq, cons...
989a1780698c65dfe093a6aa89ceeff84c31f528
Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb3: Correctly serialize peer abort path
Problem Details: Open MPI and other stress testing exposed a few bad bugs in handling aborts in the middle of a normal close. Fix these by: - serializing abort reply and peer abort processing with disconnect processing - warning (and ignoring) if ep timer is stopped when it wasn't running - cleaning up discon...
```diff diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index 72ca360c3dbc..0b515d899f6c 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c @@ -125,6 +125,12 @@ static void start_ep_timer(struct iwch_ep *ep) static void stop_ep_time...
98db6f193c93e9b4729215af2c9101210e11d26c
Analyze and fix the following issue in the Linux kernel code: x86: fix section mismatch in pci_scan_bus
Problem Details: Fix following section mismatch warning: WARNING: vmlinux.o(.text+0x275616): Section mismatch in reference from the function pci_scan_bus() to the function .devinit.text:pci_scan_bus_parented() The warning was seen with a CONFIG_DEBUG_SECTION_MISMATCH=y build. The inline function pci_scan_bus refer to ...
```diff diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 2a4d751818b7..88b5416cf009 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -489,7 +489,7 @@ void pcibios_disable_device (struct pci_dev *dev) pcibios_disable_irq(dev); } -struct pci_bus *pci_scan_bus_on_node(int busno, stru...
7883938b0d5ee8dd6381e1e2a9f71254252fd504
Analyze and fix the following issue in the Linux kernel code: [ARM] pxa: fix 1c104e0e4f6ab396960c058e95e18bdedcac945b
Problem Details: The referenced commit changed the order such that the CPU code was initialised before MFP, resulting in unregistered MFP sysfs objects being referenced. Reverse the link order of these so MFP is initialised before the CPU code. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 7cdcb459ea9d..6a830853aa6a 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile @@ -5,9 +5,9 @@ # Common support (must be linked before board specific support) obj-y += clock.o devices.o generic.o irq.o dma.o \ ...
355a46961b58012de239cafccbfce4c9321d4395
Analyze and fix the following issue in the Linux kernel code: trivial: fix user-visible typo in hfsplus
Problem Details: Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index b0f9ad362d1d..946466cd9f25 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -357,7 +357,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) printk(KERN_WARNING "hfs: Filesystem is marked locked, mounting read...
7663c1e2792a9662b23dec6e19bfcd3d55360b8f
Analyze and fix the following issue in the Linux kernel code: Improve queue_is_locked()
Problem Details: spin_is_locked() doesn't work on UP without spinlock debugging. Make it safer and just return 1 on UP, so we don't get false positives. The plan is to kill this debug function during the -rc cycle. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundati...
```diff diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 95864b3ff298..d2a1b71e93c3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -412,8 +412,12 @@ struct request_queue static inline int queue_is_locked(struct request_queue *q) { +#ifdef CONFIG_SMP spinlock_t *lock = q->que...
97094dcf5cefc8ccfdf93839f54dac2c4d316165
Analyze and fix the following issue in the Linux kernel code: drivers/pcmcia/pcmcia_ioctl.c: fix build
Problem Details: argh. A hunk got lost from "proc: remove proc_bus" Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 27523c5f4dad..5f186abca108 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c @@ -787,7 +787,7 @@ void __init pcmcia_setup_ioctl(void) { major_dev = i; #ifdef CONFIG_PROC_FS - proc_pccard = proc_mk...
8f45c1a58a25c3a1a2f42521445e1e786c4c0b92
Analyze and fix the following issue in the Linux kernel code: block: fix queue locking verification
Problem Details: The new queue_flag_set/clear() functions verify that the queue is locked, but in doing so they will actually instead oops if the queue lock hasn't been initialized at all. So fix the lock debug test to consider the "no lock" case to be unlocked. This way you get a nice WARN_ON_ONCE() instead of a fat...
```diff diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index c09696a90d6a..95864b3ff298 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -410,6 +410,12 @@ struct request_queue #define QUEUE_FLAG_BIDI 9 /* queue supports bidi requests */ #define QUEUE_FLAG_NOMERGES 10 /* disable me...
7e48bf653c37eb32c2ba4c13f15aa154aa807e61
Analyze and fix the following issue in the Linux kernel code: [ALSA] soc - wm9712 - checkpatch fixes
Problem Details: Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index d2d79e182a45..76c1e2d33e7d 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c @@ -37,23 +37,23 @@ static int ac97_write(struct snd_soc_codec *codec, * WM9712 register cache */ static const u16 wm9712_reg[] = { - 0x...
bad7785d4a787dd32245772e7daecf80d3618de9
Analyze and fix the following issue in the Linux kernel code: [ALSA] pcsp - Fix more dependency
Problem Details: Added the missing dependency and select for snd-pcsp driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/drivers/Kconfig b/sound/drivers/Kconfig index fe85af1c5693..a78a8d045175 100644 --- a/sound/drivers/Kconfig +++ b/sound/drivers/Kconfig @@ -8,6 +8,8 @@ config SND_PCSP tristate "Internal PC speaker support" depends on X86_PC && HIGH_RES_TIMERS depends on INPUT + depends on SND + select ...
df99cd334e5356b002a9480048c06265e558e180
Analyze and fix the following issue in the Linux kernel code: [ALSA] hda - Add support of Medion RIM 2150
Problem Details: Added the support of Medion RIM 2150 laptop with ALC880 codec. ALSA bug#3708: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3708 Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index fd4c32a031c9..0bbee38acd26 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -795,6 +795,7 @@ Prior to version 0.9.0rc4 options...
7aa0f1a8b1f7072990c9dc37f238c96dc6d78911
Analyze and fix the following issue in the Linux kernel code: intel_menlo: fix build warning
Problem Details: drivers/misc/intel_menlow.c:191: warning: label ‘unregister’ defined but not used Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/misc/intel_menlow.c b/drivers/misc/intel_menlow.c index 3db83a2dc3a1..5bb8816c9126 100644 --- a/drivers/misc/intel_menlow.c +++ b/drivers/misc/intel_menlow.c @@ -187,11 +187,6 @@ static int intel_menlow_memory_add(struct acpi_device *device) end: return result; - - unregister: - therm...
a53edac131cadee317e7e36a5908bb4c71d874cd
Analyze and fix the following issue in the Linux kernel code: pciehp: fix error message about getting hotplug control
Problem Details: People are confused by the following error message that actually is not for indicating a error. Cannot get control of hotplug hardware for pci %s This patch changes this message to debug message. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Acca...
```diff diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 49883c59756e..891f81a0400c 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -1017,7 +1017,7 @@ static int pciehp_acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev) break; } ...
39fa00311f21318cc498b139c2cc2830dcad98ff
Analyze and fix the following issue in the Linux kernel code: aio: fix misleading comments
Problem Details: The FIXME comments are inaccurate. The locking comment over lookup_ioctx() is wrong. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Shen Feng <shen@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Li...
```diff diff --git a/fs/aio.c b/fs/aio.c index a175ad650b66..99c2352906a0 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -277,7 +277,7 @@ static struct kioctx *ioctx_alloc(unsigned nr_events) if (ctx->max_reqs == 0) goto out_cleanup; - /* now link into global list. kludge. FIXME */ + /* now link into global list. */ ...
97a4feb4a78ae5cd130be7d546471a0779f1aa14
Analyze and fix the following issue in the Linux kernel code: ncpfs: use get/put_unaligned_* helpers
Problem Details: [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/ncpfs/ncplib_kernel.c b/fs/ncpfs/ncplib_kernel.c index df6d60bdfcd3..97645f112114 100644 --- a/fs/ncpfs/ncplib_kernel.c +++ b/fs/ncpfs/ncplib_kernel.c @@ -102,48 +102,47 @@ static inline void ncp_init_request_s(struct ncp_server *server, int subfunction } static inline char * - ncp_reply_dat...
4821cd111d1dbe4bf230a3ecd7f8d3e803f1eec3
Analyze and fix the following issue in the Linux kernel code: tpm: fix section mismatch warning
Problem Details: Fix following warning: WARNING: vmlinux.o(.init.text+0x32804): Section mismatch in reference from the function init_nsc() to the function .devexit.text:tpm_nsc_remove() The function tpm_nsc_remove() are used outside __exit, so remove the __exit annotation to make sure the function is always avilable. ...
```diff diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c index 6313326bc41f..ab18c1e7b115 100644 --- a/drivers/char/tpm/tpm_nsc.c +++ b/drivers/char/tpm/tpm_nsc.c @@ -264,7 +264,7 @@ static const struct tpm_vendor_specific tpm_nsc = { static struct platform_device *pdev = NULL; -static void __d...
c3c52bce6993c6d37af2c2de9b482a7013d646a7
Analyze and fix the following issue in the Linux kernel code: edac: fix module initialization on several modules 2nd time
Problem Details: I implemented opstate_init() as a inline function in linux/edac.h. added calling opstate_init() to: i82443bxgx_edac.c i82860_edac.c i82875p_edac.c i82975x_edac.c I wrote a fixed patch of edac-fix-module-initialization-on-several-modules.patch, and tested building 2.6.25-rc7 with applying this. It...
```diff diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c index f22075410591..2b95f1a3edfc 100644 --- a/drivers/edac/amd76x_edac.c +++ b/drivers/edac/amd76x_edac.c @@ -17,6 +17,7 @@ #include <linux/pci.h> #include <linux/pci_ids.h> #include <linux/slab.h> +#include <linux/edac.h> #include "edac_c...
94ee1cf5a88e12f5cbf8c0c78a6c18d3e043241e
Analyze and fix the following issue in the Linux kernel code: edac: add e752x parameter for sysbus_parity selection
Problem Details: Add a module parameter "sysbus_parity" to allow forcing system bus parity error checking on or off. Also add support to automatically disable system bus parity errors for processors which do not support it. If the sysbus_parity parameter is specified, sysbus parity detection will be forced on or off....
```diff diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c index 4fbc5892bc2b..12e7677b834b 100644 --- a/drivers/edac/e752x_edac.c +++ b/drivers/edac/e752x_edac.c @@ -29,6 +29,7 @@ #define EDAC_MOD_STR "e752x_edac" static int force_function_unhide; +static int sysbus_parity = -1; static struct ed...
199f0ca514f9c17668eec4f935c4ba24cd789f85
Analyze and fix the following issue in the Linux kernel code: idr: create idr_layer_cache at boot time
Problem Details: Avoid a possible kmem_cache_create() failure by creating idr_layer_cache unconditionary at boot time rather than creating it on-demand when idr_init() is called the first time. This change also enables us to eliminate the check every time idr_init() is called. [akpm@linux-foundation.org: rename init_...
```diff diff --git a/include/linux/idr.h b/include/linux/idr.h index 0edda411959c..9a2d762124de 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h @@ -14,6 +14,7 @@ #include <linux/types.h> #include <linux/bitops.h> +#include <linux/init.h> #if BITS_PER_LONG == 32 # define IDR_BITS 5 @@ -115,4 +116,6 @@...
d71a6d7332e5881a65249f4fb97b0db3c61dd5ec
Analyze and fix the following issue in the Linux kernel code: NBD: add partition support
Problem Details: Permit the use of partitions with network block devices (NBD). A new parameter is introduced to define how many partition we want to be able to manage per network block device. This parameter is "max_part". For instance, to manage 63 partitions / loop device, we will do: [on the server side] # n...
```diff diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 8e33de6bea33..a3da198ca429 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -56,6 +56,7 @@ static unsigned int debugflags; static unsigned int nbds_max = 16; static struct nbd_device *nbd_dev; +static int max_part; /* * Use just ...
48cf6061b30205b29b306bf9bc22dd6f0b091461
Analyze and fix the following issue in the Linux kernel code: NBD: allow nbd to be used locally
Problem Details: This patch allows Network Block Device to be mounted locally (nbd-client to nbd-server over 127.0.0.1). It creates a kthread to avoid the deadlock described in NBD tools documentation. So, if nbd-client hangs waiting for pages, the kblockd thread can continue its work and free pages. I have tested t...
```diff diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 60cc54368b66..8e33de6bea33 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -29,6 +29,7 @@ #include <linux/kernel.h> #include <net/sock.h> #include <linux/net.h> +#include <linux/kthread.h> #include <asm/uaccess.h> #include <asm/sy...
8c4dd6068221cd1d0d90490ace80eb4344914a8c
Analyze and fix the following issue in the Linux kernel code: edd: add default mode CONFIG_EDD_OFF=n, override with edd={on,off}
Problem Details: Add a kernel parameter option to 'edd' to enable/disable BIOS Enhanced Disk Drive Services. CONFIG_EDD_OFF disables EDD while still compiling EDD into the kernel. Default behavior can be forced using 'edd=on' or 'edd=off' as a kernel parameter. [akpm@linux-foundation.org: fix kernel-parameters.txt] ...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 5afc21b20a92..3ce193f86565 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -627,8 +627,7 @@ and is between 256 and 4096 characters. It is defined in the file eata= [HW,SC...
2c4c7155f25192da3511a6c911db4d08102d36c4
Analyze and fix the following issue in the Linux kernel code: sysctl: clean from unneeded extern and forward declarations
Problem Details: The do_sysctl_strategy isn't used outside kernel/sysctl.c, so this can be static and without a prototype in header. Besides, move this one and parse_table() above their callers and drop the forward declarations of the latter call. One more "besides" - fix two checkpatch warnings: space before a ( and...
```diff diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 5432b34a1e51..39eafd8f97a3 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -981,11 +981,6 @@ extern int do_sysctl (int __user *name, int nlen, void __user *oldval, size_t __user *oldlenp, void __user *newval...
ac41cfd19bf77424519b962f8205ede51fceaac6
Analyze and fix the following issue in the Linux kernel code: isdn: use non-racy method for proc entries creation
Problem Details: Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Karsten Keil <kkeil@suse.de> Cc: Alexey Dobriyan <adob...
```diff diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/isdn/capi/kcapi_proc.c index 845a797b0030..c29208bd7521 100644 --- a/drivers/isdn/capi/kcapi_proc.c +++ b/drivers/isdn/capi/kcapi_proc.c @@ -114,6 +114,7 @@ static int seq_contrstats_open(struct inode *inode, struct file *file) } static const struct file...
cf7acfab032ff262f42954328cdfd20a5d9aaaac
Analyze and fix the following issue in the Linux kernel code: acpi: use non-racy method for proc entries creation
Problem Details: Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Len Brown <lenb@kernel.org> Cc: Alexey Dobriyan <adobriyan@g...
```diff diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 43a95e5640de..5b73f6a2cd86 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -92,6 +92,7 @@ struct acpi_ac { #ifdef CONFIG_ACPI_PROCFS_POWER static const struct file_operations acpi_ac_fops = { + .owner = THIS_MODULE, .open = acpi_ac_open_fs...
667471386d4068e75a6a55b615701ced61eb6333
Analyze and fix the following issue in the Linux kernel code: powerpc: use non-racy method for proc entries creation
Problem Details: Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt...
```diff diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 1ffacc698ffb..1e656b43ad7f 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c @@ -591,10 +591,8 @@ int __init lparcfg_init(void) !firmware_has_feature(FW_FEATURE_ISERIES)) mode |= S_IWUSR; - ent...
a973909fc32be90884280b7a8cd2f2e093c97890
Analyze and fix the following issue in the Linux kernel code: scsi: use non-racy method for proc entries creation
Problem Details: Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W....
```diff diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c index 3a1c99d5c775..e4a0d2f9b357 100644 --- a/drivers/scsi/scsi_proc.c +++ b/drivers/scsi/scsi_proc.c @@ -413,6 +413,7 @@ static int proc_scsi_open(struct inode *inode, struct file *file) } static const struct file_operations proc_scsi_operati...
659f865ea65a60564ce00a0c571099d1fa55e8e3
Analyze and fix the following issue in the Linux kernel code: zorro: use non-racy method for proc entries creation
Problem Details: Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Alexey Dobriya...
```diff diff --git a/drivers/zorro/proc.c b/drivers/zorro/proc.c index 1b4317d7d7aa..099b6fb5b5cb 100644 --- a/drivers/zorro/proc.c +++ b/drivers/zorro/proc.c @@ -77,6 +77,7 @@ proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t * } static const struct file_operations proc_bus_zorro_opera...
59b7435149eab2dd06dd678742faff6049cb655f
Analyze and fix the following issue in the Linux kernel code: proc: introduce proc_create_data to setup de->data
Problem Details: This set of patches fixes an proc ->open'less usage due to ->proc_fops flip in the most part of the kernel code. The original OOPS is described in the commit 2d3a4e3666325a9709cc8ea2e88151394e8f20fc: Typical PDE creation code looks like: pde = create_proc_entry("foo", 0, NULL); if (pde...
```diff diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 0f3d97d41b0f..9d53b39a9cf8 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -675,9 +675,10 @@ struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, return ent; } -struct proc_dir_entry *proc_create(const char *name, mode_t ...
925d1c401fa6cfd0df5d2e37da8981494ccdec07
Analyze and fix the following issue in the Linux kernel code: procfs task exe symlink
Problem Details: The kernel implements readlink of /proc/pid/exe by getting the file from the first executable VMA. Then the path to the file is reconstructed and reported as the result. Because of the VMA walk the code is slightly different on nommu systems. This patch avoids separate /proc/pid/exe code on nommu sys...
```diff diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index c12cc362fd3b..3b40d45a3a16 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -531,7 +531,8 @@ static int load_flat_file(struct linux_binprm * bprm, DBG_FLT("BINFMT_FLAT: ROM mapping of file (we hope)\n"); down_write(&current->mm->mmap_sem); - ...
4220b7fe89f8c0623e09168ab81dd0da2fdadd72
Analyze and fix the following issue in the Linux kernel code: elf: fix shadowed variables in fs/binfmt_elf.c
Problem Details: Fix these sparse warings: fs/binfmt_elf.c:1749:29: warning: symbol 'tmp' shadows an earlier one fs/binfmt_elf.c:1734:28: originally declared here fs/binfmt_elf.c:2009:26: warning: symbol 'vma' shadows an earlier one fs/binfmt_elf.c:1892:24: originally declared here [akpm@linux-foundation.org: chose be...
```diff diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 6cb4efbae885..b25707fee2cc 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1722,26 +1722,25 @@ static int fill_note_info(struct elfhdr *elf, int phdrs, info->thread_status_size = 0; if (signr) { - struct elf_thread_status *tmp; + struct elf_thr...
adf535eeaca9e3963698df7bc5b4634d6d07f809
Analyze and fix the following issue in the Linux kernel code: ipmi: fix return from atca_oem_poweroff_hook
Problem Details: A void returning function returned the return value of another void returning function... Spotted by sparse. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds...
```diff diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c index f776df788794..a261bd735dfb 100644 --- a/drivers/char/ipmi/ipmi_poweroff.c +++ b/drivers/char/ipmi/ipmi_poweroff.c @@ -308,7 +308,7 @@ static void ipmi_poweroff_atca(ipmi_user_t user) } if (atca_oem_poweroff_hook) - r...
36c7dc44409ecc4631de25a66f13d67873cfd563
Analyze and fix the following issue in the Linux kernel code: IPMI: Style fixes in the misc code
Problem Details: Lots of style fixes for the miscellaneous IPMI files. No functional changes. Basically fixes everything reported by checkpatch and fixes the comment style. Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torva...
```diff diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c index b065a53d1ca8..f776df788794 100644 --- a/drivers/char/ipmi/ipmi_poweroff.c +++ b/drivers/char/ipmi/ipmi_poweroff.c @@ -87,7 +87,10 @@ MODULE_PARM_DESC(ifnum_to_use, "The interface number to use for the watchdog " /* param...
f7caa1b51fa526586c9d9a4582b5f8af440909d7
Analyze and fix the following issue in the Linux kernel code: ipmi: update driver version
Problem Details: Enough bug fixes and changes that we need a new driver version. Signed-off-by: Corey Minyard <cminyard@mvista.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/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index b75e2c549720..5c0abafa3e1a 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -47,7 +47,7 @@ #define PFX "IPMI message handler: " -#define IPMI_DRIVER_VERSION "39.1" +#def...
5956dce1485efe3816febc24aa52490dcb2be837
Analyze and fix the following issue in the Linux kernel code: ipmi: don't grab locks in run-to-completion mode
Problem Details: This patch prevents deadlocks in IPMI panic handler caused by msg_lock in smi_info structure and waiting_msgs_lock in ipmi_smi structure. [cminyard@mvista.com: remove unnecessary memory barriers] Signed-off-by: Konstantin Baydarov <kbaidarov@ru.mvista.com> Signed-off-by: Corey Minyard <cminyard@mvista...
```diff diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 9f0075ca34ba..8b71f5638b60 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -351,8 +351,16 @@ struct ipmi_smi /* Invalid data in an event. */ unsigned int invalid_event...
bda4c30aa6f7dc1483f39ea1dfe37bcab8a96207
Analyze and fix the following issue in the Linux kernel code: ipmi: run to completion fixes
Problem Details: The "run_to_completion" mode was somewhat broken. Locks need to be avoided in run_to_completion mode, and it shouldn't be used by normal users, just internally for panic situations. This patch removes locks in run_to_completion mode and removes the user call for setting the mode. The only user was t...
```diff diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 32b2b22996dc..9f0075ca34ba 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -1197,13 +1197,6 @@ int ipmi_unregister_for_cmd(ipmi_user_t user, return rv; } -void ipmi_u...
02fdb36ae7f55db7757b623acd27a62d5000d755
Analyze and fix the following issue in the Linux kernel code: ipc: sysvsem: refuse clone(CLONE_SYSVSEM|CLONE_NEWIPC)
Problem Details: CLONE_NEWIPC|CLONE_SYSVSEM interaction isn't handled properly. This can cause a kernel memory corruption. CLONE_NEWIPC must detach from the existing undo lists. Fix, part 3: refuse clone(CLONE_SYSVSEM|CLONE_NEWIPC). With unshare, specifying CLONE_SYSVSEM means unshare the sysvsem. So it seems reas...
```diff diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c index f5d332cf8c63..adc785146a1c 100644 --- a/kernel/nsproxy.c +++ b/kernel/nsproxy.c @@ -139,6 +139,18 @@ int copy_namespaces(unsigned long flags, struct task_struct *tsk) goto out; } + /* + * CLONE_NEWIPC must detach from the undolist: after switching +...
6013f67fc1a4c7fa5bcab2d39c1eaa3e260c7ac1
Analyze and fix the following issue in the Linux kernel code: ipc: sysvsem: force unshare(CLONE_SYSVSEM) when CLONE_NEWIPC
Problem Details: sys_unshare(CLONE_NEWIPC) doesn't handle the undo lists properly, this can cause a kernel memory corruption. CLONE_NEWIPC must detach from the existing undo lists. Fix, part 2: perform an implicit CLONE_SYSVSEM in CLONE_NEWIPC. CLONE_NEWIPC creates a new IPC namespace, the task cannot access the exi...
```diff diff --git a/kernel/fork.c b/kernel/fork.c index 01666979beac..de5c16c6b6ec 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1696,7 +1696,12 @@ asmlinkage long sys_unshare(unsigned long unshare_flags) CLONE_NEWNET)) goto bad_unshare_out; - if (unshare_flags & CLONE_SYSVSEM) + /* + * CLONE_NEWIPC mu...
9edff4ab1f8d82675277a04e359d0ed8bf14a7b7
Analyze and fix the following issue in the Linux kernel code: ipc: sysvsem: implement sys_unshare(CLONE_SYSVSEM)
Problem Details: sys_unshare(CLONE_NEWIPC) doesn't handle the undo lists properly, this can cause a kernel memory corruption. CLONE_NEWIPC must detach from the existing undo lists. Fix, part 1: add support for sys_unshare(CLONE_SYSVSEM) The original reason to not support it was the potential (inevitable?) confusion ...
```diff diff --git a/ipc/sem.c b/ipc/sem.c index d56d3ab6bb8a..e9418df5ff3e 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -1250,6 +1250,7 @@ void exit_sem(struct task_struct *tsk) undo_list = tsk->sysvsem.undo_list; if (!undo_list) return; + tsk->sysvsem.undo_list = NULL; if (!atomic_dec_and_test(&undo_list->ref...
44f564a4bf6ac70f2a84806203045cf515bc9367
Analyze and fix the following issue in the Linux kernel code: ipc: add definitions of USHORT_MAX and others
Problem Details: Add definitions of USHORT_MAX and others into kernel. ipc uses it and slub implementation might also use it. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com> Reviewed-by: Christoph Lameter <clameter@sgi.com> Cc: Nadia Derbey <Nadia.Derbey@bull.net> ...
```diff diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ad5d05efcd1a..53839ba265ec 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -20,6 +20,9 @@ extern const char linux_banner[]; extern const char linux_proc_banner[]; +#define USHORT_MAX ((u16)(~0U)) +#define SHORT_MAX ((s16)...
48dea404ed01869313f1908cca8a15774dcd8ee5
Analyze and fix the following issue in the Linux kernel code: IPC: use ipc_buildid() directly from ipc_addid()
Problem Details: By continuing to consolidate a little the IPC code, each id can be built directly in ipc_addid() instead of having it built from each callers of ipc_addid() And I also remove shm_addid() in order to have, as much as possible, the same code for shm/sem/msg. [akpm@linux-foundation.org: coding-style fix...
```diff diff --git a/ipc/msg.c b/ipc/msg.c index 46585a05473e..805ee08ec8bb 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -70,7 +70,6 @@ struct msg_sender { #define msg_ids(ns) ((ns)->ids[IPC_MSG_IDS]) #define msg_unlock(msq) ipc_unlock(&(msq)->q_perm) -#define msg_buildid(id, seq) ipc_buildid(id, seq) static void ...
02d15c43225afb2ebb6d700144285175a1c4abd9
Analyze and fix the following issue in the Linux kernel code: doc: fix DMA-API function parameters
Problem Details: Fix kernel bugzilla #10388. DMA-API.txt has wrong argument type for some functions. It uses struct device but should use struct pci_dev. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-fo...
```diff diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index 5f9f9df4d957..80d150458c80 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt @@ -145,7 +145,7 @@ Part Ic - DMA addressing limitations int dma_supported(struct device *dev, u64 mask) int -pci_dma_supported(struct dev...
a75b0a2f68d3937f96ed39525e4750601483e3b4
Analyze and fix the following issue in the Linux kernel code: dma: document dma_*map*_attrs() interfaces
Problem Details: Document the new dma_*map*_attrs() functions. [markn@au1.ibm.com: fix up for dma-add-dma_map_attrs-interfaces and update docs] Signed-off-by: Arthur Kepner <akepner@sgi.com> Acked-by: David S. Miller <davem@davemloft.net> Cc: Tony Luck <tony.luck@intel.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> ...
```diff diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index b939ebb62871..5f9f9df4d957 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt @@ -395,6 +395,71 @@ Notes: You must do this: See also dma_map_single(). +dma_addr_t +dma_map_single_attrs(struct device *dev, void *cp...
d2ba7e2ae206e9ab24e8937d99d0d5513bfd08e5
Analyze and fix the following issue in the Linux kernel code: simplify cpu_hotplug_begin()/put_online_cpus()
Problem Details: cpu_hotplug_begin() must be always called under cpu_add_remove_lock, this means that only one process can be cpu_hotplug.active_writer. So we don't need the cpu_hotplug.writer_queue, we can wake up the ->active_writer directly. Also, fix the comment. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc...
```diff diff --git a/kernel/cpu.c b/kernel/cpu.c index f8f9468d17d7..a98f6ab16ecd 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -33,17 +33,13 @@ static struct { * an ongoing cpu hotplug operation. */ int refcount; - wait_queue_head_t writer_queue; } cpu_hotplug; -#define writer_exists() (cpu_hotplug.active...
00dfcaf748f46de89efe41baa298b5cf9adda67e
Analyze and fix the following issue in the Linux kernel code: workqueues: shrink cpu_populated_map when CPU dies
Problem Details: When cpu_populated_map was introduced, it was supposed that cwq->thread can survive after CPU_DEAD, that is why we never shrink cpu_populated_map. This is not very nice, we can safely remove the already dead CPU from the map. The only required change is that destroy_workqueue() must hold the hotplug ...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 00ff4d08e370..1ad0ee489cd1 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -158,8 +158,8 @@ static void __queue_work(struct cpu_workqueue_struct *cwq, * * Returns 0 if @work was already on a queue, non-zero otherwise. * - * We queue th...
3eae90c3cdd4e762d0f4f5e939c98780fccded57
Analyze and fix the following issue in the Linux kernel code: memcg: remove redundant function calls
Problem Details: remove_list/add_list uses page_cgroup_zoneinfo() in it. So, it's called twice before and after lock. mz = page_cgroup_zoneinfo(); lock(); mz = page_cgroup_zoneinfo(); .... unlock(); And address of mz never changes. This is not good. This patch fixes this behavior. Signed-off-by: KAMEZAWA Hiro...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index f891876efee1..395fd8e4166a 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -275,10 +275,10 @@ static void unlock_page_cgroup(struct page *page) bit_spin_unlock(PAGE_CGROUP_LOCK_BIT, &page->page_cgroup); } -static void __mem_cgroup_remove_list(struc...
29f2a4dac856e9433a502b05b40e8e90385d8e27
Analyze and fix the following issue in the Linux kernel code: memcgroup: implement failcounter reset
Problem Details: This is a very common requirement from people using the resource accounting facilities (not only memcgroup but also OpenVZ beancounters). They want to put the cgroup in an initial state without re-creating it. For example after re-configuring a group people want to observe how this new configuration ...
```diff diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index 629d0ea2d073..6d9e1fca098c 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h @@ -143,4 +143,12 @@ static inline void res_counter_reset_max(struct res_counter *cnt) spin_unlock_irqrestore(&cnt->lock, flags); ...
faebe9fdf35058bb8421e4c09f6f70994eaf8db2
Analyze and fix the following issue in the Linux kernel code: memcgroups: add a document describing the resource counter abstraction
Problem Details: The resource counter is supposed to facilitate the resource accounting of arbitrary resource (and it already does this for memory controller). However, it is about to be used in other resources controllers (swap, kernel memory, networking, etc), so provide a doc describing how to work with it. This wi...
```diff diff --git a/Documentation/controllers/resource_counter.txt b/Documentation/controllers/resource_counter.txt new file mode 100644 index 000000000000..f196ac1d7d25 --- /dev/null +++ b/Documentation/controllers/resource_counter.txt @@ -0,0 +1,181 @@ + + The Resource Counter + +The resource counter, declared at i...
08ce5f16ee466ffc5bf243800deeecd77d9eaf50
Analyze and fix the following issue in the Linux kernel code: cgroups: implement device whitelist
Problem Details: Implement a cgroup to track and enforce open and mknod restrictions on device files. A device cgroup associates a device access whitelist with each cgroup. A whitelist entry has 4 fields. 'type' is a (all), c (char), or b (block). 'all' means it applies to all types and all major and minor numbers. ...
```diff diff --git a/Documentation/controllers/devices.txt b/Documentation/controllers/devices.txt new file mode 100644 index 000000000000..4dcea42432c2 --- /dev/null +++ b/Documentation/controllers/devices.txt @@ -0,0 +1,48 @@ +Device Whitelist Controller + +1. Description: + +Implement a cgroup to track and enforce o...
46ae220bea40bd1cf4abec2d5cdfb4f9396c7115
Analyze and fix the following issue in the Linux kernel code: cgroup: switch to proc_create()
Problem Details: There is a race between create_proc_entry() and the assignment of file ops. proc_create() is invented to fix it. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linu...
```diff diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 97ab04c3fcf5..436e26f4d624 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2545,7 +2545,6 @@ int __init cgroup_init(void) { int err; int i; - struct proc_dir_entry *entry; err = bdi_init(&cgroup_backing_dev_info); if (err) @@ -2561,9 +2560,7...
418d7d875ce7f33ef0d48d7cc3a95f31302dcf56
Analyze and fix the following issue in the Linux kernel code: CGroup API files: make CGROUP_DEBUG default to off
Problem Details: The cgroup debug subsystem isn't generally useful for users. It should default to "n". Signed-off-by: Paul Menage <menage@google.com> Cc: "Li Zefan" <lizf@cn.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Paul Jackson <pj@sgi.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: KAMEZAWA Hiroyuki <k...
```diff diff --git a/init/Kconfig b/init/Kconfig index e037a5a22b46..6ce16bdbec76 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -281,6 +281,7 @@ config CGROUPS config CGROUP_DEBUG bool "Example debug cgroup subsystem" depends on CGROUPS + default n help This option enables a simple cgroup subsystem that ...
3116f0e3df0a67ad56f15dd4c5f6cefb04bb4a98
Analyze and fix the following issue in the Linux kernel code: CGroup API files: move "releasable" to cgroup_debug subsystem
Problem Details: The "releasable" control file provided by the cgroup framework exports the state of a per-cgroup flag that's related to the notify-on-release feature. This isn't really generally useful, unless you're trying to debug this particular feature of cgroups. This patch moves the "releasable" file to the cgr...
```diff diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 0a3ab670dd2f..b40fd5ee9a76 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -88,6 +88,17 @@ static inline void css_put(struct cgroup_subsys_state *css) __css_put(css); } +/* bits in struct cgroup flags field */ +enum { +...
c27e8818a09bbdfe7c07c629cb2c27e1a742e156
Analyze and fix the following issue in the Linux kernel code: CGroup API files: drop mem_cgroup_force_empty()
Problem Details: This function isn't needed - a NULL pointer in the cftype read function will result in the same EINVAL response to userspace. Signed-off-by: Paul Menage <menage@google.com> Cc: "Li Zefan" <lizf@cn.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Paul Jackson <pj@sgi.com> Cc: Pavel Emelyanov <xemu...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 496ab700e0a4..d12795cc7622 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -880,17 +880,6 @@ static ssize_t mem_force_empty_write(struct cgroup *cont, return ret; } -/* - * Note: This should be removed if cgroup supports write-only file. - */ -stat...
f4c753b7eacc277e506066abdda351cbc1cf8e6a
Analyze and fix the following issue in the Linux kernel code: CGroup API files: rename read/write_uint methods to read_write_u64
Problem Details: Several people have justifiably complained that the "_uint" suffix is inappropriate for functions that handle u64 values, so this patch just renames all these functions and their users to have the suffic _u64. [peterz@infradead.org: build fix] Signed-off-by: Paul Menage <menage@google.com> Cc: "Li Zef...
```diff diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index a6a6035a4e1e..058371c5d360 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -190,20 +190,20 @@ struct cftype { struct file *file, char __user *buf, size_t nbytes, loff_t *ppos); /* - * read_uint() is a shortcut fo...
4fe91d518e4958af7edebbeb112a3272b2be232d
Analyze and fix the following issue in the Linux kernel code: cgroup: fix sparse warning of shadow symbol in cgroup.c
Problem Details: Fix a code warning: symbol 'p' shadows an earlier one This is a reincarnation of Harvey Harrison's patch: cpuset: sparse warnings in cpuset.c Independently, Cliff Wickman moved the affected code, from kernel/cpuset.c to kernel/cgroup.c, in his patch: cpusets: update_cpumask revision Signed-off-by:...
```diff diff --git a/kernel/cgroup.c b/kernel/cgroup.c index e7da66efc9fc..068f58da855a 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1913,14 +1913,14 @@ int cgroup_scan_tasks(struct cgroup_scanner *scan) if (heap->size) { for (i = 0; i < heap->size; i++) { - struct task_struct *p = heap->ptrs[i]; + ...
3ef0e1f8cad0a851b3dbf91802b14af7dd780352
Analyze and fix the following issue in the Linux kernel code: x86: olpc: add One Laptop Per Child architecture support
Problem Details: This adds support for OLPC XO hardware. Open Firmware on XOs don't contain the VSA, so it is necessary to emulate the PCI BARs in the kernel. This also adds functionality for running EC commands, and a CONFIG_OLPC. A number of OLPC drivers depend upon CONFIG_OLPC. olpc_ec_timeout is a hack to work ...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index e5f3d918316f..5afc21b20a92 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1389,6 +1389,13 @@ and is between 256 and 4096 characters. It is defined in the file nr_uarts...
8bf2debd5f7bf12d122124e34fec14af5b1e8ecf
Analyze and fix the following issue in the Linux kernel code: eCryptfs: introduce device handle for userspace daemon communications
Problem Details: A regular device file was my real preference from the get-go, but I went with netlink at the time because I thought it would be less complex for managing send queues (i.e., just do a unicast and move on). It turns out that we do not really get that much complexity reduction with netlink, and netlink i...
```diff diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c new file mode 100644 index 000000000000..72dfec48ea22 --- /dev/null +++ b/fs/ecryptfs/miscdev.c @@ -0,0 +1,580 @@ +/** + * eCryptfs: Linux filesystem encryption layer + * + * Copyright (C) 2008 International Business Machines Corp. + * Author(s): Mich...
c9e587abfdec2c2aaa55fab83bcb4972e2f84f9b
Analyze and fix the following issue in the Linux kernel code: vt: fix background color on line feed
Problem Details: A command that causes a line feed while a background color is active, such as perl -e 'print "x" x 60, "\e[44m", "x" x 40, "\e[0m\n"' and perl -e 'print "x" x 40, "\e[44m\n", "x" x 40, "\e[0m\n"' causes the line that was started as a result of the line feed to be completely filled with the currentl...
```diff diff --git a/drivers/char/vt.c b/drivers/char/vt.c index df4c3ead9e2b..1c2660477135 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -301,7 +301,7 @@ static void scrup(struct vc_data *vc, unsigned int t, unsigned int b, int nr) d = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t); s = (unsig...
762873c251b056c6c1b29e83a4dabafb064e5421
Analyze and fix the following issue in the Linux kernel code: vfs: fix unconditional write_super() call in file_fsync()
Problem Details: We need to check ->s_dirt before calling write_super(). It became the cause of an unneeded write. This bug was noticed by Sudhanshu Saxena. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morto...
```diff diff --git a/fs/sync.c b/fs/sync.c index 7cd005ea7639..228e17b5e9ee 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -64,7 +64,7 @@ int file_fsync(struct file *filp, struct dentry *dentry, int datasync) /* sync the superblock to buffers */ sb = inode->i_sb; lock_super(sb); - if (sb->s_op->write_super) + if (sb->...
c5c8be3ce59dc59baf20b33dae3f8eb70af7b1f1
Analyze and fix the following issue in the Linux kernel code: fs/inode.c: use hlist_for_each_entry()
Problem Details: fs/inode.c: use hlist_for_each_entry() in find_inode() and find_inode_fast() [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/inode.c b/fs/inode.c index 27ee1af50d02..bf6478130424 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -495,8 +495,7 @@ static struct inode * find_inode(struct super_block * sb, struct hlist_head *hea struct inode * inode = NULL; repeat: - hlist_for_each (node, head) { - inode = hlist_entry(no...
eccb95cee4f0d56faa46ef22fb94dd4a3578d3eb
Analyze and fix the following issue in the Linux kernel code: vfs: fix lock inversion in drop_pagecache_sb()
Problem Details: Fix longstanding lock inversion in drop_pagecache_sb by dropping inode_lock before calling __invalidate_mapping_pages(). We just have to make sure inode won't go away from under us by keeping reference to it and putting the reference only after we have safely resumed the scan of the inode list. A bit...
```diff diff --git a/fs/drop_caches.c b/fs/drop_caches.c index e2c6b6500c78..50f9087635d8 100644 --- a/fs/drop_caches.c +++ b/fs/drop_caches.c @@ -14,15 +14,21 @@ int sysctl_drop_caches; static void drop_pagecache_sb(struct super_block *sb) { - struct inode *inode; + struct inode *inode, *toput_inode = NULL; sp...
9c9ba34ee3dbc34e829f42e42a5e5273b1183500
Analyze and fix the following issue in the Linux kernel code: update checkpatch.pl to version 0.18
Problem Details: This version brings a few fixes for the extern checks, and a couple of new checks. Of note: - false is now recognised as a 0 assignment in static/external assignments, - printf format strings including %L are reported, - a number of fixes for the extern in .c file detector which had temporari...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index fd21b5eaed3f..b6bbbcdc557e 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -9,7 +9,7 @@ use strict; my $P = $0; $P =~ s@.*/@@g; -my $V = '0.17'; +my $V = '0.18'; use Getopt::Long qw(:config no_auto_abbrev); @@ -1144,7 +1...
171ae1a491e216ef728436f9cc958e05cccf5a27
Analyze and fix the following issue in the Linux kernel code: update checkpatch.pl to version 0.17
Problem Details: This version brings improvements to external declaration detection, fixes to quote tracking, fixes to unary tracking, some clarification of wording, and the usual slew of fixes for false positives. Of note: - much better unary tracking across preprocessor directives - UTF8 checks highlight the chara...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 64ec4b8a51b5..fd21b5eaed3f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -9,7 +9,7 @@ use strict; my $P = $0; $P =~ s@.*/@@g; -my $V = '0.16'; +my $V = '0.17'; use Getopt::Long qw(:config no_auto_abbrev); @@ -131,6 +13...
95d8c365b2df2adb904963333a93b15414403ed1
Analyze and fix the following issue in the Linux kernel code: lists: add "const" qualifier to first arg of list_splice() operations
Problem Details: Since neither the list_splice() nor __list_splice() routines modify their first argument, might as well declare them "const". [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: ...
```diff diff --git a/include/linux/list.h b/include/linux/list.h index b4a939b6b625..7627508f1b74 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -328,7 +328,7 @@ static inline int list_is_singular(const struct list_head *head) return !list_empty(head) && (head->next == head->prev); } -static inlin...
3a2e7f47d71e1df86acc1dda6826890b6546a4e1
Analyze and fix the following issue in the Linux kernel code: binfmt_misc.c: avoid potential kernel stack overflow
Problem Details: This can be triggered with root help only, but... Register the ":text:E::txt::/root/cat.txt:' rule in binfmt_misc (by root) and try launching the cat.txt file (by anyone) :) The result is - the endless recursion in the load_misc_binary -> open_exec -> load_misc_binary chain and stack overflow. There'...
```diff diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c index f95ae9789c91..f9c88d0c8ced 100644 --- a/fs/binfmt_em86.c +++ b/fs/binfmt_em86.c @@ -43,7 +43,7 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) return -ENOEXEC; } - bprm->sh_bang++; /* Well, the bang-shell is implicit... */ + ...
a2d416dcc92e576d0e339efd641bd3d8ee2bfb4d
Analyze and fix the following issue in the Linux kernel code: codafs: fix build warning
Problem Details: powerpc: fs/coda/coda_linux.c: In function 'coda_iattr_to_vattr': fs/coda/coda_linux.c:137: warning: large integer implicitly truncated to unsigned type Cc: Jan Harkes <jaharkes@cs.cmu.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundati...
```diff diff --git a/fs/coda/coda_linux.c b/fs/coda/coda_linux.c index 95a54253c047..e1c854890f94 100644 --- a/fs/coda/coda_linux.c +++ b/fs/coda/coda_linux.c @@ -134,7 +134,7 @@ void coda_iattr_to_vattr(struct iattr *iattr, struct coda_vattr *vattr) unsigned int valid; /* clean out */ - ...
5045bcae0fb466a1dbb6af0036e56901fd7aafb7
Analyze and fix the following issue in the Linux kernel code: sysrq: add show-backtrace-on-all-cpus function
Problem Details: SysRQ-P is not always useful on SMP systems, since it usually ends up showing the backtrace of a CPU that is doing just fine, instead of the backtrace of the CPU that is having problems. This patch adds SysRQ show-all-cpus(L), which shows the backtrace of every active CPU in the system. It skips idle...
```diff diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index 10c8f6922ef4..5ce0952aa065 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt @@ -85,6 +85,8 @@ On all - write a character to /proc/sysrq-trigger. e.g.: 'k' - Secure Access Key (SAK) Kills all programs on the current vir...
7d4f9f094b0a01ba199f97cd4a5f5609391a04f9
Analyze and fix the following issue in the Linux kernel code: Misc, phantom, fix poll
Problem Details: Return ERR even if there are pending data, but hw is not running. Do not decrement count in poll, do it in ioctl, where data are actually read. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-founda...
```diff diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c index 5447a603686a..71d1c84e2fa8 100644 --- a/drivers/misc/phantom.c +++ b/drivers/misc/phantom.c @@ -169,6 +169,7 @@ static long phantom_ioctl(struct file *file, unsigned int cmd, for (i = 0; i < m; i++) if (rs.mask & BIT(i)) rs.values[i]...
7e4e8e689fe90dd94bd76f9706d6cce580941ed5
Analyze and fix the following issue in the Linux kernel code: Misc: phantom, add compat ioctl
Problem Details: Openhaptics uses pointers in _IOC() macros, implement compat for them. Also add _IOC alternatives which are not 32/64 bit dependent (structures passed through aren't yet) -- libphantom will use them. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed...
```diff diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c index 7fa61e907e1c..5447a603686a 100644 --- a/drivers/misc/phantom.c +++ b/drivers/misc/phantom.c @@ -12,6 +12,7 @@ * or alternatively, you might use OpenHaptics provided by Sensable. */ +#include <linux/compat.h> #include <linux/kernel.h> #i...
8d4b69002e56e93f1cfe8bb863846ecde3990032
Analyze and fix the following issue in the Linux kernel code: fs/affs/file.c: use BUG_ON
Problem Details: if (...) BUG(); should be replaced with BUG_ON(...) when the test has no side-effects to allow a definition of BUG_ON that drops the code completely. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @ disable unlikely @ expression E,f; @@ ( ...
```diff diff --git a/fs/affs/file.c b/fs/affs/file.c index 6e0c9399200e..e87ede608f77 100644 --- a/fs/affs/file.c +++ b/fs/affs/file.c @@ -325,8 +325,7 @@ affs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh_resul pr_debug("AFFS: get_block(%u, %lu)\n", (u32)inode->i_ino, (unsigned long)block); ...
b70d3a2c596fb52b02488ad4aef13fa0d602090c
Analyze and fix the following issue in the Linux kernel code: iomap: fix 64 bits resources on 32 bits
Problem Details: Almost all implementations of pci_iomap() in the kernel, including the generic lib/iomap.c one, copies the content of a struct resource into unsigned long's which will break on 32 bits platforms with 64 bits resources. This fixes all definitions of pci_iomap() to use resource_size_t. I also "fixed" t...
```diff diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index baf57563b14c..36ab22a7ea12 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c @@ -514,8 +514,8 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn) void __iomem *pci_iomap(struct pci_dev *dev, int bar, u...
626adeb6675fdf60e9d8c6212776b0b0acf0e376
Analyze and fix the following issue in the Linux kernel code: Simplify initcall_debug output
Problem Details: print_fn_descriptor_symbol() prints the address if we don't have a symbol, so no need to print both. Also, combine printing return value with elapsed time. Changes this: Calling initcall 0xc05b7a70: pci_mmcfg_late_insert_resources+0x0/0x50() initcall 0xc05b7a70: pci_mmcfg_late_insert_resources+0...
```diff diff --git a/init/main.c b/init/main.c index 1687b0167c4a..1116d2f40cc1 100644 --- a/init/main.c +++ b/init/main.c @@ -700,10 +700,8 @@ static void __init do_initcalls(void) int result; if (initcall_debug) { - printk("Calling initcall 0x%p", *call); - print_fn_descriptor_symbol(": %s()", + print_f...
f249fdd8c19ff65825c0be67212cdf22e556668e
Analyze and fix the following issue in the Linux kernel code: autofs4: fix sparse warning in root.c
Problem Details: fs/autofs4/root.c:536:23: warning: symbol 'ino' shadows an earlier one fs/autofs4/root.c:510:22: originally declared here There is no need to redeclare, we are at the end of the loop and in the next iteration of the loop, ino will be reset. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> A...
```diff diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index a54a946a50ae..aa4c5ff8a40d 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c @@ -533,9 +533,9 @@ static struct dentry *autofs4_lookup_unhashed(struct autofs_sb_info *sbi, struct goto next; if (d_unhashed(dentry)) { - struct autofs_info *in...
f7b16c108fd044adc422ff21b5d6c16022462fd0
Analyze and fix the following issue in the Linux kernel code: cpu: fix section mismatch warning in reference to register_cpu_notifier
Problem Details: Fix following warnings: WARNING: vmlinux.o(.text+0xc60): Section mismatch in reference from the function kvm_init() to the function .cpuinit.text:register_cpu_notifier() WARNING: vmlinux.o(.text+0x33869a): Section mismatch in reference from the function xfs_icsb_init_counters() to the function .cpuinit...
```diff diff --git a/kernel/cpu.c b/kernel/cpu.c index 306844ed58f7..f8f9468d17d7 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -136,7 +136,7 @@ static void cpu_hotplug_done(void) mutex_unlock(&cpu_hotplug.lock); } /* Need to know about CPUs going up/down? */ -int __cpuinit register_cpu_notifier(struct notifier_b...
514a20a5da99aef8e667cc395841a5c4e5f9e8c1
Analyze and fix the following issue in the Linux kernel code: cpu: fix section mismatch warnings in *cpu_down
Problem Details: Fix following warnings: WARNING: vmlinux.o(.text+0x75c8d): Section mismatch in reference from the function take_cpu_down() to the variable .cpuinit.data:cpu_chain WARNING: vmlinux.o(.text+0x75d2a): Section mismatch in reference from the function _cpu_down() to the variable .cpuinit.data:cpu_chain WARNI...
```diff diff --git a/kernel/cpu.c b/kernel/cpu.c index da31165fd298..306844ed58f7 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -180,7 +180,7 @@ struct take_cpu_down_param { }; /* Take this CPU down. */ -static int take_cpu_down(void *_param) +static int __ref take_cpu_down(void *_param) { struct take_cpu_down...
9647155ffbce9dffed8a9a4768c8994334b609db
Analyze and fix the following issue in the Linux kernel code: cpu: fix section mismatch warning in unregister_cpu_notifier
Problem Details: Fix following warning: WARNING: vmlinux.o(.text+0x75f4e): Section mismatch in reference from the function unregister_cpu_notifier() to the variable .cpuinit.data:cpu_chain We know that unregister_cpu_notifier is using HOTPLUG_CPU stuff - so ignore these references. Annotating unregister_cpu_notifier h...
```diff diff --git a/kernel/cpu.c b/kernel/cpu.c index 2011ad8d2697..da31165fd298 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -149,7 +149,7 @@ int __cpuinit register_cpu_notifier(struct notifier_block *nb) EXPORT_SYMBOL(register_cpu_notifier); -void unregister_cpu_notifier(struct notifier_block *nb) +void __re...
f718e31819857825315300ea3c2dbc3f26ff3b0e
Analyze and fix the following issue in the Linux kernel code: cpu: fix section mismatch warnings in hotcpu_register
Problem Details: Fix following warnings: WARNING: vmlinux.o(.data+0x5020): Section mismatch in reference from the variable cpu_vsyscall_notifier_nb.12876 to the function .cpuinit.text:cpu_vsyscall_notifier() WARNING: vmlinux.o(.data+0x9ce0): Section mismatch in reference from the variable profile_cpu_callback_nb.17654 ...
```diff diff --git a/include/linux/cpu.h b/include/linux/cpu.h index f212fa98283e..7464ba3b4333 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -108,7 +108,7 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) extern void get_online_cpus(void); extern void put_online_cpus(void); #...
63e3453e547b20321381b212cb1ee11537dc843d
Analyze and fix the following issue in the Linux kernel code: befs: fix sparse warning in linuxvfs.c
Problem Details: Use link as the variable name to avoid shadowing the arg. fs/befs/linuxvfs.c:492:8: warning: symbol 'p' shadows an earlier one fs/befs/linuxvfs.c:488:77: originally declared here Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: "Sergey S. Kostyliov" <rathamahata@php4.ru> Signed-off-by: ...
```diff diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 82123ff3e1dd..e8717de3bab3 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c @@ -489,9 +489,9 @@ static void befs_put_link(struct dentry *dentry, struct nameidata *nd, void *p) { befs_inode_info *befs_ino = BEFS_I(dentry->d_inode); if (befs_...
95b570c9cef3b12356454c7112571b7e406b4b51
Analyze and fix the following issue in the Linux kernel code: Taint kernel after WARN_ON(condition)
Problem Details: The kernel is sent to tainted within the warn_on_slowpath() function, and whenever a warning occurs the new taint flag 'W' is set. This is useful to know if a warning occurred before a BUG by preserving the warning as a flag in the taint state. This does not work on architectures where WARN_ON has it...
```diff diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt index 7f60dfe642ca..b152e81da592 100644 --- a/Documentation/oops-tracing.txt +++ b/Documentation/oops-tracing.txt @@ -253,6 +253,10 @@ characters, each representing a particular tainted value. 8: 'D' if the kernel has died recentl...
cdac75e6f2fec9abc21d0abb4e5d80720eeebb10
Analyze and fix the following issue in the Linux kernel code: epoll: avoid kmemcheck warning
Problem Details: Epoll calls rb_set_parent(n, n) to initialize the rb-tree node, but rb_set_parent() accesses node's pointer in its code. This creates a warning in kmemcheck (reported by Vegard Nossum) about an uninitialized memory access. The warning is harmless since the following rb-tree node insert is going to ov...
```diff diff --git a/fs/eventpoll.c b/fs/eventpoll.c index a415f42d32cf..0d237182d721 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -257,25 +257,6 @@ static inline int ep_cmp_ffd(struct epoll_filefd *p1, (p1->file < p2->file ? -1 : p1->fd - p2->fd)); } -/* Special initialization for the RB tree node ...