id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
f22cf8eb485260ac6e32a614121d44998d83a69a | Analyze and fix the following issue in the Linux kernel code: virtio-blk: fix NULL checking in virtblk_alloc_req() | Problem Details:
Smatch complains about the inconsistent NULL checking here. Fix it to
return NULL on failure.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (fixed accidental deletion) | ```diff
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 2edfb5cef4f2..53b81d59059b 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -90,10 +90,12 @@ static inline struct virtblk_req *virtblk_alloc_req(struct virtio_blk *vblk,
struct virtblk_req *vbr;
vbr = mem... |
33e1afc3d82697599ccc8dc8f2fa44ffff5ae329 | Analyze and fix the following issue in the Linux kernel code: virtio: console: fix error handling in init() function | Problem Details:
If register_virtio_driver() fails, virtio-ports class is not destroyed.
The patch adds error handling of register_virtio_driver().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed... | ```diff
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index e88f84390428..8ab9c3d4bf13 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -2099,7 +2099,17 @@ static int __init init(void)
INIT_LIST_HEAD(&pdrvdata.consoles);
INIT_LIST_HEAD(&pdrvdata.portdevs... |
5b8fa822b71fa91b17c9fb38bcca31e771f7650d | Analyze and fix the following issue in the Linux kernel code: tools: Fix pthread flag for Makefile of trace-agent used by virtio-trace | Problem Details:
pthread flag should not be -lpthread but -pthread using gcc. The -lpthread
links the external multithread library. On the other hand, the -pthread manages
both the gcc's preprocessor and linker to be able to compile with pthread.
Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Sign... | ```diff
diff --git a/tools/virtio/virtio-trace/Makefile b/tools/virtio/virtio-trace/Makefile
index ef3adfce594c..0d2381633475 100644
--- a/tools/virtio/virtio-trace/Makefile
+++ b/tools/virtio/virtio-trace/Makefile
@@ -1,14 +1,13 @@
CC = gcc
-CFLAGS = -O2 -Wall
-LFLAG = -lpthread
+CFLAGS = -O2 -Wall -pthread
all: t... |
8ca84a50e5b39487ea1de8809d0ee1c8474f6a5c | Analyze and fix the following issue in the Linux kernel code: virtio/console: Allocate scatterlist according to the current pipe size | Problem Details:
Allocate scatterlist according to the current pipe size.
This allows splicing bigger buffer if the pipe size has
been changed by fcntl.
Changes in v2:
- Just a minor fix for avoiding a confliction with previous patch.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Amit S... | ```diff
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index b2fc2abedc79..e88f84390428 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -229,7 +229,6 @@ struct port {
bool guest_connected;
};
-#define MAX_SPLICE_PAGES 32
/* This is the very early arch-... |
df555b665367f9de6c04826acc482096f17c243d | Analyze and fix the following issue in the Linux kernel code: netdev: octeon: fix return value check in octeon_mgmt_init_phy() | Problem Details:
In case of error, the function of_phy_connect() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value
check should be replaced with NULL test.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.co... | ```diff
diff --git a/drivers/net/ethernet/octeon/octeon_mgmt.c b/drivers/net/ethernet/octeon/octeon_mgmt.c
index c42bbb16cdae..a688a2ddcfd6 100644
--- a/drivers/net/ethernet/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/octeon/octeon_mgmt.c
@@ -722,10 +722,8 @@ static int octeon_mgmt_init_phy(struct net_device *netde... |
6f13909f4fe9652f189b462c6c98767309000321 | Analyze and fix the following issue in the Linux kernel code: module: fix symbol waiting when module fails before init | Problem Details:
We use resolve_symbol_wait(), which blocks if the module containing
the symbol is still loading. However:
1) The module_wq we use is only woken after calling the modules' init
function, but there are other failure paths after the module is
placed in the linked list where we need to do the same ... | ```diff
diff --git a/kernel/module.c b/kernel/module.c
index 7f2ee45f362c..63cf6e7f1394 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2959,7 +2959,7 @@ static struct module *load_module(void __user *umod,
/* Unlink carefully: kallsyms could be walking list. */
list_del_rcu(&mod->list);
module_bug_cleanup... |
6ede81239e31cfacbb1e2d260530cd80d13cf0db | Analyze and fix the following issue in the Linux kernel code: MIPS: Fix module.c build for 32 bit | Problem Details:
Fixes build failure introduced by "Make most arch asm/module.h files use
asm-generic/module.h" by moving all the RELA processing code to a
separate file to be used only for RELA processing on 64-bit kernels.
CC arch/mips/kernel/module.o
arch/mips/kernel/module.c:250:14: error: 'reloc_handlers_r... | ```diff
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index fdaf65e1a99d..e2c14999839a 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_SYNC_R4K) += sync-r4k.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-$(CONFIG_MODULES) += mips_ksyms.o m... |
92eec78d25aee6bbc9bd295f51c022ddfa80cdd9 | Analyze and fix the following issue in the Linux kernel code: ipvs: SIP fragment handling | Problem Details:
Use the nfct_reasm SKB if available.
Based on part of a patch from: Hans Schillstrom
I have left Hans'es comment in the patch (marked /HS)
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
[ horms@verge.net.au: Fix comment style ]
Signed-off-by: Simon Ho... | ```diff
diff --git a/net/netfilter/ipvs/ip_vs_pe_sip.c b/net/netfilter/ipvs/ip_vs_pe_sip.c
index ee4e2e3cc086..12475ef88daf 100644
--- a/net/netfilter/ipvs/ip_vs_pe_sip.c
+++ b/net/netfilter/ipvs/ip_vs_pe_sip.c
@@ -68,6 +68,7 @@ static int get_callid(const char *dptr, unsigned int dataoff,
static int
ip_vs_sip_fill_p... |
63dca2c0b0e7a92cb39d1b1ecefa32ffda201975 | Analyze and fix the following issue in the Linux kernel code: ipvs: Fix faulty IPv6 extension header handling in IPVS | Problem Details:
IPv6 packets can contain extension headers, thus its wrong to assume
that the transport/upper-layer header, starts right after (struct
ipv6hdr) the IPv6 header. IPVS uses this false assumption, and will
write SNAT & DNAT modifications at a fixed pos which will corrupt the
message.
To fix this, proper... | ```diff
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index c8b2bdbaf91b..29265bf4153e 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -22,6 +22,9 @@
#include <linux/ip.h>
#include <linux/ipv6.h> /* for struct ipv6hdr */
#include <net/ipv6.h>
+#if IS_ENABLED(CONFIG_IPV6)
+#include <linux/net... |
d9f72f359e00a45a6cd7cc2d5121b04b9dc927e1 | Analyze and fix the following issue in the Linux kernel code: Revert "be2net: fix vfs enumeration" | Problem Details:
This reverts commit 51af6d7c1f31e0f3d42c87d53657ec7acb6e3462.
Breaks the build with CONFIG_PCI_ATS not enabled.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 966d9afb652f..84379f4fe837 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1076,7 +1076,7 @@ static int be_set_vf_tx_rate(struct net_device ... |
c072fed95c9855a920c114d7fa3351f0f54ea06e | Analyze and fix the following issue in the Linux kernel code: thermal: Exynos: Fix NULL pointer dereference in exynos_unregister_thermal() | Problem Details:
exynos_unregister_thermal() is functional only when 'th_zone' is not
NULL (ensured by the NULL checks). However, in the event it is NULL, it
gets dereferenced in the for loop. This patch fixes this issue.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> | ```diff
diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
index e84acde9e0bf..fd03e8581afc 100644
--- a/drivers/thermal/exynos_thermal.c
+++ b/drivers/thermal/exynos_thermal.c
@@ -475,11 +475,14 @@ static void exynos_unregister_thermal(void)
{
int i;
- if (th_zone && th_zone->therm_d... |
8dce30c89113e314d29d3b8f362aadff8087fccb | Analyze and fix the following issue in the Linux kernel code: ALSA: snd-usb: fix next_packet_size calls for pause case | Problem Details:
Also fix the calls to next_packet_size() for the pause case. This was
missed in 245baf983 ("ALSA: snd-usb: fix calls to next_packet_size").
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Reported-and-tested-by: Christian Tefzer <ctrefzer@gmx.de>
Cc: stable@kern... | ```diff
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index d6e2bb49c59c..060dccb9ec75 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -197,7 +197,13 @@ static void prepare_outbound_urb(struct snd_usb_endpoint *ep,
/* no data provider, so send silence */
unsigned int offs = 0;
for... |
bc9259a8bae9e814fc1f775a1b3effa13e6ad330 | Analyze and fix the following issue in the Linux kernel code: inetpeer: fix token initialization | Problem Details:
When jiffies wraps around (for example, 5 minutes after the boot, see
INITIAL_JIFFIES) and peer has just been created, now - peer->rate_last can be
< XRLIM_BURST_FACTOR * timeout, so token is not set to the maximum value, thus
some icmp packets can be unexpectedly dropped.
Fix this case by initializin... | ```diff
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index e1e0a4e8fd34..c7527f6b9ad9 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -510,7 +510,10 @@ relookup:
secure_ipv6_id(daddr->addr.a6));
p->metrics[RTAX_LOCK-1] = INETPEER_METRICS_NEW;
p->rate_tokens = 0;
- p->rate_last = 0;
... |
68b3f28c11bf896be32ad2a2e151aaa5f4a7c98e | Analyze and fix the following issue in the Linux kernel code: qlcnic: Fix scheduling while atomic bug | Problem Details:
In the device close path, 'qlcnic_fw_destroy_ctx' and
'qlcnic_poll_rsp' call msleep. But 'qlcnic_fw_destroy_ctx' and
'qlcnic_poll_rsp' are called with 'adapter->tx_clean_lock' spin lock
held resulting in scheduling while atomic bug causing the following
trace.
I observed that the commit 012dc19a45b2b... | ```diff
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
index b8ead696141e..2a179d087207 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
@@ -15,7 +15,7 @@ qlcnic_poll_rsp(struct qlcnic_adapt... |
fd51790949edbbd17633689d4e19fe26d8447764 | Analyze and fix the following issue in the Linux kernel code: trivial select_parent documentation fix | Problem Details:
"Search list for X" sounds like you're trying to find X on a list.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/fs/dcache.c b/fs/dcache.c
index 16521a9f2038..0364af2311f4 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1141,7 +1141,7 @@ rename_retry:
EXPORT_SYMBOL(have_submounts);
/*
- * Search the dentry child list for the specified parent,
+ * Search the dentry child list of the specified parent,
* an... |
f54ba7798848ce1385a71b36a2c997422c82220a | Analyze and fix the following issue in the Linux kernel code: pkt_sched: Fix warning false positives. | Problem Details:
GCC refuses to recognize that all error control flows do in fact
set err to something.
Add an explicit initialization to shut it up.
net/sched/sch_drr.c: In function ‘drr_enqueue’:
net/sched/sch_drr.c:359:11: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
net/sched/... | ```diff
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c
index 9ce0b4fe23ff..71e50c80315f 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -352,7 +352,7 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch)
{
struct drr_sched *q = qdisc_priv(sch);
struct drr_class *cl;
- int err;
+ i... |
e905ed57baa82e15ce9c158a8f1e81f171042504 | Analyze and fix the following issue in the Linux kernel code: bna: Fix warning false positive. | Problem Details:
GCC can't see that in all non-error-return paths we do in fact
set *using_dac to something.
Add an explicit initialization to remove this warning:
drivers/net/ethernet/brocade/bna/bnad.c: In function ‘bnad_pci_probe’:
drivers/net/ethernet/brocade/bna/bnad.c:3079:5: warning: ‘using_dac’ may be used un... | ```diff
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index b441f33258e7..ce1eac529470 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -3268,6 +3268,7 @@ bnad_pci_probe(struct pci_dev *pdev,
* Output : using_dac = ... |
4b7cc7fc26598914ba202d04d4196efb26b22e69 | Analyze and fix the following issue in the Linux kernel code: nf_defrag_ipv6: fix oops on module unloading | Problem Details:
fix copy-paste error introduced in linux-next commit
"ipv6: add a new namespace for nf_conntrack_reasm"
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Amerigo Wang <amwang@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Acked-by: Cong Wang <amwang@redhat.com>
Signed-off-by: Dav... | ```diff
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 1af12fde08df..18bd9bbbd1c6 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -106,7 +106,7 @@ static int __net_init nf_ct_frag6_sysctl_register(struct net *net... |
51af6d7c1f31e0f3d42c87d53657ec7acb6e3462 | Analyze and fix the following issue in the Linux kernel code: be2net: fix vfs enumeration | Problem Details:
Current VFs enumeration algorithm used in be_find_vfs does not take domain
number into the match. The match found in igb/ixgbe is more elegant and
safe.
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 84379f4fe837..966d9afb652f 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1076,7 +1076,7 @@ static int be_set_vf_tx_rate(struct net_device ... |
d208328765a0ab425e36b5b828285f3337a85451 | Analyze and fix the following issue in the Linux kernel code: gre: fix handling of key 0 | Problem Details:
GRE driver incorrectly uses zero as a flag value. Zero is a perfectly
valid value for key, and the tunnel should match packets with no key only
with tunnels created without key, and vice versa.
This is a slightly visible change since previously it might be possible to
construct a working tunnel that ... | ```diff
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index f233c1da2077..0d4c3832d490 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -214,11 +214,25 @@ static struct rtnl_link_stats64 *ipgre_get_stats64(struct net_device *dev,
return tot;
}
+/* Does key in tunnel parameters match packet */
+static... |
a3cff128c970da8400875c8893d68ac735e783fb | Analyze and fix the following issue in the Linux kernel code: smsc75xx: fix resume after device reset | Problem Details:
On some systems this device fails to properly resume after suspend,
this patch fixes it by running the usbnet_resume handler.
I suspect this also fixes this bug:
http://code.google.com/p/chromium-os/issues/detail?id=31871
Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by... | ```diff
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index f5ab6e613ec8..376143e8a1aa 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -1253,6 +1253,7 @@ static struct usb_driver smsc75xx_driver = {
.probe = usbnet_probe,
.suspend = usbnet_suspend,
.resume = us... |
1648a22b16ab05bd99dd8e2f33ca80bbcea60031 | Analyze and fix the following issue in the Linux kernel code: cxgb4: Inform caller if driver didn't upgrade firmware | Problem Details:
If a card had already been initialized, on reloading cxgb4 driver firmware
required an upgrade but the upgrade did not happen. In that case a mailbox
timeout would occur during T4 configuration file stuff. The fix is to let the
caller know the firmware was not upgraded so a reset would be issued before... | ```diff
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index b9cd08df39b3..a3f866d5b8f1 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -933,7 +933,13 @@ static int upgrade_fw(struct ada... |
52367a763d8046190754ab43743e42638564a2d1 | Analyze and fix the following issue in the Linux kernel code: cxgb4/cxgb4vf: Code cleanup to enable T4 Configuration File support | Problem Details:
This patch adds new enums and macros to enable T4 configuration file support. It
also removes duplicate macro definitions.
It fixes the build failure in cxgb4vf driver introduced because of old macro
definition removal.
It also performs SGE initialization based on T4 configuration file is provided
or... | ```diff
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
index 7de740a8b764..ae040cf255a4 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
@@ -315,6 +315,9 @@ enum { /* adapter fla... |
3eb4afbfceb44750d9afb832e6c992adec9fc571 | Analyze and fix the following issue in the Linux kernel code: cxgb4: Fix incorrect values for MEMWIN*_APERTURE and MEMWIN*_BASE | Problem Details:
Signed-off-by: Jay Hernandez <jay@chelsio.com>
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
index ec2dafe8ae5b..f3fe23669f8a 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
@@ -67,12 +67,12 @@ enum {
};
enum {
- MEMWIN0_APERTURE = 65536,
- ME... |
9019205732838d47fb3bcf021d894853e8c3489b | Analyze and fix the following issue in the Linux kernel code: sparc64: Fix comment type in NG4 copy from user. | Problem Details:
Noticed by Greg Onufer.
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/arch/sparc/lib/NG4copy_from_user.S b/arch/sparc/lib/NG4copy_from_user.S
index c8e98307ef59..fd9f903ffa32 100644
--- a/arch/sparc/lib/NG4copy_from_user.S
+++ b/arch/sparc/lib/NG4copy_from_user.S
@@ -1,4 +1,4 @@
-/* NG4copy_from_user.S: Niagara-2 optimized copy from userspace.
+/* NG4copy_from_user.S... |
6ed93dc6427d14cdfe0b272cc0a9ee4685ce9ad7 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Use %pMR in debug instead of batostr | Problem Details:
Instead of old unsafe batostr function use %pMR print specifier
for printing Bluetooth addresses in debug and error statements.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.... | ```diff
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c
index 4a6620bc1570..a5b639702637 100644
--- a/net/bluetooth/bnep/core.c
+++ b/net/bluetooth/bnep/core.c
@@ -182,8 +182,7 @@ static int bnep_ctrl_set_mcfilter(struct bnep_session *s, u8 *data, int len)
a2 = data;
data += ETH_ALEN;
- B... |
392f44d3e7894f6fe314b85b4a1611b7b1d98226 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix two warnings in BT_DBG | Problem Details:
We just need to use the right modifiers
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> | ```diff
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c
index 47565d28b27f..61e657ae71e9 100644
--- a/net/bluetooth/a2mp.c
+++ b/net/bluetooth/a2mp.c
@@ -383,7 +383,7 @@ static int a2mp_getampassoc_rsp(struct amp_mgr *mgr, struct sk_buff *skb,
if (len < sizeof(*rsp))
return -EINVAL;
- BT_DBG("id %d stat... |
39c9a4ab2b91bff26801c86e423ef07fb705b3c0 | Analyze and fix the following issue in the Linux kernel code: [IA64] xen: Fix return value check in xencomm_vtop() | Problem Details:
In case of error, the function follow_page() returns ERR_PTR()
or NULL pointer. The NULL test in the error handling should be
replaced with IS_ERR_OR_NULL().
dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn... | ```diff
diff --git a/arch/ia64/xen/xencomm.c b/arch/ia64/xen/xencomm.c
index 1f5d7ac82e97..73d903ca2d64 100644
--- a/arch/ia64/xen/xencomm.c
+++ b/arch/ia64/xen/xencomm.c
@@ -17,6 +17,7 @@
*/
#include <linux/mm.h>
+#include <linux/err.h>
static unsigned long kernel_virtual_offset;
static int is_xencomm_initial... |
9429ec96c2718c0d1e3317cf60a87a0405223814 | Analyze and fix the following issue in the Linux kernel code: um: Preinclude include/linux/kern_levels.h | Problem Details:
The userspace part of UML uses the asm-offsets.h generator mechanism to
create definitions for UM_KERN_<LEVEL> that match the in-kernel
KERN_<LEVEL> constant definitions.
As of commit 04d2c8c83d0e3ac5f78aeede51babb3236200112 ("printk: convert
the format for KERN_<LEVEL> to a 2 byte pattern"), KERN_<LE... | ```diff
diff --git a/arch/um/include/shared/common-offsets.h b/arch/um/include/shared/common-offsets.h
index 40db8f71deae..2df313b6a586 100644
--- a/arch/um/include/shared/common-offsets.h
+++ b/arch/um/include/shared/common-offsets.h
@@ -7,16 +7,6 @@ DEFINE(UM_KERN_PAGE_MASK, PAGE_MASK);
DEFINE(UM_KERN_PAGE_SHIFT, PA... |
36f647bad3d35546892c3639328479355da8690d | Analyze and fix the following issue in the Linux kernel code: [media] e4000: fix crash when attach fails | Problem Details:
Callbacks were set even attach failed. This leads calling
.release() in error case and resulted crash.
Reported-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/tuners/e4000.c b/drivers/media/tuners/e4000.c
index ffaa4824d6af..1b33ed368abe 100644
--- a/drivers/media/tuners/e4000.c
+++ b/drivers/media/tuners/e4000.c
@@ -366,9 +366,6 @@ struct dvb_frontend *e4000_attach(struct dvb_frontend *fe,
priv->cfg = cfg;
priv->i2c = i2c;
- fe->tune... |
ef40c0088ecbc8863c9404c96065269c83c16259 | Analyze and fix the following issue in the Linux kernel code: [media] fc2580: fix crash when attach fails | Problem Details:
Callbacks were set even attach failed. This leads calling
.release() in error case and resulted crash.
Reported-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c
index 7db32ec4bd09..ec7965d7c2f8 100644
--- a/drivers/media/tuners/fc2580.c
+++ b/drivers/media/tuners/fc2580.c
@@ -487,9 +487,6 @@ struct dvb_frontend *fc2580_attach(struct dvb_frontend *fe,
priv->cfg = cfg;
priv->i2c = i2c;
- fe-... |
2a858486e0406110541e13f07d00665ee0c08a54 | Analyze and fix the following issue in the Linux kernel code: [media] dvb_usb_v2: fix error handling for .tuner_attach() | Problem Details:
fe was not set NULL after it was destroyed in tuner attach fail
error case. Due to that it was destroyed again and Kernel oopsed.
Reported-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
index f99015937957..9859d2a2449b 100644
--- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
+++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
@@ -612,8 +612,10 @@ err_dvb_unregister_frontend:
err_dvb_frontend... |
2347e6836ad2a5a2f7e62bd12b8f52fe15f04f74 | Analyze and fix the following issue in the Linux kernel code: [media] cypress_firmware: refactor firmware downloading | Problem Details:
Refactor firmware download function. It also should fix one bug
coming from usb_control_msg() message buffers. Taking buffers from
the stack for usb_control_msg() is not allowed as it does not work
on all architectures. Allocate buffers using kmalloc().
Signed-off-by: Antti Palosaari <crope@iki.fi>
Si... | ```diff
diff --git a/drivers/media/usb/dvb-usb-v2/cypress_firmware.c b/drivers/media/usb/dvb-usb-v2/cypress_firmware.c
index bb21eeea5495..211df549f26a 100644
--- a/drivers/media/usb/dvb-usb-v2/cypress_firmware.c
+++ b/drivers/media/usb/dvb-usb-v2/cypress_firmware.c
@@ -40,48 +40,59 @@ static int usb_cypress_writemem(s... |
8acc91cd68e8493ce892c39d9f94afd8bcf9be67 | Analyze and fix the following issue in the Linux kernel code: [media] rtl28xxu: remove fc0013 tuner fe callback | Problem Details:
It is just stub implementation, remove it.
Also add debug for beginning of fe callback.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index 4d8382a0ee8a..f17e73baccff 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -618,14 +618,6 @@ err:
return ret;
}
-
-static int rtl2832u_fc0013_tuner_call... |
bbb35efcda41d589cfff5e2b08c5fb457791117c | Analyze and fix the following issue in the Linux kernel code: um: Fix IPC on um | Problem Details:
commit c1d7e01d (ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION)
forgot UML and broke IPC on it.
Also UML has to select ARCH_WANT_IPC_PARSE_VERSION usin Kconfig.
Reported-and-tested-by: <Toralf Förster toralf.foerster@gmx.de>
Signed-off-by: Richard Weinberger <richard@nod.at> | ```diff
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig
index 9926e11a772d..aeaff8bef2f1 100644
--- a/arch/x86/um/Kconfig
+++ b/arch/x86/um/Kconfig
@@ -21,6 +21,7 @@ config 64BIT
config X86_32
def_bool !64BIT
select HAVE_AOUT
+ select ARCH_WANT_IPC_PARSE_VERSION
config X86_64
def_bool 64BIT
``` |
beb5ac20b3f90ffabac1eecd3c00205255df0728 | Analyze and fix the following issue in the Linux kernel code: netdev: pasemi: fix return value check in pasemi_mac_phy_init() | Problem Details:
In case of error, the function of_phy_connect() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value
check should be replaced with NULL test.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.co... | ```diff
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c
index e559dfa06d6a..6fa74d530e44 100644
--- a/drivers/net/ethernet/pasemi/pasemi_mac.c
+++ b/drivers/net/ethernet/pasemi/pasemi_mac.c
@@ -1101,9 +1101,9 @@ static int pasemi_mac_phy_init(struct net_device *dev)
ph... |
3c16b2b330e33392ad5dbd98e64bab659259daa4 | Analyze and fix the following issue in the Linux kernel code: [media] media-devnode: Replace printk with pr_* | Problem Details:
Fixes checkpatch warnings related to printk.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c
index f6b52d549430..023b2a1cbb9b 100644
--- a/drivers/media/media-devnode.c
+++ b/drivers/media/media-devnode.c
@@ -30,6 +30,8 @@
* counting.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/errno.h>
#include <li... |
0bd0dbee3f49c46ba860f21f97a98ac64781be5d | Analyze and fix the following issue in the Linux kernel code: [media] omap3isp: Fix error return code in probe function | Problem Details:
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret ... | ```diff
diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index e0096e07dbdc..d7aa513dcc8d 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -2102,8 +2102,10 @@ static int __devinit isp_probe(struct platform_device *pdev)
if (ret... |
a326e6dd315ee38c280b7ecf8a0d777952e384cd | Analyze and fix the following issue in the Linux kernel code: team: fix return value check | Problem Details:
In case of error, the function genlmsg_put() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should
be replaced with NULL test.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.c... | ```diff
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 3ffe8a6e3c8b..f8cd61f449a4 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1653,8 +1653,8 @@ static int team_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)
hdr = genlmsg_put(msg, info->snd_pid, info->snd_se... |
7f8436a1269eaaf2d0b1054a325eddf4e14cb80d | Analyze and fix the following issue in the Linux kernel code: l2tp: fix return value check | Problem Details:
In case of error, the function genlmsg_put() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should
be replaced with NULL test.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.c... | ```diff
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c
index d71cd9229a47..6f936358d664 100644
--- a/net/l2tp/l2tp_netlink.c
+++ b/net/l2tp/l2tp_netlink.c
@@ -80,8 +80,8 @@ static int l2tp_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)
hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq,
... |
e1878957b4676a17cf398f7f5723b365e9a2ca48 | Analyze and fix the following issue in the Linux kernel code: staging: comedi: jr3_pci: fix iomem dereference | Problem Details:
Correct a direct dereference of I/O memory to use an appropriate I/O
memory access function. Note that the pointer being dereferenced is not
currently tagged with `__iomem` but I plan to correct that for 3.7.
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off... | ```diff
diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
index 360107c4dcab..4a108ea8a9aa 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -885,7 +885,7 @@ static int jr3_pci_attach(struct comedi_device *dev,
}
... |
b2cc2a074de75671bbed5e2dda67a9252ef353ea | Analyze and fix the following issue in the Linux kernel code: x86, smep, smap: Make the switching functions one-way | Problem Details:
There is no fundamental reason why we should switch SMEP and SMAP on
during early cpu initialization just to switch them off again. Now
with %eflags and %cr4 forced to be initialized to a clean state, we
only need the one-way enable. Also, make the functions inline to make
them (somewhat) harder to a... | ```diff
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 44aec5d4dfaf..fefd9b7e93e1 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -259,48 +259,36 @@ static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
}
#endif
-static int disable_... |
a694f1b2af4942a1e0026e7929b4f7c5c251f82d | Analyze and fix the following issue in the Linux kernel code: [media] omap3isp: Fix up ENOIOCTLCMD error handling | Problem Details:
At commit 07d106d0, Linus pointed out that ENOIOCTLCMD should be
translated as ENOTTY to user mode.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c
index c78f60a0220d..a0b737fecf13 100644
--- a/drivers/media/platform/omap3isp/ispvideo.c
+++ b/drivers/media/platform/omap3isp/ispvideo.c
@@ -733,7 +733,7 @@ isp_video_try_format(struct file *file, void *fh, str... |
3d11df7abbff013b811d5615320580cd5d9d7d31 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: Fix vcpu_load handling in interrupt code | Problem Details:
Recent changes (KVM: make processes waiting on vcpu mutex killable)
now requires to check the return value of vcpu_load. This triggered
a warning in s390 specific kvm code. Turns out that we can actually
remove the put/load, since schedule will do the right thing via
the preempt notifiers.
Reported-by... | ```diff
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 7556231fb073..ff1e2f8ef94a 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -423,9 +423,7 @@ no_timer:
set_current_state(TASK_INTERRUPTIBLE);
spin_unlock_bh(&vcpu->arch.local_int.lock);
spin_unlock(&vcpu->... |
0d00dc2611abbe6ad244d50569c2ee82ce42846c | Analyze and fix the following issue in the Linux kernel code: USB: Fix race condition when removing host controllers | Problem Details:
This patch (as1607) fixes a race that can occur if a USB host
controller is removed while a process is reading the
/sys/kernel/debug/usb/devices file.
The usb_device_read() routine uses the bus->root_hub pointer to
determine whether or not the root hub is registered. The is not a
valid test, because ... | ```diff
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index d95696584762..3440812b4a84 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -624,7 +624,7 @@ static ssize_t usb_device_read(struct file *file, char __user *buf,
/* print devices for all busses */
list_for_e... |
01bb6501779ed0b6dc6c55be34b49eaa6306fdd8 | Analyze and fix the following issue in the Linux kernel code: USB: ohci-at91: fix null pointer in ohci_hcd_at91_overcurrent_irq | Problem Details:
Fixes the following NULL pointer dereference:
[ 7.740000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 7.810000] Unable to handle kernel NULL pointer dereference at virtual address 00000028
[ 7.810000] pgd = c3a38000
[ 7.810000] [00000028] *pgd=23a8c831, *pte=00000000, *ppte=000... | ```diff
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index aaa8d2bce217..0bf72f943b00 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -467,7 +467,8 @@ static irqreturn_t ohci_hcd_at91_overcurrent_irq(int irq, void *data)
/* From the GPIO notifying the over-c... |
c523530ce17defe6b28ccfe622c506488f430866 | Analyze and fix the following issue in the Linux kernel code: can: c_can: fix segfault during rmmod | Problem Details:
This patch fixes an oops which occurs during unloading the driver.
unregister_c_can_dev() is doing c_can/d_can module interrupts disable, which
requires module clock enable. c_can/d_can interrupts enable/disable is handled
properly in c_can_start and c_can_stop, so removing from
unregister_c_can_dev().... | ```diff
diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index 2c4a21f98442..e5180dfddba5 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -1265,9 +1265,6 @@ void unregister_c_can_dev(struct net_device *dev)
{
struct c_can_priv *priv = netdev_priv(dev);
- ... |
fb6ca6d154cdcd53e7f27f8dbba513830372699b | Analyze and fix the following issue in the Linux kernel code: drm/radeon: force MSIs on RS690 asics | Problem Details:
There are so many quirks, lets just try and force
this for all RS690s. See:
https://bugs.freedesktop.org/show_bug.cgi?id=37679
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org | ```diff
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
index 2da4465e3c6d..b06fa5936100 100644
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -208,6 +208,10 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
(rde... |
3a6d59df80897cc87812b6826d70085905bed013 | Analyze and fix the following issue in the Linux kernel code: drm/radeon: Add MSI quirk for gateway RS690 | Problem Details:
Fixes another system on:
https://bugs.freedesktop.org/show_bug.cgi?id=37679
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org | ```diff
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
index c4e638d6f8af..2da4465e3c6d 100644
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -202,6 +202,12 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
(rde... |
fa87e62d357ccf73831cd52ed316593d0968020d | Analyze and fix the following issue in the Linux kernel code: drm/radeon: add 2-level VM pagetables support v9 | Problem Details:
PDE/PTE update code uses CP ring for memory writes.
All page table entries are preallocated for now in alloc_pt().
It is made as whole because it's hard to divide it to several patches
that compile and doesn't break anything being applied separately.
Tested on cayman card.
v2: rebased on top of "ref... | ```diff
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index b0a08330ed32..f920a2c5ef23 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -782,7 +782,7 @@ static int cayman_pcie_gart_enable(struct radeon_device *rdev)
(u32)(rdev->dummy_page.addr >> 12));
WR... |
dce34bfd633d23ebddb196af8a4fa1c93c90ed07 | Analyze and fix the following issue in the Linux kernel code: drm/radeon: refactor set_page chipset interface v5 | Problem Details:
Cleanup the interface in preparation for hierarchical page tables.
v2: add incr parameter to set_page for simple scattered PTs uptates
added PDE-specific flags to r600_flags and radeon_drm.h
removed superfluous value masking with 0xffffffff
v3: removed superfluous bo_va->valid checking
ch... | ```diff
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index b23821674a95..b0a08330ed32 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -1497,7 +1497,7 @@ void cayman_vm_fini(struct radeon_device *rdev)
{
}
-#define R600_PTE_VALID (1 << 0)
+#define R600_ENTR... |
af026c5bd14cb57b230a63bdee6f73677a06f010 | Analyze and fix the following issue in the Linux kernel code: drm/radeon: Fix scratch register leak in IB test. | Problem Details:
Restructure the code to jump out via labels instead of directly returning
early. Also make error reporting consistent across all hardware generations.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Simon Kitching <skitching@vonos.net>
Reviewed-by: Christian König <christian.koenig@... | ```diff
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index f3892efcf7f4..b41237bf884b 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -3758,7 +3758,8 @@ int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
WREG32(scratch, 0xCAFEDEAD);
... |
bced76f27165ca7733437715185c3a1aa526f7a1 | Analyze and fix the following issue in the Linux kernel code: drm/radeon: restore backlight level on resume | Problem Details:
Restore the backlight level on resume. Some systems
need to explicitly restore the backlight level on
resume.
Fixes panel resume on my Trinity laptop and may fix the
following bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=43829
https://bugzilla.kernel.org/show_bug.cgi?id=46241
Signed-off-by: Al... | ```diff
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index 5ce13b8fbe6c..806cbcc94fdd 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -32,8 +32,6 @@
extern int atom_debug;
-#if defined(CONFIG_BACKLIG... |
a255172895b35d7c9271a44b25700a7b3f1558b1 | Analyze and fix the following issue in the Linux kernel code: m68knommu: fix inconsistent formating in ColdFire 5407 definitions | Problem Details:
Fix tab broken address defines to be consistent with others in this file.
Signed-off-by: Greg Ungerer <gerg@uclinux.org> | ```diff
diff --git a/arch/m68k/include/asm/m5407sim.h b/arch/m68k/include/asm/m5407sim.h
index cc485ba31bc8..a7550bc5cd1e 100644
--- a/arch/m68k/include/asm/m5407sim.h
+++ b/arch/m68k/include/asm/m5407sim.h
@@ -102,9 +102,9 @@
/*
* Generic GPIO support
*/
-#define MCFGPIO_PIN_MAX 16
-#define MCFGPIO_IRQ_MAX -1... |
cbf13821d36848819ad5d75d97a7626415bfbf95 | Analyze and fix the following issue in the Linux kernel code: m68knommu: fix inconsistent formating in ColdFire 5307 definitions | Problem Details:
Fix tab broken address defines to be consistent with others in this file.
Signed-off-by: Greg Ungerer <gerg@uclinux.org> | ```diff
diff --git a/arch/m68k/include/asm/m5307sim.h b/arch/m68k/include/asm/m5307sim.h
index a8e7519c4985..5d0bb7ec31f8 100644
--- a/arch/m68k/include/asm/m5307sim.h
+++ b/arch/m68k/include/asm/m5307sim.h
@@ -127,9 +127,9 @@
/*
* Generic GPIO support
*/
-#define MCFGPIO_PIN_MAX 16
-#define MCFGPIO_IRQ_MAX -1... |
39dc5b7fcebe3cca65b775f743416107ec321e0b | Analyze and fix the following issue in the Linux kernel code: m68knommu: fix inconsistent formating in ColdFire 527x definitions | Problem Details:
Fix tab broken address defines to be consistent with others in this file.
Signed-off-by: Greg Ungerer <gerg@uclinux.org> | ```diff
diff --git a/arch/m68k/include/asm/m527xsim.h b/arch/m68k/include/asm/m527xsim.h
index 6335e4298dc8..1bebbe78055a 100644
--- a/arch/m68k/include/asm/m527xsim.h
+++ b/arch/m68k/include/asm/m527xsim.h
@@ -184,15 +184,15 @@
/*
* Generic GPIO support
*/
-#define MCFGPIO_PODR MCFGPIO_PODR_ADDR
-#define MCFGPI... |
41e5be6a0e3bd0b54b7d2e60ba3225887286a45f | Analyze and fix the following issue in the Linux kernel code: m68knommu: fix inconsistent formating in ColdFire 5272 definitions | Problem Details:
Fix tab broken defines to be consistent with others in this file.
Signed-off-by: Greg Ungerer <gerg@uclinux.org> | ```diff
diff --git a/arch/m68k/include/asm/m5272sim.h b/arch/m68k/include/asm/m5272sim.h
index 52d1a33887d1..1fb01bb05d6c 100644
--- a/arch/m68k/include/asm/m5272sim.h
+++ b/arch/m68k/include/asm/m5272sim.h
@@ -132,8 +132,9 @@
/*
* Generic GPIO support
*/
-#define MCFGPIO_PIN_MAX 48
-#define MCFGPIO_IRQ_MAX -1... |
4617134eaf061ae2ef9e8f21ede05c93884a88ff | Analyze and fix the following issue in the Linux kernel code: m68knommu: fix inconsistent formating in ColdFire 523x definitions | Problem Details:
Fix tab broken address defines to be consistent with others in this file.
Signed-off-by: Greg Ungerer <gerg@uclinux.org> | ```diff
diff --git a/arch/m68k/include/asm/m523xsim.h b/arch/m68k/include/asm/m523xsim.h
index d1d4ec74d286..5e06b4eb57f3 100644
--- a/arch/m68k/include/asm/m523xsim.h
+++ b/arch/m68k/include/asm/m523xsim.h
@@ -176,15 +176,15 @@
/*
* Generic GPIO support
*/
-#define MCFGPIO_PODR MCFGPIO_PODR_ADDR
-#define MCFGPI... |
632306f2454bf46c71d4fb7a499916d942b22a32 | Analyze and fix the following issue in the Linux kernel code: m68knommu: clean up Pin Assignment definitions for the 54xx ColdFire CPU | Problem Details:
The Pin Assignment register definitions for the ColdFire 54xx CPU family are
inconsistently named and defined compared to the other ColdFire part
definitions. Rename them with the same prefix as used on other parts,
MCFGPIO_PAR_, and make their definitions include the MCF_MBAR periphperal
region offset... | ```diff
diff --git a/arch/m68k/include/asm/m54xxsim.h b/arch/m68k/include/asm/m54xxsim.h
index d6a50799ff27..d3bd83887429 100644
--- a/arch/m68k/include/asm/m54xxsim.h
+++ b/arch/m68k/include/asm/m54xxsim.h
@@ -70,15 +70,25 @@
#define MCFEPORT_EPFR (MCF_MBAR + 0xf0c) /* Flags */
/*
- * Some PSC related definitions... |
98d9696b38df7d477be34fccd4abb2aae02987c8 | Analyze and fix the following issue in the Linux kernel code: m68knommu: fix multi-function pin setup for FEC module on ColdFire 523x | Problem Details:
The multi-function pin setup code for the FEC ethernet module is using just
plain wrong. Looks like it was cut-and-pasted from other init code. It has
hard coded register addresses that are incorrect for the 523x, and it is
manipulating bits that don't make sense.
Add proper register definitions for t... | ```diff
diff --git a/arch/m68k/include/asm/m523xsim.h b/arch/m68k/include/asm/m523xsim.h
index 91d3abc3f2a5..d1d4ec74d286 100644
--- a/arch/m68k/include/asm/m523xsim.h
+++ b/arch/m68k/include/asm/m523xsim.h
@@ -189,8 +189,16 @@
/*
* Pin Assignment
*/
+#define MCFGPIO_PAR_AD (MCF_IPSBAR + 0x100040)
+#define MCFGPIO... |
e4c2b9befe91a0e9bdbbdaf9faf4b093b35c9044 | Analyze and fix the following issue in the Linux kernel code: m68knommu: modify ColdFire 532x GPIO register definitions to be consistent | Problem Details:
The ColdFire 532x CPU register definitions for the multi-function setup
pins are inconsistently defined compared with other ColdFire parts. Modify
the register defintions to be just the addresses, not pointers. This also
fixes the erroneous use in one case of using these values in the UART setup
code f... | ```diff
diff --git a/arch/m68k/include/asm/m532xsim.h b/arch/m68k/include/asm/m532xsim.h
index 38333703a563..d4092fa7e5f4 100644
--- a/arch/m68k/include/asm/m532xsim.h
+++ b/arch/m68k/include/asm/m532xsim.h
@@ -393,32 +393,32 @@
#define MCFGPIO_PCLRR_LCDDATAL (0xFC0A404B)
#define MCFGPIO_PCLRR_LCDCTLH (0xFC0A404C)
... |
4fb62ededfc5021e7fa25cbc20f92003e148af27 | Analyze and fix the following issue in the Linux kernel code: m68knommu: fix wrong register offsets used for ColdFire 5272 multi-function pins | Problem Details:
The registers used to configure and set the multifunction pins on the 5272
ColdFire are defined as absolute addresses. So the use of them does not need
to be offset relative to the peripheral region address.
Fix two cases of incorrect usage of these addresses. Both affect UART
initialization, one in t... | ```diff
diff --git a/arch/m68k/include/asm/nettel.h b/arch/m68k/include/asm/nettel.h
index 4dec2d9fb994..2a7a7667d807 100644
--- a/arch/m68k/include/asm/nettel.h
+++ b/arch/m68k/include/asm/nettel.h
@@ -21,6 +21,7 @@
#ifdef CONFIG_COLDFIRE
#include <asm/coldfire.h>
#include <asm/mcfsim.h>
+#include <asm/io.h>
#endi... |
6d1ab10e69ff5f3cb63920ba965ec0f1f0bdaf8d | Analyze and fix the following issue in the Linux kernel code: ext4: ext4_bread usage audit | Problem Details:
When ext4_bread() returns NULL and err is set to zero, this means
there is no phyical block mapped to the specified logical block
number. (Previous to commit 90b0a97323, err was uninitialized in this
case, which caused other problems.)
The directory handling routines use ext4_bread() in many places, ... | ```diff
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index bd87b7a66afb..6d600a69fc9d 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -74,6 +74,12 @@ static struct buffer_head *ext4_append(handle_t *handle,
bh = NULL;
}
}
+ if (!bh && !(*err)) {
+ *err = -EIO;
+ ext4_error(inode->i_sb,
+ "Direct... |
300b9ff609ca027b9964a453a8156e6fe0077cde | Analyze and fix the following issue in the Linux kernel code: m68knommu: use "r", not "i" constraint in cacheflush asm's | Problem Details:
Let the compiler choose which register to use in the cache flushing
asm statements, instead of imposing %d0.
Additionally, fix two typo's.
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org> | ```diff
diff --git a/arch/m68k/include/asm/cacheflush_no.h b/arch/m68k/include/asm/cacheflush_no.h
index 7cafb537d03c..d2b3935ae147 100644
--- a/arch/m68k/include/asm/cacheflush_no.h
+++ b/arch/m68k/include/asm/cacheflush_no.h
@@ -34,10 +34,9 @@ static inline void __clear_cache_all(void)
{
#ifdef CACHE_INVALIDATE
_... |
eb26cc9c71f81f44777bbf5ca1bd72aa76997786 | Analyze and fix the following issue in the Linux kernel code: pinctrl: Fix potential memory leak in pinctrl_register_one_pin() | Problem Details:
'pindesc' was not freed when returning from an error induced
exit path.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | ```diff
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index dc5c126e398a..0f1ec9e8ff14 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -230,8 +230,10 @@ static int pinctrl_register_one_pin(struct pinctrl_dev *pctldev,
pindesc->name = name;
} else {
pindesc->name = kasprintf(GF... |
9c33c512b2d3167a3580659942ee78437b1b1bc6 | Analyze and fix the following issue in the Linux kernel code: doc: fix old config name of kprobetrace | Problem Details:
KPROBE_TRACING has been replaced by KPROBE_EVENT.
Signed-off-by: Liu Bo <liub.liubo@gmail.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index d0d0bb9e3e25..d68ea5fc812b 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -12,7 +12,7 @@ kprobes can probe (this means, all functions body except for __kprobes
functions).... |
6f8d6b20bb0bdda333e781faf775db14cb4660dd | Analyze and fix the following issue in the Linux kernel code: wlcore: Load the NVS file asynchronously | Problem Details:
The NVS file is loaded by the device's probe callback with the help of
request_firmware(). Since request_firmware() relies on udevd, the
modules cannot be loaded before hotplug events are handled.
Fix this by loading the NVS file asynchronously and continue
initialization only after the firmware reque... | ```diff
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 7db6384a2457..6ada018fe4a4 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -744,32 +744,6 @@ out:
return ret;
}
-static void wl1271_fetch_nvs(struct wl1271 *wl)... |
a8311c8a9a7c41de9cc2d5e1573ff7005b4959ab | Analyze and fix the following issue in the Linux kernel code: wlcore: Fix unbalanced interrupts enablement | Problem Details:
The interrupt line is enabled by wl12xx_enable_interrupts and
wl18xx_enable_interrupts, but it will not be disabled in all failure
paths. Fix this.
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi> | ```diff
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index f49ce7c633b6..630b4d4cea04 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -1184,9 +1184,16 @@ static int wl12xx_enable_interrupts(struct wl1271 *wl)
ret = wlcore_... |
792a58a8720f02c8f340583f6ee54c9eb46adf0b | Analyze and fix the following issue in the Linux kernel code: wlcore: Don't recover during boot | Problem Details:
While recursive recovery is avoided during shutdown, a new recovery may
be queued when the FW boots. The recovery work will then try to stop an
already stopped hardware, which will most likely result in a kernel
panic.
Fix this by verifying that wl->state is on before queueing a new
recovery.
Signed-... | ```diff
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 7b825e8c1a9b..3f5d87e95d92 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -775,8 +775,9 @@ void wl12xx_queue_recovery_work(struct wl1271 *wl)
WARN_ON(!test_bit(WL... |
fc3d1db5b60ebb81f9ce2ac3a1192f2c763ab504 | Analyze and fix the following issue in the Linux kernel code: wlcore: make debug prints work without dynamic debug | Problem Details:
Make debug prints operational when dynamic debug is not defined.
This allows better debugging in production environments.
Change the driver prefix to "wlcore" while were at it.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi> | ```diff
diff --git a/drivers/net/wireless/ti/wlcore/debug.h b/drivers/net/wireless/ti/wlcore/debug.h
index 6b800b3cbea5..db4bf5a68ce2 100644
--- a/drivers/net/wireless/ti/wlcore/debug.h
+++ b/drivers/net/wireless/ti/wlcore/debug.h
@@ -28,7 +28,7 @@
#include <linux/bitops.h>
#include <linux/printk.h>
-#define DRIVER... |
d49524d3e8406e3b858650abcf846531a2104120 | Analyze and fix the following issue in the Linux kernel code: wlcore: resume() only if sta is associated | Problem Details:
mac80211's resume() callback might get called even if
the sta is not associated (but only up). The
resume sequence in this case results in configuring
the wake-up conditions of a non-started role, which
causes fw assertion.
Fix it by bailing out if the STA is not connected
(like we do on suspend()).
... | ```diff
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index a797ce7201b2..ae2b0fd7e558 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1672,6 +1672,9 @@ static void wl1271_configure_resume(struct wl1271 *wl,
if ((!is_ap) &... |
f83e54134a6d38437ddee0fda96692a6b0c33b0e | Analyze and fix the following issue in the Linux kernel code: wlcore: tx_flush - optimize flow and force Tx during the flush | Problem Details:
Force Tx during the flush if there are packets pending in the driver.
This actually solves a bug where we would get called from the mac80211
wq context, which would prevent tx_work from getting queued, even when
the mutex is unlocked.
Don't stop the queues needlessly if there's nothing to flush. Use a... | ```diff
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index d89e0db8a6f9..f9c26b19bff0 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -1084,22 +1084,32 @@ void wl1271_tx_flush(struct wl1271 *wl)
/* only one flush should be in prog... |
958e303abba61bad165a96e22e138c4763047df2 | Analyze and fix the following issue in the Linux kernel code: wlcore: make Tx flush timings more verbose | Problem Details:
Print how much time a flush took. This will help debug the time it takes
to switch between channels.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi> | ```diff
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index 24ac8ecde867..d89e0db8a6f9 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -1076,9 +1076,10 @@ void wl12xx_tx_reset(struct wl1271 *wl)
/* caller must *NOT* hold wl->mutex *... |
4cc533830b7e6b309e8b73196c410951fc2bed91 | Analyze and fix the following issue in the Linux kernel code: wlcore: Prevent interaction with HW after recovery is queued | Problem Details:
When a function requests to recover, it would normally abort and will
not send any additional commands to the HW. However, other threads may
not be aware of the failure and could try to communicate with the HW
after a recovery was queued, but before the recovery work began.
Fix this by introducing an ... | ```diff
diff --git a/drivers/net/wireless/ti/wl18xx/debugfs.c b/drivers/net/wireless/ti/wl18xx/debugfs.c
index 3ce6f1039af3..7f1669cdea09 100644
--- a/drivers/net/wireless/ti/wl18xx/debugfs.c
+++ b/drivers/net/wireless/ti/wl18xx/debugfs.c
@@ -220,7 +220,7 @@ static ssize_t clear_fw_stats_write(struct file *file,
mu... |
50b78b2a6500d0e97c204c1b6c51df8c17358bbe | Analyze and fix the following issue in the Linux kernel code: NFC: Fix sleeping in atomic when releasing socket | Problem Details:
nfc_llcp_socket_release is calling lock_sock/release_sock while holding
write lock for rwlock. Use bh_lock/unlock_sock instead.
BUG: sleeping function called from invalid context at net/core/sock.c:2138
in_atomic(): 1, irqs_disabled(): 0, pid: 56, name: kworker/1:1
4 locks held by kworker/1:1/56:
Pid:... | ```diff
diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c
index fc43747f0c33..c12c5ef3d036 100644
--- a/net/nfc/llcp/llcp.c
+++ b/net/nfc/llcp/llcp.c
@@ -56,7 +56,7 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen)
sk_for_each_safe(sk, node, tmp, &local->sockets.head) {
llcp_so... |
3c0cc8aa23f4b53446bbf385d4647eec6992a2cb | Analyze and fix the following issue in the Linux kernel code: NFC: Fix sleeping in invalid context when netlink socket is closed | Problem Details:
netlink_register_notifier requires notify functions to not sleep.
nfc_stop_poll locks device mutex and must not be called from notifier.
Create workqueue that will handle this for all devices.
BUG: sleeping function called from invalid context at kernel/mutex.c:269
in_atomic(): 0, irqs_disabled(): 0, ... | ```diff
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
index 4c51714ee741..baa6af9500df 100644
--- a/net/nfc/netlink.c
+++ b/net/nfc/netlink.c
@@ -761,31 +761,63 @@ static struct genl_ops nfc_genl_ops[] = {
},
};
-static int nfc_genl_rcv_nl_event(struct notifier_block *this,
- unsigned long event, void *pt... |
ee5e8d812ca25bf95a97b4368aec4e680678e75e | Analyze and fix the following issue in the Linux kernel code: NFC: Fix missing mutex unlock in pn533_send_cmd_frame_async | Problem Details:
If command allocation failed cmd_lock was not released and deadlock
would occur.
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> | ```diff
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index d123444404c8..97c440a8cd61 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -716,7 +716,7 @@ static int pn533_send_cmd_frame_async(struct pn533 *dev,
void *arg, gfp_t flags)
{
struct pn533_cmd *cmd;
- int rc;
+ int rc = 0;
nf... |
1b62ca7bf5775bed048032b7e779561e1fe66aa0 | Analyze and fix the following issue in the Linux kernel code: sparc64: Fix return value of Niagara-2 memcpy. | Problem Details:
It gets clobbered by the kernel's VISEntryHalf, so we have to save it
in a different register than the set clobbered by that macro.
The instance in glibc is OK and doesn't have this problem.
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/arch/sparc/lib/NG2memcpy.S b/arch/sparc/lib/NG2memcpy.S
index 03eadf66b0d3..2c20ad63ddbf 100644
--- a/arch/sparc/lib/NG2memcpy.S
+++ b/arch/sparc/lib/NG2memcpy.S
@@ -14,7 +14,7 @@
#define FPRS_FEF 0x04
#ifdef MEMCPY_DEBUG
#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs; \
- cl... |
200429cc63399e99dd2abcdca5088559a911ef2b | Analyze and fix the following issue in the Linux kernel code: crypto: cast5/avx - fix storing of new IV in CBC encryption | Problem Details:
cast5/avx incorrectly XORs new IV over old IV at end of CBC encryption
function when it should store. This causes CBC encryption to give
incorrect output on multi-page encryption requests.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | ```diff
diff --git a/arch/x86/crypto/cast5_avx_glue.c b/arch/x86/crypto/cast5_avx_glue.c
index 445aab06387b..e0ea14f9547f 100644
--- a/arch/x86/crypto/cast5_avx_glue.c
+++ b/arch/x86/crypto/cast5_avx_glue.c
@@ -165,7 +165,7 @@ static unsigned int __cbc_encrypt(struct blkcipher_desc *desc,
nbytes -= bsize;
} while ... |
c2b1ad800b66f62105a7fd250604d72e07202e66 | Analyze and fix the following issue in the Linux kernel code: fs: fix include/percpu-rwsem.h export error | Problem Details:
We get the following export error on the include file:
usr/include/linux/fs.h:13: included file 'linux/percpu-rwsem.h' is not exported
Move the include inside the __KERNEL__ section.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jens Axboe <axboe@kernel.dk> | ```diff
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 24e1229cdfe0..cefa9645fc85 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -10,7 +10,6 @@
#include <linux/ioctl.h>
#include <linux/blk_types.h>
#include <linux/types.h>
-#include <linux/percpu-rwsem.h>
/*
* It's silly to have NR_OPEN... |
b6ba418ef42010725c7794c64c653e5df48cd31f | Analyze and fix the following issue in the Linux kernel code: [media] media: sh-vou: fix compilation breakage | Problem Details:
A recent commit
commit f135a8a224294fa0f60ec1b8bc120813b7cfc804
Author: Hans Verkuil <hans.verkuil@cisco.com>
[media] sh_vou: remove V4L2_FL_LOCK_ALL_FOPS
broke compilation of sh_vou.c:
drivers/media/platform/sh_vou.c: In function 'sh_vou_mmap':
drivers/media/platform/sh_vou.c:1227: error: 'vdev' u... | ```diff
diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c
index ba3de3e02d47..85fd312f0a82 100644
--- a/drivers/media/platform/sh_vou.c
+++ b/drivers/media/platform/sh_vou.c
@@ -1224,6 +1224,7 @@ static int sh_vou_release(struct file *file)
static int sh_vou_mmap(struct file *file, struc... |
3bc2913e2cb74aac8af90b46fa251dfb8d854665 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix set_caching locking | Problem Details:
On the EINVAL case we don't release struct_mutex. It should be safe to
grab the lock after checking the parameters, which also resolves the
issues.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 365a7dc8a4a8..76bbb379d389 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3218,10 +3218,6 @@ int i915_gem_set_caching_ioctl(struct drm_device *dev, void *data,
enum i915_cache_level lev... |
0c96c65b48fba3ffe9822a554cbc0cd610765cd5 | Analyze and fix the following issue in the Linux kernel code: drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag | Problem Details:
The dithering introduced in
commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf
Author: Adam Jackson <ajax@redhat.com>
Date: Tue Dec 13 15:41:00 2011 -0800
drm/i915/dp: Dither down to 6bpc if it makes the mode fit
stores the INTEL_MODE_DP_FORCE_6BPC flag in the private_flags of the
adjusted mode, ... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 6f5aafa1b633..f6e274c5db62 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4370,7 +4370,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
/* default to 8bpc *... |
a4b6fec977020a508ff04b05f0fa01221a4ecf29 | Analyze and fix the following issue in the Linux kernel code: Thermal: Fix bug on cpu_cooling, cooling device's id conflict problem. | Problem Details:
This patch fixes small bug on cpu_cooling. CPU cooling device has own
id generated with idr mathod. However in the previous version, it swapped
to all same id at last stage of probing as 0. This makes id's collision and
also occures error when it releases that id.
Signed-off-by: Jonghwa Lee <jonghwa3.... | ```diff
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 99a5d7551b33..9050c1b0573c 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -351,7 +351,7 @@ struct thermal_cooling_device *cpufreq_cooling_register(
struct cpufreq_cooling_device *cpufreq_dev = N... |
402537fd9f5499d1a50a6f20cdd9031d24ee2e47 | Analyze and fix the following issue in the Linux kernel code: perf/x86: Fix typo in uncore_pmu_to_box | Problem Details:
The variable box should not be declared as static.
This could probably cause crashes with sufficiently parallel
uncore PMU use.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Cc: eranian@google.com
Cc: a.p.zijlstra@chello.nl
Link: http://lkml.kernel.org/r/1348709606-2759-1-git-send-email-zheng.z.y... | ```diff
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 38e4894165b9..c7c55e74ac60 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -1950,7 +1950,7 @@ struct intel_uncore_box *uncore_alloc_b... |
35c41db8f9ca76d7ca3cdc9003ac5a53292026be | Analyze and fix the following issue in the Linux kernel code: crypto: tegra-aes - fix error return code | Problem Details:
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != re... | ```diff
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c
index 631149e50ef1..37185e6630cd 100644
--- a/drivers/crypto/tegra-aes.c
+++ b/drivers/crypto/tegra-aes.c
@@ -969,6 +969,7 @@ static int tegra_aes_probe(struct platform_device *pdev)
aes_wq = alloc_workqueue("tegra_aes_wq", WQ_HIGHPRI | WQ_U... |
b48ae1df54b77daa3dc2382b7fd1d980329087bd | Analyze and fix the following issue in the Linux kernel code: crypto: crypto4xx - fix error return code | Problem Details:
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != re... | ```diff
diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c
index 802e85102c32..f88e3d8f6b64 100644
--- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -1226,6 +1226,7 @@ static int __init crypto4xx_probe(struct platform_device *ofdev)
core_dev... |
c2ff861d96ec21c80435281ef73cccf2fe56369a | Analyze and fix the following issue in the Linux kernel code: crypto: hifn_795x - fix error return code | Problem Details:
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != re... | ```diff
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index c9c4befb5a8d..88bb001719a9 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -2611,14 +2611,17 @@ static int __devinit hifn_probe(struct pci_dev *pdev, const struct pci_device_id
size = pci_resource_len(pdev,... |
79c09c122f48d2503a6a5a164328c7f9fc8b1a1e | Analyze and fix the following issue in the Linux kernel code: crypto: ux500 - fix error return code | Problem Details:
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != re... | ```diff
diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c
index 1c307e1b840c..715c0fe0fc85 100644
--- a/drivers/crypto/ux500/cryp/cryp_core.c
+++ b/drivers/crypto/ux500/cryp/cryp_core.c
@@ -1486,6 +1486,7 @@ static int ux500_cryp_probe(struct platform_device *pdev)
if (!res_ir... |
39ab735835818b12c05b6ae7282630000cd50fe8 | Analyze and fix the following issue in the Linux kernel code: crypto: caam - fix error IDs for SEC v5.x RNG4 | Problem Details:
According to SEC v5.0-v5.3 reference manuals.
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | ```diff
diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c
index 9955ed9643e6..30b8f74833d4 100644
--- a/drivers/crypto/caam/error.c
+++ b/drivers/crypto/caam/error.c
@@ -77,10 +77,8 @@ static void report_ccb_status(u32 status, char *outstr)
"Not instantiated",
"Test instantiate",
"Predicti... |
f065fd099fc475333fc7a55677a7f64764445d55 | Analyze and fix the following issue in the Linux kernel code: CIFS: Fix possible freed pointer dereference in CIFS_SessSetup | Problem Details:
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <smfrench@gmail.com> | ```diff
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 382c06d01b38..76809f4d3428 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -876,7 +876,8 @@ ssetup_ntlmssp_authenticate:
pSMB = (SESSION_SETUP_ANDX *)iov[0].iov_base;
smb_buf = (struct smb_hdr *)iov[0].iov_base;
- if ((type == RawNTLMSSP) && (smb_buf-... |
4ca3a99ca4bf8f5dcfc4fef4f2b1d8322bb60ad9 | Analyze and fix the following issue in the Linux kernel code: CIFS: Fix possible freed pointer dereference in SMB2_sess_setup | Problem Details:
and remove redundant (rsp == NULL) checks after SendReceive2.
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <smfrench@gmail.com> | ```diff
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index a7db95f4760c..5ad88b4b9990 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -409,11 +409,6 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
if (rc != 0)
goto neg_exit;
- if (rsp == NULL) {
- rc = -EIO;
- goto neg_exit;
- }... |
b794e7a6ebfbddb819b0e75ab59ada6b08a285f2 | Analyze and fix the following issue in the Linux kernel code: jbd2: fix assertion failure in commit code due to lacking transaction credits | Problem Details:
ext4 users of data=journal mode with blocksize < pagesize were
occasionally hitting assertion failure in
jbd2_journal_commit_transaction() checking whether the transaction has
at least as many credits reserved as buffers attached. The core of the
problem is that when a file gets truncated, buffers tha... | ```diff
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index af5280fb579b..3091d42992f0 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -1014,17 +1014,35 @@ restart_loop:
* there's no point in keeping a checkpoint record for
* it. */
- /* A buffer which has been freed while still being
- * journa... |
7844663a31e97930e3949430573452ac245bfdd5 | Analyze and fix the following issue in the Linux kernel code: powerpc/eeh: Don't release eeh_mutex in eeh_phb_pe_get | Problem Details:
Acked-by: Gavin Shan <shangw@linux.vnet.ibm.com>
=====================================
[ BUG: bad unlock balance detected! ]
3.6.0-rc5-00338-gcaa1d63-dirty #6 Not tainted
-------------------------------------
swapper/0/1 is trying to release lock (eeh_mutex) at:
[<c000000000058218>] .eeh_add_to_parent... | ```diff
diff --git a/arch/powerpc/platforms/pseries/eeh_pe.c b/arch/powerpc/platforms/pseries/eeh_pe.c
index 9d35543736ed..797cd181dc3f 100644
--- a/arch/powerpc/platforms/pseries/eeh_pe.c
+++ b/arch/powerpc/platforms/pseries/eeh_pe.c
@@ -105,11 +105,8 @@ static struct eeh_pe *eeh_phb_pe_get(struct pci_controller *phb)... |
80b4812407c6b1f66a4f2430e69747a13f010839 | Analyze and fix the following issue in the Linux kernel code: md/raid10: fix "enough" function for detecting if array is failed. | Problem Details:
The 'enough' function is written to work with 'near' arrays only
in that is implicitly assumes that the offset from one 'group' of
devices to the next is the same as the number of copies.
In reality it is the number of 'near' copies.
So change it to make this number explicit.
This bug makes it possib... | ```diff
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 1c2eb38f3c51..0138a727c1f3 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1512,14 +1512,16 @@ static int _enough(struct r10conf *conf, struct geom *geo, int ignore)
do {
int n = conf->copies;
int cnt = 0;
+ int this = first;
... |
aaf7d73e54b6915310ece11aedb19ec06a833642 | Analyze and fix the following issue in the Linux kernel code: ext4: enable FITRIM ioctl on bigalloc file system | Problem Details:
With a minor tweaks regarding minimum extent size to discard and
discarded bytes reporting the FITRIM can be enabled on bigalloc file
system and it works without any problem.
This patch fixes minlen handling and discarded bytes reporting to
take into consideration bigalloc enabled file systems and fin... | ```diff
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 8b84fe28ccaf..4c8174aa685c 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -404,13 +404,6 @@ resizefs_out:
if (!blk_queue_discard(q))
return -EOPNOTSUPP;
- if (EXT4_HAS_RO_COMPAT_FEATURE(sb,
- EXT4_FEATURE_RO_COMPAT_BIGALLOC)) {
- e... |
f34f9d186df35e5c39163444c43b4fc6255e39c5 | Analyze and fix the following issue in the Linux kernel code: coredump: prevent double-free on an error path in core dumper | Problem Details:
In !CORE_DUMP_USE_REGSET case, if elf_note_info_init fails to allocate
memory for info->fields, it frees already allocated stuff and returns
error to its caller, fill_note_info. Which in turn returns error to its
caller, elf_core_dump. Which jumps to cleanup label and calls
free_note_info, which will... | ```diff
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 1b52956afe33..0225fddf49b7 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1696,30 +1696,19 @@ static int elf_note_info_init(struct elf_note_info *info)
return 0;
info->psinfo = kmalloc(sizeof(*info->psinfo), GFP_KERNEL);
if (!info->psinfo)
- g... |
260ef31135c2250ec01aa343192ec2a071b8e05f | Analyze and fix the following issue in the Linux kernel code: usb/gadget: fix misannotations | Problem Details:
__user * != * __user
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index 829aba75a6df..158200dc4199 100644
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -340,7 +340,7 @@ ffs_sb_create_file(struct super_block *sb, const char *name, void *data,
static int ffs_mutex_lock(struct mutex *mutex... |
63784dd02b2ac85e867be9d6a6f5536c4ff738be | Analyze and fix the following issue in the Linux kernel code: fcntl: fix misannotations | Problem Details:
__user * != * __user...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 91af39a33af7..8f704291d4ed 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -149,7 +149,7 @@ pid_t f_getown(struct file *filp)
static int f_setown_ex(struct file *filp, unsigned long arg)
{
- struct f_owner_ex * __user owner_p = (void * __user)arg;
+ struct f_owner_ex _... |
b71fc079b5d8f42b2a52743c8d2f1d35d655b1c5 | Analyze and fix the following issue in the Linux kernel code: ext4: fix fdatasync() for files with only i_size changes | Problem Details:
Code tracking when transaction needs to be committed on fdatasync(2) forgets
to handle a situation when only inode's i_size is changed. Thus in such
situations fdatasync(2) doesn't force transaction with new i_size to disk
and that can result in wrong i_size after a crash.
Fix the issue by updating in... | ```diff
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 0a31197590d7..4df5e95801b4 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4054,6 +4054,7 @@ static int ext4_do_update_inode(handle_t *handle,
struct ext4_inode_info *ei = EXT4_I(inode);
struct buffer_head *bh = iloc->bh;
int err = 0, rc, block;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.