id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
2be8412c6cef97b01dfaae71c04bf585d3d93a3b | Analyze and fix the following issue in the Linux kernel code: [IA64] sprintf should not be used with same source & destination address | Problem Details:
This happens to work at the moment but isn't a good idea so fix it the
simple way.
Resolves-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13576
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com> | ```diff
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c
index 76645cf6ac5d..25831c47c579 100644
--- a/arch/ia64/sn/kernel/io_common.c
+++ b/arch/ia64/sn/kernel/io_common.c
@@ -435,7 +435,8 @@ void sn_generate_path(struct pci_bus *pci_bus, char *address)
bricktype = MODULE_GET_BTYPE(modu... |
2cdb3f1d834aab27a927be7555fbf4f9e43e9261 | Analyze and fix the following issue in the Linux kernel code: x86/PCI: fix boundary checking when using root CRS | Problem Details:
Don't touch info->res_num if we are out of space.
Acked-by: Gary Hade <garyhade@us.ibm.com>
Tested-by: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> | ```diff
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index b26626dc517c..8bf152910eb0 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -68,6 +68,10 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
unsigned long flags;
struct resource *root;
int max_root_bus_resources = PCI_BUS_... |
f7c2df9b55212d5ec94169a4de11e44c683e0af4 | Analyze and fix the following issue in the Linux kernel code: AFS: Fix lock imbalance | Problem Details:
Don't unlock on vfs_rejected_lock path in afs_do_setlk, since the lock
is unlocked after abort_attempt label.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/fs/afs/flock.c b/fs/afs/flock.c
index 210acafe4a9b..3ff8bdd18fb3 100644
--- a/fs/afs/flock.c
+++ b/fs/afs/flock.c
@@ -432,7 +432,6 @@ vfs_rejected_lock:
list_del_init(&fl->fl_u.afs.link);
if (list_empty(&vnode->granted_locks))
afs_defer_unlock(vnode, key);
- spin_unlock(&vnode->lock);
goto... |
008440e3ad4b72f5048d1b1f6f5ed894fdc5ad08 | Analyze and fix the following issue in the Linux kernel code: ipv4: Fix fib_trie rebalancing, part 3 | Problem Details:
Alas current delaying of freeing old tnodes by RCU in trie_rebalance
is still not enough because we can free a top tnode before updating a
t->trie pointer.
Reported-by: Pawel Staszewski <pstaszewski@itcare.pl>
Tested-by: Pawel Staszewski <pstaszewski@itcare.pl>
Signed-off-by: Jarek Poplawski <jarkao2@... | ```diff
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 012cf5a68581..00a54b246dfe 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1021,6 +1021,9 @@ static void trie_rebalance(struct trie *t, struct tnode *tn)
(struct node *)tn, wasfull);
tp = node_parent((struct node *) tn);... |
01e532981460594fffbf9b992ecfc96a78369924 | Analyze and fix the following issue in the Linux kernel code: bnx2x: Fix the behavior of ethtool when ONBOOT=no | Problem Details:
This is the same fix as commit
7959ea254ed18faee41160b1c50b3c9664735967 ("bnx2: Fix the behavior of
ethtool when ONBOOT=no"), but for bnx2x:
--------------------
When configure in ifcfg-eth* is ONBOOT=no,
the behavior of ethtool command is wrong.
# grep ONBOOT /etc/sysconfig/netwo... | ```diff
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index fbf1352e9c1c..951714a7f90a 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -8637,6 +8637,14 @@ static int bnx2x_nway_reset(struct net_device *dev)
return 0;
}
+static u32
+bnx2x_get_link(struct net_device *dev)
+... |
201fa69a2849536ef2912e8e971ec0b01c04eff4 | Analyze and fix the following issue in the Linux kernel code: fuse: fix bad return value in fuse_file_poll() | Problem Details:
Fix fuse_file_poll() which returned a -errno value instead of a poll
mask.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org | ```diff
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index fce6ce694fde..cbc464043b6f 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1922,7 +1922,7 @@ unsigned fuse_file_poll(struct file *file, poll_table *wait)
req = fuse_get_req(fc);
if (IS_ERR(req))
- return PTR_ERR(req);
+ return POLLERR;
req->in.... |
b4c458b3a23d76936e76678f2074b1528f129f7a | Analyze and fix the following issue in the Linux kernel code: fuse: fix return value of fuse_dev_write() | Problem Details:
On 64 bit systems -- where sizeof(ssize_t) > sizeof(int) -- the following test
exposes a bug due to a non-careful return of an int or unsigned value:
implement a FUSE filesystem which sends an unsolicited notification to
the kernel with invalid opcode. The respective write to /dev/fuse
will return (1 ... | ```diff
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 8fed2ed12f38..8a11a8c67c42 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -910,7 +910,7 @@ static ssize_t fuse_dev_write(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
int err;
- unsigned nbytes = iov_length(iov... |
f5812a7a336fb952d819e4427b9a2dce02368e82 | Analyze and fix the following issue in the Linux kernel code: perf_counter tools: Adjust only prelinked symbol's addresses | Problem Details:
I.e. we can't handle these two kinds of files in the same way:
1) prelinked system library:
[acme@doppio pahole]$ readelf -s /usr/lib64/libdw-0.141.so | egrep 'FUNC.+GLOBAL.+dwfl_report_elf'
278: 00000030450105a0 261 FUNC GLOBAL DEFAULT 12 dwfl_report_elf@@ELFUTILS_0.122
2) not prelinked l... | ```diff
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 9c659ef6aec2..78c2efde01b7 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -520,7 +520,9 @@ static int dso__load_sym(struct dso *self, int fd, const char *name,
nr_syms = shdr.sh_size / shdr.sh_entsize;
memset(&... |
ea9df47cc92573b159ef3b4fda516c32cba9c4fd | Analyze and fix the following issue in the Linux kernel code: dm table: fix blk_stack_limits arg to use bytes not sectors | Problem Details:
The offset passed to blk_stack_limits() must be in bytes not sectors.
Fixes false warnings like the following:
device-mapper: table: 254:1: target device sda6 is misaligned
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Reported-by: Frans Pop <elendil@planet.nl>
Tested-by: Frans Pop <elendil@planet.... | ```diff
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 4899ebe767c8..2cba557d9e61 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -495,7 +495,7 @@ int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev,
return 0;
}
- if (blk_stack_limits(limits, &q->limits, start) <... |
874d2f61d31e596c36af7732dc1b3aa2dc233824 | Analyze and fix the following issue in the Linux kernel code: dm exception store: really fix type lookup | Problem Details:
Fix exception store name handling.
We need to reference exception store by zero terminated string.
Fixes regression introduced in commit f6bd4eb73cdf2a5bf954e497972842f39cabb7e3
Cc: Yi Yang <yi.y.yang@intel.com>
Cc: Jonathan Brassow <jbrassow@redhat.com>
Cc: stable@kernel.org
Cc: Andrew Morton <akpm... | ```diff
diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c
index c3ae51584b12..3710ff88fc10 100644
--- a/drivers/md/dm-exception-store.c
+++ b/drivers/md/dm-exception-store.c
@@ -195,7 +195,7 @@ int dm_exception_store_create(struct dm_target *ti, int argc, char **argv,
struct dm_ex... |
0d971c9fcf06d22663040570c3cfe08b137c4b2f | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix input pinctl for ALC882 auto mode | Problem Details:
alc882_auto_init_analog_input() sets the input pins to VREF-80 regardless
of the input pin types although it shouldn't be for line-in pins.
This patch fixes the behavior to follow other codecs.
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 6a899e8fdd0c..0f6b6a6f72e3 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9125,9 +9125,6 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec)
alc882_auto_set_output_and_unmute(codec... |
1bdd7419910c1506151e7b9e2d60c6980e015f76 | Analyze and fix the following issue in the Linux kernel code: ASoC: OMAP: fix OMAP1510 broken PCM pointer callback | Problem Details:
This patch tries to work around the problem of broken OMAP1510 PCM playback
pointer calculation by replacing DMA function call that incorrectly tries to
read the value form DMA hardware with a value computed locally from an
already maintained variable omap_runtime_data.period_index.
Tested on OMAP5910... | ```diff
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 6454e15f7d28..84a1950880eb 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -216,12 +216,15 @@ static snd_pcm_uframes_t omap_pcm_pointer(struct snd_pcm_substream *substream)
dma_addr_t ptr;
snd_pcm_uframes_t of... |
6a84c234da06a4ac0c1b4c819b83cf264674c2d8 | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix typo in MPC5200 PSC AC97 driver Kconfig | Problem Details:
ALSA SoC drivers should be specify SND_SOC_AC97_BUS instead, not AC97_BUS.
Without SND_SOC_AC97_BUS defined, an AC97 device will not get correctly
registered on the AC97 bus, which prevents thinks like the WM9712
touchscreen driver from getting probed.
Tested against 2.6.31-rc1.
Signed-off-by: Grant ... | ```diff
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 5dbebf82249c..5661876ee837 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -33,7 +33,7 @@ config SND_SOC_MPC5200_I2S
config SND_SOC_MPC5200_AC97
tristate "Freescale MPC5200 PSC in AC97 mode driver"
depends on PPC_MPC52xx && ... |
6828b92bd21acd65113dfe0541f19f5df0d9668f | Analyze and fix the following issue in the Linux kernel code: tcp: Do not tack on TSO data to non-TSO packet | Problem Details:
If a socket starts out on a non-TSO route, and then switches to
a TSO route, then we will tack on data to the tail of the tx queue
even if it started out life as non-TSO. This is suboptimal because
all of it will then be copied and checksummed unnecessarily.
This patch fixes this by ensuring that skb... | ```diff
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 17b89c523f9d..7870a535dac6 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -903,13 +903,17 @@ int tcp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
iov++;
while (seglen > 0) {
- int copy;
+ int copy = 0;
+ int max = size... |
8e5b9dda99cc86bdbd822935fcc37c5808e271b3 | Analyze and fix the following issue in the Linux kernel code: tcp: Stop non-TSO packets morphing into TSO | Problem Details:
If a socket starts out on a non-TSO route, and then switches to
a TSO route, then the tail on the tx queue can morph into a TSO
packet, causing mischief because the rest of the stack does not
expect a partially linear TSO packet.
This patch fixes this by ensuring that skb->ip_summed is set to
CHECKSUM... | ```diff
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 416fc4c2e7eb..5bdf08d312d9 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -725,7 +725,8 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb)
static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb,
... |
e18ed145c7f556f1de8350c32739bf35b26df705 | Analyze and fix the following issue in the Linux kernel code: ide: memory overrun in ide_get_identity_ioctl() on big endian machines using ioctl HDIO_OBSOLETE_IDENTITY | Problem Details:
This patch fixes a memory overrun in function ide_get_identity_ioctl() which
chooses the size of a memory buffer depending on the ioctl command that led
to the function call, however, passes that buffer to a function which needs the
buffer size to be always chosen unconditionally.
Due to conditional c... | ```diff
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c
index 82f252c3ee6e..e246d3d3fbcc 100644
--- a/drivers/ide/ide-ioctls.c
+++ b/drivers/ide/ide-ioctls.c
@@ -64,7 +64,8 @@ static int ide_get_identity_ioctl(ide_drive_t *drive, unsigned int cmd,
goto out;
}
- id = kmalloc(size, GFP_KERNEL);
+ ... |
2bf427b25b79eb7cea27963a66c3d4684cae0e0c | Analyze and fix the following issue in the Linux kernel code: ide: fix resume for CONFIG_BLK_DEV_IDEACPI=y | Problem Details:
commit 2f0d0fd2a605666d38e290c5c0d2907484352dc4 ("ide-acpi: cleanup
do_drive_get_GTF()") didn't account for the lack of hwif->acpidata
check in generic_ide_suspend() [ indirect user of do_drive_get_GTF()
through ide_acpi_exec_tfs() ] resulting in broken resume when ACPI
support is enabled but ACPI data... | ```diff
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index 77f79d26b264..c509c9916464 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -92,6 +92,11 @@ int ide_acpi_init(void)
return 0;
}
+bool ide_port_acpi(ide_hwif_t *hwif)
+{
+ return ide_noacpi == 0 && hwif->acpidata;
+}
+
/*... |
12abb8ba8444f7c9b355bbdd44a6d0839f7a41b6 | Analyze and fix the following issue in the Linux kernel code: PCI MSI: Fix restoration of MSI/MSI-X mask states in suspend/resume | Problem Details:
There are 2 problems on mask states in suspend/resume.
[1]:
It is better to restore the mask states of MSI/MSI-X to initial states
(MSI is unmasked, MSI-X is masked) when we release the device.
The pci_msi_shutdown() does the restoration of mask states for MSI,
while the msi_free_irqs() does it for MS... | ```diff
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 9ab4fe8f20af..d986afb7032b 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -127,17 +127,23 @@ static inline __attribute_const__ u32 msi_enabled_mask(u16 control)
* reliably as devices without an INTx disable bit will then generate a
* level ... |
503998ca4a295f7da233689850ba4b9d13cf41e7 | Analyze and fix the following issue in the Linux kernel code: PCI: fix kernel-doc warnings | Problem Details:
Add documentation for missing parameters in PCI hotplug code.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> | ```diff
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
index 844580489d4d..5c5043f239cf 100644
--- a/drivers/pci/hotplug/pci_hotplug_core.c
+++ b/drivers/pci/hotplug/pci_hotplug_core.c
@@ -555,6 +555,8 @@ static struct hotplug_slot *get_slot_from_name (const char *name)
*... |
0d07348931daef854aca8c834a89f1a99ba4ff2b | Analyze and fix the following issue in the Linux kernel code: PCI MSI: Return if alloc_msi_entry for MSI-X failed | Problem Details:
In current code it continues setup even if alloc_msi_entry() for MSI-X
is failed due to lack of memory. It means arch_setup_msi_irqs() might
be called with msi_desc entries less than its argument nvec.
At least x86's arch_setup_msi_irqs() uses list_for_each_entry() for
dev->msi_list that suspected to... | ```diff
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index d9f06fbfa0bf..628c14150d49 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -439,8 +439,14 @@ static int msix_capability_init(struct pci_dev *dev,
for (i = 0; i < nvec; i++) {
entry = alloc_msi_entry(dev);
- if (!entry)
- break;
+ if (... |
44b3615b8cb3b016a49eb7ef4236e77a77793cec | Analyze and fix the following issue in the Linux kernel code: eeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS | Problem Details:
FYI, there's a post-rc1 build regression with certain configs:
drivers/built-in.o: In function `pci_hp_deregister':
(.text+0xb166): undefined reference to `pci_hp_remove_module_link'
drivers/built-in.o: In function `pci_hp_deregister':
(.text+0xb19f): undefined reference to `pci_destroy_slot'
dri... | ```diff
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index fee6a4022bc1..46dad12f952f 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -355,10 +355,9 @@ config EEEPC_LAPTOP
depends on INPUT
depends on EXPERIMENTAL
depends on RFKILL || RFKILL = n
+ depends... |
aef29bc2603014cb28dfe39bab8d888546fe18e7 | Analyze and fix the following issue in the Linux kernel code: tty: Fix the leak in tty_ldisc_release | Problem Details:
Currently we reinit the ldisc on final tty close which is what the old code
did to ensure that if the device retained its termios settings then it had the
right ldisc. tty_ldisc_reinit does that but also leaves us with the reset
ldisc reference which is then leaked.
At this point we know the port will... | ```diff
diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c
index a19e935847b0..913aa8d3f1c5 100644
--- a/drivers/char/tty_ldisc.c
+++ b/drivers/char/tty_ldisc.c
@@ -867,15 +867,22 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)
tty_ldisc_wait_idle(tty);
/*
- * Shutdown t... |
b6e687221eb840bacd4d4a991e5f8e7ed3ae910a | Analyze and fix the following issue in the Linux kernel code: kmemleak: Do not warn if an unknown object is freed | Problem Details:
vmap'ed memory blocks are not tracked by kmemleak (yet) but they may be
released with vfree() which is tracked. The corresponding kmemleak
warning is only enabled in debug mode. Future patch will add support for
ioremap and vmap.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> | ```diff
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index e094c4dbdf55..eeece2deace2 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -531,8 +531,10 @@ static void delete_object(unsigned long ptr)
write_lock_irqsave(&kmemleak_lock, flags);
object = lookup_object(ptr, 0);
if (!object) {
+#ifdef DEBUG
kmemleak_w... |
9ea5ca75a2aebb7172094a7d77acf6ff7600cc56 | Analyze and fix the following issue in the Linux kernel code: sound: OSS: mpu401, fix deadlock | Problem Details:
mpu401_chk_version is called with a spin lock already held. Don't take it
again.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/oss/mpu401.c b/sound/oss/mpu401.c
index 6c0a770ed054..1b2316f35b1f 100644
--- a/sound/oss/mpu401.c
+++ b/sound/oss/mpu401.c
@@ -926,31 +926,21 @@ static struct midi_operations mpu401_midi_operations[MAX_MIDI_DEV];
static void mpu401_chk_version(int n, struct mpu_config *devc)
{
int tmp;
-... |
9ea21ebca1a1c4caf3bdaecb0879034107cac1e9 | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix WM8961 suspend function type | Problem Details:
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
index 1af2d10702f4..bd1af92a122f 100644
--- a/sound/soc/codecs/wm8961.c
+++ b/sound/soc/codecs/wm8961.c
@@ -1268,7 +1268,7 @@ static __devexit int wm8961_i2c_remove(struct i2c_client *client)
}
#ifdef CONFIG_PM
-static int wm8961_i2c_suspend... |
932c1329acebc03ef5efa3647c9c3a967b59d0c4 | Analyze and fix the following issue in the Linux kernel code: nl802154: fix Oops in ieee802154_nl_get_dev | Problem Details:
ieee802154_nl_get_dev() lacks check for the existance of the device
that was returned by dev_get_XXX, thus resulting in Oops for non-existing
devices. Fix it.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | ```diff
diff --git a/net/ieee802154/netlink.c b/net/ieee802154/netlink.c
index 105ad10876af..332b947ae812 100644
--- a/net/ieee802154/netlink.c
+++ b/net/ieee802154/netlink.c
@@ -276,6 +276,9 @@ static struct net_device *ieee802154_nl_get_dev(struct genl_info *info)
else
return NULL;
+ if (!dev)
+ return NULL;
... |
8a3af79361e85db6fec4173ef1916322471c19e3 | Analyze and fix the following issue in the Linux kernel code: netfilter: headers_check fix: linux/netfilter/xt_osf.h | Problem Details:
fix the following 'make headers_check' warnings:
usr/include/linux/netfilter/xt_osf.h:40: found __[us]{8,16,32,64} type without #include <linux/types.h>
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net> | ```diff
diff --git a/include/linux/netfilter/xt_osf.h b/include/linux/netfilter/xt_osf.h
index fd2272e0959a..18afa495f973 100644
--- a/include/linux/netfilter/xt_osf.h
+++ b/include/linux/netfilter/xt_osf.h
@@ -20,6 +20,8 @@
#ifndef _XT_OSF_H
#define _XT_OSF_H
+#include <linux/types.h>
+
#define MAXGENRELEN 32
... |
a3a9f79e361e864f0e9d75ebe2a0cb43d17c4272 | Analyze and fix the following issue in the Linux kernel code: netfilter: tcp conntrack: fix unacknowledged data detection with NAT | Problem Details:
When NAT helpers change the TCP packet size, the highest seen sequence
number needs to be corrected. This is currently only done upwards, when
the packet size is reduced the sequence number is unchanged. This causes
TCP conntrack to falsely detect unacknowledged data and decrease the
timeout.
Fix by u... | ```diff
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index a632689b61b4..cbdd6284996d 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -258,8 +258,8 @@ static inline bool nf_ct_kill(struct nf_conn *ct)
/* Update TCP window track... |
66eae8469e4e4ba6f4ca7ef82103c78f6d645583 | Analyze and fix the following issue in the Linux kernel code: intel-iommu: Don't just mask out too-big physical addresses; BUG() instead | Problem Details:
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 40eae2097aca..ad367f53a2bb 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -700,8 +700,7 @@ static struct dma_pte * addr_to_dma_pte(struct dmar_domain *domain, u64 addr)
unsigned long flags;
BUG_ON(!domain->... |
1d955ebd4db7961dc4e772a23288b3d5c6f191be | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Add missing initializations for ALC268 and ALC269 | Problem Details:
During the changes to clean up / fix the realtek codec initialization
routines in commit 4a79ba34cada6a5a4ee86ed53aa8a73ba1e6fc51,
I forgot to add the check for ALC268 and ALC269.
This resulted in the missing EAPD and COEF setup for these codecs.
This patch adds the missing checks for these codecs.
R... | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 08846d222cbe..3a8e58c483df 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -12463,6 +12463,8 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
if (err < 0)
return err;
+ alc_ss... |
238a24f626628cb16a3015f332d649f08246ca89 | Analyze and fix the following issue in the Linux kernel code: tracing/fastboot: Document the need of initcall_debug | Problem Details:
To use boot tracer, one should pass initcall_debug as well as
ftrace=initcall to the command line.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <4A48735E.9050002@cn.fujitsu.com>
Signed-off-by: Ingo M... | ```diff
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 1551f47e7669..019f380fd764 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -226,13 +226,13 @@ config BOOT_TRACER
the timings of the initcalls and traces key events and the identity
of tasks that can cause boot delays, such as... |
bab7614d6d1b1fc96ec6c5a7ca34c8641060e659 | Analyze and fix the following issue in the Linux kernel code: Input: add support for generic GPIO-based matrix keypad | Problem Details:
Original patch by Marek Vasut, modified by Eric in:
1. use delayed work to simplify the debouncing
2. combine col_polarity/row_polarity into a single active_low field
3. use a generic bit array based XOR algorithm to detect key
press/release, which should make the column assertion time
shorter a... | ```diff
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index d2df1030675a..a6b989a9dc07 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -158,7 +158,16 @@ config KEYBOARD_GPIO
with configuration data saying which GPIOs are used.
To compile this ... |
00b8ac409cad653137f087e3ff69c020174cbc15 | Analyze and fix the following issue in the Linux kernel code: Input: dm355evm_keys - fix kconfig symbol names | Problem Details:
The keypad driver for the DM355 EVM got slightly broken as it merged,
since it moved from input/keyboard to input/misc and its Kconfig
symbol changed. This patch copes with the changed Kconfig symbol.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor... | ```diff
diff --git a/drivers/mfd/dm355evm_msp.c b/drivers/mfd/dm355evm_msp.c
index 7ac12cb0be4a..5b6e58a3ba46 100644
--- a/drivers/mfd/dm355evm_msp.c
+++ b/drivers/mfd/dm355evm_msp.c
@@ -32,8 +32,7 @@
* This driver was tested with firmware revision A4.
*/
-#if defined(CONFIG_KEYBOARD_DM355EVM) \
- || defined(CON... |
c413ec446188ae53276eb60a60311b430448c6b0 | Analyze and fix the following issue in the Linux kernel code: Input: wacom - add DTF720a support and fix rotation on Intuos3 | Problem Details:
This patch adds DTF720a support and fixes an Intuos3 rotation
pen out-proximity bug.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> | ```diff
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 38bf86384aeb..c896d6a21b7e 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -384,6 +384,8 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo)
wacom_report_key(wco... |
ec5a36f94e7ca4b1f28ae4dd135cd415a704e772 | Analyze and fix the following issue in the Linux kernel code: SLAB: Fix lockdep annotations | Problem Details:
Commit 8429db5... ("slab: setup cpu caches later on when interrupts are
enabled") broke mm/slab.c lockdep annotations:
[ 11.554715] =============================================
[ 11.555249] [ INFO: possible recursive locking detected ]
[ 11.555560] 2.6.31-rc1 #896
[ 11.555861] -------... | ```diff
diff --git a/mm/slab.c b/mm/slab.c
index 5241b6598ba3..7b5d4deacfcd 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1544,9 +1544,6 @@ void __init kmem_cache_init(void)
}
g_cpucache_up = EARLY;
-
- /* Annotate slab for lockdep -- annotate the malloc caches */
- init_lock_keys();
}
void __init kmem_cache_ini... |
c2a30d711852e4f39c8a79135b3caa701f7a8e02 | Analyze and fix the following issue in the Linux kernel code: ALSA: cmi8330: fix MPU-401 PnP init copy&paste bug | Problem Details:
Fix copy&paste bug in PnP MPU-401 initialization.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index de83608719ea..3ee0269e5bd0 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -338,7 +338,7 @@ static int __devinit snd_cmi8330_pnp(int dev, struct snd_cmi8330 *acard,
return -EBUSY;
acard->mpu = pnp_request_card_device(card, id->dev... |
bd46cb6cf11867130a41ea9546dd65688b71f3c2 | Analyze and fix the following issue in the Linux kernel code: be2net: Fix to avoid a crash seen on PPC with LRO and Jumbo frames. | Problem Details:
While testing the driver on PPC, we ran into a crash with LRO, Jumbo frames.
With CONFIG_PPC_64K_PAGES configured (a default in PPC), MAX_SKB_FRAGS drops to 3 and we were crossing the array limits on skb_shinfo(skb)->frags[].
Now we coalesce the frags from the same physical page into one slot in
skb_sh... | ```diff
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index f703758f0a6e..5b4bf3d2cdc2 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -73,7 +73,7 @@ static inline char *nic_name(struct pci_dev *pdev)
#define RX_FRAGS_REFILL_WM (RX_Q_LEN - MAX_RX_POST)
#define BE_MAX_LRO_DESCRIPTO... |
94e5d714f604d4cb4cb13163f01ede278e69258b | Analyze and fix the following issue in the Linux kernel code: integrity: add ima_counts_put (updated) | Problem Details:
This patch fixes an imbalance message as reported by J.R. Okajima.
The IMA file counters are incremented in ima_path_check. If the
actual open fails, such as ETXTBSY, decrement the counters to
prevent unnecessary imbalance messages.
Reported-by: J.R. Okajima <hooanon05@yahoo.co.jp>
Signed-off-by: Mimi... | ```diff
diff --git a/fs/namei.c b/fs/namei.c
index 5b961eb71cbf..f3c5b278895a 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1761,6 +1761,10 @@ do_last:
goto exit;
}
filp = nameidata_to_filp(&nd, open_flag);
+ if (IS_ERR(filp))
+ ima_counts_put(&nd.path,
+ acc_mode & (MAY_READ | MAY_WRITE |
+ ... |
79b854c549c62c54fa27f87e04465c01db889f8d | Analyze and fix the following issue in the Linux kernel code: integrity: ima audit hash_exists fix | Problem Details:
Audit the file name, not the template name.
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org> | ```diff
diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c
index 7ec94314ac0c..a0880e9c8e05 100644
--- a/security/integrity/ima/ima_queue.c
+++ b/security/integrity/ima/ima_queue.c
@@ -134,7 +134,8 @@ int ima_add_template_entry(struct ima_template_entry *entry, int violation,
}
out:... |
46690f3718d95e9bb712b6f2b5c869f8494521de | Analyze and fix the following issue in the Linux kernel code: integrity: ima mq_open imbalance msg fix | Problem Details:
This patch fixes an imbalance message as reported by Sanchin Sant.
As we don't need to measure the message queue, just increment the
counters.
Reported-by: Sanchin Sant <sanchinp@in.ibm.com>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Mor... | ```diff
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index e35ba2c3a8d7..c5e68adc6732 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -32,6 +32,7 @@
#include <linux/nsproxy.h>
#include <linux/pid.h>
#include <linux/ipc_namespace.h>
+#include <linux/ima.h>
#include <net/sock.h>
#include "util.h"
@@ -733,6 +734,7 @@ S... |
9e6996240afcbe61682eab8eeaeb65c34333164d | Analyze and fix the following issue in the Linux kernel code: KVM: Ignore reads to K7 EVNTSEL MSRs | Problem Details:
In commit 7fe29e0faacb650d31b9e9f538203a157bec821d we ignored the
reads to the P6 EVNTSEL MSRs. That fixed crashes on Intel machines.
Ignore the reads to K7 EVNTSEL MSRs as well to fix this on AMD
hosts.
This fixes Kaspersky antivirus crashing Windows guests on AMD hosts.
Signed-off-by: Amit Shah <a... | ```diff
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 249540f98513..fe5474aec41a 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -898,6 +898,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
case MSR_VM_HSAVE_PA:
case MSR_P6_EVNTSEL0:
case MSR_P6_EVNTSEL1:
+ case MSR... |
ffdfa071bd6fa8f5e5964569bef41e067540d424 | Analyze and fix the following issue in the Linux kernel code: KVM: ia64: fix ia64 build due to missing kallsyms_lookup() and double export | Problem Details:
Fix problem with double export of certain symbols from vsprintf.c
which we do not wish to export from the kvm-intel.ko module.
In addition, we do not have access to kallsyms_lookup() from the
module, so make sure to #undef CONFIG_KALLSYMS
Signed-off-by: Jes Sorensen <jes@sgi.com>
Acked-by: Xiantao Zh... | ```diff
diff --git a/arch/ia64/kvm/kvm_lib.c b/arch/ia64/kvm/kvm_lib.c
index a85cb611ecd7..f1268b8e6f9e 100644
--- a/arch/ia64/kvm/kvm_lib.c
+++ b/arch/ia64/kvm/kvm_lib.c
@@ -11,5 +11,11 @@
*
*/
#undef CONFIG_MODULES
+#include <linux/module.h>
+#undef CONFIG_KALLSYMS
+#undef EXPORT_SYMBOL
+#undef EXPORT_SYMBOL_GPL... |
84261923d3dddb766736023bead6fa07b7e218d5 | Analyze and fix the following issue in the Linux kernel code: KVM: protect concurrent make_all_cpus_request | Problem Details:
make_all_cpus_request contains a race condition which can
trigger false request completed status, as follows:
CPU0 CPU1
if (test_and_set_bit(req,&vcpu->requests))
.... if (test_and_set_bit(req,&vcpu->requests))... | ```diff
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index aacc5449f586..16713dc672e4 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -125,6 +125,7 @@ struct kvm_kernel_irq_routing_entry {
struct kvm {
struct mutex lock; /* protects the vcpus array and APIC accesses */
s... |
e244584fe3a5c20deddeca246548ac86dbc6e1d1 | Analyze and fix the following issue in the Linux kernel code: KVM: Fix dirty bit tracking for slots with large pages | Problem Details:
When slot is already allocated and being asked to be tracked we need
to break the large pages.
This code flush the mmu when someone ask a slot to start dirty bit
tracking.
Cc: stable@kernel.org
Signed-off-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 764554350ed8..013a5b3e9f75 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1194,6 +1194,8 @@ int __kvm_set_memory_region(struct kvm *kvm,
if (!new.dirty_bitmap)
goto out_free;
memset(new.dirty_bitmap, 0, dirty_bytes);
+ if (o... |
c276aca46d26aa2347320096f8ecdf5016795c14 | Analyze and fix the following issue in the Linux kernel code: mtd: nand: fix build failure and incorrect return from omap_wait() | Problem Details:
We need to include jiffies.h manually in some cases, and the status
returned from omap_wait() was broken in two separate ways.
Also add cond_resched() to the loop.
Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 0cd76f89f4b0..ebd07e95b814 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -11,6 +11,8 @@
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
+#include <linux/jiffies.h>
+#inc... |
f0a71eb820596bd8f6abf64beb4cb181edaa2341 | Analyze and fix the following issue in the Linux kernel code: cifs: fix fh_mutex locking in cifs_reopen_file | Problem Details:
Fixes a regression caused by commit a6ce4932fbdbcd8f8e8c6df76812014351c32892
When this lock was converted to a mutex, the locks were turned into
unlocks and vice-versa.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Cc: Stable Tree <stable@kernel.or... | ```diff
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index ebdbe62a829c..97ce4bf89d15 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -493,9 +493,9 @@ static int cifs_reopen_file(struct file *file, bool can_flush)
return -EBADF;
xid = GetXid();
- mutex_unlock(&pCifsFile->fh_mutex);
+ mutex_lock(&pCifsFile->f... |
a222ad1a4b2e3ca177a538482c99c519c1ce94d1 | Analyze and fix the following issue in the Linux kernel code: [SCSI] cxgb3i: fix connection error when vlan is enabled | Problem Details:
There is a bug when VLAN is configured on the cxgb3 interface, the iscsi
conn. would be denied with message "cxgb3i: NOT going through cxgbi device."
This patch adds code to get the real egress net_device when vlan is configured.
Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie ... | ```diff
diff --git a/drivers/scsi/cxgb3i/cxgb3i_iscsi.c b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
index 74369a3f963b..c399f485aa7d 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
@@ -13,6 +13,7 @@
#include <linux/inet.h>
#include <linux/crypto.h>
+#include <linux/if_vlan.h>
#inc... |
bddc605955bca2d914ca621a7ef4ca6c271f55d8 | Analyze and fix the following issue in the Linux kernel code: score: fix function prototypes | Problem Details:
Syscalls should return 'long' and be marked as 'asmlinkage'.
Functions that are only used in a single file should be 'static'.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> | ```diff
diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c
index 1634aaa7c2ba..afbfe33dcf17 100644
--- a/arch/score/kernel/signal.c
+++ b/arch/score/kernel/signal.c
@@ -42,7 +42,7 @@ struct rt_sigframe {
struct ucontext rs_uc;
};
-int setup_sigcontext(struct pt_regs *regs, struct sigcontext __use... |
ddf4f3d994651ee2924432a618d9caefed411dc1 | Analyze and fix the following issue in the Linux kernel code: [ARM] 5574/1: ep93xx: gpio.c: fix header includes and __iomem pointers | Problem Details:
Fix ep93xx gpio.c header includes and __iomem pointers.
1. <linux/gpio.h> should be included instead of <asm/gpio.h>
2. <mach/hardware.h> should be included instead of <mach/ep93xx-regs.h>
3. data_reg and data_dir_reg in struct ep93xx_gpio_chip should be
void __iomem pointers not unsigned i... | ```diff
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
index 482cf3d2fbcd..7b7a564916f3 100644
--- a/arch/arm/mach-ep93xx/gpio.c
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -17,15 +17,15 @@
#include <linux/module.h>
#include <linux/seq_file.h>
#include <linux/io.h>
+#include <linux/gpio.h>
-#inclu... |
566747e6298289c5cb02d4939cb3abf1c4fe7e5a | Analyze and fix the following issue in the Linux kernel code: perf stat: Fix multi-run stats | Problem Details:
In multi-run (-r/--repeat) printouts, print out the noise of
the wall-clock average as well.
Also, fix a bug in printing out scaled counters: if it was not
scaled then we should not update the average with -1.
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mac... | ```diff
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index cdcd058fac08..52c176cc683e 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -353,8 +353,11 @@ static void calc_avg(void)
event_res_avg[j]+1, event_res[i][j]+1);
update_avg("counter/2", j,
event_res_av... |
ff780cd8f2fa928b193554f593b36d1243554212 | Analyze and fix the following issue in the Linux kernel code: gro: Flush GRO packets in napi_disable_pending path | Problem Details:
When NAPI is disabled while we're in net_rx_action, we end up
calling __napi_complete without flushing GRO packets. This is
a bug as it would cause the GRO packets to linger, of course it
also literally BUGs to catch error like this :)
This patch changes it to napi_complete, with the obligatory IRQ
r... | ```diff
diff --git a/net/core/dev.c b/net/core/dev.c
index 60b572812278..70c27e0c7c32 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2823,9 +2823,11 @@ static void net_rx_action(struct softirq_action *h)
* move the instance around on the list at-will.
*/
if (unlikely(work == weight)) {
- if (unlikely... |
a8735821d198675dd326cc5847e79df79c735119 | Analyze and fix the following issue in the Linux kernel code: Kbuild: Disable the -Wformat-security gcc flag | Problem Details:
Some distributions have enabled the gcc flag -Wformat-security by default.
This results in a number of warnings about format arguments to functions,
sometimes in cases where fixing the warning is not likely to actually fix a
bug. Instead of hand patching a dozens of places (possibly more) that produce... | ```diff
diff --git a/Makefile b/Makefile
index d1216fea0c92..8fb9bfce212c 100644
--- a/Makefile
+++ b/Makefile
@@ -344,7 +344,8 @@ KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
- -Werror-implicit-function-declaration... |
73f1d9391a6aa72efdcea2f302ee7bfcd313c631 | Analyze and fix the following issue in the Linux kernel code: asm-generic/vmlinux.lds.h: Fix up RW_DATA_SECTION definition. | Problem Details:
RW_DATA_SECTION is defined to take 4 different alignment parameters,
while NOSAVE_DATA currently uses a fixed PAGE_SIZE alignment as noted
in the comments.
There are presently no in-tree users of this at present, and I just
stumbled across this while implementing the simplified script on a new
archite... | ```diff
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 92b73b6140ff..f92e730695c8 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -704,7 +704,7 @@
* matches the requirment of PAGE_ALIGNED_DATA.
*
* use 0 as page_align if page_alig... |
a32c7765e2796395aec49f699bd25c407155e9c5 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix stack tracer sysctl handling | Problem Details:
This made my machine completely frozen:
# echo 1 > /proc/sys/kernel/stack_tracer_enabled
# echo 2 > /proc/sys/kernel/stack_tracer_enabled
The cause is register_ftrace_function() was called twice.
Also fix ftrace_enabled sysctl, though seems nothing bad happened
as I tested it.
Signed-off-by: Li... | ```diff
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index f3716bf04df6..bce9e01a29c8 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3160,10 +3160,10 @@ ftrace_enable_sysctl(struct ctl_table *table, int write,
ret = proc_dointvec(table, write, file, buffer, lenp, ppos);
- if (re... |
9c72ebef5aabf3532469d602a9d87beceea268b1 | Analyze and fix the following issue in the Linux kernel code: ide-cd: handle fragmented packet commands gracefully | Problem Details:
There are some devices in the wild that clear the DRQ bit during the
last word of a packet command and therefore could use a "second chance"
for that last word of data to be xferred instead of simply failing the
request. Do that by attempting to suck in those last bytes in PIO mode.
In addition, the A... | ```diff
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index f0ede5953af8..6a9a769bffc1 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -592,9 +592,19 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
}
} else if (!blk_pc_request(rq)) {
ide_cd_request_sense_fixup(drive,... |
4698c1f2bbe44ce852ef1a6716973c1f5401a4c4 | Analyze and fix the following issue in the Linux kernel code: kmemleak: Do not trigger a scan when reading the debug/kmemleak file | Problem Details:
Since there is a kernel thread for automatically scanning the memory, it
makes sense for the debug/kmemleak file to only show its findings. This
patch also adds support for "echo scan > debug/kmemleak" to trigger an
intermediate memory scan and eliminates the kmemleak_mutex (scan_mutex
covers all the c... | ```diff
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt
index c06f7ba64993..89068030b01b 100644
--- a/Documentation/kmemleak.txt
+++ b/Documentation/kmemleak.txt
@@ -17,12 +17,16 @@ Usage
CONFIG_DEBUG_KMEMLEAK in "Kernel hacking" has to be enabled. A kernel
thread scans the memory every 10 minu... |
bab4a34afc301fdb81b6ea0e3098d96fc356e03a | Analyze and fix the following issue in the Linux kernel code: kmemleak: Simplify the reports logged by the scanning thread | Problem Details:
Because of false positives, the memory scanning thread may print too
much information. This patch changes the scanning thread to only print
the number of newly suspected leaks. Further information can be read
from the /sys/kernel/debug/kmemleak file.
Signed-off-by: Catalin Marinas <catalin.marinas@arm... | ```diff
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt
index 9426e94f291a..c06f7ba64993 100644
--- a/Documentation/kmemleak.txt
+++ b/Documentation/kmemleak.txt
@@ -16,9 +16,9 @@ Usage
-----
CONFIG_DEBUG_KMEMLEAK in "Kernel hacking" has to be enabled. A kernel
-thread scans the memory every 10... |
b9389796fa4c87fbdff33816e317cdae5f36dd0b | Analyze and fix the following issue in the Linux kernel code: sky2: Fix checksum endianness | Problem Details:
sky2 driver on PowerPC targets floods kernel log with following errors:
eth1: hw csum failure.
Call Trace:
[ef84b8a0] [c00075e4] show_stack+0x50/0x160 (unreliable)
[ef84b8d0] [c02fa178] netdev_rx_csum_fault+0x3c/0x5c
[ef84b8f0] [c02f6920] __skb_checksum_complete_head+0x7c/0x84
[ef84b900] [... | ```diff
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 7681d28c53d7..daf961ab68bc 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2495,7 +2495,7 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)
if (likely(status >> 16 == (status & 0xffff))) {
skb = sky2->rx_ring[s... |
39562e783928e3ea9ee2cbce99a756ab48d3c06a | Analyze and fix the following issue in the Linux kernel code: [SCSI] FC transport: Locking fix for common-code FC pass-through patch | Problem Details:
Fix this:
------------[ cut here ]------------
Badness at block/blk-core.c:244
CPU: 0 Tainted: G W 2.6.31-rc1-00004-gd3a263a #3
Process zfcp_wq (pid: 901, task: 000000002fb7a038, ksp: 000000002f02bc78)
Krnl PSW : 0704300180000000 00000000002141ba (blk_remove_plug+0xb2/0xb8)
R:0 T:1 I... | ```diff
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 2eee9e6e4fe8..292c02f810d0 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -3670,13 +3670,14 @@ static void
fc_bsg_goose_queue(struct fc_rport *rport)
{
int flagset;
+ unsigned long... |
c2caa4da46a41899b29f90ec30ef3ba86665b334 | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix widget powerdown on shutdown | Problem Details:
We need to set the widget power state we want to implement.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index b9129efeedf3..5157ec110cfa 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2045,6 +2045,7 @@ void snd_soc_dapm_shutdown(struct snd_soc_device *socdev)
list_for_each_entry(w, &codec->dapm_widgets, list) {
if (w->power) {
dap... |
37da045067b4e923190662e21029005ea53bfaa1 | Analyze and fix the following issue in the Linux kernel code: amd64_edac: misc small cleanups | Problem Details:
- cleanup debug calls
- shorten function names
- cleanup error exit paths
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> | ```diff
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 8497963a61f6..858fe6037223 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1269,7 +1269,7 @@ static int f10_early_channel_count(struct amd64_pvt *pvt)
if (channels == 0)
channels = 1;
- debugf0("DIMM count... |
30c875cbc1836a03a1acc6c998fa8a04f29f8f73 | Analyze and fix the following issue in the Linux kernel code: amd64_edac: fix ecc_enable_override handling | Problem Details:
amd64_check_ecc_enabled() returns non-zero status when ECC
checking/correcting is disabled and this fails further loading of the
driver even when 'ecc_enable_override' boot param is used.
Fix that by clearing return status in that case.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> | ```diff
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 3b76605330e9..8497963a61f6 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2966,7 +2966,12 @@ static int amd64_check_ecc_enabled(struct amd64_pvt *pvt)
" Use of the override can cause "
"unknown side... |
7e25a2422987a37729706b18583d177966919d2a | Analyze and fix the following issue in the Linux kernel code: intel-iommu: fix Identity Mapping to be arch independent | Problem Details:
Drop the e820 scanning and use existing function for finding valid
RAM regions to add to 1:1 mapping.
Signed-off-by: Chris Wright <chrisw@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index e53eacd75c8d..420afa887283 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -39,7 +39,6 @@
#include <linux/sysdev.h>
#include <asm/cacheflush.h>
#include <asm/iommu.h>
-#include <asm/e820.h>
#include "pci.h"
... |
e3c7dbb07cde886ba97f183c4cc98a2a99b46eaa | Analyze and fix the following issue in the Linux kernel code: ASoC: Remove word "Switch" from Handsfree switch name | Problem Details:
SoC dapm adds the suffix "Switch" to SND_SOC_DAPM_SWITCH controls,
removing word "Switch" from HandsfreeL/HandsfreeR widget name
for avoiding to duplicate it.
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opens... | ```diff
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index df42fa2abd91..49ceb620678c 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -1258,14 +1258,14 @@ static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = {
/* HandsfreeL/R */
SND_SOC_DAPM_MUX("Hands... |
7ed9f7e5db58c6e8c2b4b738a75d5dcd8e17aad5 | Analyze and fix the following issue in the Linux kernel code: fix RCU-callback-after-kmem_cache_destroy problem in sl[aou]b | Problem Details:
Jesper noted that kmem_cache_destroy() invokes synchronize_rcu() rather than
rcu_barrier() in the SLAB_DESTROY_BY_RCU case, which could result in RCU
callbacks accessing a kmem_cache after it had been destroyed.
Cc: <stable@kernel.org>
Acked-by: Matt Mackall <mpm@selenic.com>
Reported-by: Jesper Danga... | ```diff
diff --git a/mm/slab.c b/mm/slab.c
index e74a16e4ced6..5241b6598ba3 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2547,7 +2547,7 @@ void kmem_cache_destroy(struct kmem_cache *cachep)
}
if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU))
- synchronize_rcu();
+ rcu_barrier();
__kmem_cache_destroy(cachep);... |
55dba52458a11126ff4445b5b94ebde03afcf47a | Analyze and fix the following issue in the Linux kernel code: HID: fix memory leak on error path in debug code | Problem Details:
If hid_get_report() fails, we forgot to free the already allocated buffer
for debugging messages on error path. Fix that up.
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 449bd747d116..86c2ff2429d8 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1100,8 +1100,10 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
hid_debug_event(hid, buf);
report = hid_get... |
38b7f49a0654cb52cac61c6455807248eee3059d | Analyze and fix the following issue in the Linux kernel code: HID: fix debugfs build with !CONFIG_DEBUG_FS | Problem Details:
Fix the debug function prototypes to be correct even in the
!CONFIG_DEBUG_FS case.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/include/linux/hid-debug.h b/include/linux/hid-debug.h
index ec08ac1ad687..53744fa1c8b7 100644
--- a/include/linux/hid-debug.h
+++ b/include/linux/hid-debug.h
@@ -22,6 +22,8 @@
*
*/
+#define HID_DEBUG_BUFSIZE 512
+
#ifdef CONFIG_DEBUG_FS
void hid_dump_input(struct hid_device *, struct hid_... |
0296e4254f3318e0dcad9706fa1daf8e5addc1e9 | Analyze and fix the following issue in the Linux kernel code: ftrace: Fix the output of profile | Problem Details:
The first entry of the ftrace profile was always skipped when
reading trace_stat/functionX.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A443D59.4080307@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <... | ```diff
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 71a52c172140..f3716bf04df6 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -291,7 +291,9 @@ function_stat_next(void *v, int idx)
pg = (struct ftrace_profile_page *)((unsigned long)rec & PAGE_MASK);
again:
- rec++;
+ if (idx... |
5e955245d6cf49c5ed26c7add7392ff5a6762bf4 | Analyze and fix the following issue in the Linux kernel code: ide: always kill the whole request on error | Problem Details:
* Use blk_rq_bytes() instead of obsolete ide_rq_bytes() in ide_kill_rq()
and ide_floppy_do_request() for failed requests.
[ bugfix part ]
* Use blk_rq_bytes() instead of obsolete ide_rq_bytes() in ide_do_devset()
and ide_complete_drive_reset(). Then remove ide_rq_bytes().
[ cleanup part ]
Si... | ```diff
diff --git a/drivers/ide/ide-devsets.c b/drivers/ide/ide-devsets.c
index 5bf958e5b1d5..1099bf7cf968 100644
--- a/drivers/ide/ide-devsets.c
+++ b/drivers/ide/ide-devsets.c
@@ -183,6 +183,6 @@ ide_startstop_t ide_do_devset(ide_drive_t *drive, struct request *rq)
err = setfunc(drive, *(int *)&rq->cmd[1]);
if (... |
789547508f22e482825f52f813b59680408ec2c7 | Analyze and fix the following issue in the Linux kernel code: ide: fix ide_kill_rq() for special ide-{floppy,tape} driver requests | Problem Details:
Such requests should be failed with -EIO (like all other requests
in this function) instead of being completed successfully.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 93b7886a2d6e..95db5f03f6a2 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -152,7 +152,7 @@ void ide_kill_rq(ide_drive_t *drive, struct request *rq)
if ((media == ide_floppy || media == ide_tape) && drv_req) {
rq->errors = 0;
... |
5ba762c9bb3ce2cc11e9e111cb3c476e84b91668 | Analyze and fix the following issue in the Linux kernel code: powerpc/rtas: Fix watchdog driver temperature read functionality | Problem Details:
Using the RTAS watchdog driver to read out the temperature crashes
on a PXCAB:
Unable to handle kernel paging request for data at address 0xfe347b50
Faulting instruction address: 0xc00000000001af64
Oops: Kernel access of bad area, sig: 11 [#1]
The wrong usage of "(void *)__pa(&temperature)" in rtas_c... | ```diff
diff --git a/drivers/watchdog/wdrtas.c b/drivers/watchdog/wdrtas.c
index a4fe7a38d9b0..3bde56bce63a 100644
--- a/drivers/watchdog/wdrtas.c
+++ b/drivers/watchdog/wdrtas.c
@@ -218,16 +218,14 @@ static void wdrtas_timer_keepalive(void)
*/
static int wdrtas_get_temperature(void)
{
- long result;
+ int result;
... |
6c16a74d423f584ed80815ee7b944f5b578dd37a | Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Fix potential access to freed pages when using hugetlbfs | Problem Details:
When using 64k page sizes, our PTE pages are split in two halves,
the second half containing the "extension" used to keep track of
individual 4k pages when not using HW 64k pages.
However, our page tables used for hugetlb have a slightly different
format and don't carry that "second half".
Our code t... | ```diff
diff --git a/arch/powerpc/include/asm/pte-hash64-64k.h b/arch/powerpc/include/asm/pte-hash64-64k.h
index e05d26fa372f..82b72207c51c 100644
--- a/arch/powerpc/include/asm/pte-hash64-64k.h
+++ b/arch/powerpc/include/asm/pte-hash64-64k.h
@@ -47,7 +47,8 @@
* generic accessors and iterators here
*/
#define __re... |
f694cda89250f38782a5fd0b2d32fe33a39dcf37 | Analyze and fix the following issue in the Linux kernel code: powerpc/440: Fix warning early debug code | Problem Details:
The function udbg_44x_as1_flush() has the wrong prototype causing
a warning when enabling 440 early debug.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> | ```diff
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index 0362a891e54e..acb74a17bbbf 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -219,7 +219,7 @@ void udbg_init_pas_realmode(void)
#ifdef CONFIG_PPC_EARLY_DEBUG_44x
#include <platforms/44x... |
03c01aa740d4137ea2884328f2c29956c6084834 | Analyze and fix the following issue in the Linux kernel code: powerpc/of: Fix usage of dev_set_name() in of_device_alloc() | Problem Details:
dev_set_name() takes a format string, so use it properly and avoid
a warning with recent gcc's
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> | ```diff
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index fa983a59c4ce..a359cb08e900 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -76,7 +76,7 @@ struct of_device *of_device_alloc(struct device_node *np,
dev->dev.archdata.of_node = np;
if ... |
f97bb36f705da0a86b3ea77bfeee3415fee0b025 | Analyze and fix the following issue in the Linux kernel code: powerpc/rtas: Turn rtas lock into a raw spinlock | Problem Details:
RTAS currently uses a normal spinlock. However it can be called from
contexts where this is not necessarily a good idea. For example, it
can be called while syncing timebases, with the core timebase being
frozen. Unfortunately, that will deadlock in case of lock contention
when spinlock debugging is en... | ```diff
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
index 01c12339b304..0af42d20b692 100644
--- a/arch/powerpc/include/asm/rtas.h
+++ b/arch/powerpc/include/asm/rtas.h
@@ -58,7 +58,7 @@ struct rtas_t {
unsigned long entry; /* physical address pointer */
unsigned long base; /* ph... |
04a85d1234d7e1682a612565e663e6b760918643 | Analyze and fix the following issue in the Linux kernel code: powerpc/BSR: Fix BSR to allow mmap of small BSR on 64k kernel | Problem Details:
On Mon, Nov 17, 2008 at 01:26:13AM -0600, Sonny Rao wrote:
> On Fri, Nov 07, 2008 at 04:28:29PM +1100, Paul Mackerras wrote:
> > Sonny Rao writes:
> >
> > > Fix the BSR driver to allow small BSR devices, which are limited to a
> > > single 4k space, on a 64k page kernel. Previously the driver would
> ... | ```diff
diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c
index 7d9fd8a8dfd0..c02db01f736e 100644
--- a/drivers/char/bsr.c
+++ b/drivers/char/bsr.c
@@ -27,6 +27,7 @@
#include <linux/cdev.h>
#include <linux/list.h>
#include <linux/mm.h>
+#include <asm/pgtable.h>
#include <asm/io.h>
/*
@@ -118,15 +119,22 @@ sta... |
3514141aedc16c7344117d5bd79ec1310edf8fb3 | Analyze and fix the following issue in the Linux kernel code: powerpc/pmac: Fix DMA ops for MacIO devices | Problem Details:
The macio_dev's created to map devices inside the MacIO ASICs
don't have proper dma_ops. This causes crashes on some machines
since the SCSI code calls dma_map_* on our behalf using the
device we hang from.
This fixes it by copying the parent PCI device dma_ops into
the macio_dev when creating it.
Si... | ```diff
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index 6e149f4a1fff..a0f68386c12f 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -378,6 +378,17 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
dev->ofdev.dev.bus = &maci... |
85355bb272db31a3f2dd99d547eef794805e1319 | Analyze and fix the following issue in the Linux kernel code: powerpc: Fix mpic alloc warning | Problem Details:
Since we can use kmalloc earlier we are getting the following since the
mpic_alloc() code calls alloc_bootmem(). Move to using kzalloc() to
remove the warning.
------------[ cut here ]------------
Badness at c0583248 [verbose debug info unavailable]
NIP: c0583248 LR: c0583210 CTR: 00000004
REGS: c074... | ```diff
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 32a2e950f563..d46de1f0f3ee 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1053,11 +1053,10 @@ struct mpic * __init mpic_alloc(struct device_node *node,
int intvec_top;
u64 paddr = phys_addr;
- mpic =... |
a2367194183d6ab6b05e5d7d9b40db6ba48afc06 | Analyze and fix the following issue in the Linux kernel code: powerpc: Fix output from show_regs | Problem Details:
For some reason we've had an explicit KERN_INFO for GPR dumps. With
recent changes we get output like:
<6>GPR00: 00000000 ef855eb0 ef858000 00000001 000000d0 f1000000 ffbc8000 ffffffff
The KERN_INFO is causing the <6>. Don't see any reason to keep it
around.
Signed-off-by: Kumar Gala <galak@kernel... | ```diff
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 3e7135bbe40f..892a9f2e6d76 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -528,7 +528,7 @@ void show_regs(struct pt_regs * regs)
for (i = 0; i < 32; i++) {
if ((i % REGS_PER_LINE) == 0)
-... |
7ccbe504b5ee766d33211a507189a06f3079b29b | Analyze and fix the following issue in the Linux kernel code: powerpc/pmac: Fix issues with PowerMac "PowerSurge" SMP | Problem Details:
The old PowerSurge SMP (ie, dual or quad 604 machines) code has
numerous issues in modern world.
One is cpu_possible_map is set too late (the device-tree is bogus)
so we fail to allocate the interrupt stacks and crash. Another
problem is the fact the timebase is frozen by the bringup of the
second CPU... | ```diff
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 65484b2200b3..0b47de07302d 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -68,7 +68,8 @@ EXPORT_PER_CPU_SYMBOL(cpu_core_map);
/* SMP operations for this machine */
struct smp_ops_t *smp_ops;
-static volatile ... |
3984114f056203d833251af85501721f7b00fd18 | Analyze and fix the following issue in the Linux kernel code: powerpc/warp: Platform fix for i2c change | Problem Details:
A change to the i2c subsystem breaks the warp platform code. The patch
is cleaner anyway, the old way was a bit crufty.
For those with keen eyes, the gratuitous change in the string from
PIKA to Warp is just so the logs look a bit nicer. The following two
lines tend to be printed one after another.
... | ```diff
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c
index 42e09a9f77e2..0362c88f47d7 100644
--- a/arch/powerpc/platforms/44x/warp.c
+++ b/arch/powerpc/platforms/44x/warp.c
@@ -16,6 +16,7 @@
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/of_gpio.h>
+#inclu... |
5a2642f620eb6e40792822fa0eafe23046fbb55e | Analyze and fix the following issue in the Linux kernel code: powerpc/mpic: Fix mapping of "DCR" based MPIC variants | Problem Details:
Commit 31207dab7d2e63795eb15823947bd2f7025b08e2
"Fix incorrect allocation of interrupt rev-map"
introduced a regression crashing on boot on machines using
a "DCR" based MPIC, such as the Cell blades.
The reason is that the irq host data structure is initialized
much later as a result of that patch, ca... | ```diff
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 9c3af5045495..32a2e950f563 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -279,28 +279,29 @@ static void _mpic_map_mmio(struct mpic *mpic, phys_addr_t phys_addr,
}
#ifdef CONFIG_PPC_DCR
-static void _mpic... |
6f0b1c6094b3e8eeeb13f8f16c1b2ef452a6f519 | Analyze and fix the following issue in the Linux kernel code: powerpc: Swiotlb breaks pseries | Problem Details:
Turning on SWIOTLB selects or enables PPC_NEED_DMA_SYNC_OPS, which means
we get the non empty versions of dma_sync_* in asm/dma-mapping.h
On my pseries machine the dma_ops have no such routines and we die with
a null pointer - this patch gets it booting, is there a more elegant way
to do it?
Signed-o... | ```diff
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
index 3d9e887c3c0c..b44aaabdd1a6 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -309,7 +309,9 @@ static inline void dma_sync_single_for_cpu(struct device *dev,
stru... |
e2a61fa31382b1ac2b22f76f9c439892e5dc4b86 | Analyze and fix the following issue in the Linux kernel code: fsl_pq_mdio: Fix fsl_pq_mdio to work with modules | Problem Details:
This patch fixes the case when ucc_geth or gianfar are compiled
as modules. Without this patch the call to phy_connect() fails.
Signed-off-by: Ionut Nicu <ionut.nicu@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c
index 3af581303ca2..d167090248e2 100644
--- a/drivers/net/fsl_pq_mdio.c
+++ b/drivers/net/fsl_pq_mdio.c
@@ -188,7 +188,7 @@ static int fsl_pq_mdio_find_free(struct mii_bus *new_bus)
}
-#ifdef CONFIG_GIANFAR
+#if defined(CONFIG_GIANFAR) || d... |
8944146daa2c38dd85bc489d1b84fb9abc108837 | Analyze and fix the following issue in the Linux kernel code: sparc32: Fix makefile not generating required files | Problem Details:
The tftpboot build was failing with missing file errors.
It turns out that $(obj)/image wasn't being generated which was causing the a.out conversion to be skipped and hence piggyback to be called with nonexistent files.
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: David S. M... | ```diff
diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
index 500a2f87f28f..1ff0fd924756 100644
--- a/arch/sparc/boot/Makefile
+++ b/arch/sparc/boot/Makefile
@@ -58,7 +58,7 @@ $(obj)/image: $(obj)/btfix.o FORCE
$(obj)/zImage: $(obj)/image
$(call if_changed,strip)
-$(obj)/tftpboot.img: $(obj)/piggy... |
3e05c5e2ce40066582dc34aa8335baa328815a09 | Analyze and fix the following issue in the Linux kernel code: sparc32: Fix tftpboot.img Makefile | Problem Details:
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
index 5e2caeb31109..500a2f87f28f 100644
--- a/arch/sparc/boot/Makefile
+++ b/arch/sparc/boot/Makefile
@@ -15,7 +15,7 @@ quiet_cmd_elftoaout = ELFTOAOUT $@
ifeq ($(CONFIG_SPARC32),y)
quiet_cmd_piggy = PIGGY $@
- cmd_piggy = $(obj)/pigg... |
52da82cfb569b44e26e15395a6727277758580fe | Analyze and fix the following issue in the Linux kernel code: sparc: fix tftpboot.img build | Problem Details:
Kjetil Oftedal mentioned that piggyback_32 was failing
when building a sparc image.
I tracked this down to the fact that the kernel no longer
provided an absolute symbol named "end".
Commit 86ed40bd6fe511d26bb8f3fa65a84cb65c235366 ("sparc: unify sections.h")
renamed end to _end but failed to update p... | ```diff
diff --git a/arch/sparc/boot/piggyback_32.c b/arch/sparc/boot/piggyback_32.c
index 3f0f93354543..e8dc9adfcd61 100644
--- a/arch/sparc/boot/piggyback_32.c
+++ b/arch/sparc/boot/piggyback_32.c
@@ -84,7 +84,7 @@ int main(int argc,char **argv)
while (fgets (buffer, 1024, map)) {
if (!strcmp (buffer + 8, " T st... |
22b096a8907e5184f25fafd1b73f0b3633d52495 | Analyze and fix the following issue in the Linux kernel code: sparc32: Fix obvious build issues for tftpboot.img build. | Problem Details:
Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
index 96041a8d39e8..5e2caeb31109 100644
--- a/arch/sparc/boot/Makefile
+++ b/arch/sparc/boot/Makefile
@@ -58,7 +58,7 @@ $(obj)/image: $(obj)/btfix.o FORCE
$(obj)/zImage: $(obj)/image
$(call if_changed,strip)
-$(obj)/tftpboot.img: $(obj)/piggy... |
413ee282a510afb2f18975a189501f39d279a906 | Analyze and fix the following issue in the Linux kernel code: sparc64: Fix build warnings in piggyback_64.c | Problem Details:
This patch fixes the following build warnings:
arch/sparc/boot/piggyback_64.c: In function 'main':
arch/sparc/boot/piggyback_64.c:44: warning: 'end' may be used uninitialized in this function
arch/sparc/boot/piggyback_64.c:44: warning: 'start' may be used uninitialized in this function
Signed-off-by: ... | ```diff
diff --git a/arch/sparc/boot/piggyback_64.c b/arch/sparc/boot/piggyback_64.c
index de364bfed0bb..c63fd1b6bdd4 100644
--- a/arch/sparc/boot/piggyback_64.c
+++ b/arch/sparc/boot/piggyback_64.c
@@ -46,6 +46,7 @@ int main(int argc,char **argv)
struct stat s;
int image, tail;
+ start = end = 0;
if (stat (ar... |
22f4319d6bc0155e6c0ae560729baa6c09dc09e7 | Analyze and fix the following issue in the Linux kernel code: x86, setup: Fix typo "CONFIG_x86_64" in <asm/boot.h> | Problem Details:
CONFIG_X86_64 was misspelled (wrong case), which caused the x86-64
kernel to advertise itself as more relocatable than it really is.
This could in theory cause boot failures once bootloaders start
support the new relocation fields.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by:... | ```diff
diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h
index 418e632d4a80..6f02b9a53848 100644
--- a/arch/x86/include/asm/boot.h
+++ b/arch/x86/include/asm/boot.h
@@ -16,7 +16,7 @@
& ~(CONFIG_PHYSICAL_ALIGN - 1))
/* Minimum kernel alignment, as a power of two */
-#ifdef CONFIG_x86_64
+#i... |
3928ddbe994cce1da1b6365b0db04d5765f254f4 | Analyze and fix the following issue in the Linux kernel code: perf record: Fix unhandled io return value | Problem Details:
Building latest perfcounter fails on the following error:
builtin-record.c: In function ‘create_counter’:
builtin-record.c:451: erreur: ignoring return value of ‘read’, declared with attribute warn_unused_result
make: *** [builtin-record.o] Erreur 1
Just check if we successfully read the perf file... | ```diff
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 798a56d890e5..d18546f37d7c 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -448,7 +448,10 @@ try_again:
}
}
- read(fd[nr_cpu][counter], &read_data, sizeof(read_data));
+ if (read(fd[nr_cpu][counter]... |
647613e97fa46f6c25cf38b0f2fa81eba5f278d4 | Analyze and fix the following issue in the Linux kernel code: ASoC: txx9aclc: dynamically allocate dmaengine devname | Problem Details:
Use kasprintf to allocate temporary devname string instead of a
fixed size string.
This fixes "FIXME" introduced on removal of BUS_ID_SIZE.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c
index 938a58a5a244..efed64b8b026 100644
--- a/sound/soc/txx9/txx9aclc.c
+++ b/sound/soc/txx9/txx9aclc.c
@@ -297,15 +297,17 @@ static int txx9aclc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,
static bool filter(struct dma_chan *chan, ... |
e6e18ec79b023d5fe84226cef533cf0e3770ce93 | Analyze and fix the following issue in the Linux kernel code: perf_counter: Rework the sample ABI | Problem Details:
The PERF_EVENT_READ implementation made me realize we don't
actually need the sample_type int the output sample, since
we already have that in the perf_counter_attr information.
Therefore, remove the PERF_EVENT_MISC_OVERFLOW bit and the
event->type overloading, and imply put counter overflow
samples i... | ```diff
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index de70a10b5ec8..3078e23c91eb 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -262,7 +262,6 @@ struct perf_counter_mmap_page {
#define PERF_EVENT_MISC_KERNEL (1 << 0)
#define PERF_EVENT_MISC_USER (2... |
0f3bc09ee1b7fcadd5bfdc5ed2e1643f658fe23d | Analyze and fix the following issue in the Linux kernel code: cifs: Fix incorrect return code being printed in cFYI messages | Problem Details:
FreeXid() along with freeing Xid does add a cifsFYI debug message that
prints rc (return code) as well. In some code paths where we set/return
error code after calling FreeXid(), incorrect error code is being
printed when cifsFYI is enabled.
This could be misleading in few cases. For eg.
In cifs_open(... | ```diff
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 3758965d73d5..7dc6b74f9def 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -307,8 +307,9 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
full_path = build_path_from_dentry(direntry);
if (full_path == NULL) {
+ rc = -ENOMEM;
Free... |
f4fa446883959c1c5f314a043e750dbfe3728c55 | Analyze and fix the following issue in the Linux kernel code: usb_serial: Fix oops when unexisting usb serial device is opened. | Problem Details:
This commit 335f8514f200e63d689113d29cb7253a5c282967 has stopped
properly checking if there is any usb serial associated with the tty in
the close function. It happens the close function is called by releasing
the terminal right after opening the device fails.
As an example, open fails with a non-exis... | ```diff
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index d595aa5586a7..a84216464ca0 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -333,6 +333,9 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
{
struct usb_serial_port *... |
922b13565b6a826a925f9f91f053dc9cb0d6210e | Analyze and fix the following issue in the Linux kernel code: acm: Fix oops when closing ACM tty device right after open has failed. | Problem Details:
This commit 10077d4a6674f535abdbe25cdecb1202af7948f1 has stopped
checking if there was a valid acm device associated to the tty, which is
not true right after open fails and tty subsystem tries to close the
device.
As an example, open fails with a non-existing device, when probe has
never been called,... | ```diff
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 02eb60bb6795..3f1045993474 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -677,7 +677,7 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp)
/* Perform the closing process and see i... |
ab420e6d9c2511b862d753b70efb4e979faa0714 | Analyze and fix the following issue in the Linux kernel code: UML: Fix some apparent bitrot | Problem Details:
UML: Fix some apparent bitrot
- migration of net_device methods into net_device_ops
- dma_sync_single() changes
Signed-off-by: Paul Menage <menage@google.com>
Acked-by: Amerigo Wang <xiyou.wangcong@gmail.com>
--
This version is split from my earlier patch, including just the
portions that ar require... | ```diff
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c
index 5ec17563142e..dd2aadc14af0 100644
--- a/arch/um/drivers/slip_kern.c
+++ b/arch/um/drivers/slip_kern.c
@@ -30,7 +30,6 @@ static void slip_init(struct net_device *dev, void *data)
slip_proto_init(&spri->slip);
- dev->init = NULL;
... |
47749b14e55cd167632f9a27a4fc439e591e5268 | Analyze and fix the following issue in the Linux kernel code: i2c: fix build bug in i2c-designware.c | Problem Details:
This build error triggers on x86:
drivers/built-in.o: In function `i2c_dw_init':
i2c-designware.c:(.text+0x4e37ca): undefined reference to `clk_get_rate'
drivers/built-in.o: In function `dw_i2c_probe':
i2c-designware.c:(.devinit.text+0x51f5e): undefined reference to `clk_get'
i2c-designware.c:(.d... | ```diff
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index aa87b6a3bbef..8206442fbabd 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -328,6 +328,7 @@ config I2C_DAVINCI
config I2C_DESIGNWARE
tristate "Synopsys DesignWare"
+ depends on HAVE_CLK
help
If you ... |
d3a263a8168f78874254ea9da9595cfb0f3e96d7 | Analyze and fix the following issue in the Linux kernel code: [SCSI] zalon: fix oops on attach failure | Problem Details:
I recently discovered on my zalon that if the attachment fails because
of a bus misconfiguration (I scrapped my HVD array, so the card is now
unterminated) then the system oopses. The reason is that if
ncr_attach() returns NULL (signalling failure) that NULL is passed by
the goto failed straight into ... | ```diff
diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
index 97f3158fa7b5..27e84e4b1fa9 100644
--- a/drivers/scsi/zalon.c
+++ b/drivers/scsi/zalon.c
@@ -134,7 +134,7 @@ zalon_probe(struct parisc_device *dev)
host = ncr_attach(&zalon7xx_template, unit, &device);
if (!host)
- goto fail;
+ return -ENODEV... |
87a2d34b0372dcf6bc4caf4d97a7889f5e62a1af | Analyze and fix the following issue in the Linux kernel code: [SCSI] fnic: remove redundant BUG_ONs and fix checks on unsigned | Problem Details:
The shost sg tablesize is set to FNIC_MAX_SG_DESC_CNT and fnic uses
scsi_dma_map, so both BUG_ONs can be removed.
scsi_dma_map may return -ENOMEM, sg_count should be int to catch that.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.c... | ```diff
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index eabf36502856..bfc996971b81 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -245,7 +245,7 @@ static inline int fnic_queue_wq_copy_desc(struct fnic *fnic,
struct vnic_wq_copy *wq,
str... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.