id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
f68596c6d8711650722b2a54328a088a2c21bc5b | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix dB scales for WM8990 | Problem Details:
These should be regular, not linear.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org | ```diff
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 9a9528e9044e..b6c003f9e862 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -110,21 +110,21 @@ static const u16 wm8990_reg[] = {
#define wm8990_reset(c) snd_soc_write(c, WM8990_RESET, 0)
-static const DECLARE_... |
3351e9fbb0fda6498ee149ee88c67f5849813c57 | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix dB scales for WM8400 | Problem Details:
These scales should be regular, not linear.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org | ```diff
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
index a7506ae2b8cc..535db3bff866 100644
--- a/sound/soc/codecs/wm8400.c
+++ b/sound/soc/codecs/wm8400.c
@@ -106,21 +106,21 @@ static void wm8400_codec_reset(struct snd_soc_codec *codec)
wm8400_reset_codec_reg_cache(wm8400->wm8400);
}
-stati... |
e6a08c5a8990102bcd1f4bae84b668da6c23caa9 | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix dB scales for WM835x | Problem Details:
These should be regular rather than linear scales.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org | ```diff
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index e5a48da65f82..c342c2c9fb49 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -425,8 +425,8 @@ static const struct soc_enum wm8350_enum[] = {
SOC_ENUM_SINGLE(WM8350_INPUT_MIXER_VOLUME, 15, 2, wm8350_lr),
};
-sta... |
3ca341499612572aa1e377a37fa0220d48b12e92 | Analyze and fix the following issue in the Linux kernel code: ASoC: fix uninitialised variable in siu_dai.c | Problem Details:
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/sh/siu_dai.c b/sound/soc/sh/siu_dai.c
index 5452d19607e1..c86c0858d6e2 100644
--- a/sound/soc/sh/siu_dai.c
+++ b/sound/soc/sh/siu_dai.c
@@ -587,6 +587,8 @@ static int siu_dai_prepare(struct snd_pcm_substream *substream,
ret = siu_dai_spbstart(port_info);
if (ret < 0)
goto fail;
... |
cc68e3be7412baaa1ea2a2df9e88770f1753da78 | Analyze and fix the following issue in the Linux kernel code: fs/fscache/object-list.c: fix warning on 32-bit | Problem Details:
fs/fscache/object-list.c: In function 'fscache_objlist_lookup':
fs/fscache/object-list.c:105: warning: cast to pointer from integer of different size
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-fou... | ```diff
diff --git a/fs/fscache/object-list.c b/fs/fscache/object-list.c
index 1e1f286dd70e..4a8eb31c5338 100644
--- a/fs/fscache/object-list.c
+++ b/fs/fscache/object-list.c
@@ -103,7 +103,7 @@ static struct fscache_object *fscache_objlist_lookup(loff_t *_pos)
/* banners (can't represent line 0 by pos 0 as that woul... |
2abfb9e1d470f7082e5e20e4b11a271a0124211b | Analyze and fix the following issue in the Linux kernel code: timers: Move local variable into else section | Problem Details:
Fix nit-picking coding style detail.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/kernel/timer.c b/kernel/timer.c
index d8decb8d46b0..22118342a456 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -747,7 +747,7 @@ EXPORT_SYMBOL(mod_timer_pending);
static inline
unsigned long apply_slack(struct timer_list *timer, unsigned long expires)
{
- unsigned long expires_limit, mask, ... |
0522f6adedd2736cbca3c0e16ca51df668993eee | Analyze and fix the following issue in the Linux kernel code: NFS: Fix another nfs_wb_page() deadlock | Problem Details:
J.R. Okajima reports that the call to sync_inode() in nfs_wb_page() can
deadlock with other writeback flush calls. It boils down to the fact
that we cannot ever call writeback_single_inode() while holding a page
lock (even if we do set nr_to_write to zero) since another process may
already be waiting i... | ```diff
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index b8a6d7af2a1d..91679e2631ee 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1518,14 +1518,17 @@ int nfs_wb_page(struct inode *inode, struct page *page)
};
int ret;
- while(PagePrivate(page)) {
+ for (;;) {
wait_on_page_writeback(page);
if (clear... |
59844a9bd73e084b0ffefc0e13226098e28c71ad | Analyze and fix the following issue in the Linux kernel code: NFS: Fix a lock imbalance typo in nfs_access_cache_shrinker | Problem Details:
Commit 9c7e7e23371e629dbb3b341610a418cdf1c19d91 (NFS: Don't call iput() in
nfs_access_cache_shrinker) unintentionally removed the spin unlock for the
inode->i_lock.
Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index ee9a179ebdf3..db64854b7b09 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1741,6 +1741,7 @@ remove_lru_entry:
clear_bit(NFS_INO_ACL_LRU_SET, &nfsi->flags);
smp_mb__after_clear_bit();
}
+ spin_unlock(&inode->i_lock);
}
spin_unlock(&nfs_access_lru_l... |
0a68b0bed08eeb7ec62e0125f17856b1ccb1ea4b | Analyze and fix the following issue in the Linux kernel code: sunrpc: fix leak on error on socket xprt setup | Problem Details:
Also collect exit code together while we're at it.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index b7cd8cccbe72..2a9675136c68 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2293,6 +2293,7 @@ static struct rpc_xprt *xs_setup_udp(struct xprt_create *args)
struct sockaddr *addr = args->dstaddr;
struct rpc_xprt *xprt;
stru... |
ed601fa46777cb529bda0dbec80c4aec704dd063 | Analyze and fix the following issue in the Linux kernel code: backlight: mbp_nvidia_bl - Fix DMI_SYS_VENDOR for MacBook1,1 | Problem Details:
Fix DMI_SYS_VENDOR for MacBook1,1.
When the MacBook1,1 came out Apple was still named Apple Computer, I am
not sure if this applies to older MacBook2,1 versions aswell.
Signed-off-by: Steffen Röcker <sroecker@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com> | ```diff
diff --git a/drivers/video/backlight/mbp_nvidia_bl.c b/drivers/video/backlight/mbp_nvidia_bl.c
index 52c780f5db1b..9fb533f6373e 100644
--- a/drivers/video/backlight/mbp_nvidia_bl.c
+++ b/drivers/video/backlight/mbp_nvidia_bl.c
@@ -141,7 +141,7 @@ static const struct dmi_system_id __initdata mbp_device_table[] =... |
47306fc35ec39a5d0715e0a79344d02dffeaeeb2 | Analyze and fix the following issue in the Linux kernel code: backlight: l4f00242t03: Fix regulators handling code in remove function | Problem Details:
Simple swap of regulator free
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com> | ```diff
diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c
index bcdb12c93efd..1dafec85ddc0 100644
--- a/drivers/video/backlight/l4f00242t03.c
+++ b/drivers/video/backlight/l4f00242t03.c
@@ -222,9 +222,9 @@ static int __devexit l4f00242t03_remove(struct spi_device *spi)
gpio_fr... |
3f43f8b2ad9035c5440d65681079f4d80542d21f | Analyze and fix the following issue in the Linux kernel code: backlight: fix adp8860_bl build errors | Problem Details:
Add slab.h to fix part of build.
Add a parameter in backlight_device_register() call to fix part of build.
drivers/video/backlight/adp8860_bl.c:215: error: implicit declaration of function 'kzalloc'
drivers/video/backlight/adp8860_bl.c:215: warning: assignment makes pointer from integer without a cast... | ```diff
diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
index 3c449d2f68b9..99d14ed88571 100644
--- a/drivers/video/backlight/adp8860_bl.c
+++ b/drivers/video/backlight/adp8860_bl.c
@@ -16,6 +16,7 @@
#include <linux/fb.h>
#include <linux/backlight.h>
#include <linux/leds.h>
+... |
9844ce0501b03843c44156d6e36afb80e847c974 | Analyze and fix the following issue in the Linux kernel code: backlight: 88pm860x_bl - potential memory leak | Problem Details:
I added a kfree() on the error path. I don't really expect it to affect
anyone, but it's easy and makes the static checkers happy.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com> | ```diff
diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c
index 68d2518fadaa..78d8fde9fe8f 100644
--- a/drivers/video/backlight/88pm860x_bl.c
+++ b/drivers/video/backlight/88pm860x_bl.c
@@ -222,6 +222,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev)
data->p... |
1e653accf7d2b02e75af550963b261b3243ac20e | Analyze and fix the following issue in the Linux kernel code: leds: leds-ss4200: fix led_classdev_unregister twice in error handling | Problem Details:
In current implementation, if device_create_file failed in register_nasgpio_led,
led_classdev_unregister will be executed twice.
( in register_nasgpio_led it calls led_classdev_unregister before return and in nas_gpio_init out_err )
This patch fixes it by only unregistering those that were successfull... | ```diff
diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c
index 51477ec71391..a688293abd0b 100644
--- a/drivers/leds/leds-ss4200.c
+++ b/drivers/leds/leds-ss4200.c
@@ -534,7 +534,7 @@ static int __init nas_gpio_init(void)
set_power_light_amber_noblink();
return 0;
out_err:
- for (; i >= 0; i--)
... |
14e40f644b020d473415342461b7c62e3bb5e312 | Analyze and fix the following issue in the Linux kernel code: leds: Add LED driver for the Soekris net5501 board | Problem Details:
It is based on the previously submitted code by Alessandro Zummo, but is
changed to use the new GPIO driver with 2.6.33, and the driver has been
moved to drivers/leds where it belongs.
[akpm@linux-foundation.org: coding-style fixes]
[randy.dunlap@oracle.com: fix net5501 kconfig]
Signed-off-by: Bjarke ... | ```diff
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 505eb64c329c..ecb6932c3636 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -67,6 +67,16 @@ config LEDS_NET48XX
This option enables support for the Soekris net4801 and net4826 error
LED.
+config LEDS_NET5501
+ tristate "LED ... |
98652efceab8f0b1a3a1b2750544a395ec056115 | Analyze and fix the following issue in the Linux kernel code: leds: 88pm860x - fix checking in probe function | Problem Details:
Improve device and platform data checks in probe function.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com> | ```diff
diff --git a/drivers/leds/leds-88pm860x.c b/drivers/leds/leds-88pm860x.c
index 16a60c06c96c..b7677106cff8 100644
--- a/drivers/leds/leds-88pm860x.c
+++ b/drivers/leds/leds-88pm860x.c
@@ -256,8 +256,10 @@ static int pm860x_led_probe(struct platform_device *pdev)
if (pdev->dev.parent->platform_data) {
pm860x... |
459f2a32024b46b7f144999738112eb88654eb0f | Analyze and fix the following issue in the Linux kernel code: ARM: S5PC100: Fixup cross tree merge problems | Problem Details:
The commit 45c79433c02b8fe7b8a1cbf60548a9798d0502ed got things building
but then commit 17d2f877ae8b68b09bf88a9949ee64fbbda5ee10 and others
where merged in from a seperate tree and this has resulted from a build
failure due to the redefinition of IRQ_EINT().
Fix this by merging a new commit.
Signed-o... | ```diff
diff --git a/arch/arm/mach-s5pc100/include/mach/regs-gpio.h b/arch/arm/mach-s5pc100/include/mach/regs-gpio.h
index 763edebdd577..dd6295e1251d 100644
--- a/arch/arm/mach-s5pc100/include/mach/regs-gpio.h
+++ b/arch/arm/mach-s5pc100/include/mach/regs-gpio.h
@@ -60,12 +60,9 @@
#define S5PC100EINT30PEND (S5P_VA_GP... |
5fae405838527c136a920eb7b9a2edfc5d2b6198 | Analyze and fix the following issue in the Linux kernel code: ARM: S5P: Fix the platform external interrupt issues. | Problem Details:
This patch does the following:
1. Corrects the common platform code for external interrupts for using the
VIC mask/unmask bits also.
2. Moves the common defines related to external interrupt for plat-s5p
to common files.
3. Based on the new common defines, corresponding changes are made in the
... | ```diff
diff --git a/arch/arm/mach-s5p6440/include/mach/irqs.h b/arch/arm/mach-s5p6440/include/mach/irqs.h
index a4b9b40d18f2..911854d9ad42 100644
--- a/arch/arm/mach-s5p6440/include/mach/irqs.h
+++ b/arch/arm/mach-s5p6440/include/mach/irqs.h
@@ -72,7 +72,14 @@
#define S5P_IRQ_EINT_BASE (S5P_IRQ_VIC1(31) + 6)
#defi... |
ed0f160ad674407adb3aba499444f71c83289c63 | Analyze and fix the following issue in the Linux kernel code: ipmr: off by one in __ipmr_fill_mroute() | Problem Details:
This fixes a smatch warning:
net/ipv4/ipmr.c +1917 __ipmr_fill_mroute(12) error: buffer overflow
'(mrt)->vif_table' 32 <= 32
The ipv6 version had the same issue.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 45889103b3e2..856123fe32f9 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1911,7 +1911,7 @@ static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb,
struct rtattr *mp_head;
/* If cache is unresolved, don't try to parse IIF and OI... |
7e3a1f4ab1a550dd6cf62a23aabedbad0d23e2d7 | Analyze and fix the following issue in the Linux kernel code: IB/qib: Fix undefined symbol error when CONFIG_PCI_MSI=n | Problem Details:
This patch fixes a compile error saying qib_init_iba6120_funcs() is
undefined when CONFIG_PCI_MSI is not defined. Thanks to Randy Dunlap
<randy.dunlap@oracle.com> for finding this and suggesting the fix.
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@c... | ```diff
diff --git a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c
index 7b6549fd429b..1eadadc13da8 100644
--- a/drivers/infiniband/hw/qib/qib_iba6120.c
+++ b/drivers/infiniband/hw/qib/qib_iba6120.c
@@ -3475,14 +3475,6 @@ struct qib_devdata *qib_init_iba6120_funcs(struct pci_dev *pde... |
2101d6f7ac791e87a274371a07a408f74e40ec49 | Analyze and fix the following issue in the Linux kernel code: agp: amd64, fix pci reference leaks | Problem Details:
Stanse found pci reference leaks in uli_agp_init and nforce3_agp_init
initialization functions.
The PCI devices are bridges, so it's not critical, but still worth fixing.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@lin... | ```diff
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 67ea3a60de74..70312da4c968 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -384,7 +384,7 @@ static int __devinit uli_agp_init(struct pci_dev *pdev)
{
u32 httfea,baseaddr,enuscr;
struct pci_dev *de... |
7cc2835083aedfde42de02301005a5555e00c4b1 | Analyze and fix the following issue in the Linux kernel code: crypto: mv_cesa - fixup error handling in mv_probe() | Problem Details:
The error handling in mv_probe() was a bit messed up. There were some
gotos to the wrong labels so it ended up releasing stuff that that hadn't
been aquired and not releasing stuff that was meant to be released. I
shuffled it around a bit to fix it and make it clearer.
Signed-off-by: Dan Carpenter ... | ```diff
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
index e095422b58dd..7d279e578df5 100644
--- a/drivers/crypto/mv_cesa.c
+++ b/drivers/crypto/mv_cesa.c
@@ -1055,20 +1055,20 @@ static int mv_probe(struct platform_device *pdev)
cp->queue_th = kthread_run(queue_manag, cp, "mv_crypto");
if (IS_ER... |
527b9525256f97ad8d092bbfc8fdc3c5409f4a4d | Analyze and fix the following issue in the Linux kernel code: n2_crypto: Fix MAU kmem_cache name. | Problem Details:
Both the CWQ and MAU caches unintentionally had that same name.
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index 1a5b1e709d67..5613b8affe11 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -1449,7 +1449,7 @@ static int queue_cache_init(void)
{
if (!queue_cache[HV_NCS_QTYPE_MAU - 1])
queue_cache[HV_NCS_QTYPE_MAU - 1] =
- k... |
ff6c7341e0bc486c3e1b369ab7f3b325b98600d3 | Analyze and fix the following issue in the Linux kernel code: n2_crypto: Fix build after of_device/of_platform_driver changes. | Problem Details:
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index 8566be832f51..1a5b1e709d67 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -1398,7 +1398,7 @@ static int find_devino_index(struct of_device *dev, struct spu_mdesc_info *ip,
intr = ip->ino_table[i].intr;
- dev_in... |
4a638b4e38234233f5c7e6705662fbc0b58d80c2 | Analyze and fix the following issue in the Linux kernel code: drm/edid: Allow non-fatal checksum errors in CEA blocks | Problem Details:
Switches will try to update the topology address and not correctly fix
up the checksum, so just let it slide.
https://bugs.freedesktop.org/28229
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index f569ae88ab38..c1981861bbbd 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -147,7 +147,10 @@ drm_edid_block_valid(u8 *raw_edid)
csum += raw_edid[i];
if (csum) {
DRM_ERROR("EDID checksum is invalid, rem... |
f925b1303e0672effc78547353bd2ddfe11f5b5f | Analyze and fix the following issue in the Linux kernel code: drivers/net/usb/asix.c: Fix pointer cast. | Problem Details:
Stephen Rothwell reports the following new warning:
drivers/net/usb/asix.c: In function 'asix_rx_fixup':
drivers/net/usb/asix.c:325: warning: cast from pointer to integer of different size
drivers/net/usb/asix.c:354: warning: cast from pointer to integer of different size
The code just cares about th... | ```diff
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 31b73310ec77..1f802e90474c 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -322,7 +322,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
size = (u16) (header & 0x0000ffff);
if ((skb->len) - ((size... |
dd131e76e562fa0c6f9dd53130e8d08d39a0b62c | Analyze and fix the following issue in the Linux kernel code: be2net: Bug fix to avoid disabling bottom half during firmware upgrade. | Problem Details:
Certain firmware commands/operations to upgrade firmware could take several
seconds to complete. The code presently disables bottom half during these
operations which could lead to unpredictable behaviour in certain cases. This
patch now does all firmware upgrade operations asynchronously using a
compl... | ```diff
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 373c1a563474..b46be490cd2a 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -283,6 +283,8 @@ struct be_adapter {
u8 port_type;
u8 transceiver;
u8 generation; /* BladeEngine ASIC generation */
+ u32 flash_status;
+ struc... |
e513480e28cdfd868755f05c1a654fcfcee58070 | Analyze and fix the following issue in the Linux kernel code: Phonet: fix potential use-after-free in pep_sock_close() | Problem Details:
sk_common_release() might destroy our last reference to the socket.
So an extra temporary reference is needed during cleanup.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/phonet/pep.c b/net/phonet/pep.c
index af4d38bc3b22..7b048a35ca58 100644
--- a/net/phonet/pep.c
+++ b/net/phonet/pep.c
@@ -626,6 +626,7 @@ static void pep_sock_close(struct sock *sk, long timeout)
struct pep_sock *pn = pep_sk(sk);
int ifindex = 0;
+ sock_hold(sk); /* keep a reference after... |
fe501f1e89cd460793152f500bf25d81d463515b | Analyze and fix the following issue in the Linux kernel code: x86, k8: Fix section mismatch for powernowk8_exit() | Problem Details:
Fix the following warning:
"WARNING: arch/x86/kernel/built-in.o(.exit.text+0x72):
Section mismatch in reference from the function powernowk8_exit() to the variable .cpuinit.data:cpb_nb
The function __exit powernowk8_exit() references a variable
__cpuinitdata cpb_nb. This is often seen when error hand... | ```diff
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index 6f3dc8fbbfdc..7ec2123838e6 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -1497,8 +1497,8 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
... |
021f80cc701a31c0962de7f1cc96b16309140b1f | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix dB scales for WM8990 | Problem Details:
These should be regular, not linear.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org | ```diff
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 4caa509b853a..731bc0775f44 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -108,21 +108,21 @@ static const u16 wm8990_reg[] = {
#define wm8990_reset(c) snd_soc_write(c, WM8990_RESET, 0)
-static const DECLARE_... |
9cd8bd8a2c29dc36142c03deadafcb806b0c14f5 | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix dB scales for WM8400 | Problem Details:
These scales should be regular, not linear.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org | ```diff
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
index a7506ae2b8cc..535db3bff866 100644
--- a/sound/soc/codecs/wm8400.c
+++ b/sound/soc/codecs/wm8400.c
@@ -106,21 +106,21 @@ static void wm8400_codec_reset(struct snd_soc_codec *codec)
wm8400_reset_codec_reg_cache(wm8400->wm8400);
}
-stati... |
52e39d22c87b548d632e10a9e30ba3273d916434 | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix dB scales for WM835x | Problem Details:
These should be regular rather than linear scales.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org | ```diff
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index e5a48da65f82..c342c2c9fb49 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -425,8 +425,8 @@ static const struct soc_enum wm8350_enum[] = {
SOC_ENUM_SINGLE(WM8350_INPUT_MIXER_VOLUME, 15, 2, wm8350_lr),
};
-sta... |
578454ff7eab61d13a26b568f99a89a2c9edc881 | Analyze and fix the following issue in the Linux kernel code: driver core: add devname module aliases to allow module on-demand auto-loading | Problem Details:
This adds:
alias: devname:<name>
to some common kernel modules, which will allow the on-demand loading
of the kernel module when the device node is accessed.
Ideally all these modules would be compiled-in, but distros seems too
much in love with their modularization that we need to cover the common
... | ```diff
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index 53d64d382343..1d83d124056c 100644
--- a/Documentation/devices.txt
+++ b/Documentation/devices.txt
@@ -443,6 +443,8 @@ Your cooperation is appreciated.
231 = /dev/snapshot System memory snapshot device
232 = /dev/kvm Kernel-based vir... |
3014420b6b5d0a6483cf5e56c10df180a33e957e | Analyze and fix the following issue in the Linux kernel code: ieee1394: schedule for removal | Problem Details:
All application domains that are supported by the old ieee1394 driver
stack are supported by the newer firewire driver stack too. There is
now good and extensive experience with the newer stack from deployment
in Fedora since F7 as well as by enthusiast users of other
distributions.
The new drivers h... | ```diff
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 0a46833c1b76..88a216d18092 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -542,3 +542,13 @@ Why: Duplicate functionality with the gspca_zc3xx dr... |
8e63d7795e30b4091e303cc8c060509bd8eea742 | Analyze and fix the following issue in the Linux kernel code: timers: Fix slack calculation really | Problem Details:
commit f00e047ef (timers: Fix slack calculation for expired timers)
fixed the issue of slack on expired timers only partially. Linus
noticed that jiffies is volatile so it is reloaded twice, which
generates bad code.
But its worse. This can defeat the time_after() check if jiffies are
incremented betw... | ```diff
diff --git a/kernel/timer.c b/kernel/timer.c
index be394af5bc22..d8decb8d46b0 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -747,16 +747,19 @@ EXPORT_SYMBOL(mod_timer_pending);
static inline
unsigned long apply_slack(struct timer_list *timer, unsigned long expires)
{
- unsigned long expires_limit, mask... |
b406e6103baa3da85950f22d3d46d21a8da654c5 | Analyze and fix the following issue in the Linux kernel code: ALSA: pcm: fix delta calculation at boundary wraparound | Problem Details:
In the cleanup of the hw_ptr update functions in 2.6.33, the calculation
of the delta value was changed to use the modulo operator to protect
against a negative difference due to the pointer wrapping around at the
boundary.
However, the ptr variables are unsigned, so a negative difference would
result... | ```diff
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 22aff180dd1f..e9d98be190c5 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -345,7 +345,9 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
new_hw_ptr = hw_base + pos;
}
__delta:
- delta = (new_hw_p... |
9ef04066b3e7c51ed7edc6010ac039f18f9f3617 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda_intel: fix handling of non-completion stream interrupts | Problem Details:
Check that the interrupt raised for a stream is actually a buffer
completion interrupt before handling it as one. Otherwise, memory
errors or FIFO xruns would be interpreted as a pointer update and could
break the stream timing.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takas... | ```diff
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 14d895bcf3fe..77e22c2a8caa 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1097,6 +1097,7 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)
struct azx *chip = dev_id;
struct azx_dev *azx_dev;
u32 s... |
57c7ffc9414d79c8ec25800bbdbf8f801b2f148a | Analyze and fix the following issue in the Linux kernel code: ALSA: usb/caiaq: fix Traktor Kontrol X1 ABS_HAT2X axis | Problem Details:
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/usb/caiaq/input.c b/sound/usb/caiaq/input.c
index 8bbfbfd4c658..dcb620796d9e 100644
--- a/sound/usb/caiaq/input.c
+++ b/sound/usb/caiaq/input.c
@@ -171,7 +171,7 @@ static void snd_caiaq_input_read_analog(struct snd_usb_caiaqdev *dev,
input_report_abs(input_dev, ABS_HAT0Y, (buf[4] << 8) | ... |
b17e0969dc184c66ed8934e130344621829484a3 | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix incorrect unlock in nes_process_mac_intr() | Problem Details:
Commit ce6e74f2 ("RDMA/nes: Make nesadapter->phy_lock usage
consistent") introduced a problem where phy_lock was only unlocked
within an if statement and so nes_process_mac_intr() could return with
phy_lock still held. Fix this.
This was discovered because of the sparse warning:
drivers/infiniba... | ```diff
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index bb9c77504fe2..57874a165083 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -2584,7 +2584,6 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
br... |
f9e8894ae5157796dd69249c56062042d02a431d | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix race in scsi_target_reap | Problem Details:
This patch (as1357) fixes a race in SCSI target allocation and
release. Putting a target in the STARGET_DEL state isn't protected by
the host lock, so an old target structure could be reused by a new
device even though it's about to be deleted. The cure is to change
the state while still holding the ... | ```diff
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index c992ecf4e372..a77468cd5a33 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -492,19 +492,20 @@ void scsi_target_reap(struct scsi_target *starget)
struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
unsigne... |
b3230c8b44da5838cf396942d5c1ab19f8e8f720 | Analyze and fix the following issue in the Linux kernel code: ring-buffer: Reset "real_end" when page is filled | Problem Details:
The code to store the "lost events" requires knowing the real end
of the page. Since the 'commit' includes the padding at the end of
a page a "real_end" variable was used to keep track of the end not
including the padding.
If events were lost, the reader can place the count of events in
the padded are... | ```diff
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 7f6059c5aa94..b0702ff78218 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1768,6 +1768,14 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
* must fill the old tail_page with padding.
*/
if (t... |
774610e4f26cb3d9da14a8b5974324c9e51017bd | Analyze and fix the following issue in the Linux kernel code: ath9k: change beacon allocation to prefer the first beacon slot | Problem Details:
This fixes IBSS beacon transmissions without VEOL enabled
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index c8a4558f79ba..77face76e05f 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -274,17 +274,11 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_v... |
bf87eae94880f1b79c2828d8705f0d97e961f168 | Analyze and fix the following issue in the Linux kernel code: auxdisplay: section cleanup in cfag12864bfb driver | Problem Details:
This fixes a two section mismatches and makes remove() __devexit.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org... | ```diff
diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c
index 3fecfb446d90..5ad3bad2b0a5 100644
--- a/drivers/auxdisplay/cfag12864bfb.c
+++ b/drivers/auxdisplay/cfag12864bfb.c
@@ -37,7 +37,7 @@
#define CFAG12864BFB_NAME "cfag12864bfb"
-static struct fb_fix_screeninfo cfag12864bfb... |
49bbd815fd8ba26d0354900b783b767c7f47c816 | Analyze and fix the following issue in the Linux kernel code: fb_defio: fix for non-dirty ptes | Problem Details:
Fix a problem observed while using fb_defio with a short delay on a
PowerPC platform.
It is possible that page_mkclean() is invoked in the deferred io work
function _before_ a PTE has been marked dirty. In this case, the page is
removed from the defio pagelist but page_mkclean() does not write-protec... | ```diff
diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c
index 6113c47e095a..1105a591dcc1 100644
--- a/drivers/video/fb_defio.c
+++ b/drivers/video/fb_defio.c
@@ -155,25 +155,41 @@ static void fb_deferred_io_work(struct work_struct *work)
{
struct fb_info *info = container_of(work, struct fb_info,
... |
0d5b02641faade3dfd376abdcffbd8ccb03c7a91 | Analyze and fix the following issue in the Linux kernel code: sgivwfb: fix sections | Problem Details:
Since the drivers probe call was changed from .init.text to .devinit.text
in commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b ("platform-drivers:
move probe to .devinit.text in drivers/video") the fb_fix_screeninfo and
fb_var_screeninfo structures must be changed from .init.data to
.devinit.data, too.
... | ```diff
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c
index 7a3a5e28eca1..53455f295510 100644
--- a/drivers/video/sgivwfb.c
+++ b/drivers/video/sgivwfb.c
@@ -47,7 +47,7 @@ static int ywrap = 0;
static int flatpanel_id = -1;
-static struct fb_fix_screeninfo sgivwfb_fix __initdata = {
+static struct... |
a8ce4be7d5b99a6338e695b26358abca329735c1 | Analyze and fix the following issue in the Linux kernel code: s3c2410fb: fix sections | Problem Details:
Since the drivers probe calls were changed from .init.text to
.devinit.text in commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b
("platform-drivers: move probe to .devinit.text in drivers/video") all the
function from .init.text should be moved to .devinit.text, too.
The drivers remove calls can also be... | ```diff
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index 2b094dec4a56..46b430978bcc 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -631,7 +631,7 @@ static struct fb_ops s3c2410fb_ops = {
* cache. Once this area is remapped, all virtual memory
* access to the video... |
e88a0f461aeadfe309d36a2a4fac9ffb1b0ed651 | Analyze and fix the following issue in the Linux kernel code: hitfb: fix sections | Problem Details:
Since the drivers probe call was changed from .init.text to .devinit.text
in commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b ("platform-drivers:
move probe to .devinit.text in drivers/video") the fb_fix_screeninfo and
fb_var_screeninfo structures must be changed from .init.data to
.devinit.data, too.
... | ```diff
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
index 393f3f3d3dfe..cfb8d6451014 100644
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -30,14 +30,14 @@
#define WIDTH 640
-static struct fb_var_screeninfo hitfb_var __initdata = {
+static struct fb_var_screeninfo hitfb_var __devinitdata... |
fb6cb3270af8f2ad3dd556906a9c52aa85754849 | Analyze and fix the following issue in the Linux kernel code: fbdev: section cleanup in w100fb | Problem Details:
Fix up the section in the w100fb driver, by moving:
* w100fb_remove() from .text to .devexit.text
* w100_get_xtal_table() from .text to .devinit.text
* w100fb_init() from .devinit.text to .init.text
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Uwe Kleine-König <u.kleine-koen... | ```diff
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
index 31b0e17ed090..e66b8b19ce5d 100644
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -53,7 +53,7 @@ static void w100_update_enable(void);
static void w100_update_disable(void);
static void calc_hsync(struct w100fb_par *par);
static ... |
ad1458464cbbe6935be6e20d70920301733158af | Analyze and fix the following issue in the Linux kernel code: fbdev: section cleanup in vga16fb | Problem Details:
Fix up the sections in the vga16fb driver, by moving:
* the variables vga16_defined and vga16fb
from .init.data to .devinit.data
* vga16fb_setup() from .text to .init.text
* vga16fb_remove() from .text. to .devexit.text
This fixes the following warnings issued by modpost:
WARNING: drivers/video/b... | ```diff
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
index 149c47ac7e93..28ccab44a391 100644
--- a/drivers/video/vga16fb.c
+++ b/drivers/video/vga16fb.c
@@ -65,7 +65,7 @@ struct vga16fb_par {
/* --------------------------------------------------------------------- */
-static struct fb_var_screeni... |
3cc04971661e37e7de6fbf9808ede554b5e1cb4e | Analyze and fix the following issue in the Linux kernel code: fbdev: section cleanup in vfb | Problem Details:
Fix up the section in the vfb driver, by moving the variables vfb_default
and vfb_fix from .init.data to .devinit.data
This fixes the following warnings issued by modpost:
WARNING: drivers/video/vfb.o(.devinit.text+0xf8): Section mismatch in reference from the function vfb_probe() to the variable .in... | ```diff
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c
index 9b5532b4de35..bc67251f1a2f 100644
--- a/drivers/video/vfb.c
+++ b/drivers/video/vfb.c
@@ -78,7 +78,7 @@ static void rvfree(void *mem, unsigned long size)
vfree(mem);
}
-static struct fb_var_screeninfo vfb_default __initdata = {
+static struct fb_... |
e217e6e39f62e47f7e659b715235dbd57df480f8 | Analyze and fix the following issue in the Linux kernel code: fbdev: section cleanup in hgafb | Problem Details:
Fix up the sections in the hgafb driver, by
* moving hga_default_var and hga_fix from .init.data to .devinit.data
* moving hga_detect() from .init.text to .devinit.text
* moving hga_fb_remove() from .text to .devexit.text
This fixes the following warnings issued by modpost:
WARNING: drivers/video/... | ```diff
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c
index 8bbf251f83d9..af8f0f2cc782 100644
--- a/drivers/video/hgafb.c
+++ b/drivers/video/hgafb.c
@@ -106,7 +106,7 @@ static DEFINE_SPINLOCK(hga_reg_lock);
/* Framebuffer driver structures */
-static struct fb_var_screeninfo __initdata hga_default_va... |
bd9b5caf8616501d2ab6f17210b11f81ea7546eb | Analyze and fix the following issue in the Linux kernel code: fbdev: section cleanup in arcfb | Problem Details:
Fix the sections in the arcfb driver, by moving:
* the variables arcfb_fix and arcfb_var from .init.data to .devinit.data
* arcfb_remove() from .text to .devexit.text
This fixes the following warnings issued by modpost:
WARNING: drivers/video/built-in.o(.devinit.text+0x543): Section mismatch in ref... | ```diff
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index 8d406fb689c1..f3d7440f0072 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -80,7 +80,7 @@ struct arcfb_par {
spinlock_t lock;
};
-static struct fb_fix_screeninfo arcfb_fix __initdata = {
+static struct fb_fix_screeninfo arcf... |
6ba8bcd457d9fc793ac9435aa2e4138f571d4ec5 | Analyze and fix the following issue in the Linux kernel code: rtc-cmos: do dev_set_drvdata() earlier in the initialization | Problem Details:
The bug is an oops when dev_get_drvdata() returned null in
cmos_update_irq_enable(). The call tree looks like this:
rtc_dev_ioctl()
=> rtc_update_irq_enable()
=> cmos_update_irq_enable()
It's caused by a race condition in the module initialization. It is
rtc_device_register() which makes... | ```diff
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 96e8e70fbf1e..11b8ea29d2b7 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -719,6 +719,9 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
}
}
+ cmos_rtc.dev = dev;
+ dev_set_drvdata(dev, &cmos_... |
f3bc3189a001ec85c7b1119ad4aa5e39eea0f05e | Analyze and fix the following issue in the Linux kernel code: xen: fix build when SYSRQ is disabled | Problem Details:
Fix build error when CONFIG_MAGIC_SYSRQ is not enabled:
drivers/xen/manage.c:223: error: implicit declaration of function 'handle_sysrq'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: And... | ```diff
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 8943b8ccee1a..07e857b0de13 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -185,6 +185,7 @@ static void shutdown_handler(struct xenbus_watch *watch,
kfree(str);
}
+#ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_handler(struct xenb... |
e0c70b80786296d4f3c35ebe0d52591cebf8f916 | Analyze and fix the following issue in the Linux kernel code: hwmon: add TI ads7871 a/d converter driver | Problem Details:
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Paul Thomas <pthomas8589@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 9be8e1754a0b..6a9ac754ca5d 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -802,6 +802,15 @@ config SENSORS_ADS7828
This driver can also be built as a module. If so, the module
will be called ads7828.
+config SENSORS_A... |
836e2af92503f1642dbc3c3281ec68ec1dd39d2e | Analyze and fix the following issue in the Linux kernel code: crc32: major optimization | Problem Details:
Precompute more crc32 values(0xcc00, 0xcc0000 and 0xcc000000) into tables.
This increases the table size from 1KB to 4KB but the performance benfit
makes it worth it:
28% faster on MPC8321, 266 MHz
2x faster on Core 2 Duo, 3.1GHz
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Joakim ... | ```diff
diff --git a/lib/crc32.c b/lib/crc32.c
index bc5b936e9142..4855995fcde9 100644
--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -48,12 +48,20 @@ MODULE_LICENSE("GPL");
#if CRC_LE_BITS == 8 || CRC_BE_BITS == 8
static inline u32
-crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 *tab)
+crc32_body(u32 ... |
3354957a4f8b9bb4b43625232acdf0626851c82f | Analyze and fix the following issue in the Linux kernel code: checkpatch: add check for too short Kconfig descriptions | Problem Details:
I've seen various new Kconfigs with rather unhelpful one liner
descriptions. Add a Kconfig warning for a minimum length of the Kconfig
help section.
Right now I arbitarily chose 4. The exact value can be debated.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andi Kleen <ak@linux.int... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f2bbea900700..de0f4672cb74 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1382,6 +1382,21 @@ sub process {
ERROR("trailing whitespace\n" . $herevet);
}
+# check for Kconfig help text having a real description
+ if ($r... |
2b2f68b5383ea107295d7f1483256866e2daa1e3 | Analyze and fix the following issue in the Linux kernel code: DYNAMIC_DEBUG: fix documentation errors | Problem Details:
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Florian Ragwitz <rafl@debian.org>
Cc: Jason Baron <jbaron@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index f8c2e1767500..b3cd4de9432b 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -28,7 +28,7 @@ struct _ddebug {
/*
* The flags field controls the behaviour at the callsite.
* The bits here are... |
ea46c8f774f295c45fac48101d54be347d3d453b | Analyze and fix the following issue in the Linux kernel code: dynamic_debug: small cleanup in ddebug_proc_write() | Problem Details:
This doesn't change behavior at all. In the original code, if nwords was
zero then ddebug_parse_query() would return -EINVAL, now we just do it
earlier.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
... | ```diff
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index d6b8b9b1abfe..3df8eb17a607 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -456,7 +456,7 @@ static ssize_t ddebug_proc_write(struct file *file, const char __user *ubuf,
__func__, (int)len);
nwords = ddebug_tokenize(tmpbuf, words,... |
d8521fcc5e0ad3e79bbc4231bb20a6cdc2b50164 | Analyze and fix the following issue in the Linux kernel code: printk_ratelimited(): fix uninitialized spinlock | Problem Details:
ratelimit_state initialization of printk_ratelimited() seems broken. This
fixes it by using DEFINE_RATELIMIT_STATE() to initialize spinlock
properly.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
... | ```diff
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index ea8490d7020e..05f332afc9e0 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -424,14 +424,13 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
* no local ratelimit_state used in the !PRINTK case
*/
#ifdef CONFIG_PRI... |
fc62f2f19edf46c9bdbd1a54725b56b18c43e94f | Analyze and fix the following issue in the Linux kernel code: kernel.h: add pr_warn for symmetry to dev_warn, netdev_warn | Problem Details:
The current logging macros are
pr_<level>, dev_<level>, netdev_<level>, and netif_<level>.
pr_ uses warning, the other use warn.
Standardize these logging macros a bit more by adding pr_warn and
pr_warn_ratelimited.
Right now, there are:
$ for level in emerg alert crit err warn warning notice info ;... | ```diff
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index a2e7c32e17e7..ea8490d7020e 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -389,6 +389,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
#define pr_warning(fmt, .... |
08a82c6872ac1d37cb993a52f1b35f97f48295bd | Analyze and fix the following issue in the Linux kernel code: hvsi: fix messed up error checking getting state name | Problem Details:
Handle out-of-range indices before reading what they refer to. And don't
access the one-past-the-end element of the array either.
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Roel Kluin <roel.kluin@gmail.com>
Cc: Grant Likely <gr... | ```diff
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c
index 793b236c9266..d4b14ff1c4c1 100644
--- a/drivers/char/hvsi.c
+++ b/drivers/char/hvsi.c
@@ -194,10 +194,8 @@ static inline void print_state(struct hvsi_struct *hp)
"HVSI_WAIT_FOR_MCTRL_RESPONSE",
"HVSI_FSP_DIED",
};
- const char *name = state_na... |
4be929be34f9bdeffa40d815d32d7d60d2c7f03b | Analyze and fix the following issue in the Linux kernel code: kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, SHRT_MAX and SHRT_MIN | Problem Details:
- C99 knows about USHRT_MAX/SHRT_MAX/SHRT_MIN, not
USHORT_MAX/SHORT_MAX/SHORT_MIN.
- Make SHRT_MIN of type s16, not int, for consistency.
[akpm@linux-foundation.org: fix drivers/dma/timb_dma.c]
[akpm@linux-foundation.org: fix security/keys/keyring.c]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.... | ```diff
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
index 0172fa3c7a2b..a1bf77c1993f 100644
--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -188,7 +188,7 @@ static void __td_unmap_descs(struct timb_dma_desc *td_desc, bool single)
static int td_fill_desc(struct timb_dma_chan *td_chan, u8 *... |
940370fc86b920b51a34217a1facc3e9e97c2456 | Analyze and fix the following issue in the Linux kernel code: hangcheck-timer: fix x86_32 bugs | Problem Details:
drivers/char/hangcheck-timer.c is doubly broken. When the overflown value
of TIMER_FREQ is abnormally low, it spams the syslog with KERN_CRIT
messages "Hangcheck: hangcheck value past margin!" But whether it happens
or not depends on HZ and lpj in a complex way. People have hit it
occasionally as far... | ```diff
diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c
index 712d9f271aa6..e0249722d25f 100644
--- a/drivers/char/hangcheck-timer.c
+++ b/drivers/char/hangcheck-timer.c
@@ -49,8 +49,9 @@
#include <asm/uaccess.h>
#include <linux/sysrq.h>
#include <linux/timer.h>
+#include <linux/time.h>
... |
e47103b1af5df52fa69e18b14d3012472f78817d | Analyze and fix the following issue in the Linux kernel code: err.h: add __must_check to error pointer handlers | Problem Details:
Add __must_check to error pointer handlers to have the compiler warn about
mistakes like:
if (err)
ERR_PTR(err);
It found two bugs:
Mar 12 Nikula Jani [PATCH] enclosure: fix error path - actually return ERR_PTR() on error
Mar 12 Nikula Jani [PATCH] sunrpc: fix error path - actually return ERR_PTR... | ```diff
diff --git a/include/linux/err.h b/include/linux/err.h
index 1b12642636c7..448afc12c78a 100644
--- a/include/linux/err.h
+++ b/include/linux/err.h
@@ -19,22 +19,22 @@
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
-static inline void *ERR_PTR(long error)
+static inline void * __must_che... |
1f85f87d4f81d1e5a2d502d48316a1bdc5acac0b | Analyze and fix the following issue in the Linux kernel code: cpuidle: add a repeating pattern detector to the menu governor | Problem Details:
Currently, the menu governor uses the (corrected) next timer as key item
for predicting the idle duration.
It turns out that there are specific cases where this breaks down: There
are cases where we have a very repetitive pattern of idle durations, where
the idle period is pretty much the same, for re... | ```diff
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index b81ad9c731ae..52ff8aa63f84 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -21,9 +21,12 @@
#include <linux/math64.h>
#define BUCKETS 12
+#define INTERVALS 8
#define RESOLUTION 1024... |
e9a137cb00d8b0f71c08a9e67d993f53e7713d21 | Analyze and fix the following issue in the Linux kernel code: m68knommu: fix broken use of BUAD_TABLE_SIZE in 68328serial driver | Problem Details:
Commit 8b505ca8e2600eb9e7dd2d6b2682a81717671374 ("serial: 68328serial.c:
remove BAUD_TABLE_SIZE macro") misses one use of BAUD_TABLE_SIZE. So the
resulting 68328serial.c does not compile:
drivers/serial/68328serial.c: In function `m68328_console_setup':
drivers/serial/68328serial.c:1439: error: `BAUD... | ```diff
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c
index 78ed24bb6a35..30463862603b 100644
--- a/drivers/serial/68328serial.c
+++ b/drivers/serial/68328serial.c
@@ -1437,7 +1437,7 @@ int m68328_console_setup(struct console *cp, char *arg)
for (i = 0; i < ARRAY_SIZE(baud_table); i++)
i... |
4eaf3f64397c3db3c5785eee508270d62a9fabd9 | Analyze and fix the following issue in the Linux kernel code: mem-hotplug: fix potential race while building zonelist for new populated zone | Problem Details:
Add global mutex zonelists_mutex to fix the possible race:
CPU0 CPU1 CPU2
(1) zone->present_pages += online_pages;
(2) build_all_zonelists();
(3) ... | ```diff
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index a367ed5bb3fe..0fa491326c4a 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -650,6 +650,7 @@ typedef struct pglist_data {
#include <linux/memory_hotplug.h>
+extern struct mutex zonelists_mutex;
void get_zone_counts(unsig... |
1f522509c77a5dea8dc384b735314f03908a6415 | Analyze and fix the following issue in the Linux kernel code: mem-hotplug: avoid multiple zones sharing same boot strapping boot_pageset | Problem Details:
For each new populated zone of hotadded node, need to update its pagesets
with dynamically allocated per_cpu_pageset struct for all possible CPUs:
1) Detach zone->pageset from the shared boot_pageset
at end of __build_all_zonelists().
2) Use mutex to protect zone->pageset when it's sti... | ```diff
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index f6f2c505fa7e..a367ed5bb3fe 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -652,7 +652,7 @@ typedef struct pglist_data {
void get_zone_counts(unsigned long *active, unsigned long *inactive,
unsigned long *free);
-void ... |
0faa56389c793cda7f967117415717bbab24fe4e | Analyze and fix the following issue in the Linux kernel code: mm: fix NR_SECTION_ROOTS == 0 when using using sparsemem extreme. | Problem Details:
Got this while compiling for ARM/SA1100:
mm/sparse.c: In function '__section_nr':
mm/sparse.c:135: warning: 'root' is used uninitialized in this function
This patch follows Russell King's suggestion for a new calculation for
NR_SECTION_ROOTS. Thanks also to Sergei Shtylyov for pointing out the
exist... | ```diff
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index fd55f725a09e..f6f2c505fa7e 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -981,7 +981,7 @@ struct mem_section {
#endif
#define SECTION_NR_TO_ROOT(sec) ((sec) / SECTIONS_PER_ROOT)
-#define NR_SECTION_ROOTS (NR_MEM_SECTION... |
fd23855e38d2a7275a786238459c070b4e9f7975 | Analyze and fix the following issue in the Linux kernel code: include/linux/gfp.h: fix coding style | Problem Details:
Add parenthesis in a define. This doesn't change functionality.
checkpatch errors:
1) white space fixes
2) add spaces after comas
Signed-off-by: matt mooney <mfm@muteddisk.com>
Cc: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvald... | ```diff
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 474887eac51f..975609cb8548 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -101,7 +101,7 @@ struct vm_area_struct;
__GFP_NORETRY|__GFP_NOMEMALLOC)
/* Control slab gfp mask during early boot */
-#define GFP_BOOT_MASK __GFP_BITS_MAS... |
263ff5d8e82e577202d2b8393585b0e2436b7ffc | Analyze and fix the following issue in the Linux kernel code: include/linux/gfp.h: spelling fixes | Problem Details:
Fix minor spelling errors in a few comments; no code changes.
Signed-off-by: matt mooney <mfm@muteddisk.com>
Cc: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 4c6d41333f98..474887eac51f 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -15,7 +15,7 @@ struct vm_area_struct;
* Zone modifiers (see linux/mmzone.h - low three bits)
*
* Do not put any conditional on these. If necessary modify th... |
cf23422b9d76215316855253da491d4c9f294372 | Analyze and fix the following issue in the Linux kernel code: cpu/mem hotplug: enable CPUs online before local memory online | Problem Details:
Enable users to online CPUs even if the CPUs belongs to a numa node which
doesn't have onlined local memory.
The zonlists(pg_data_t.node_zonelists[]) of a numa node are created either
in system boot/init period, or at the time of local memory online. For a
numa node without onlined local memory, its ... | ```diff
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 35b07b773e6c..864035fb8f8a 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -202,6 +202,7 @@ static inline int is_mem_section_removable(unsigned long pfn,
}
#endif /* CONFIG_MEMORY_HOTREMOVE *... |
ec95f53aa6ed62ba68660cb19c8474ebe9025cce | Analyze and fix the following issue in the Linux kernel code: mm: introduce free_pages_prepare() | Problem Details:
free_hot_cold_page() and __free_pages_ok() have very similar freeing
preparation. Consolidate them.
[akpm@linux-foundation.org: fix busted coding style]
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-founda... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 95ad42de5a87..8f4f27841b71 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -620,20 +620,23 @@ static void free_one_page(struct zone *zone, struct page *page, int order,
spin_unlock(&zone->lock);
}
-static void __free_pages_ok(struct page *page, uns... |
5f53e76299ceebd68bdf9495e8ff80db77711236 | Analyze and fix the following issue in the Linux kernel code: vmscan: page_check_references(): check low order lumpy reclaim properly | Problem Details:
If vmscan is under lumpy reclaim mode, it have to ignore referenced bit
for making contenious free pages. but current page_check_references()
doesn't.
Fix it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Rik van Riel <riel@redha... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8e1d72333e8a..cd4a5edf5be2 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -77,6 +77,12 @@ struct scan_control {
int order;
+ /*
+ * Intend to reclaim enough contenious memory rather than to reclaim
+ * enough amount memory. I.e, it's the mode for high order al... |
bf8abe8b926f7546eb763fd2a088fe461dde6317 | Analyze and fix the following issue in the Linux kernel code: readahead.c: fix comment | Problem Details:
Fix a wrong comment over page_cache_async_readahead().
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/mm/readahead.c b/mm/readahead.c
index dfa9a1a03a11..77506a291a2d 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -523,7 +523,7 @@ EXPORT_SYMBOL_GPL(page_cache_sync_readahead);
* @req_size: hint: total size of the read which the caller is performing in
* pagecache pages
*
- * pa... |
5e7719058079a1423ccce56148b0aaa56b2df821 | Analyze and fix the following issue in the Linux kernel code: mm: compaction: add a tunable that decides when memory should be compacted and when it should be reclaimed | Problem Details:
The kernel applies some heuristics when deciding if memory should be
compacted or reclaimed to satisfy a high-order allocation. One of these
is based on the fragmentation. If the index is below 500, memory will not
be compacted. This choice is arbitrary and not based on data. To help
optimise the s... | ```diff
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 56dd29b97a91..5fdbb612aeb8 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -27,6 +27,7 @@ Currently, these files are in /proc/sys/vm:
- dirty_ratio
- dirty_writeback_centisecs
- drop_caches
+- extfrag_t... |
56de7263fcf3eb10c8dcdf8d59a9cec831795f3f | Analyze and fix the following issue in the Linux kernel code: mm: compaction: direct compact when a high-order allocation fails | Problem Details:
Ordinarily when a high-order allocation fails, direct reclaim is entered
to free pages to satisfy the allocation. With this patch, it is
determined if an allocation failed due to external fragmentation instead
of low memory and if so, the calling process will compact until a suitable
page is freed. C... | ```diff
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index ba98cfe0ae15..eed40ec4280b 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -1,15 +1,31 @@
#ifndef _LINUX_COMPACTION_H
#define _LINUX_COMPACTION_H
-/* Return values for compact_zone() */
-#define COMPACT_CO... |
748446bb6b5a9390b546af38ec899c868a9dbcf0 | Analyze and fix the following issue in the Linux kernel code: mm: compaction: memory compaction core | Problem Details:
This patch is the core of a mechanism which compacts memory in a zone by
relocating movable pages towards the end of the zone.
A single compaction run involves a migration scanner and a free scanner.
Both scanners operate on pageblock-sized areas in the zone. The migration
scanner starts at the botto... | ```diff
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
new file mode 100644
index 000000000000..465ca88615ed
--- /dev/null
+++ b/include/linux/compaction.h
@@ -0,0 +1,9 @@
+#ifndef _LINUX_COMPACTION_H
+#define _LINUX_COMPACTION_H
+
+/* Return values for compact_zone() */
+#define COMPACT_CONTINUE ... |
f1a5ab1210579e2d3ac8c0c227645823af5aafb0 | Analyze and fix the following issue in the Linux kernel code: mm: export fragmentation index via debugfs | Problem Details:
The fragmentation fragmentation index, is only meaningful if an allocation
would fail and indicates what the failure is due to. A value of -1 such
as in many of the examples above states that the allocation would succeed.
If it would fail, the value is between 0 and 1. A value tending towards
0 impl... | ```diff
diff --git a/mm/vmstat.c b/mm/vmstat.c
index d3e0fa169f05..23a5899c7461 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -16,6 +16,7 @@
#include <linux/cpu.h>
#include <linux/vmstat.h>
#include <linux/sched.h>
+#include <linux/math64.h>
#ifdef CONFIG_VM_EVENT_COUNTERS
DEFINE_PER_CPU(struct vm_event_state, v... |
d7a5752c0c19750312efab3a2a80d350e11fa4a2 | Analyze and fix the following issue in the Linux kernel code: mm: export unusable free space index via debugfs | Problem Details:
The unusable free space index measures how much of the available free
memory cannot be used to satisfy an allocation of a given size and is a
value between 0 and 1. The higher the value, the more of free memory is
unusable and by implication, the worse the external fragmentation is. For
the most part... | ```diff
diff --git a/mm/vmstat.c b/mm/vmstat.c
index fa12ea3051fb..d3e0fa169f05 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -379,7 +379,50 @@ void zone_statistics(struct zone *preferred_zone, struct zone *z)
}
#endif
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_COMPACTION
+struct contig_page_info {
+ unsigned long free_... |
a8bef8ff6ea15fa4c67433cab0f5f3484574ef7c | Analyze and fix the following issue in the Linux kernel code: mm: migration: avoid race between shift_arg_pages() and rmap_walk() during migration by not migrating temporary stacks | Problem Details:
Page migration requires rmap to be able to find all ptes mapping a page
at all times, otherwise the migration entry can be instantiated, but it
is possible to leave one behind if the second rmap_walk fails to find
the page. If this page is later faulted, migration_entry_to_page() will
call BUG because... | ```diff
diff --git a/fs/exec.c b/fs/exec.c
index e6e94c626c2c..9badbc0bfb1d 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -242,9 +242,10 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
* use STACK_TOP because that can depend on attributes which aren't
* configured yet.
*/
+ BUG_ON(VM_STACK_FLAGS & VM_STACK... |
67b9509b2c68ae38cecb83a239881cb0ddf087dc | Analyze and fix the following issue in the Linux kernel code: mm: migration: do not try to migrate unmapped anonymous pages | Problem Details:
rmap_walk_anon() was triggering errors in memory compaction that look like
use-after-free errors. The problem is that between the page being
isolated from the LRU and rcu_read_lock() being taken, the mapcount of the
page dropped to 0 and the anon_vma gets freed. This can happen during
memory compacti... | ```diff
diff --git a/mm/migrate.c b/mm/migrate.c
index 42a3d24d1107..b114635962dc 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -600,6 +600,17 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
if (PageAnon(page)) {
rcu_read_lock();
rcu_locked = 1;
+
+ /*
+ * If the page has no ma... |
6a60f1b3588aef6ddceaa14192df475d430cce45 | Analyze and fix the following issue in the Linux kernel code: mincore: cleanups | Problem Details:
This fixes some minor issues that bugged me while going over the code:
o adjust argument order of do_mincore() to match the syscall
o simplify range length calculation
o drop superfluous shift in huge tlb calculation, address is page aligned
o drop dead nr_huge calculation
o check pte_none() before pt... | ```diff
diff --git a/mm/mincore.c b/mm/mincore.c
index f77433c20279..1f6574c5167b 100644
--- a/mm/mincore.c
+++ b/mm/mincore.c
@@ -54,7 +54,7 @@ static unsigned char mincore_page(struct address_space *mapping, pgoff_t pgoff)
* all the arguments, we hold the mmap semaphore: we should
* just return the amount of info... |
c0ff7453bb5c7c98e0885fb94279f2571946f280 | Analyze and fix the following issue in the Linux kernel code: cpuset,mm: fix no node to alloc memory when changing cpuset's mems | Problem Details:
Before applying this patch, cpuset updates task->mems_allowed and
mempolicy by setting all new bits in the nodemask first, and clearing all
old unallowed bits later. But in the way, the allocator may find that
there is no node to alloc memory.
The reason is that cpuset rebinds the task's mempolicy, i... | ```diff
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index a73454aec333..20b51cab6593 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -86,9 +86,44 @@ extern void rebuild_sched_domains(void);
extern void cpuset_print_task_mems_allowed(struct task_struct *p);
+/*
+ * reading curre... |
708c1bbc9d0c3e57f40501794d9b0eed29d10fce | Analyze and fix the following issue in the Linux kernel code: mempolicy: restructure rebinding-mempolicy functions | Problem Details:
Nick Piggin reported that the allocator may see an empty nodemask when
changing cpuset's mems[1]. It happens only on the kernel that do not do
atomic nodemask_t stores. (MAX_NUMNODES > BITS_PER_LONG)
But I found that there is also a problem on the kernel that can do atomic
nodemask_t stores. The pr... | ```diff
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 1cc966cd3e5f..7b9ef6bf45aa 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -23,6 +23,13 @@ enum {
MPOL_MAX, /* always last member of enum */
};
+enum mpol_rebind_step {
+ MPOL_REBIND_ONCE, /* do rebind work a... |
6eb27e1fdf5781719a3d2e90e6c89fa012135c62 | Analyze and fix the following issue in the Linux kernel code: mempolicy: remove case MPOL_INTERLEAVE from policy_zonelist() | Problem Details:
In policy_zonelist() mode MPOL_INTERLEAVE shouldn't happen, so fall
through to BUG() instead of break to return. I also fixed the comment.
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Lee Schermerhorn <lee.schermerh... | ```diff
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index ad500f3b12bf..d97355b744ab 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1441,15 +1441,13 @@ static struct zonelist *policy_zonelist(gfp_t gfp, struct mempolicy *policy)
/*
* Normally, MPOL_BIND allocations are node-local within the
* allowed ... |
6dda9d55bf545013597724bf0cd79d01bd2bd944 | Analyze and fix the following issue in the Linux kernel code: page allocator: reduce fragmentation in buddy allocator by adding buddies that are merging to the tail of the free lists | Problem Details:
In order to reduce fragmentation, this patch classifies freed pages in two
groups according to their probability of being part of a high order merge.
Pages belonging to a compound whose next-highest buddy is free are more
likely to be part of a high order merge in the near future, so they will
be adde... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a6326c71b663..596180fedd3a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -475,6 +475,8 @@ static inline void __free_one_page(struct page *page,
int migratetype)
{
unsigned long page_idx;
+ unsigned long combined_idx;
+ struct page *buddy;
if... |
1f0a738868cbfe20ae53a00b7c302c04ef7ab8fc | Analyze and fix the following issue in the Linux kernel code: xtensa: includecheck fix: vectors.S | Problem Details:
fix the following 'make includecheck' warnings:
arch/xtensa/kernel/vectors.S: asm/processor.h is included more than once.
arch/xtensa/kernel/vectors.S: asm/ptrace.h is included more than once.
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Si... | ```diff
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S
index 74a7518faf16..70066e3582d0 100644
--- a/arch/xtensa/kernel/vectors.S
+++ b/arch/xtensa/kernel/vectors.S
@@ -44,14 +44,12 @@
#include <linux/linkage.h>
#include <asm/ptrace.h>
-#include <asm/ptrace.h>
#include <asm/current.h>
#i... |
7873ca4e4401f0ecd8868bf1543113467e6bae61 | Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: fix system crash when reading sysfs fc_host statistics | Problem Details:
The port data structure related to fc_host statistics collection is
not initialized. This causes system crash when reading the fc_host
statistics. The fix is to initialize port structure during driver
attach.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.... | ```diff
diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c
index 0c08e185a766..3a7b3f88932f 100644
--- a/drivers/scsi/bfa/bfa_core.c
+++ b/drivers/scsi/bfa/bfa_core.c
@@ -84,11 +84,32 @@ bfa_cfg_get_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *meminfo)
for (i = 0; hal_mods[i]; i++)
... |
4aa0edd294f69e3100973a0ecfa1e6b5ab42d83a | Analyze and fix the following issue in the Linux kernel code: fuse: remove unneeded variable | Problem Details:
"map" isn't needed any more after: 0bd87182d3ab18 "fuse: fix kunmap in
fuse_ioctl_copy_user"
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> | ```diff
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index a9f5e137f1d3..4172bfee0f1a 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1580,9 +1580,9 @@ static int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov,
while (iov_iter_count(&ii)) {
struct page *page = pages[page_idx++];
size_t todo = ... |
6b9c88e2a3961346db1a23d967585af16ff33f05 | Analyze and fix the following issue in the Linux kernel code: CRISv10: Whitespace fixes for hw_settings.S | Problem Details:
Remove trailing whitespace.
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> | ```diff
diff --git a/arch/cris/arch-v10/lib/hw_settings.S b/arch/cris/arch-v10/lib/hw_settings.S
index 56905aaa7b6e..c09f19f478a5 100644
--- a/arch/cris/arch-v10/lib/hw_settings.S
+++ b/arch/cris/arch-v10/lib/hw_settings.S
@@ -1,13 +1,11 @@
/*
- * $Id: hw_settings.S,v 1.1 2001/12/17 13:59:27 bjornw Exp $
- *
* This... |
2f941a1be362cc2966ccb63cf15ccdfdb12a5a69 | Analyze and fix the following issue in the Linux kernel code: CRISv10: Trivial fixes. | Problem Details:
- Removed CVS id tag.
- Formatting fixes
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> | ```diff
diff --git a/arch/cris/arch-v10/lib/dmacopy.c b/arch/cris/arch-v10/lib/dmacopy.c
index e5fb44f505c5..49f5b8ca5b47 100644
--- a/arch/cris/arch-v10/lib/dmacopy.c
+++ b/arch/cris/arch-v10/lib/dmacopy.c
@@ -1,5 +1,4 @@
-/* $Id: dmacopy.c,v 1.1 2001/12/17 13:59:27 bjornw Exp $
- *
+/*
* memcpy for large blocks, u... |
d708b41c96f404b8bb572f39973bbdf6d99d5f4b | Analyze and fix the following issue in the Linux kernel code: CRISv32: Fix RS485 port 4 CD Kconfig item. | Problem Details:
The Kconfig item for port 4 CD was controlled by the same
Kconfig item as for port 3.
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> | ```diff
diff --git a/arch/cris/arch-v32/drivers/Kconfig b/arch/cris/arch-v32/drivers/Kconfig
index fdf3faafca99..a2dd740c5907 100644
--- a/arch/cris/arch-v32/drivers/Kconfig
+++ b/arch/cris/arch-v32/drivers/Kconfig
@@ -360,7 +360,7 @@ config ETRAX_SER4_DSR_BIT
string "Ser 4 DSR bit (empty = not used)"
depends on ET... |
bbabb158f0e9d41174ae5c2183a8e4f981daf6ce | Analyze and fix the following issue in the Linux kernel code: power_supply: Fix regression for 'type' property | Problem Details:
Commit 5f487cd34f4337f9bc27ca19da72a39d1b0a0ab4 (power_supply: Use
attribute groups) causes a regression the power supply core does not
export the 'type' attribute anymore.
POWER_SUPPLY_PROP_TYPE is handled by the power supply core without the
low-level driver, so power_supply_attr_is_visible() must a... | ```diff
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index 6a86cdfd79fa..9d30eeb8c810 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -179,14 +179,16 @@ static mode_t power_supply_attr_is_visible(struct kobject *kobj,
{
struct device... |
87f44bbc246c5244c76a701f8eefba7788bce64a | Analyze and fix the following issue in the Linux kernel code: perf, trace: Fix !x86 build bug | Problem Details:
Patch b7e2ecef92 (perf, trace: Optimize tracepoints by removing
IRQ-disable from perf/tracepoint interaction) made the
unfortunate mistake of assuming the world is x86 only, correct
this.
The problem was that perf_fetch_caller_regs() did
local_save_flags() into regs->flags, and I re-used that to
remov... | ```diff
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index fd4db0db3708..c77586061bcb 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1717,7 +1717,11 @@ void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int ski
*/
r... |
1dcc434b52ff25416b225f6ac229fc775867303a | Analyze and fix the following issue in the Linux kernel code: mc13783-regulator: fix vaild voltage range checking for mc13783_fixed_regulator_set_voltage | Problem Details:
In the case of "min_uV == max_uV == mc13783_regulators[id].voltages[0]",
mc13783_fixed_regulator_set_voltage should return 0 instead of -EINVAL.
This patch also adds a missing ">" character for MODULE_AUTHOR, a trivial fix.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Mark Brown <broonie@opensour... | ```diff
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c
index ad036dd8da13..4597d508a229 100644
--- a/drivers/regulator/mc13783-regulator.c
+++ b/drivers/regulator/mc13783-regulator.c
@@ -440,8 +440,8 @@ static int mc13783_fixed_regulator_set_voltage(struct regulator_dev *rdev... |
47bd53f0e8008294ff58c5b37d713f25a8dc56aa | Analyze and fix the following issue in the Linux kernel code: regulator: fix unset_regulator_supplies() to remove all matches | Problem Details:
Remove all matching consumer supplies, not just the first, to not leave
dangling pointers.
Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> | ```diff
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 2a3494f72465..a50672f33afa 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1013,7 +1013,6 @@ static void unset_regulator_supplies(struct regulator_dev *rdev)
list_del(&node->list);
kfree(node->dev_name);
... |
100fb76f0acfebcb7c72875890b9ef33ff04dc2b | Analyze and fix the following issue in the Linux kernel code: watchdog: s3c2410_wdt - Fix on handling of the request_mem_region fail | Problem Details:
If the request for wdt_mem region fails, this patch modifies the driver
such that, it does not try to release the wdt_mem region on exit.
Signed-off-by: Banajit Goswami <banajit.g@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-b... | ```diff
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index 095cbf38eb5d..300932580ded 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -426,8 +426,7 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev)
wdt_mem = request_mem_region(re... |
7e6811daa662fc4eb87ddfb3ea0ea9d782044157 | Analyze and fix the following issue in the Linux kernel code: iTCO_wdt: fix TCO V1 timeout values and limits | Problem Details:
For TCO V1 devices the programmed timeout was twice too long
because the fact that the TCO V1 timer needs to count down
twice before triggering the watchdog, wasn't accounted for.
Also the timeout values in the module description and error
message were clarified. And the _STS registers are 16 bit
inste... | ```diff
diff --git a/drivers/watchdog/iTCO_vendor_support.c b/drivers/watchdog/iTCO_vendor_support.c
index 5133bca5ccbe..481d1ad43464 100644
--- a/drivers/watchdog/iTCO_vendor_support.c
+++ b/drivers/watchdog/iTCO_vendor_support.c
@@ -101,13 +101,6 @@ static void supermicro_old_pre_stop(unsigned long acpibase)
outl(v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.