id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
10c6c383e43565c9c6ec07ff8eb2825f8091bdf0 | Analyze and fix the following issue in the Linux kernel code: char: n_gsm: remove message filtering for contipated DLCI | Problem Details:
The design of uplink flow control in the mux driver is
that for constipated channels data will backup into the
per-channel fifos, and any messages that make it to the
outbound message queue will still go out.
Code was added to also stop messages that were in the outbound
queue but this requires filteri... | ```diff
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index db15b562a29e..5f68f2a70c5c 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -691,10 +691,6 @@ static void gsm_data_kick(struct gsm_mux *gsm)
msg = msg->next;
continue;
}
- if (gsm->dlci[msg->addr]->constipated) {
- msg = msg... |
a45440f05e9ebc26f2a375df911823fdef5b5281 | Analyze and fix the following issue in the Linux kernel code: autofs4 - fix get_next_positive_subdir() | Problem Details:
Following a report of a crash during an automount expire I found that
the locking in fs/autofs4/expire.c:get_next_positive_subdir() was wrong.
Not only is the locking wrong but the function is more complex than it
needs to be.
The function is meant to calculate (and dget) the next entry in the list
of... | ```diff
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index 1feb68ecef95..8c0e56d92938 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -94,25 +94,21 @@ static struct dentry *get_next_positive_subdir(struct dentry *prev,
{
struct autofs_sb_info *sbi = autofs4_sbi(root->d_sb);
struct list_head... |
6683549e4ba050cddd8fa88c3f1e53b825fdcb6d | Analyze and fix the following issue in the Linux kernel code: 8250: add AgeStar AS-PRS2-009 | Problem Details:
Signed-off-by: Alan Cox <alan@linux.intel.com>
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=22502
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 62e10fe747a8..ad4bb8dec36f 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1194,6 +1194,8 @@ pci_xr17c154_setup(struct serial_private *priv,
#define PCIE_DEVICE_ID_NEO_2_OX_IB... |
4f870fe6269bbc7cca2a70c50a4cc6f811fe21c5 | Analyze and fix the following issue in the Linux kernel code: staging: comedi: replace printk calls in comedi core | Problem Details:
Replace the printk() calls in the comedi core module with something more
suitable, such as dev_...() or pr_...(). Remove the ones that report a
failure to increment a module count (try_module_get() failure). Change
the printk() call in the DPRINTK() macro to pr_debug().
TODO: Most of the DPRINTK() c... | ```diff
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index e82126407e95..7a76f9c07afd 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -882,14 +882,12 @@ static int check_insn_config_length(struct comedi_insn *insn,
/* by defa... |
2a95e37c128d1c12b3cb0eb6dfdc1739a7104cd8 | Analyze and fix the following issue in the Linux kernel code: scripts/decodecode: Fixup trapping instruction marker | Problem Details:
When dumping "Code: " sections from an oops, the trapping instruction
%rip points to can be a string copy
2b:* f3 a5 rep movsl %ds:(%rsi),%es:(%rdi)
and the line contain a bunch of ":". Current "cut" selects only the and
the second field output looks funnily overlaid this:
2b... | ```diff
diff --git a/scripts/decodecode b/scripts/decodecode
index 18ba881c3415..4f8248d5a11f 100755
--- a/scripts/decodecode
+++ b/scripts/decodecode
@@ -89,7 +89,7 @@ echo $code >> $T.s
disas $T
cat $T.dis >> $T.aa
-faultline=`cat $T.dis | head -1 | cut -d":" -f2`
+faultline=`cat $T.dis | head -1 | cut -d":" -f2-... |
a76cccbeef9e91b5f799e8853acac1ed1fc833cb | Analyze and fix the following issue in the Linux kernel code: xfs: fix uninitialised variable in xfs_rtbuf_get() | Problem Details:
Results in this assert failure in generic/090:
XFS: Assertion failed: *nmap >= 1, file: fs/xfs/xfs_bmap.c, line: 4363
.....
Call Trace:
[<ffffffff814680db>] xfs_bmapi_read+0x6b/0x370
[<ffffffff814b64b2>] xfs_rtbuf_get+0x42/0x130
[<ffffffff814b6f09>] xfs_rtget_summary+0x89/0x120
[<ffffffff814b7bfe>... | ```diff
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 92d4331cd4f1..ca28a4ba4b54 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -857,7 +857,7 @@ xfs_rtbuf_get(
xfs_buf_t *bp; /* block buffer, result */
xfs_inode_t *ip; /* bitmap or summary inode */
xfs_bmbt_irec_t map;
- int n... |
a525a3ddeaca69f405d98442ab3c0746e53168dc | Analyze and fix the following issue in the Linux kernel code: driver core: free devres in device_release | Problem Details:
device_del can happen anytime, so once it happens,
the devres of the device will be freed inside device_del, but
drivers can't know it has been deleted and may still add
resources into the device, so memory leak is caused.
This patch moves the devres_release_all to fix the problem.
Signed-off-by: Min... | ```diff
diff --git a/drivers/base/core.c b/drivers/base/core.c
index f338037a4f3d..c8fe4a563866 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -184,6 +184,17 @@ static void device_release(struct kobject *kobj)
struct device *dev = kobj_to_dev(kobj);
struct device_private *p = dev->p;
+ /*
+ * Some... |
62b2ce964bb901f00a480104bd35a2e1f8d2cf58 | Analyze and fix the following issue in the Linux kernel code: vfs: fix propagation of atomic_open create error on negative dentry | Problem Details:
If ->atomic_open() returns -ENOENT, we take care to return the create
error (e.g., EACCES), if any. Do the same when ->atomic_open() returns 1
and provides a negative dentry.
This fixes a regression where an unprivileged open O_CREAT fails with
ENOENT instead of EACCES, introduced with the new atomic... | ```diff
diff --git a/fs/namei.c b/fs/namei.c
index 26c28ec4f4af..db76b866a097 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2489,6 +2489,10 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
dput(dentry);
dentry = file->f_path.dentry;
}
+ if (create_error && dentry->d_inode == NULL) {
+ ... |
7b7e995d69199b555181ac057c47b017c510a129 | Analyze and fix the following issue in the Linux kernel code: extcon: extcon_gpio: Replace gpio_request_one by devm_gpio_request_one | Problem Details:
commit 01eaf24 "extcon: Convert extcon_gpio to devm_gpio_request_one"
missed the replacement for devm_gpio_request_one. fix it.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/extcon/extcon_gpio.c b/drivers/extcon/extcon_gpio.c
index fe3db45fa83c..3cc152e690b0 100644
--- a/drivers/extcon/extcon_gpio.c
+++ b/drivers/extcon/extcon_gpio.c
@@ -107,7 +107,8 @@ static int __devinit gpio_extcon_probe(struct platform_device *pdev)
if (ret < 0)
return ret;
- ret = ... |
af7f2158fdee9d7f55b793b09f8170a3391f889a | Analyze and fix the following issue in the Linux kernel code: drivers-core: make structured logging play nice with dynamic-debug | Problem Details:
commit c4e00daaa96d3a0786f1f4fe6456281c60ef9a16 changed __dev_printk
in a way that broke dynamic-debug's ability to control the dynamic
prefix of dev_dbg(dev,..), but not dev_dbg(NULL,..) or pr_debug(..),
which is why it wasnt noticed sooner.
When dev==NULL, __dev_printk() just calls printk(), which j... | ```diff
diff --git a/drivers/base/core.c b/drivers/base/core.c
index f338037a4f3d..cdd01c52c629 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1865,6 +1865,7 @@ int __dev_printk(const char *level, const struct device *dev,
struct va_format *vaf)
{
char dict[128];
+ const char *level_extra = "";
... |
8565adbc821487accbabe82a03c40daf7a3b92ca | Analyze and fix the following issue in the Linux kernel code: drivers/misc/ti-st: fix read fw version cmd | Problem Details:
If the read firmware version response from the chip is split into multiple
frames of UART buffer being received by the host, the TI-ST driver as of today
is unable to put the pieces of response together unlike other responses.
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-H... | ```diff
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
index 0f36db3aa40f..04a819944f6b 100644
--- a/drivers/misc/ti-st/st_kim.c
+++ b/drivers/misc/ti-st/st_kim.c
@@ -66,7 +66,24 @@ static struct platform_device *st_get_plat_device(int id)
static void validate_firmware_response(struct kim_data_... |
73ac0e9eafe8d04a3cdb39b7c7c1e3f4154676b5 | Analyze and fix the following issue in the Linux kernel code: pch_phub: fix sparse warning | Problem Details:
sparse warns about using 0 as NULL pointer,
drivers/misc/pch_phub.c:702:44: warning: Using plain integer as NULL pointer
Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/misc/pch_phub.c b/drivers/misc/pch_phub.c
index 9fbcacd703d5..e2c066e510f3 100644
--- a/drivers/misc/pch_phub.c
+++ b/drivers/misc/pch_phub.c
@@ -699,7 +699,7 @@ static int __devinit pch_phub_probe(struct pci_dev *pdev,
chip->pch_phub_base_address = pci_iomap(pdev, 1, 0);
- if (chip->... |
e045907c0a08d09cbc992cd00f788ef0dd83889d | Analyze and fix the following issue in the Linux kernel code: drivers/char/tlclk.c: fix error return code | Problem Details:
Convert a 0 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>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@
(
if (\(ret != 0\|ret < 0\) || ...) { ...... | ```diff
diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c
index ce29e7cce528..e95e0ab0bd87 100644
--- a/drivers/char/tlclk.c
+++ b/drivers/char/tlclk.c
@@ -784,8 +784,10 @@ static int __init tlclk_init(void)
}
tlclk_major = ret;
alarm_events = kzalloc( sizeof(struct tlclk_alarms), GFP_KERNEL);
- if (!alarm... |
c216fdeb2e7371554c56ba457c374cce9c77f91a | Analyze and fix the following issue in the Linux kernel code: mei: wd: decouple and revamp watchdog state machine | Problem Details:
Before ME watchdog was exported through standard watchdog interface
it was closed and started together with the mei device.
The major issue is that closing ME watchdog disabled also MEI device,
to fix this the watchdog state machine has to be independent from MEI
state machine.
Signed-off-by: Tomas W... | ```diff
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index cd6a7f1ff916..98f1430e3e14 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -330,7 +330,6 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled)
dev->me_clients_num = 0;
dev->rd_msg_hdr = 0;
- dev->stop = ... |
248ffdf7c95726a8dae76e25fdb037899c5b77fa | Analyze and fix the following issue in the Linux kernel code: mei: wd: rename watchdog constants to be more descriptive | Problem Details:
1. rename defines to more be descriptive
2. remove duplicated defines from interface.h
3. add common prefix MEI_
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/misc/mei/interface.h b/drivers/misc/mei/interface.h
index fb5c7db4723b..c1988f564aa2 100644
--- a/drivers/misc/mei/interface.h
+++ b/drivers/misc/mei/interface.h
@@ -23,14 +23,6 @@
#include "mei_dev.h"
-#define AMT_WD_DEFAULT_TIMEOUT 120 /* seconds */
-#define AMT_WD_MIN_TIMEOUT 120 /*... |
9bb3a5897e22bf6af82bc451db9458b1d794f627 | Analyze and fix the following issue in the Linux kernel code: mei: fix device stall after wd is stopped | Problem Details:
After watchdog was disabled the driver would stall
due to wrong calculation of credits reduction
The cat&paste bug was introduced in the commit
7bdf72d3d8059a50214069ea4b87c2174645f40f
mei: introduce mei_data2slots wrapper
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kro... | ```diff
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index 94370d26ed45..7d9a91298ec1 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -1253,7 +1253,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
if (dev->wd_timeout)
*slots... |
731879f8e3d4c61220462160311fa650a8b96abf | Analyze and fix the following issue in the Linux kernel code: USB: qcserial: fix port handling on Gobi 1K and 2K+ | Problem Details:
Bjorn's latest patchset does break Gobi 1K and 2K because on both
devices as it claims usb interface 0. That's because usbif 0 is not
handled in the switch statement, and thus the if0 gets claimed when it
should not. So let's just make things even simpler yet, and handle both
the 1K and 2K+ cases sep... | ```diff
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index 314ae8ceba41..bfd50779f0c9 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -199,43 +199,49 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
/* default to enablin... |
3e8309551777e2a54367daddb65b53e236754374 | Analyze and fix the following issue in the Linux kernel code: mei: fix device stall after wd is stopped | Problem Details:
After watchdog was disabled the driver would stall
due to wrong calculation of credits reduction
The cat&paste bug was introduced in the commit
7bdf72d3d8059a50214069ea4b87c2174645f40f
mei: introduce mei_data2slots wrapper
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kro... | ```diff
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index c6ffbbe5a6c0..d78c05e693f7 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -1253,7 +1253,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
if (dev->wd_timeout)
*slots... |
b210d7506f416e7250eb52c314e5ed08928639dd | Analyze and fix the following issue in the Linux kernel code: mei: name space for mei device state | Problem Details:
1. add MEI_DEV_ prefix for mei device state enums
2. rename mei_state to dev_state
3. add constant to string translation for debug purposes
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index 58b3bf47c8eb..cd6a7f1ff916 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -24,6 +24,25 @@
#include "interface.h"
#include <linux/mei.h>
+const char *mei_dev_state_str(int state)
+{
+#define MEI_DEV_STATE(state) case ... |
07b509b7943e5594f3f228e5b62a49cf6a033709 | Analyze and fix the following issue in the Linux kernel code: mei: revamp me client search function | Problem Details:
me client search functions returns index
into me_client array according me client id
or me client uuid.
1. Add common prefix for the functions mei_me_cl_<>
2. create new function mei_me_cl_by_id that wraps open
coded loops scattered over the code
3. rename mei_find_me_client_index to mei_me_cl_by_uu... | ```diff
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index e77f86e69fb5..58b3bf47c8eb 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -522,12 +522,12 @@ void mei_cl_init(struct mei_cl *priv, struct mei_device *dev)
priv->dev = dev;
}
-int mei_find_me_client_index(const struc... |
a0675a386a3a68f71e831bd064082e6717b45fdc | Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Check iboe netdev pointer before dereferencing it | Problem Details:
Unlike other parts of the mlx4_ib code, the function build_mlx_header()
doesn't check if the iboe netdev of the given port is valid before
dereferencing it, which can cause a crash if the ethernet interface
has already been taken down.
Fix this by checking for a valid netdev pointer before using it to... | ```diff
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index a6d8ea060ea8..f585eddef4b7 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1407,6 +1407,7 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr,
struct mlx4_wqe_m... |
d1aa4d04da8de5c89d73859e077d89c4c71d8ed1 | Analyze and fix the following issue in the Linux kernel code: drbd: Write all pages of the bitmap after an online resize | Problem Details:
We need to write the whole bitmap after we moved the meta data
due to an online resize operation.
With the support for one peta byte devices bitmap IO was optimized
to only write out touched pages. This optimization must be turned
off when writing the bitmap after an online resize.
This issue was int... | ```diff
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index ba91b408abad..d84566496746 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -889,6 +889,7 @@ struct bm_aio_ctx {
unsigned int done;
unsigned flags;
#define BM_AIO_COPY_PAGES 1
+#def... |
227f052f4711caf432b9a7dbcfe1a2857d3c0def | Analyze and fix the following issue in the Linux kernel code: drbd: fix drbd wire compatibility for empty flushes | Problem Details:
DRBD has a concept of request epochs or reorder-domains,
which are separated on the wire by P_BARRIER packets.
Older DRBD is not able to handle zero-sized requests at all,
so we need to map empty flushes to these drbd barriers.
These are the equivalent of empty flushes, and
by default trigger flushes... | ```diff
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 910335c30927..0bb1e41f136f 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -834,7 +834,15 @@ static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, uns
req->private_bio = N... |
e8143ccb6b501f78bb95d9c5ee100d18423008cf | Analyze and fix the following issue in the Linux kernel code: ppc: e500_tlb memset clears nothing | Problem Details:
Put the parameters the right way around
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=44031
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alexander Graf <agraf@suse.de> | ```diff
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
index fb3bb3ad8b3c..a2b66717813d 100644
--- a/arch/powerpc/kvm/e500_tlb.c
+++ b/arch/powerpc/kvm/e500_tlb.c
@@ -322,11 +322,11 @@ static inline void kvmppc_e500_ref_release(struct tlbe_ref *ref)
static void clear_tlb1_bitmap(struct kvmppc_v... |
04f995a544d1289ffb8108849cd71b1325c5af6a | Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Book3S HV: Fix incorrect branch in H_CEDE code | Problem Details:
In handling the H_CEDE hypercall, if this vcpu has already been
prodded (with the H_PROD hypercall, which Linux guests don't in fact
use), we branch to a numeric label '1f'. Unfortunately there is
another '1:' label before the one that we want to jump to. This fixes
the problem by using a textual lab... | ```diff
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index 5a84c8d3d040..44b72feaff7d 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -1421,13 +1421,13 @@ _GLOBAL(kvmppc_h_cede)
sync /* order setting ceded vs. te... |
d1c60a0350a1840281d4de579af6c7665d7ed877 | Analyze and fix the following issue in the Linux kernel code: HID: picolcd: using vmalloc() requires the include of vmalloc.h | Problem Details:
Fixes thes build errors:
drivers/hid/hid-picolcd_fb.c: In function 'picolcd_fb_destroy':
drivers/hid/hid-picolcd_fb.c:350:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
drivers/hid/hid-picolcd_fb.c: In function 'picolcd_init_framebuffer':
drivers/hid/hid-pic... | ```diff
diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c
index 4d8e22c73249..cf295c569170 100644
--- a/drivers/hid/hid-picolcd_fb.c
+++ b/drivers/hid/hid-picolcd_fb.c
@@ -18,6 +18,7 @@
***************************************************************************/
#include <linux/hid.h>
+#incl... |
2614f86490122bf51eb7c12ec73927f1900f4e7d | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_ct_expect: fix possible access to uninitialized timer | Problem Details:
In __nf_ct_expect_check, the function refresh_timer returns 1
if a matching expectation is found and its timer is successfully
refreshed. This results in nf_ct_expect_related returning 0.
Note that at this point:
- the passed expectation is not inserted in the expectation table
and its timer was not... | ```diff
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index 45cf602a76bc..527651a53a45 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -361,23 +361,6 @@ static void evict_oldest_expect(struct nf_conn *master,
}
}
-static inline ... |
ec9b22eebbcf6ff1dfc121ec1e76bbb98a0418b4 | Analyze and fix the following issue in the Linux kernel code: ARM: mmp: enable debug uart port in defconfig | Problem Details:
Enable DEBUG_LL & debug uart port in pxa910 & mmp2 defconfig.
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com> | ```diff
diff --git a/arch/arm/configs/mmp2_defconfig b/arch/arm/configs/mmp2_defconfig
index 5a584520db2f..f1cb95e58af0 100644
--- a/arch/arm/configs/mmp2_defconfig
+++ b/arch/arm/configs/mmp2_defconfig
@@ -16,7 +16,7 @@ CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLI... |
5967b546dd7142e7747993bb4c79422cd7b6f34f | Analyze and fix the following issue in the Linux kernel code: ARM: cache: fix uninitialized ptr in tauros2_init | Problem Details:
init the variable "mode" to NULL to ensure the later NULL checking is
taking effect.
Signed-off-by: Chao Xie <xiechao.mail@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com> | ```diff
diff --git a/arch/arm/mm/cache-tauros2.c b/arch/arm/mm/cache-tauros2.c
index 23a7643e9a87..97e2ac81399f 100644
--- a/arch/arm/mm/cache-tauros2.c
+++ b/arch/arm/mm/cache-tauros2.c
@@ -192,7 +192,7 @@ static inline void __init write_actlr(u32 actlr)
void __init tauros2_init(void)
{
extern int processor_id;
- ... |
77be4b1366c97b95bb197e18187ff45b0e4f6bd3 | Analyze and fix the following issue in the Linux kernel code: mm/slab: restructure kmem_cache_create() debug checks | Problem Details:
kmem_cache_create() does cache integrity checks when CONFIG_DEBUG_VM is
defined. These checks interspersed with the regular code path has lead
to compile time warnings when compiled without CONFIG_DEBUG_VM defined.
Restructuring the code to move the integrity checks in to a new function
would eliminat... | ```diff
diff --git a/mm/slab_common.c b/mm/slab_common.c
index aa3ca5bb01b5..8cf8b4962d6c 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -23,49 +23,17 @@ enum slab_state slab_state;
LIST_HEAD(slab_caches);
DEFINE_MUTEX(slab_mutex);
-/*
- * kmem_cache_create - Create a cache.
- * @name: A string which is us... |
667a5313ecd7308d79629c0738b0db588b0b0a4e | Analyze and fix the following issue in the Linux kernel code: md: Don't truncate size at 4TB for RAID0 and Linear | Problem Details:
commit 27a7b260f71439c40546b43588448faac01adb93
md: Fix handling for devices from 2TB to 4TB in 0.90 metadata.
changed 0.90 metadata handling to truncated size to 4TB as that is
all that 0.90 can record.
However for RAID0 and Linear, 0.90 doesn't need to record the size, so
this truncation is not n... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index fcd098794d37..3f6203a4c7ea 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1108,8 +1108,11 @@ static int super_90_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor
ret = 0;
}
rdev->sectors = rdev->sb_start;
- /* Limit to 4TB as metad... |
19c7ff9ecd89441096dab6a56f926f7df8ba850a | Analyze and fix the following issue in the Linux kernel code: slub: Take node lock during object free checks | Problem Details:
Only applies to scenarios where debugging is on:
Validation of slabs can currently occur while debugging
information is updated from the fast paths of the allocator.
This results in various races where we get false reports about
slab metadata not being in order.
This patch makes the fast paths take t... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index c83fe96f5e42..e131084e87a3 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1069,13 +1069,13 @@ bad:
return 0;
}
-static noinline int free_debug_processing(struct kmem_cache *s,
- struct page *page, void *object, unsigned long addr)
+static noinline struct kmem_cache_no... |
e9ba389c5ffc4dd29dfe17e00e48877302111135 | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream | Problem Details:
A PCM capture stream on usb-audio causes a scheduling-while-atomic
BUG, as reported in the bugzilla entry below. It's because
snd_usb_endpoint_start() is called at first at trigger START for a
capture stream, and this function contains the left-over EP
deactivation codes. The problem doesn't happen f... | ```diff
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 0f647d22cb4a..c41181202688 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -821,10 +821,6 @@ int snd_usb_endpoint_start(struct snd_usb_endpoint *ep)
if (++ep->use_count != 1)
return 0;
- /* just to be sure */
- deactivate_urbs... |
43da5f2e0d0c69ded3d51907d9552310a6b545e8 | Analyze and fix the following issue in the Linux kernel code: net: fix info leak in compat dev_ifconf() | Problem Details:
The implementation of dev_ifconf() for the compat ioctl interface uses
an intermediate ifc structure allocated in userland for the duration of
the syscall. Though, it fails to initialize the padding bytes inserted
for alignment and that for leaks four bytes of kernel stack. Add an
explicit memset(0) be... | ```diff
diff --git a/net/socket.c b/net/socket.c
index dfe5b66c97e0..a5471f804d99 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2657,6 +2657,7 @@ static int dev_ifconf(struct net *net, struct compat_ifconf __user *uifc32)
if (copy_from_user(&ifc32, uifc32, sizeof(struct compat_ifconf)))
return -EFAULT;
+ mems... |
2d8a041b7bfe1097af21441cb77d6af95f4f4680 | Analyze and fix the following issue in the Linux kernel code: ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT) | Problem Details:
If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing the structure to
__ip_vs_get_timeouts()... | ```diff
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 84444dda194b..72bf32a84874 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -2759,6 +2759,7 @@ do_ip_vs_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
{
struct ip_vs_timeout... |
7b07f8eb75aa3097cdfd4f6eac3da49db787381d | Analyze and fix the following issue in the Linux kernel code: dccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INFO) | Problem Details:
The CCID3 code fails to initialize the trailing padding bytes of struct
tfrc_tx_info added for alignment on 64 bit architectures. It that for
potentially leaks four bytes kernel stack via the getsockopt() syscall.
Add an explicit memset(0) before filling the structure to avoid the
info leak.
Signed-of... | ```diff
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index d65e98798eca..119c04317d48 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -535,6 +535,7 @@ static int ccid3_hc_tx_getsockopt(struct sock *sk, const int optname, int len,
case DCCP_SOCKOPT_CCID_TX_INFO:
if (len < sizeof(... |
276bdb82dedb290511467a5a4fdbe9f0b52dce6f | Analyze and fix the following issue in the Linux kernel code: dccp: check ccid before dereferencing | Problem Details:
ccid_hc_rx_getsockopt() and ccid_hc_tx_getsockopt() might be called with
a NULL ccid pointer leading to a NULL pointer dereference. This could
lead to a privilege escalation if the attacker is able to map page 0 and
prepare it with a fake ccid_ops pointer.
Signed-off-by: Mathias Krause <minipli@google... | ```diff
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h
index 75c3582a7678..fb85d371a8de 100644
--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -246,7 +246,7 @@ static inline int ccid_hc_rx_getsockopt(struct ccid *ccid, struct sock *sk,
u32 __user *optval, int __user *optlen)
{
int rc = -ENOPROTOOPT;
- if (ccid-... |
3592aaeb80290bda0f2cf0b5456c97bfc638b192 | Analyze and fix the following issue in the Linux kernel code: llc: fix info leak via getsockname() | Problem Details:
The LLC code wrongly returns 0, i.e. "success", when the socket is
zapped. Together with the uninitialized uaddrlen pointer argument from
sys_getsockname this leads to an arbitrary memory leak of up to 128
bytes kernel stack via the getsockname() syscall.
Return an error instead when the socket is zap... | ```diff
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 8c2919ca36f6..c2190005a114 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -969,14 +969,13 @@ static int llc_ui_getname(struct socket *sock, struct sockaddr *uaddr,
struct sockaddr_llc sllc;
struct sock *sk = sock->sk;
struct llc_sock *llc = l... |
04d4fbca1017c11381e7d82acea21dd741e748bc | Analyze and fix the following issue in the Linux kernel code: l2tp: fix info leak via getsockname() | Problem Details:
The L2TP code for IPv6 fails to initialize the l2tp_unused member of
struct sockaddr_l2tpip6 and that for leaks two bytes kernel stack via
the getsockname() syscall. Initialize l2tp_unused with 0 to avoid the
info leak.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: James Chapman <jchapman... | ```diff
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c
index 35e1e4bde587..927547171bc7 100644
--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -410,6 +410,7 @@ static int l2tp_ip6_getname(struct socket *sock, struct sockaddr *uaddr,
lsa->l2tp_family = AF_INET6;
lsa->l2tp_flowinfo = 0;
lsa->l2tp_sco... |
792039c73cf176c8e39a6e8beef2c94ff46522ed | Analyze and fix the following issue in the Linux kernel code: Bluetooth: L2CAP - Fix info leak via getsockname() | Problem Details:
The L2CAP code fails to initialize the l2_bdaddr_type member of struct
sockaddr_l2 and the padding byte added for alignment. It that for leaks
two bytes kernel stack via the getsockname() syscall. Add an explicit
memset(0) before filling the structure to avoid the info leak.
Signed-off-by: Mathias Kra... | ```diff
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index b94abd30e6f9..1497edd191a2 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -245,6 +245,7 @@ static int l2cap_sock_getname(struct socket *sock, struct sockaddr *addr, int *l
BT_DBG("sock %p, sk %p", sock, s... |
9344a972961d1a6d2c04d9008b13617bcb6ec2ef | Analyze and fix the following issue in the Linux kernel code: Bluetooth: RFCOMM - Fix info leak via getsockname() | Problem Details:
The RFCOMM code fails to initialize the trailing padding byte of struct
sockaddr_rc added for alignment. It that for leaks one byte kernel stack
via the getsockname() syscall. Add an explicit memset(0) before filling
the structure to avoid the info leak.
Signed-off-by: Mathias Krause <minipli@googlema... | ```diff
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 64f55ca61472..1a17850d093c 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -528,6 +528,7 @@ static int rfcomm_sock_getname(struct socket *sock, struct sockaddr *addr, int *
BT_DBG("sock %p, sk %p", soc... |
f9432c5ec8b1e9a09b9b0e5569e3c73db8de432a | Analyze and fix the following issue in the Linux kernel code: Bluetooth: RFCOMM - Fix info leak in ioctl(RFCOMMGETDEVLIST) | Problem Details:
The RFCOMM code fails to initialize the two padding bytes of struct
rfcomm_dev_list_req inserted for alignment before copying it to
userland. Additionally there are two padding bytes in each instance of
struct rfcomm_dev_info. The ioctl() that for disclosures two bytes plus
dev_num times two bytes unin... | ```diff
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index cb960773c002..56f182393c4c 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -456,7 +456,7 @@ static int rfcomm_get_dev_list(void __user *arg)
size = sizeof(*dl) + dev_num * sizeof(*di);
- dl = kmalloc(siz... |
9ad2de43f1aee7e7274a4e0d41465489299e344b | Analyze and fix the following issue in the Linux kernel code: Bluetooth: RFCOMM - Fix info leak in getsockopt(BT_SECURITY) | Problem Details:
The RFCOMM code fails to initialize the key_size member of struct
bt_security before copying it to userland -- that for leaking one
byte kernel stack. Initialize key_size with 0 to avoid the info
leak.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc:... | ```diff
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 7e1e59645c05..64f55ca61472 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -822,6 +822,7 @@ static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, c
}
sec.level = rfcomm_pi(... |
3f68ba07b1da811bf383b4b701b129bfcb2e4988 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: HCI - Fix info leak via getsockname() | Problem Details:
The HCI code fails to initialize the hci_channel member of struct
sockaddr_hci and that for leaks two bytes kernel stack via the
getsockname() syscall. Initialize hci_channel with 0 to avoid the
info leak.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>... | ```diff
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index a27bbc3cd4b7..19fdac78e555 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -694,6 +694,7 @@ static int hci_sock_getname(struct socket *sock, struct sockaddr *addr,
*addr_len = sizeof(*haddr);
haddr->hci_family = A... |
e15ca9a0ef9a86f0477530b0f44a725d67f889ee | Analyze and fix the following issue in the Linux kernel code: Bluetooth: HCI - Fix info leak in getsockopt(HCI_FILTER) | Problem Details:
The HCI code fails to initialize the two padding bytes of struct
hci_ufilter before copying it to userland -- that for leaking two
bytes kernel stack. Add an explicit memset(0) before filling the
structure to avoid the info leak.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtma... | ```diff
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index a7f04de03d79..a27bbc3cd4b7 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -1009,6 +1009,7 @@ static int hci_sock_getsockopt(struct socket *sock, int level, int optname,
{
struct hci_filter *f = &hci_pi(sk)->fi... |
3c0c5cfdcd4d69ffc4b9c0907cec99039f30a50a | Analyze and fix the following issue in the Linux kernel code: atm: fix info leak via getsockname() | Problem Details:
The ATM code fails to initialize the two padding bytes of struct
sockaddr_atmpvc inserted for alignment. Add an explicit memset(0)
before filling the structure to avoid the info leak.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/atm/pvc.c b/net/atm/pvc.c
index 3a734919c36c..ae0324021407 100644
--- a/net/atm/pvc.c
+++ b/net/atm/pvc.c
@@ -95,6 +95,7 @@ static int pvc_getname(struct socket *sock, struct sockaddr *sockaddr,
return -ENOTCONN;
*sockaddr_len = sizeof(struct sockaddr_atmpvc);
addr = (struct sockaddr_atm... |
e862f1a9b7df4e8196ebec45ac62295138aa3fc2 | Analyze and fix the following issue in the Linux kernel code: atm: fix info leak in getsockopt(SO_ATMPVC) | Problem Details:
The ATM code fails to initialize the two padding bytes of struct
sockaddr_atmpvc inserted for alignment. Add an explicit memset(0)
before filling the structure to avoid the info leak.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/atm/common.c b/net/atm/common.c
index b4b44dbed645..0c0ad930a632 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -812,6 +812,7 @@ int vcc_getsockopt(struct socket *sock, int level, int optname,
if (!vcc->dev || !test_bit(ATM_VF_ADDR, &vcc->flags))
return -ENOTCONN;
+ memset(&p... |
3de819e6b642fdd51904f5f4d2716d7466a2f7f5 | Analyze and fix the following issue in the Linux kernel code: mlx4_core: Fix integer overflow issues around MTT table | Problem Details:
Fix some issues around int variables used in data structures related
to memory registration.
Handle int overflow in mlx4_init_icm_table by using a u64 intermediate
variable and changing struct mlx4_icm_table num_obj field to be u32.
Change some more fields/variables to use u32 instead of int to preve... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx4/icm.c b/drivers/net/ethernet/mellanox/mlx4/icm.c
index 88b7b3e75ab1..daf417923661 100644
--- a/drivers/net/ethernet/mellanox/mlx4/icm.c
+++ b/drivers/net/ethernet/mellanox/mlx4/icm.c
@@ -358,13 +358,14 @@ void mlx4_table_put_range(struct mlx4_dev *dev, struct mlx4... |
89dd86db78e08b51bab29e168fd41b2fd943e6b6 | Analyze and fix the following issue in the Linux kernel code: mlx4_core: Allow large mlx4_buddy bitmaps | Problem Details:
mlx4_buddy_init uses kmalloc() to allocate bitmaps, which fails when
the required size is beyond the max supported value (or when memory is
too fragmented to handle a huge allocation). Extend this to use use
vmalloc() if kmalloc() fails, and take that into account when freeing
the bitmaps as well.
Th... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c
index af55b7ce5341..d6a3a392a377 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mr.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mr.c
@@ -37,6 +37,7 @@
#include <linux/export.h>
#include <linux/slab.h>
#include <linu... |
893430558e5bf116179915de2d3d119ad25c01cf | Analyze and fix the following issue in the Linux kernel code: [media] cx23885-cards: fix netup card default revision | Problem Details:
Netup cards revision 1 are not manufactured anymore.
So, rev. 4 should be default.
Signed-off-by: Anton Nurkin <ptqa@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/pci/cx23885/cx23885-cards.c b/drivers/media/pci/cx23885/cx23885-cards.c
index d365e9a8efc4..d889bd2fe9cc 100644
--- a/drivers/media/pci/cx23885/cx23885-cards.c
+++ b/drivers/media/pci/cx23885/cx23885-cards.c
@@ -36,7 +36,7 @@
#include "xc5000.h"
#include "cx23888-ir.h"
-static uns... |
eb68faaf6685dca904cc92dfbe1028eb5475d662 | Analyze and fix the following issue in the Linux kernel code: [media] media: mx2_camera: Fix clock handling for i.MX27 | Problem Details:
On i.MX27 two clocks are required: emma-ipg and emma-ahb. The ahb clock
has to be requested using both a device and a connection ID.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
[g.liakhovetski@gmx.de: rebase to the current media tree]
Signed-off-by: Guennadi Liakhovetski <g.liakhove... | ```diff
diff --git a/drivers/media/platform/mx2_camera.c b/drivers/media/platform/mx2_camera.c
index 83eeaa69d8f7..256187f30a6c 100644
--- a/drivers/media/platform/mx2_camera.c
+++ b/drivers/media/platform/mx2_camera.c
@@ -272,7 +272,7 @@ struct mx2_camera_dev {
struct device *dev;
struct soc_camera_host soc_host;... |
ad5b987031835b0ac3064ef12209282277dbae54 | Analyze and fix the following issue in the Linux kernel code: [media] media: mx2_camera: Fix clock handling for i.MX27 | Problem Details:
On i.MX27 two clocks are required: emma-ipg and emma-ahb. The ahb clock
has to be requested using both a device and a connection ID.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
[g.liakhovetski@gmx.de: rebase to the current media tree]
Signed-off-by: Guennadi Liakhovetski <g.liakhove... | ```diff
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index 2c3ec94769a5..ac175406e582 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -272,7 +272,7 @@ struct mx2_camera_dev {
struct device *dev;
struct soc_camera_host soc_host;
struct so... |
386d95b3ad6f6dad61d0be379873dca66595c1e4 | Analyze and fix the following issue in the Linux kernel code: drivers/tty/moxa.c: fix error return code | Problem Details:
Convert a 0 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>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@
(
if (\(ret != 0\|ret < 0\) || ...) { ...... | ```diff
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index 9dffc724d46f..3b17a044c212 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -977,6 +977,7 @@ static int __devinit moxa_pci_probe(struct pci_dev *pdev,
board->basemem = ioremap_nocache(pci_resource_start(pdev, 2), 0x4000);
if (board->basem... |
dfdda5a0fa3f458e9807da1d1a1d2c56076d43e5 | Analyze and fix the following issue in the Linux kernel code: drivers/usb/gadget/s3c-hsotg.c: fix error return code | Problem Details:
Convert a 0 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>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@
(
if (\(ret != 0\|ret < 0\) || ...) { ...... | ```diff
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index b13e0bb5f5b8..0bb617e1dda2 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -3599,6 +3599,7 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev)
if (hsotg->num_of_eps == 0) ... |
fd4d72cb0d31e13f0eb4c90c26580a5784c76527 | Analyze and fix the following issue in the Linux kernel code: drivers/usb/wusbcore/wa-hc.c: fix error return code | Problem Details:
Convert a 0 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>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@
(
if (\(ret != 0\|ret < 0\) || ...) { ...... | ```diff
diff --git a/drivers/usb/wusbcore/wa-hc.c b/drivers/usb/wusbcore/wa-hc.c
index 9e4a92461688..a09b65ebd9bb 100644
--- a/drivers/usb/wusbcore/wa-hc.c
+++ b/drivers/usb/wusbcore/wa-hc.c
@@ -46,8 +46,10 @@ int wa_create(struct wahc *wa, struct usb_interface *iface)
wa->dto_epd = &iface->cur_altsetting->endpoint[2... |
aece389ea58ff507801ce260a84905bbe2ab7948 | Analyze and fix the following issue in the Linux kernel code: drivers/usb/host/ohci-platform.c: fix error return code | Problem Details:
Convert a possibly 0 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>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@
(
if (\(ret != 0\|ret < 0\) || .... | ```diff
diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
index 10d85b9d9e93..e24ec9f79164 100644
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
@@ -130,8 +130,10 @@ static int __devinit ohci_platform_probe(struct platform_device *dev)
}
hcd->regs = io... |
ec03ad85486e94f133a721a5d6fd3aaef1176c46 | Analyze and fix the following issue in the Linux kernel code: drivers/usb/host/ehci-platform.c: fix error return code | Problem Details:
Convert a possibly 0 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>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@
(
if (\(ret != 0\|ret < 0\) || .... | ```diff
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 91acdde8d21f..764e0100b6f4 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -128,8 +128,10 @@ static int __devinit ehci_platform_probe(struct platform_device *dev)
}
hcd->regs = io... |
595c8970064275d1eb59b8df5c871ccda2f2bc88 | Analyze and fix the following issue in the Linux kernel code: USB: storage: ene_ub6250: Use macros for firmware names | Problem Details:
Advertise firmware files using MODULE_FIRMWARE macros.
Fix a debug string: SD_RDWR_PATTERN --> SD_RW_PATTERN
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c
index b28f2ad127d4..95edee53d860 100644
--- a/drivers/usb/storage/ene_ub6250.c
+++ b/drivers/usb/storage/ene_ub6250.c
@@ -29,9 +29,21 @@
#include "protocol.h"
#include "debug.h"
+#define SD_INIT1_FIRMWARE "ene-ub6250/sd_init1.b... |
c54103d00957a6725be3b2f4abdf230680db06f4 | Analyze and fix the following issue in the Linux kernel code: USB: qcserial: fix port handling on Gobi 1K and 2K+ | Problem Details:
Bjorn's latest patchset does break Gobi 1K and 2K because on both
devices as it claims usb interface 0. That's because usbif 0 is not
handled in the switch statement, and thus the if0 gets claimed when it
should not. So let's just make things even simpler yet, and handle both
the 1K and 2K+ cases sep... | ```diff
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index 8d103019d6aa..1c94618261c9 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -199,43 +199,49 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
/* default to enablin... |
3821bf4abb7f78c90af7fa2975df6618906b11ec | Analyze and fix the following issue in the Linux kernel code: USB: whci-hcd: fix NULL dereference on allocation failure | Problem Details:
If usb_create_hcd() fails here then we dereference "whc" inside the call
to whc_clean_up() before it has been set. The compiler would have
warned about this if we hadn't initialized all the pointers to NULL at
the start of the function. I've cleaned that up as well.
Signed-off-by: Dan Carpenter <dan... | ```diff
diff --git a/drivers/usb/host/whci/hcd.c b/drivers/usb/host/whci/hcd.c
index 1e141f755b26..c3a647816af0 100644
--- a/drivers/usb/host/whci/hcd.c
+++ b/drivers/usb/host/whci/hcd.c
@@ -238,16 +238,16 @@ static struct hc_driver whc_hc_driver = {
static int whc_probe(struct umc_dev *umc)
{
- int ret = -ENOMEM;
... |
c06d8752e790ed1e717316416c10a7929f1873dd | Analyze and fix the following issue in the Linux kernel code: [media] media: coda: add const qualifiers | Problem Details:
The commit 98d7bbb9 changed *of_device_id.data to const
which introduced warnings in various places that have mostly
been fixed. This patch fixes one such warning by introducing
two const qualifiers.
GCC warning:
drivers/media/platform/coda.c:1785:16: warning:
assignment discards ‘const’ quali... | ```diff
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index 0d6e0a095607..690851400911 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -118,7 +118,7 @@ struct coda_dev {
struct v4l2_device v4l2_dev;
struct video_device vfd;
struct platform_device *pla... |
1e658489ba8d87b7c89ca6f734b8319acc534dbc | Analyze and fix the following issue in the Linux kernel code: USB: serial: Fix mos7840 timeout | Problem Details:
* mos7840 driver was using multiple of HZ for the timeout handed off to
usb_control_msg(). Changed the timeout to use msecs instead.
* Remove unused WAIT_FOR_EVER definition
Signed-off-by: Mark Ferrell <mferrell@uplogix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 009c1d99e146..2f6da1e89bfa 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -82,8 +82,7 @@
* Defines used for sending commands to port
*/
-#define WAIT_FOR_EVER (HZ * 0) /* timeout urb is wait f... |
e3bc4ffb814c847bde7706a80d5684d12c676a8b | Analyze and fix the following issue in the Linux kernel code: vmxnet3: Fix race between dev_open() and register_netdev() | Problem Details:
dev_open() can complete before register_netdev() returns.
Fix vmxnet3_probe_device() to support this.
Signed-off-by: Steve Hodgson <steve@purestorage.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 93e0cfb739b8..ce9d4f2c9776 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -3019,6 +3019,7 @@ vmxnet3_probe_device(struct pci_dev *pdev,
netdev->watchdog_timeo = 5 * HZ;
INIT_... |
c03307eab68d583ea6db917681afa14ed1fb3b84 | Analyze and fix the following issue in the Linux kernel code: bridge: fix rcu dereference outside of rcu_read_lock | Problem Details:
Alternative solution for problem found by Linux Driver Verification
project (linuxtesting.org).
As it noted in the comment before the br_handle_frame_finish
function, this function should be called under rcu_read_lock.
The problem callgraph:
br_dev_xmit -> br_nf_pre_routing_finish_bridge_slow ->
-> ... | ```diff
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 32211fa5b506..070e8a68cfc6 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -31,9 +31,11 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
struct net_bridge_mdb_entry *mdst;
struct br_cpu_netstats *br... |
f44e6b4223fdbb2556faa895861098c32b0ba83f | Analyze and fix the following issue in the Linux kernel code: [media] anysee: fix compiler warning | Problem Details:
debug_dump macro was defined twice when CONFIG_DVB_USB_DEBUG was
not set. Move debug_dump macro to correct place.
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
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/anysee.h b/drivers/media/usb/dvb-usb-v2/anysee.h
index dc40dcf7c328..834dc120f90f 100644
--- a/drivers/media/usb/dvb-usb-v2/anysee.h
+++ b/drivers/media/usb/dvb-usb-v2/anysee.h
@@ -41,19 +41,18 @@
#ifdef CONFIG_DVB_USB_DEBUG
#define dprintk(var, level, args...) \
do... |
e839776f9dfe1eda232755d5cab6eacc59208b4b | Analyze and fix the following issue in the Linux kernel code: [media] drivers/media/usb/{s2255drv.c, tm6000/tm6000-alsa.c, tm6000/tm6000-input.c}: Remove potential NULL dereferences | Problem Details:
If the NULL test is necessary, the initialization involving a dereference of
the tested value should be moved after the NULL test.
The sematic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@
- T i = E->fld... | ```diff
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
index 6c7960cc7506..a25513d484f7 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -1861,11 +1861,12 @@ static int s2255_release(struct file *file)
static int s2255_mmap_v4l(struct fil... |
edff996eb942ce5595e9b60a0e06586dcc41b19b | Analyze and fix the following issue in the Linux kernel code: [media] ov772x: Fix memory leak in probe error path | Problem Details:
The control handler isn't freed if its initialization fails. Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/i2c/soc_camera/ov772x.c b/drivers/media/i2c/soc_camera/ov772x.c
index 641f6f43d7ee..0fede50dde4b 100644
--- a/drivers/media/i2c/soc_camera/ov772x.c
+++ b/drivers/media/i2c/soc_camera/ov772x.c
@@ -1098,18 +1098,17 @@ static int ov772x_probe(struct i2c_client *client,
V4L2_CID_BAND_... |
4bbc6d52e61a8a9c19fcc859c4acab89cb8cd4e5 | Analyze and fix the following issue in the Linux kernel code: [media] soc-camera: Push probe-time power management to drivers | Problem Details:
Several client drivers access the hardware at probe time, for instance
to read the probe chip ID. Such chips need to be powered up when being
probed.
soc-camera handles this by powering chips up in the soc-camera probe
implementation. However, this will break with non soc-camera hosts that
don't perfo... | ```diff
diff --git a/drivers/media/i2c/soc_camera/imx074.c b/drivers/media/i2c/soc_camera/imx074.c
index ade19873ed83..f8534eec9de9 100644
--- a/drivers/media/i2c/soc_camera/imx074.c
+++ b/drivers/media/i2c/soc_camera/imx074.c
@@ -310,26 +310,33 @@ static struct v4l2_subdev_ops imx074_subdev_ops = {
static int imx07... |
4ec10bacd6bf08de39ebdba9e75060452cc313e0 | Analyze and fix the following issue in the Linux kernel code: [media] soc-camera: Add and use soc_camera_power_[on|off]() helper functions | Problem Details:
Instead of forcing all soc-camera drivers to go through the mid-layer to
handle power management, create soc_camera_power_[on|off]() functions
that can be called from the subdev .s_power() operation to manage
regulators and platform-specific power handling. This allows non
soc-camera hosts to use soc-c... | ```diff
diff --git a/drivers/media/i2c/soc_camera/imx074.c b/drivers/media/i2c/soc_camera/imx074.c
index 351e9bafe8fe..ade19873ed83 100644
--- a/drivers/media/i2c/soc_camera/imx074.c
+++ b/drivers/media/i2c/soc_camera/imx074.c
@@ -268,6 +268,14 @@ static int imx074_g_chip_ident(struct v4l2_subdev *sd,
return 0;
}
... |
220329916c72ee3d54ae7262b215a050f04a18fc | Analyze and fix the following issue in the Linux kernel code: IB/srp: Fix a race condition | Problem Details:
Avoid a crash caused by the scmnd->scsi_done(scmnd) call in
srp_process_rsp() being invoked with scsi_done == NULL. This can
happen if a reply is received during or after a command abort.
Reported-by: Joseph Glanville <joseph.glanville@orionvm.com.au>
Reference: http://marc.info/?l=linux-rdma&m=13431... | ```diff
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index bcbf22ee0aa7..1b5b0c730054 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -586,24 +586,62 @@ static void srp_unmap_data(struct scsi_cmnd *scmnd,
scmnd->sc_data_directio... |
51fa3ca37e3bebb291dbe50faa3cb259af35e978 | Analyze and fix the following issue in the Linux kernel code: IB/qib: Fix error return code in qib_init_7322_variables() | Problem Details:
Convert a 0 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>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@
(
if (\(ret != 0\|ret < 0\) || ...) { ...... | ```diff
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
index 0d7280af99bc..3f6b21e9dc11 100644
--- a/drivers/infiniband/hw/qib/qib_iba7322.c
+++ b/drivers/infiniband/hw/qib/qib_iba7322.c
@@ -6346,8 +6346,10 @@ static int qib_init_7322_variables(struct qib_devdata *dd)
... |
142ad5db2b29a1c392e1b14934fae5d161d6c6e7 | Analyze and fix the following issue in the Linux kernel code: IB: Fix typos in infiniband drivers | Problem Details:
Correct spelling typos in comments in drivers/infiniband.
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Roland Dreier <roland@purestorage.com> | ```diff
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c
index 8c81992fa6db..e4a73158fc7f 100644
--- a/drivers/infiniband/hw/amso1100/c2_rnic.c
+++ b/drivers/infiniband/hw/amso1100/c2_rnic.c
@@ -439,7 +439,7 @@ static int c2_rnic_close(struct c2_dev *c2dev)
/*
* Call... |
0b68c8e2c3afaf9807eb1ebe0ccfb3b809570aa4 | Analyze and fix the following issue in the Linux kernel code: PCI: EHCI: Fix crash during hibernation on ASUS computers | Problem Details:
Commit dbf0e4c (PCI: EHCI: fix crash during suspend on ASUS
computers) added a workaround for an ASUS suspend issue related to
USB EHCI and a bug in a number of ASUS BIOSes that attempt to shut
down the EHCI controller during system suspend if its PCI command
register doesn't contain 0 at that time.
I... | ```diff
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 185be3703343..5270f1a99328 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -959,6 +959,13 @@ static int pci_pm_poweroff_noirq(struct device *dev)
if (!pci_dev->state_saved && !pci_is_bridge(pci_dev))
pci_prepare_... |
3d0882c0d10d4b4785aeaf26043e764e3aaca825 | Analyze and fix the following issue in the Linux kernel code: PCI / PM: Fix D3/D3cold/D4 messages printed by acpi_pci_set_power_state() | Problem Details:
If a PCI device is put into D3_cold by acpi_bus_set_power(),
the message printed by acpi_pci_set_power_state() says that its
power state has been changed to D4, which doesn't make sense.
In turn, if the device is put into D3_hot, the message simply
says "D3" without specifying the variant of the D3 sta... | ```diff
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index fbf7b26c7c8a..c5792d622dc4 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -266,8 +266,8 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
}
if (!error)
- dev_printk(KERN_INFO, &dev->dev,
-... |
908d6d52928a7f2a4b317aac47542c5fbef43d88 | Analyze and fix the following issue in the Linux kernel code: regulator: twl-regulator: fix up VINTANA1/VINTANA2 | Problem Details:
It seems commit 2098e95ce9bb039ff2e7bf836df358d18a176139 (regulator: twl:
adapt twl-regulator driver to dt) accidentally deleted VINTANA1. Also
the same commit defines VINTANA2 twice with TWL4030_ADJUSTABLE_LDO and
TWL4030_FIXED_LDO. This patch changes the fixed one to be VINTANA1.
I noticed this when... | ```diff
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 30cb62289b74..77a71a5c17c3 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -1037,7 +1037,7 @@ TWL6025_ADJUSTABLE_LDO(LDO7, 0x74, 1000, 3300);
TWL6025_ADJUSTABLE_LDO(LDO6, 0x60, 100... |
84cfe9e79bd5ac11c963f4841158454fefa872f6 | Analyze and fix the following issue in the Linux kernel code: [media] b2c2: fix driver's build due to the lack of pci DMA code | Problem Details:
Fix a one-character typo at the makefile.
drivers/built-in.o: In function `flexcop_pci_remove':
flexcop-pci.c:(.text+0x20d1a28): undefined reference to `flexcop_dma_free'
flexcop-pci.c:(.text+0x20d1a3e): undefined reference to `flexcop_dma_free'
drivers/built-in.o: In function `flexcop_pci_stream_cont... | ```diff
diff --git a/drivers/media/pci/b2c2/Makefile b/drivers/media/pci/b2c2/Makefile
index aedcac1dceb9..b894320a5f21 100644
--- a/drivers/media/pci/b2c2/Makefile
+++ b/drivers/media/pci/b2c2/Makefile
@@ -2,7 +2,7 @@ ifneq ($(CONFIG_DVB_B2C2_FLEXCOP_PCI),)
b2c2-flexcop-pci-objs += flexcop-dma.o
endif
-b2c2-flexco... |
b74ffd85e32d44e8ed405a2a0a175ef4cd39cf67 | Analyze and fix the following issue in the Linux kernel code: ARM: Kirkwood: fix Makefile.boot | Problem Details:
While building the dtbs target, one is getting:
make dtbs
make[1]: *** No rule to make target `arch/arm/boot/kirkwood-qnap-ts219.dtb', needed by `arch/arm/boot/dtbs'. Stop.
make: *** [dtbs] Error 2
The reason is that there's no kirkwood-qnap-ts219.dts file. Update Makefile.boot
to reflect the dts fi... | ```diff
diff --git a/arch/arm/mach-kirkwood/Makefile.boot b/arch/arm/mach-kirkwood/Makefile.boot
index 2a576abf409b..e2ad35803d27 100644
--- a/arch/arm/mach-kirkwood/Makefile.boot
+++ b/arch/arm/mach-kirkwood/Makefile.boot
@@ -7,7 +7,8 @@ dtb-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += kirkwood-dns320.dtb
dtb-$(CONFIG_MACH_DL... |
03810a20308af54d01b096bc19a8c145684bd6b2 | Analyze and fix the following issue in the Linux kernel code: ARM: Kirkwood: Fix iconnect leds | Problem Details:
While converting, a led has been missed leading to wrong power blue led
definition. Add it back and fix the gpio used on the power blue led.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net> | ```diff
diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts
index 52d947045106..f8ca6fa88192 100644
--- a/arch/arm/boot/dts/kirkwood-iconnect.dts
+++ b/arch/arm/boot/dts/kirkwood-iconnect.dts
@@ -41,9 +41,13 @@
};
power-blue {
label = "power:blue";
- gpios = <&gpio... |
4e8b14526ca7fb046a81c94002c1c43b6fdf0e9b | Analyze and fix the following issue in the Linux kernel code: time: Improve sanity checking of timekeeping inputs | Problem Details:
Unexpected behavior could occur if the time is set to a value large
enough to overflow a 64bit ktime_t (which is something larger then the
year 2262).
Also unexpected behavior could occur if large negative offsets are
injected via adjtimex.
So this patch improves the sanity check timekeeping inputs b... | ```diff
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 603bec2913b0..06177ba10a16 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -58,13 +58,6 @@ union ktime {
typedef union ktime ktime_t; /* Kill this */
-#define KTIME_MAX ((s64)~((u64)1 << 63))
-#if (BITS_PER_LONG == 64)
-#... |
63dab225f334e0e21f7106aed8d888b500b53ce6 | Analyze and fix the following issue in the Linux kernel code: perf evlist: Rename __group method to __set_leader | Problem Details:
Just like was done for parse_events__set_leader.
Also we need to have the list_entry set_leader method in evlist.c so that we
don't grow another dep in the python binding:
# ~acme/git/linux/tools/perf/python/twatch.py
Traceback (most recent call last):
File "/home/acme/git/linux/tools/perf/pytho... | ```diff
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index f5b6137c0f7e..c4e3b683e79b 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -193,7 +193,7 @@ static void perf_record__open(struct perf_record *rec)
perf_evlist__config_attrs(evlist, opts);
if (opts->g... |
68766a2edcd5cd744262a70a2f67a320ac944760 | Analyze and fix the following issue in the Linux kernel code: udf: fix retun value on error path in udf_load_logicalvol | Problem Details:
In case we detect a problem and bail out, we fail to set "ret" to a
nonzero value, and udf_load_logicalvol will mistakenly report success.
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz> | ```diff
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 9f55f7981b7d..18fc038a438d 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1344,6 +1344,7 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
udf_err(sb, "error loading logical volume descriptor: "
"Partition table too long (%u... |
2e84f2641ea91a730642ead558a4ee3bd52310c9 | Analyze and fix the following issue in the Linux kernel code: jbd: don't write superblock when unmounting an ro filesystem | Problem Details:
This sequence:
results in an IO error when unmounting the RO filesystem. The bug was
introduced by:
commit 9754e39c7bc51328f145e933bfb0df47cd67b6e9
Author: Jan Kara <jack@suse.cz>
Date: Sat Apr 7 12:33:03 2012 +0200
jbd: Split updating of journal superblock and marking journal empty
which los... | ```diff
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
index 09357508ec9a..a2862339323b 100644
--- a/fs/jbd/journal.c
+++ b/fs/jbd/journal.c
@@ -1113,6 +1113,11 @@ static void mark_journal_empty(journal_t *journal)
BUG_ON(!mutex_is_locked(&journal->j_checkpoint_mutex));
spin_lock(&journal->j_state_lock);
+ /* I... |
62b259d8b3ea9d4a73108fc599e40c863ec25ae6 | Analyze and fix the following issue in the Linux kernel code: vfs: atomic_open(): fix create mode usage | Problem Details:
Don't mask S_ISREG off the create mode before passing to ->atomic_open(). Other
methods (->create, ->mknod) also get the complete file mode and filesystems
expect it.
Reported-by: Steve <steveamigauk@yahoo.co.uk>
Reported-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Miklos Szeredi <mszer... | ```diff
diff --git a/fs/namei.c b/fs/namei.c
index 1b464390dde8..5bac1bb6e585 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2414,7 +2414,7 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
goto out;
}
- mode = op->mode & S_IALLUGO;
+ mode = op->mode;
if ((open_flag & O_CREAT) && !IS_POSIXAC... |
a2140fc0cb0325bb6384e788edd27b9a568714e2 | Analyze and fix the following issue in the Linux kernel code: audit: fix refcounting in audit-tree | Problem Details:
Refcounting of fsnotify_mark in audit tree is broken. E.g:
refcount
create_chunk
alloc_chunk 1
fsnotify_add_mark 2
untag_chunk
fsnotify_get_mark 3
fsnotify_destroy_mark
audit_tree_freeing_mark 2
fsnotify_put_mark ... | ```diff
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index 69a58515f43f..2b2ffff9eca2 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -250,7 +250,6 @@ static void untag_chunk(struct node *p)
spin_unlock(&hash_lock);
spin_unlock(&entry->lock);
fsnotify_destroy_mark(entry);
- fsnotify_pu... |
0fe33aae0e94b4097dd433c9399e16e17d638cd8 | Analyze and fix the following issue in the Linux kernel code: audit: don't free_chunk() after fsnotify_add_mark() | Problem Details:
Don't do free_chunk() after fsnotify_add_mark(). That one does a delayed unref
via the destroy list and this results in use-after-free.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Eric Paris <eparis@redhat.com>
CC: stable@vger.kernel.org | ```diff
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index 3a5ca582ba1e..69a58515f43f 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -259,7 +259,7 @@ static void untag_chunk(struct node *p)
fsnotify_duplicate_mark(&new->mark, entry);
if (fsnotify_add_mark(&new->mark, new->mark.group, new-... |
1f07b62f3205f6ed41759df2892eaf433bc051a1 | Analyze and fix the following issue in the Linux kernel code: sctp: fix a compile error in sctp.h | Problem Details:
I got the following compile error:
In file included from include/net/sctp/checksum.h:46:0,
from net/ipv4/netfilter/nf_nat_proto_sctp.c:14:
include/net/sctp/sctp.h: In function ‘sctp_dbg_objcnt_init’:
include/net/sctp/sctp.h:370:88: error: parameter name omitted
include/net/sctp/sctp.h... | ```diff
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index aaa82923bbaa..9c6414f553f9 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -367,8 +367,8 @@ void sctp_dbg_objcnt_exit(struct net *);
#define SCTP_DBG_OBJCNT_INC(name)
#define SCTP_DBG_OBJCNT_DEC(name)
-static inline v... |
1c86845268dc91fa6a53de9a4479b407cd4ee903 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Add 3stack-automute model to AD1882 codec | Problem Details:
Added a simple support of automute for the front HP jack to AD1882
stack model. Such an addition is basically an exception -- we really
want to avoid the static quirk codes, but AD1882 parser isn't still
ready for moving to the BIOS auto-parser yet. So, as a quick fix, I
merged it for now.
In near f... | ```diff
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index a92bba816843..16dfe57f1731 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -74,7 +74,8 @@ CMI9880
AD1882 / AD1882A
================
-... |
2843b673d03421e0e73cf061820d1db328f7c8eb | Analyze and fix the following issue in the Linux kernel code: HID: add quirk for Freescale i.MX28 ROM recovery | Problem Details:
The USB recovery mode present in i.MX28 ROM emulates USB HID.
It needs this quirk to behave properly.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chen Peter <B29397@freescale.com>
Cc: Greg KH <greg@kroah.com>
Cc: Jiri Kosina <jkosina@suse.cz>
[jkosina@suse.cz: fix alphabetical ordering]
Signed-off-... | ```diff
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 41c34f21bd00..ec0d6d2ea943 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -296,6 +296,9 @@
#define USB_VENDOR_ID_EZKEY 0x0518
#define USB_DEVICE_ID_BTC_8193 0x0002
+#define USB_VENDOR_ID_FREESCALE 0x15A2
+#define USB_DEVI... |
baacf9c5d2e631e7c940527ad670c8d4b019da81 | Analyze and fix the following issue in the Linux kernel code: HID: picoLCD: satify some checkpatch warnings | Problem Details:
WARNING: static const char * array should probably be static const char * const
+static const char *error_codes[] = {
WARNING: min() should probably be min_t(size_t, 20, s)
+ raw_data[2] = min((size_t)20, s);
Note: the second min_t suggestion cannot be followed because GCC is not
smart enough t... | ```diff
diff --git a/drivers/hid/hid-picolcd_debugfs.c b/drivers/hid/hid-picolcd_debugfs.c
index ff746456823d..f2491fa53e2f 100644
--- a/drivers/hid/hid-picolcd_debugfs.c
+++ b/drivers/hid/hid-picolcd_debugfs.c
@@ -135,7 +135,7 @@ static ssize_t picolcd_debug_eeprom_write(struct file *f, const char __user *u,
memset(... |
b07072e6a27253b5eb7d21049a108449920b4c50 | Analyze and fix the following issue in the Linux kernel code: HID: picoLCD: prevent NULL pointer dereference on unplug | Problem Details:
[ 679.807480] BUG: unable to handle kernel NULL pointer dereference at 00000074
[ 679.814457] IP: [<de93b5bf>] picolcd_led_set_brightness+0x1f/0xb0 [hid_picolcd]
[ 679.814457] *pde = 00000000
[ 679.814457] Oops: 0000 [#1]
[ 679.814457] Modules linked in: hid_picolcd fb_sys_fops sysimgblt sysfillre... | ```diff
diff --git a/drivers/hid/hid-picolcd_leds.c b/drivers/hid/hid-picolcd_leds.c
index 9249c068a485..5573cd8b240b 100644
--- a/drivers/hid/hid-picolcd_leds.c
+++ b/drivers/hid/hid-picolcd_leds.c
@@ -69,6 +69,8 @@ static void picolcd_led_set_brightness(struct led_classdev *led_cdev,
dev = led_cdev->dev->parent;
... |
2856cc2e4d0852c3ddaae9dcb19cb9396512eb08 | Analyze and fix the following issue in the Linux kernel code: sparc64: Be less verbose during vmemmap population. | Problem Details:
On a 2-node machine with 256GB of ram we get 512 lines of
console output, which is just too much.
This mimicks Yinghai Lu's x86 commit c2b91e2eec9678dbda274e906cc32ea8f711da3b
(x86_64/mm: check and print vmemmap allocation continuous) except that
we aren't ever going to get contiguous block pointers i... | ```diff
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 6026fdd1b2ed..d58edf5fefdb 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -2020,6 +2020,9 @@ EXPORT_SYMBOL(_PAGE_CACHE);
#ifdef CONFIG_SPARSEMEM_VMEMMAP
unsigned long vmemmap_table[VMEMMAP_SIZE];
+static long __memin... |
bb2db45b5495455ec7580315029184550709f4a2 | Analyze and fix the following issue in the Linux kernel code: sctp: Enable sctp in all network namespaces | Problem Details:
- Fix the sctp_af operations to work in all namespaces
- Enable sctp socket creation in all network namespaces.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index bbf15341eb2b..a18cda60e156 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -582,7 +582,7 @@ static int sctp_v6_available(union sctp_addr *addr, struct sctp_sock *sp)
if (!(type & IPV6_ADDR_UNICAST))
return 0;
- return ipv6_chk_addr(&init_net, in6... |
bc21fde2d549d1cb1ebef04016eb7affa43bb5c1 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Add support for Sony Vaio T-Series | Problem Details:
Add Sony Vaio T-Series Bluetooth Module( 0x489:0xE036) to
the blacklist of btusb module and add it to the ath3k module.
output of cat /sys/kernel/debug/usb/devices
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendo... | ```diff
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 11f36e502136..fc2de5528dcc 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -86,6 +86,7 @@ static struct usb_device_id ath3k_table[] = {
/* Atheros AR5BBU22 with sflash firmware */
{ USB_DEVICE(0x0489, 0xE03C... |
61a0cfb008f57ecf7eb28ee762952fb42dc15d15 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix use-after-free bug in SMP | Problem Details:
If SMP fails, we should always cancel security_timer delayed work.
Otherwise, security_timer function may run after l2cap_conn object
has been freed.
This patch fixes the following warning reported by ODEBUG:
WARNING: at lib/debugobjects.c:261 debug_print_object+0x7c/0x8d()
Hardware name: Bochs
ODEBU... | ```diff
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 901a616c8083..98ffc1b6a6fa 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -267,10 +267,10 @@ static void smp_failure(struct l2cap_conn *conn, u8 reason, u8 send)
mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type,
hcon->dst... |
e6dd548b9a3c7b3fcdd2fd97880abf7597e8334b | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Add type information to the hci_connect() debug statement | Problem Details:
Now that we have a "connect" function for each link type, we should be
able to indentify which function is going to be called.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> | ```diff
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 2e7b7765e0ea..98670b1df17b 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -566,7 +566,7 @@ static struct hci_conn *hci_connect_sco(struct hci_dev *hdev, bdaddr_t *dst,
struct hci_conn *hci_connect(struct hci_dev *hd... |
4acd4945cd1e1f92b20d14e349c6c6a52acbd42d | Analyze and fix the following issue in the Linux kernel code: ipv6: addrconf: Avoid calling netdevice notifiers with RCU read-side lock | Problem Details:
Cong Wang reports that lockdep detected suspicious RCU usage while
enabling IPV6 forwarding:
[ 1123.310275] ===============================
[ 1123.442202] [ INFO: suspicious RCU usage. ]
[ 1123.558207] 3.6.0-rc1+ #109 Not tainted
[ 1123.665204] -------------------------------
[ 1123.768254] inclu... | ```diff
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 79181819a24f..6bc85f7c31e3 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -494,8 +494,7 @@ static void addrconf_forward_change(struct net *net, __s32 newf)
struct net_device *dev;
struct inet6_dev *idev;
- rcu_read_lock();
- for_e... |
499b95f6b324ec49e8ff50000d47877445b8590a | Analyze and fix the following issue in the Linux kernel code: drivers/net/ethernet/mellanox/mlx4/mcg.c: fix error return code | Problem Details:
Convert a 0 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>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@
(
if (\(ret != 0\|ret < 0\) || ...) { ...... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c
index 4ec3835e1bc2..a018ea2a43de 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
@@ -432,8 +432,10 @@ static int add_promisc_qp(struct mlx4_dev *dev, u8 port,
... |
137bc99ff30aa1d9bf556ee9c8ba788a8ec0f595 | Analyze and fix the following issue in the Linux kernel code: drivers/net/ethernet/freescale/fs_enet: fix error return code | Problem Details:
Convert a 0 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>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@
(
if (\(ret != 0\|ret < 0\) || ...) { ...... | ```diff
diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
index 0f2d1a710909..151453309401 100644
--- a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
+++ b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
@@ -174,8 +174,10 @@ static int _... |
f37c54b6a6c56489221d42ff27305e4f8098e34b | Analyze and fix the following issue in the Linux kernel code: drivers/net/ethernet/ti/davinci_cpdma.c: Remove potential NULL dereference | Problem Details:
If the NULL test is necessary, the initialization involving a dereference of
the tested value should be moved after the NULL test.
The sematic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@
- T i = E->fld... | ```diff
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index 3b5c4571b55e..d15c888e9df8 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -538,11 +538,12 @@ EXPORT_SYMBOL_GPL(cpdma_chan_create);
int cpdma_chan_destroy... |
80eb7a506fdcea08f86c9dfc7c638303bf02a3c8 | Analyze and fix the following issue in the Linux kernel code: staging: comedi: Fix reversed test in comedi_device_attach() | Problem Details:
Commit 3902a370281d2f2b130f141e8cf94eab40125769 (staging: comedi:
refactor comedi_device_attach() a bit) by yours truly introduced an
inverted logic bug in comedi_device_attach() for the case where the
driver expects the device to be configured by driver name rather than
board name. The result of a st... | ```diff
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index c0fdb00783ed..2359151af7e1 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -168,7 +168,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
dev->boa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.