id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
f51d5b248981d05269e4f83ab8f8ed7ed494fe33 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix updating EIR when updating the name | Problem Details:
Whenever we update the local device name the EIR data also needs to be
updated to reflect this. The update_eir() function in mgmt.c depends on
hdev->dev_name to be up to date so the patch also makes sure that the
mgmt function is called from hci_event.c after the update has happened.
Signed-off-by: Jo... | ```diff
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 498b71a0579a..e44e3fd68628 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -209,12 +209,12 @@ static void hci_cc_write_local_name(struct hci_dev *hdev, struct sk_buff *skb)
hci_dev_lock(hdev);
- if (test_bit... |
e59fda8dc14c173b74b5e9d5c8d72849d2ff6b5f | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix EIR data clearing when powering off | Problem Details:
When powering off we should assume that the EIR data isn't valid
anymore. This patch makes sure it gets cleared in hci_dev_do_close and
thereby ensures that a correct new EIR is recreated when powering on
again.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@h... | ```diff
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index e1dadeea4c2f..2d75ffb42f7d 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -794,6 +794,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
/* Clear flags */
hdev->flags = 0;
+ memset(hdev->eir, 0, sizeof(hdev... |
6c8f12c143fe83485afa530320e6f70dfc1aad54 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix Set SSP supported check | Problem Details:
The test for SSP support needs to be earlier in the set_ssp function so
that we return an error when SSP is not supported even when the device
is powered off.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 8b4df0473ec3..ac8ba839a78b 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1141,6 +1141,12 @@ static int set_ssp(struct sock *sk, u16 index, void *data, u16 len)
hci_dev_lock(hdev);
+ if (!(hdev->features[6] & LMP_SIMPLE_PAIR)... |
c80da27e868f6ffbe1c6588937aa4e7aeab21dec | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix clearing of hdev->eir | Problem Details:
The hdev->eir buffer needs to be cleared when clearing the EIR data.
Otherwise subsequent attempts at setting the EIR to something valid
again may fail because the code thinks that the EIR hasn't changed.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann... | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index bdaadb278ce7..08c657df7f8c 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -3400,6 +3400,8 @@ static int clear_eir(struct hci_dev *hdev)
if (!(hdev->features[6] & LMP_EXT_INQ))
return 0;
+ memset(hdev->eir, 0, sizeof(hdev->eir... |
5fc6ebb102fdf6f589242ebfe3a07d112d60c7d5 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix EIR toggling with SSP | Problem Details:
This patch fixes setting the EIR properly when the SSP flag has been set
when powered off (in such a case there is no pending Set_SSP command).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 9fb44900f7d6..bdaadb278ce7 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -3437,14 +3437,13 @@ int mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 enable, u8 status)
if (changed)
err = new_settings(hdev, match.sk);
- if (ma... |
6bf0e4699d1dd56f7f8c12cf332ebffaf1c5e83e | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix coding style issues in mgmt code | Problem Details:
In this case we need to use braces in both branches.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 3f4c50eebbea..9fb44900f7d6 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -952,9 +952,9 @@ static int set_connectable(struct sock *sk, u16 index, void *data, u16 len)
if (!!cp->val != test_bit(HCI_CONNECTABLE, &hdev->dev_flags))
... |
70c1f20b00495fd25b81be14b263d32648a3d629 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix two minor style issues in HCI code | Problem Details:
WARNING: min() should probably be min_t(__u16, scb->expect, count)
+ len = min(scb->expect, (__u16)count);
WARNING: Statements terminations use 1 semicolon
+ INIT_LIST_HEAD(&conn->chan_list);;
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> | ```diff
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 3c68e606d5e5..947172bf1621 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -402,7 +402,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
skb_queue_head_init(&conn->data_q);
- INIT... |
e5f0e151426bd83e4852a7a150fc6ad8ee349e69 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix two minor style issues in management code | Problem Details:
WARNING: Statements terminations use 1 semicolon
+ return err;;
WARNING: space prohibited between function name and open parenthesis '('
+ err = cmd_status (sk, index, MGMT_OP_CONFIRM_NAME,
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index eefd08468002..3f4c50eebbea 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -264,7 +264,7 @@ static int cmd_complete(struct sock *sk, u16 index, u16 cmd, u8 status,
if (err < 0)
kfree_skb(skb);
- return err;;
+ return err;
}
... |
1b009c982482ee0e4cbabcd9bdae690a29119ede | Analyze and fix the following issue in the Linux kernel code: Bluetooth: trivial: Fix long line | Problem Details:
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> | ```diff
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 37736c6603fc..63539f940572 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2720,7 +2720,8 @@ static inline int l2cap_connect_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hd
result = __le16_to_cpu(rsp->resu... |
73c1e20430cbb96947fe3b835c6a3c13805eafd8 | Analyze and fix the following issue in the Linux kernel code: mm: fix comment typo of truncate_inode_pages_range | Problem Details:
The typo of API truncate_inode_pages_range is not updated.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/mm/truncate.c b/mm/truncate.c
index 632b15e29f74..a188058582e0 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -184,7 +184,7 @@ int invalidate_inode_page(struct page *page)
}
/**
- * truncate_inode_pages - truncate range of pages specified by start & end byte offsets
+ * truncate_inode_pages_... |
ca888a7958b3d808e4efd08ceff88913f4212c69 | Analyze and fix the following issue in the Linux kernel code: OMAPDSS: HDMI: hot plug detect fix | Problem Details:
The "OMAPDSS: HDMI: PHY burnout fix" commit switched the HDMI driver
over to using a GPIO for plug detect. Unfortunately the ->detect()
method was not also updated, causing HDMI to no longer work for the
omapdrm driver (because it would actually check if a connection was
detected before attempting to ... | ```diff
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
index 2d72334ca3da..6847a478b459 100644
--- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
+++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
@@ -479,14 +479,7 @@ int ti_hdmi_4xxx_read_edid(struct hdmi_ip_data *ip_data,... |
a247ce78ca3fa041f3e6b1187c4ae96c7016e83a | Analyze and fix the following issue in the Linux kernel code: OMAPDSS: HACK: Ensure DSS clock domain gets out of idle when HDMI is enabled | Problem Details:
For DSS clock domain to transition from idle to active state. It's necessary
to enable the optional clock DSS_FCLK before we enable the module using the
MODULEMODE bits in the clock domain's CM_DSS_DSS_CLKCTRL register.
This sequence was not followed correctly for the 'dss_hdmi' hwmod and it led
to DS... | ```diff
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index d7aa3b056529..a36b934b2db4 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -165,9 +165,25 @@ static int hdmi_runtime_get(void)
DSSDBG("hdmi_runtime_get\n");
+ /*
+ * HACK: Add dss_runtim... |
22c8bff6facebd6f1514ee1e37a6ffc892de7815 | Analyze and fix the following issue in the Linux kernel code: mlx4_core: Exported functions can't be static | Problem Details:
At least on powerpc, it breaks the build if exported functions are
static. Fix some static exported functions introduced with the mlx4
SR-IOV support added in 3.3-rc1.
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Roland Dreier <roland@purestorage.com> | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c
index 8a21e10952ea..9ea7cabcaf3c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx4/fw.c
@@ -685,7 +685,7 @@ int mlx4_QUERY_PORT_wrapper(struct mlx4_dev *dev, int slave,
re... |
c71013597d49c7ca8bb5049f0c7873df2643fad5 | Analyze and fix the following issue in the Linux kernel code: tg3: Clear RECOVERY_PENDING with reset_task_cancel | Problem Details:
If an error happens in the tx completion thread, tg3_reset_task will be
scheduled and TX_RECOVERY_PENDING will be set. The TX_RECOVERY_PENDING
flag causes tg3_poll[_msix] to return early before doing much of its
work. Tg3_reset_task() gets canceled when the configuration of the
device is changing, wh... | ```diff
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index f921484d2086..21b39c5ffb4b 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -6163,6 +6163,7 @@ static inline void tg3_reset_task_cancel(struct tg3 *tp)
{
cancel_work_sync(... |
34655ad63893d3dd64f3fbaaaa0791550e554fa9 | Analyze and fix the following issue in the Linux kernel code: tg3: Fix link check in tg3_adjust_link | Problem Details:
The tg3 driver tried to detect link changes by comparing the tg3 local
active_speed member with SPEED_UNKNOWN (or formerly SPEED_INVALID).
This check is not correct, since phylib will never set its speed member
to either of these two values. The code only appeared to work because
tg3 initializes activ... | ```diff
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 27dafd928279..0caf565fafe4 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -1819,13 +1819,13 @@ static void tg3_adjust_link(struct net_device *dev)
(6 << TX_LENGTHS... |
862ae3132dc393ab6ea750b9ee9e0e1c276b9abb | Analyze and fix the following issue in the Linux kernel code: x32: Drop non-__vdso weak symbols from the x32 VDSO | Problem Details:
Drop the legacy weak symbols that don't carry the __vdso prefix from
the x32 VDSO. This is a new ABI and we don't need to support that
legacy; the actual libc will export the proper symbols.
Suggested-by: Andy Lutomirski <luto@mit.edu>
Link: http://lkml.kernel.org/r/4F42E171.9080005@mit.edu
Cc: H. J.... | ```diff
diff --git a/arch/x86/vdso/vdsox32.lds.S b/arch/x86/vdso/vdsox32.lds.S
index 373ca9a02a53..62272aa2ae0a 100644
--- a/arch/x86/vdso/vdsox32.lds.S
+++ b/arch/x86/vdso/vdsox32.lds.S
@@ -17,13 +17,9 @@
VERSION {
LINUX_2.6 {
global:
- clock_gettime;
__vdso_clock_gettime;
- gettimeofday;
__vdso_gettimeof... |
6d166fec12967063e0e709a935bba8c48fcde99e | Analyze and fix the following issue in the Linux kernel code: ppc-6xx: fix build failure in flipper-pic.c and hlwd-pic.c | Problem Details:
The commit bae1d8f19983fbfa25559aa3cb6a81a84aa82a18 (linux-next)
"irq_domain/powerpc: Use common irq_domain structure instead of irq_host"
made this change:
-static struct irq_host *flipper_irq_host;
+static struct irq_domain *flipper_irq_host;
and this change:
-static struct irq_host *... | ```diff
diff --git a/arch/powerpc/platforms/embedded6xx/flipper-pic.c b/arch/powerpc/platforms/embedded6xx/flipper-pic.c
index 675335a52648..53d6eee01963 100644
--- a/arch/powerpc/platforms/embedded6xx/flipper-pic.c
+++ b/arch/powerpc/platforms/embedded6xx/flipper-pic.c
@@ -172,7 +172,7 @@ out:
unsigned int flipper_... |
e55d7f737d3daf4aaf41945c1829138c608662e9 | Analyze and fix the following issue in the Linux kernel code: powerpc/mpic: Remove duplicate MPIC_WANTS_RESET flag | Problem Details:
There are two separate flags controlling whether or not the MPIC is
reset during initialization, which is completely unnecessary, and only
one of them can be specified in the device tree.
Also, most platforms in-tree right now do actually want to reset the
MPIC during initialization anyways, which mea... | ```diff
diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h
index 2ebac31d1bbd..d7e3fec343d8 100644
--- a/arch/powerpc/include/asm/mpic.h
+++ b/arch/powerpc/include/asm/mpic.h
@@ -348,8 +348,6 @@ struct mpic
#define MPIC_U3_HT_IRQS 0x00000004
/* Broken IPI registers (autodetected) */
#de... |
3a7a7176e840f448aae929f7761ea80cf892c665 | Analyze and fix the following issue in the Linux kernel code: powerpc/mpic: Fix use of "flags" variable in mpic_alloc() | Problem Details:
The mpic_alloc() function takes a "flags" parameter and assigns it into
the mpic->flags variable fairly early on, but several later pieces of
code detect various device-tree properties and save them into the
"mpic->flags" variable (EG: "big-endian" => MPIC_BIG_ENDIAN).
Unfortunately, a number of codep... | ```diff
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 4e9ccb1015de..9deec44ede83 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1182,6 +1182,14 @@ struct mpic * __init mpic_alloc(struct device_node *node,
}
}
+ /* Read extra device-tree properties into t... |
6503de65459da619d3ade0824c9cc17ea0a57141 | Analyze and fix the following issue in the Linux kernel code: firewire: sbp2: Fix SCSI sense data mangling | Problem Details:
SCSI sense data in SBP-2/3 is carried in an unusual format that means we
have to un-mangle it on our end before we pass it to the SCSI subsystem.
Currently our un-mangling code doesn't quite follow the SBP-2 standard
in that we always assume Current and never Deferred error types, we
never set the VALI... | ```diff
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c
index 0c92ed835e06..cc5828e7c735 100644
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -1309,10 +1309,19 @@ static void sbp2_unmap_scatterlist(struct device *card_device,
static unsigned int sbp2_status_to_sense_data(u8 *sbp2_status... |
90963f1cdb3baffc68321e7c98073bf9e99d2ec7 | Analyze and fix the following issue in the Linux kernel code: firewire: core: fix race at address_handler unregistration | Problem Details:
Fix the following unlikely but possible race:
CPU 1 CPU 2
------------------------------------------------------------------------
AR-request tasklet
lookup handler
unregister handler
free handler->callback_data or handler
cal... | ```diff
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index 89e310ba03ba..190bf61533a2 100644
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -602,6 +602,9 @@ EXPORT_SYMBOL(fw_core_add_address_handler);
/**
* fw_core_remove_address_han... |
26b4950de174bc96c27b77546370dec84fb75ae7 | Analyze and fix the following issue in the Linux kernel code: firewire: core: prefix log messages with card name | Problem Details:
Associate all log messages from firewire-core with the respective card
because some people have more than one card. E.g.
firewire_ohci 0000:04:00.0: added OHCI v1.10 device as card 0, 8 IR + 8 IT contexts, quirks 0x0
firewire_ohci 0000:05:00.0: added OHCI v1.10 device as card 1, 8 IR + 8 IT co... | ```diff
diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c
index 85661b060ed7..b19db0f6a254 100644
--- a/drivers/firewire/core-card.c
+++ b/drivers/firewire/core-card.c
@@ -37,6 +37,22 @@
#include "core.h"
+#define define_fw_printk_level(func, kern_level) \
+void func(const struct fw_card *c... |
8408dc1c14c113face77f6f967af98f76999989f | Analyze and fix the following issue in the Linux kernel code: firewire: net: use dev_printk API | Problem Details:
Change the log line prefix from "firewire_net: " to "net firewire0: "
etc. for the case that several RFC 2734 interfaces are being used in the
same machine.
Note, the netdev_printk API is not very useful to firewire-net.
netdev_notice(net, "abc\n") would result in irritating messages like
"firewire_oh... | ```diff
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index fa305187f468..08c674957af8 100644
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -256,8 +256,8 @@ static int fwnet_header_rebuild(struct sk_buff *skb)
if (get_unaligned_be16(&h->h_proto) == ETH_P_IP)
return arp_find((unsigned ... |
fadd85f16a8ec3fee8af599e79a209682dc52348 | Analyze and fix the following issue in the Linux kernel code: x86/mce: Fix return value of mce_chrdev_read() when erst is disabled | Problem Details:
Current kernel MCE code reads ERST at the first reading of /dev/mcelog
(maybe in starting mcelogd,) even if the system does not support ERST,
which results in a fake "no such device" message (as described in [1].)
This problem is not critical, but can confuse system admins.
This patch fixes it by filte... | ```diff
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 4979a5dfeba2..87c56ba8080c 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1541,6 +1541,12 @@ static int __mce_read_apei(char __user **ubuf, size_t usize)
/* Error or no more MCE rec... |
2d0cc56da39d62e141d4a60e3ac96522c52de4b1 | Analyze and fix the following issue in the Linux kernel code: sfc: Minor formatting cleanup | Problem Details:
Fix some indentation and line continuations.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> | ```diff
diff --git a/drivers/net/ethernet/sfc/bitfield.h b/drivers/net/ethernet/sfc/bitfield.h
index a2a9f40b90cf..b26a954c27fc 100644
--- a/drivers/net/ethernet/sfc/bitfield.h
+++ b/drivers/net/ethernet/sfc/bitfield.h
@@ -531,8 +531,8 @@ typedef union efx_oword {
/* Static initialiser */
-#define EFX_OWORD32(a, b... |
01cb543db8a2d2dbcea5f357365ce1327ac46193 | Analyze and fix the following issue in the Linux kernel code: sfc: Correct validation of peer_page_count in efx_vfdi_set_status_page() | Problem Details:
efx_vfdi_set_status_page() validates the peer page count by
calculating the size of a request containing that many addresses and
comparing that with the maximum valid request size (4KB). The
calculation involves a multiplication that may overflow on a 32-bit
system.
We use kcalloc() to allocate memor... | ```diff
diff --git a/drivers/net/ethernet/sfc/siena_sriov.c b/drivers/net/ethernet/sfc/siena_sriov.c
index 5c6839ec3a83..80976e84eee6 100644
--- a/drivers/net/ethernet/sfc/siena_sriov.c
+++ b/drivers/net/ethernet/sfc/siena_sriov.c
@@ -796,12 +796,13 @@ static int efx_vfdi_set_status_page(struct efx_vf *vf)
{
struct ... |
c37281a076604937ec2403f3cfec71362f93c7d8 | Analyze and fix the following issue in the Linux kernel code: iwleagcy: fix ident code damage | Problem Details:
Using ident is not always good.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index 99d7c729d8ce..002cf4fd5a55 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -2272,12 +2272,8 @@ __il3945_down(struct il_priv *il)
* clear all bits but ... |
4e5ea2088b699ae86ffd96b53b916a3966535fcb | Analyze and fix the following issue in the Linux kernel code: iwlegacy: cleanup/fix memory barriers | Problem Details:
wmb(), rmb() are not needed when writel(), readl() are used as
accessors for MMIO. We use them indirectly via iowrite32(),
ioread32().
What is needed mmiowb(), for synchronizing writes coming from
different CPUs on PCIe bridge (see in patch comments). This
fortunately is not needed on x86, where mmiow... | ```diff
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 6dbd11f76f84..50308da8aee3 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -179,7 +179,6 @@ il_read_targ_mem(struct il_priv *il, u32 addr)
_il_grab_nic_access(... |
3fccdcf5091eaaa0d7582bedbc035163b40714b9 | Analyze and fix the following issue in the Linux kernel code: rtlwifi: rtl8192se firmware load can overflow target buffer | Problem Details:
Define RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE which represents the
maximimum possible firmware file size. Use it in the definition
of the buffer which receives the firmware file data.
Set RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE closer to the actual size of
the firmware file, e.g., 90000 (down from hard coded 1... | ```diff
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/fw.h b/drivers/net/wireless/rtlwifi/rtl8192se/fw.h
index babe85d4b694..b4afff626437 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/fw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/fw.h
@@ -30,6 +30,7 @@
#define __REALTEK_FIRMWARE92S_H__
#define RTL81... |
c0e89f084b5089acdfdda1cb45c88896fa0f5139 | Analyze and fix the following issue in the Linux kernel code: brcm80211: fmac: only return success in brcmf_sdbrcm_bus_init() when true | Problem Details:
The function brcmf_sdbrcm_bus_init() always returned success except for
firmware download failure. However, also when enabling SDIO function 2
is failing the function should return failure. This patch fixes that.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) ... | ```diff
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index b20029e9984c..47a192db36ff 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -3467,13 +3467,12 @@ static int brcmf_... |
137dabed34a13f90e068327b98329331367c9b46 | Analyze and fix the following issue in the Linux kernel code: brcm80211: smac: remove smatch warnings from brcmsmac code | Problem Details:
The patch fixes following smatch warnings:
main.c +2902 brcms_b_read_objmem(11) info: ignoring unreachable code.
mac80211_if.c +1146 brcms_suspend(8) error: we previously assumed 'wl'
could be null (see line 1145)
srom.c +641 _initvars_srom_pci(16) error: potential null dereference
'entry'. (kzalloc ... | ```diff
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index c8427978d09e..fec0f10773e5 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -1136,8 +1136,8 @@ static ... |
5e379203c7788b7af01150bfadbc74d2797a2ef4 | Analyze and fix the following issue in the Linux kernel code: brcm80211: smac: fix endless retry of A-MPDU transmissions | Problem Details:
The A-MPDU code checked against a retry limit, but it was using
the wrong variable to do so. This patch fixes this to assure
proper retry mechanism.
This problem had a side-effect causing the mac80211 flush callback
to remain waiting forever as well. That side effect has been fixed
by commit by Stanis... | ```diff
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
index d89dcb14cb6d..c1ce831b9bf4 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
@@ -1051,17 +1051,13 @@ brcms_c_ampdu_dotxstatus_comp... |
1570e53c14ff21ec5e23c1a7fe814c09aa950dbc | Analyze and fix the following issue in the Linux kernel code: brcm80211: smac: fix unintended fallthru in wlc_phy_radio_init_2057() | Problem Details:
The radio initialization for 2057 rev 5 was using the incorrect
register table for the initialization. This patch fixes that.
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: ... | ```diff
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
index ec7450d2fbd6..c27ec7a9af21 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
@@ -19989,12 +19989,11 @@ static void... |
b6df7f1d3b0513529c496b7ef70f0f14b5177407 | Analyze and fix the following issue in the Linux kernel code: rt2x00:Add debug message for new chipset | Problem Details:
Signed-off-by: John Li <chen-yang.li@mediatek.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 772d4aec303a..f1df929e97a7 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4053,7 +4053,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
case RT5... |
6adaea3062b66852e951c65139feb47d1953bd7e | Analyze and fix the following issue in the Linux kernel code: rt2x00:Fix typo | Problem Details:
Signed-off-by: John Li <chen-yang.li@mediatek.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig
index a0a7854facc0..299c3879582d 100644
--- a/drivers/net/wireless/rt2x00/Kconfig
+++ b/drivers/net/wireless/rt2x00/Kconfig
@@ -163,7 +163,7 @@ config RT2800USB_RT53XX
depends on EXPERIMENTAL
---help---
... |
ba9adbe67e288823ac1deb7f11576ab5653f833e | Analyze and fix the following issue in the Linux kernel code: jme: Fix FIFO flush issue | Problem Details:
Set the RX FIFO flush watermark lower.
According to Federico and JMicron's reply,
setting it to 16QW would be stable on most platforms.
Otherwise, user might experience packet drop issue.
CC: stable@kernel.org
Reported-by: Federico Quagliata <federico@quagliata.org>
Fixed-by: Federico Quagliata <feder... | ```diff
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
index 27d651a80f3f..55cbf65512c3 100644
--- a/drivers/net/ethernet/jme.c
+++ b/drivers/net/ethernet/jme.c
@@ -2328,19 +2328,11 @@ jme_change_mtu(struct net_device *netdev, int new_mtu)
((new_mtu) < IPV6_MIN_MTU))
return -EINVAL;
- if (... |
3569e5374df66a42ab66368b8bbb075e81d4e85c | Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_dh_rdac: Fix for unbalanced reference count | Problem Details:
This patch fixes an unbalanced refcount issue.
Elevating the lock for both kref_put and also for controller node deletion.
Previously, controller deletion was protected but the not the kref_put. This
was causing the other thread to pick up the controller structure which was
already kref'd zero.
This ... | ```diff
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
index 53a31c753cb1..20c4557f5abd 100644
--- a/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -364,10 +364,7 @@ static void release_controller(struct kref *kref)
... |
f7b9006f4598dd252dca5225f3cf88179c36276f | Analyze and fix the following issue in the Linux kernel code: pinctrl: fix pinconf_groups_show() to emit newline | Problem Details:
pinconf_groups_show() wrote all debug information on one line. Fix it to
match pinconf_pins_show() and be legible.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | ```diff
diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
index 0c9d08d84694..3f018a1cc14b 100644
--- a/drivers/pinctrl/pinconf.c
+++ b/drivers/pinctrl/pinconf.c
@@ -285,6 +285,8 @@ static int pinconf_groups_show(struct seq_file *s, void *what)
seq_printf(s, "%u (%s):", selector, gname);
pincon... |
449d16b025ac38c7b62af5fb6ef4b833d78e690d | Analyze and fix the following issue in the Linux kernel code: pinctrl: make "hog" mapping table entries work | Problem Details:
Commit 77a5988 "pinctrl: changes hog mechanism to be self-referential"
modified the way "hog" entries were represented in the mapping table.
However, the new representation failed some error checks in
pinctrl_hog_map(). Remove the now-bogus error-check, and fix the code
to solve the issue the error-che... | ```diff
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index c5f76ad5a8c5..8a91eb24eb52 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -725,23 +725,11 @@ static int pinctrl_hog_map(struct pinctrl_dev *pctldev,
struct pinctrl *p;
int ret;
- if (map->dev_name) {
- /*
- * TODO: ... |
5c9bdc3f52d20c9bc6c2552c6d3ec5bfa4119f75 | Analyze and fix the following issue in the Linux kernel code: serial/sirf: fixup for changes to pin control | Problem Details:
We changed the signature of the pin multiplexing functions to
handle any pin business, so fix up the Sirf driver to call this
new interface and rename some variables to make the semantics
understandable.
Cc: linux-serial@vger.kernel.org
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-b... | ```diff
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index a60523fee11b..c1a871eac450 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -22,7 +22,7 @@
#include <linux/io.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
-#include <linux/pi... |
b719587eb46c588fabc71de97c28bafcf827acf7 | Analyze and fix the following issue in the Linux kernel code: rpmsg: rename virtqueue_add_buf_gfp to virtqueue_add_buf | Problem Details:
Since commit 7bb7aef2 "virtio: rename virtqueue_add_buf_gfp to virtqueue_add_buf",
virtqueue_add_buf_gfp is already rename to virtqueue_add_buf now.
This patch fixes below build error:
CC [M] drivers/rpmsg/virtio_rpmsg_bus.o
drivers/rpmsg/virtio_rpmsg_bus.c: In function 'rpmsg_send_offchannel_raw':
... | ```diff
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index 257683e7fe8a..8980ac2cc546 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -720,14 +720,14 @@ int rpmsg_send_offchannel_raw(struct rpmsg_channel *rpdev, u32 src, u32 dst,
mutex_lock(&... |
027d676650e690c6bcb479d96fb601e91213ee56 | Analyze and fix the following issue in the Linux kernel code: mfd: wm8994: Add __devinit and __devexit annotations for probe and remove | Problem Details:
Fixes warnings and needed for correctness.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index f117e7fb9321..980f8419580b 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -599,8 +599,8 @@ static const struct of_device_id wm8994_of_match[] = {
};
MODULE_DEVICE_TABLE(of, wm8994_of_match);
-static int wm899... |
95a771ca16ad63cfd665bebadbc543857db6fa4e | Analyze and fix the following issue in the Linux kernel code: ASoC: mxs-pcm: Request DMA channel early | Problem Details:
Request the DMA channel in the PCM open callback instead of the hwparams
callback, this allows us to let open fail if no dma channel is available. This
also fixes a bug where the channel will be requested multiple times if hwparams
is called multiple times.
Signed-off-by: Lars-Peter Clausen <lars@meta... | ```diff
diff --git a/sound/soc/mxs/mxs-pcm.c b/sound/soc/mxs/mxs-pcm.c
index 06c18ecffbb4..5b8c8d314060 100644
--- a/sound/soc/mxs/mxs-pcm.c
+++ b/sound/soc/mxs/mxs-pcm.c
@@ -85,8 +85,7 @@ static bool filter(struct dma_chan *chan, void *param)
return true;
}
-static int mxs_dma_alloc(struct snd_pcm_substream *subs... |
e2b35f3dbfc080f15b72834d08f04f0269dbe9be | Analyze and fix the following issue in the Linux kernel code: dmaengine/dw_dmac: Fix dw_dmac user drivers to adapt to slave_config changes | Problem Details:
There are few existing user drivers of dw_dmac. They will break as soon as we
remove unused fields from struct dw_dma_slave. This patch focuses to fix these
user drivers to use dma_slave_config() routine.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.int... | ```diff
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 402a7bb72669..43c44e77d83c 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -1353,7 +1353,6 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
goto fa... |
7f99a4216d68f6d75d5d544aa265d72f193bad7f | Analyze and fix the following issue in the Linux kernel code: dmaengine: intel_mid_dma: fix error status mask | Problem Details:
The error status mask (MASK_ERR) has the same format as the other
masks (MASK_TFR, MASK_BLOCK etc) and must be cleared the same way.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> | ```diff
diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
index 74f70aadf9e4..512e2ab3febb 100644
--- a/drivers/dma/intel_mid_dma.c
+++ b/drivers/dma/intel_mid_dma.c
@@ -1056,7 +1056,8 @@ static irqreturn_t intel_mid_dma_interrupt(int irq, void *data)
}
err_status &= mid->intr_mask;
if (err_s... |
3f806e50981825fa56a7f1938f24c0680816be45 | Analyze and fix the following issue in the Linux kernel code: x86/mce/AMD: Fix UP build error | Problem Details:
141168c36cde ("x86: Simplify code by removing a !SMP #ifdefs
from 'struct cpuinfo_x86'") removed a bunch of CONFIG_SMP ifdefs
around code touching struct cpuinfo_x86 members but also caused
the following build error with Randy's randconfigs:
mce_amd.c:(.cpuinit.text+0x4723): undefined reference to `cp... | ```diff
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index 786e76a86322..e4eeaaf58a47 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -528,6 +528,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int ban... |
10ea9d6f5663c3ed51f91cd037b4b9b147273cbb | Analyze and fix the following issue in the Linux kernel code: clocksource: scx200_hrt: Fix the build | Problem Details:
This commit:
12d6d41276de: clocksource: scx200_hrt: Convert scx200 to use clocksource_register_hz
Breaks the build on x86-32:
drivers/clocksource/scx200_hrt.c: In function ‘init_hrt_clocksource’:
drivers/clocksource/scx200_hrt.c:95:0: error: unterminated argument list invoking macro "pr_info"
... | ```diff
diff --git a/drivers/clocksource/scx200_hrt.c b/drivers/clocksource/scx200_hrt.c
index 60db8b1492f1..64f9e8294434 100644
--- a/drivers/clocksource/scx200_hrt.c
+++ b/drivers/clocksource/scx200_hrt.c
@@ -81,9 +81,7 @@ static int __init init_hrt_clocksource(void)
if (mhz27)
freq *= 27;
- pr_info("enabling ... |
8c79a045fd590a26e81e75f5d8d4ec5c7d23e565 | Analyze and fix the following issue in the Linux kernel code: sched/events: Revert trace_sched_stat_sleeptime() | Problem Details:
Commit 1ac9bc69 ("sched/tracing: Add a new tracepoint for sleeptime")
added a new sched:sched_stat_sleeptime tracepoint.
It's broken: the first sample we get on a task might be bad because
of a stale sleep_start value that wasn't reset at the last task switch
because the tracepoint was not active.
It... | ```diff
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 6ba596b07a72..e33ed1bfa113 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -370,56 +370,6 @@ TRACE_EVENT(sched_stat_runtime,
(unsigned long long)__entry->vruntime)
);
-#ifdef CREATE_TRACE_POINTS... |
1e93674a8ea169320950c5e6d1fa29a20b534e60 | Analyze and fix the following issue in the Linux kernel code: HID: add new driver for non-compliant Saitek devices | Problem Details:
The driver currently only supports the PS1000 controller.
It fixes the report descriptor by removing a non-existing axis and
clearing the constant bit on the d-pad and button input reports.
Signed-off-by: Andreas Hübner <andreas@k4n.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 1e6b78ed5ac9..9398cfce80b6 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -532,6 +532,15 @@ config HID_ROCCAT_PYRA
---help---
Support for Roccat Pyra mouse.
+config HID_SAITEK
+ tristate "Saitek non-fully HID-compliant devices"
+ ... |
f0d14daa6906070ca044b86f483fdde7d81f5294 | Analyze and fix the following issue in the Linux kernel code: drm/radeon: Only create additional ring debugfs files on Cayman or newer. | Problem Details:
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46274
Tested with a Cayman card in a Llano system: The additional files are created
and working for the Cayman card but not created for the CPU's built-in GPU.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexa... | ```diff
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index 30a4c5014c8b..92c9ea4751fb 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -500,8 +500,11 @@ static char radeon_debugfs_ib_names[RADEON_IB_POOL_SIZE][32];
int radeon_de... |
04a3d984d32e47983770d314cdb4e4d8f38fccb7 | Analyze and fix the following issue in the Linux kernel code: uprobes/core: Make instruction tables volatile | Problem Details:
Some versions of gcc spits a warning about the asm operand for
test_bit and also causes the first long of the instruction table
to be output.
Fix is similar to 7115e3fc on arch/x86/kernel/kprobes.c
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
... | ```diff
diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
index cf2a18498425..13d616d6519b 100644
--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -53,34 +53,12 @@
(bc##UL << 0xc)|(bd##UL << 0xd)|(be##UL << 0xe)|(bf##UL << 0xf)) \
<< (row % 32))
-#ifdef CONFIG_X86_64
-stat... |
cb74eb15ac88d6aacf7e58db1d8f8dadee710fd9 | Analyze and fix the following issue in the Linux kernel code: ALSA: snd-usb-caiaq: Fix the return of XRUN | Problem Details:
Commit 3702b08 added a lock, but did not account for the case of
SNDRV_PCM_POS_XRUN, which would get immediately overwritten.
This could be bundled into one if-else-if statement, but the goto
helps to clarify the 'exceptional' case.
Thanks to Andreas Pape for spotting this.
Signed-off-by: Mark Hills... | ```diff
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
index 2cf87f5afed4..fde9a7a29cb6 100644
--- a/sound/usb/caiaq/audio.c
+++ b/sound/usb/caiaq/audio.c
@@ -311,8 +311,10 @@ snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub)
spin_lock(&dev->spinlock);
- if (dev->input_panic || dev->output_... |
597cdbc2239e6019bbb2dd73b266f436166f0427 | Analyze and fix the following issue in the Linux kernel code: atm: clip: remove clip_tbl | Problem Details:
Commit 32092ecf0644 (atm: clip: Use device neigh support on top of
"arp_tbl".) introduced a bug since clip_tbl is zeroed : Crash occurs in
__neigh_for_each_release()
idle_timer_check() must use instead arp_tbl and neigh_check_cb() should
ignore non clip neighbours.
Idea from David Miller.
Reported-b... | ```diff
diff --git a/net/atm/clip.c b/net/atm/clip.c
index c12c2582457c..127fe70a1baa 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -46,8 +46,8 @@
static struct net_device *clip_devs;
static struct atm_vcc *atmarpd;
-static struct neigh_table clip_tbl;
static struct timer_list idle_timer;
+static const struc... |
a746e3cc984b0aa5b620dd07c1a433283b1835cf | Analyze and fix the following issue in the Linux kernel code: jump label: Fix compiler warning | Problem Details:
While cross-compiling on sparc64, I found:
kernel/jump_label.c: In function 'jump_label_update':
kernel/jump_label.c:447:40: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
Fix by casting to 'unsigned long'.
Signed-off-by: Jason Baron <jbaron@redhat.com>
Cc: rostedt@g... | ```diff
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index ed9654fd7d27..543782e7cdd2 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -424,7 +424,7 @@ static void jump_label_update(struct jump_label_key *key, int enable)
struct jump_entry *entry = key->entries, *stop = __stop___jump_table;
... |
18b246fa60dd4bfc71c78d669e2ffaa5df454d6a | Analyze and fix the following issue in the Linux kernel code: powerpc: Fix various issues with return to userspace | Problem Details:
We have a few problems when returning to userspace. This is a
quick set of fixes for 3.3, I'll look into a more comprehensive
rework for 3.4. This fixes:
- We kept interrupts soft-disabled when schedule'ing or calling
do_signal when returning to userspace as a result of a hardware
interrupt.
- Rena... | ```diff
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 4f80cf1ce77b..3e57a00b8cba 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -1213,7 +1213,7 @@ do_user_signal: /* r10 contains MSR_KERNEL here */
stw r3,_TRAP(r1)
2: addi r3,r1,STACK_FRAME_... |
922b9f86a020258d3ea3bfed27251efaed7a03a3 | Analyze and fix the following issue in the Linux kernel code: powerpc: Fix program check handling when lockdep is enabled | Problem Details:
In commit 54321242afe ("Disable interrupts early in Program Check"), we
switched from enabling to disabling interrupts in program_check_common.
Whereas ENABLE_INTS leaves r3 untouched, if lockdep is enabled DISABLE_INTS
calls into lockdep code and will clobber r3. That means we pass a bogus
struct pt_... | ```diff
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 3844ca7c5099..15c5a4f6de01 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -774,8 +774,8 @@ alignment_common:
program_check_common:
EXCEPTION_PROLOG_COMMON(0x700, PAC... |
faf309009e2e18d30c032b7d9479f29b91677c37 | Analyze and fix the following issue in the Linux kernel code: sys_poll: fix incorrect type for 'timeout' parameter | Problem Details:
The 'poll()' system call timeout parameter is supposed to be 'int', not
'long'.
Now, the reason this matters is that right now 32-bit compat mode is
broken on at least x86-64, because the 32-bit code just calls
'sys_poll()' directly on x86-64, and the 32-bit argument will have been
zero-extended, turn... | ```diff
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 18c51df9fe06..ff605a39cf43 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -662,7 +662,7 @@ ENTRY(sys32_getresuid16_wrapper)
ENTRY(sys32_poll_wrapper)
llgtr %r2,%r2 # struct po... |
2226957ed2d84add88368aa4c4f69eae4b4843a3 | Analyze and fix the following issue in the Linux kernel code: ARM: OMAP1: Fix out-of-bounds array access for Innovator | Problem Details:
Otherwise we can get the following on some compilers:
arch/arm/mach-omap1/board-innovator.c:419:19: warning:
array subscript is above array bounds [-Warray-bounds]
arch/arm/mach-omap1/board-innovator.c:425:19: warning:
array subscript is above array bounds [-Warray-bounds]
Signed-off-by: Tony Lindgre... | ```diff
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index 309369ea6978..be2002f42dea 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -416,13 +416,13 @@ static void __init innovator_init(void)
#ifdef CONFIG_ARCH_OMAP15XX
... |
53dfe8a884e6f85d73379f84cffa72225cd52ad6 | Analyze and fix the following issue in the Linux kernel code: cpufreq: OMAP: scale voltage along with frequency | Problem Details:
Use the regulator framework to get the voltage regulator associated
with the MPU voltage domain and use it to scale voltage along with
frequency.
While here, CONFIG_CPU_FREQ_DEBUG doesn't exist anymore, so move
debug prints to use dev_dbg().
Special thanks to Afzal Mohammed for suggestions on more ro... | ```diff
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 5d04c57aae30..9f5d6368766e 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -25,6 +25,7 @@
#include <linux/opp.h>
#include <linux/cpu.h>
#include <linux/module.h>
+#include <linux/regulator/c... |
bb94a406682770a35305daaa241ccdb7cab399de | Analyze and fix the following issue in the Linux kernel code: usb-storage: fix freezing of the scanning thread | Problem Details:
This patch (as1521b) fixes the interaction between usb-storage's
scanning thread and the freezer. The current implementation has a
race: If the device is unplugged shortly after being plugged in and
just as a system sleep begins, the scanning thread may get frozen
before the khubd task. Khubd won't b... | ```diff
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 3dd7da9fd504..db51ba16dc07 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -788,15 +788,19 @@ static void quiesce_and_remove_host(struct us_data *us)
struct Scsi_Host *host = us_to_host(us);
/* If the device... |
340a3504fd39dad753ba908fb6f894ee81fc3ae2 | Analyze and fix the following issue in the Linux kernel code: xhci: Fix encoding for HS bulk/control NAK rate. | Problem Details:
The xHCI 0.96 spec says that HS bulk and control endpoint NAK rate must
be encoded as an exponent of two number of microframes. The endpoint
descriptor has the NAK rate encoded in number of microframes. We were
just copying the value from the endpoint descriptor into the endpoint
context interval fie... | ```diff
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 36cbe2226a44..383fc857491c 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1126,26 +1126,42 @@ static unsigned int xhci_parse_exponent_interval(struct usb_device *udev,
}
/*
- * Convert bInterval expr... |
cab928ee1f221c9cc48d6615070fefe2e444384a | Analyze and fix the following issue in the Linux kernel code: USB: Fix handoff when BIOS disables host PCI device. | Problem Details:
On some systems with an Intel Panther Point xHCI host controller, the
BIOS disables the xHCI PCI device during boot, and switches the xHCI
ports over to EHCI. This allows the BIOS to access USB devices without
having xHCI support.
The downside is that the xHCI BIOS handoff mechanism will fail because... | ```diff
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index ac53a662a6a3..7732d69e49e0 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -872,7 +872,17 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
*/
if (pdev->vendor == 0x184e) ... |
a5e7424d424f6398a198ead79d99e0a3c2f24ce8 | Analyze and fix the following issue in the Linux kernel code: ipv4: ping: Fix recvmsg MSG_OOB error handling. | Problem Details:
Don't return an uninitialized variable as the error, return
-EOPNOTSUPP instead.
Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index aea5a199c37a..b072386cee21 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -630,6 +630,7 @@ static int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
pr_debug("ping_recvmsg(sk=%p,sk->num=%u)\n", isk, isk->inet_num);
+ err = ... |
ebe8f7e59d0de3a97d264220deeffa90b8b14003 | Analyze and fix the following issue in the Linux kernel code: OMAP3 EVM: remove out-of-bounds array access of gpio_leds | Problem Details:
Otherwise we can get the following warning on some compilers:
arch/arm/mach-omap2/board-omap3evm.c:384:11:
warning: array subscript is above array bounds
The omap3evm BSP enables a GPIO LED on the twl4030 chip. However,
the static gpio_leds array doesn't have an entry for it. This is
most likely a ... | ```diff
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index c775bead1497..c877236a8442 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -381,7 +381,7 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
gpio_request_one(gpi... |
22e842d4d90ffec9677cc114487a5cefd39b5643 | Analyze and fix the following issue in the Linux kernel code: x32: Fix coding style violations in the x32 VDSO code | Problem Details:
Move the prototype for x32_setup_additional_pages() to a header file,
and adjust the coding style to match standard.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: H. J. Lu <hjl.tools@gmail.com> | ```diff
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
index 83aabea95dd7..1e40634591a4 100644
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -331,6 +331,8 @@ struct linux_binprm;
#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
extern int arch_setup_additional_pages(struct linux_... |
2f2da1ac0ba5b6cc6e1957c4da5ff20e67d8442b | Analyze and fix the following issue in the Linux kernel code: hwmon: (max6639) Fix PPR register initialization to set both channels | Problem Details:
Initialize PPR register for both channels, and set correct PPR register bits.
Also remove unnecessary variable initializations.
Signed-off-by: Chris D Schimp <silverchris@gmail.com>
[guenter.roeck@ericsson.com: Merged two patches into one]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: ... | ```diff
diff --git a/drivers/hwmon/max6639.c b/drivers/hwmon/max6639.c
index 13e58a1992cf..a6760bacd915 100644
--- a/drivers/hwmon/max6639.c
+++ b/drivers/hwmon/max6639.c
@@ -429,9 +429,9 @@ static int max6639_init_client(struct i2c_client *client)
struct max6639_data *data = i2c_get_clientdata(client);
struct max6... |
b63d97a36edb1aecf8c13e5f5783feff4d64c24b | Analyze and fix the following issue in the Linux kernel code: hwmon: (max6639) Fix FAN_FROM_REG calculation | Problem Details:
RPM calculation from tachometer value does not depend on PPR.
Also, do not report negative RPM values.
Signed-off-by: Chris D Schimp <silverchris@gmail.com>
[guenter.roeck@ericsson.com: do not report negative RPM values]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: stable@vger.kernel.... | ```diff
diff --git a/drivers/hwmon/max6639.c b/drivers/hwmon/max6639.c
index e10a092c603c..13e58a1992cf 100644
--- a/drivers/hwmon/max6639.c
+++ b/drivers/hwmon/max6639.c
@@ -72,8 +72,8 @@ static unsigned short normal_i2c[] = { 0x2c, 0x2e, 0x2f, I2C_CLIENT_END };
static const int rpm_ranges[] = { 2000, 4000, 8000, 1... |
115c9b81928360d769a76c632bae62d15206a94a | Analyze and fix the following issue in the Linux kernel code: rtnetlink: Fix problem with buffer allocation | Problem Details:
Implement a new netlink attribute type IFLA_EXT_MASK. The mask
is a 32 bit value that can be used to indicate to the kernel that
certain extended ifinfo values are requested by the user application.
At this time the only mask value defined is RTEXT_FILTER_VF to
indicate that the user wants the ifinfo ... | ```diff
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index c52d4b5f872a..4b24ff453aee 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -137,6 +137,7 @@ enum {
IFLA_AF_SPEC,
IFLA_GROUP, /* Group the device belongs to */
IFLA_NET_NS_FD,
+ IFLA_EXT_MASK, /* Extended info mask... |
84338a6c9dbb6ff3de4749864020f8f25d86fc81 | Analyze and fix the following issue in the Linux kernel code: neighbour: Fixed race condition at tbl->nht | Problem Details:
When the fixed race condition happens:
1. While function neigh_periodic_work scans the neighbor hash table
pointed by field tbl->nht, it unlocks and locks tbl->lock between
buckets in order to call cond_resched.
2. Assume that function neigh_periodic_work calls cond_resched, that is,
the lock tbl->lo... | ```diff
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index e287346e0934..2a83914b0277 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -826,6 +826,8 @@ next_elt:
write_unlock_bh(&tbl->lock);
cond_resched();
write_lock_bh(&tbl->lock);
+ nht = rcu_dereference_protected(tbl->nht,
+ ... |
0f22dd395fc473cee252b9af50249b8e0f32fde7 | Analyze and fix the following issue in the Linux kernel code: of: Only compile OF_DYNAMIC on PowerPC pseries and iseries | Problem Details:
Only two architectures use the OF node reference counting and reclaim bits.
There is no need to compile it for the rest of the PowerPC platforms or for
any of the other architectures. This patch makes iseries and pseries
select CONFIG_OF_DYNAMIC, and makes it default to off for everything else.
It is... | ```diff
diff --git a/arch/powerpc/platforms/8xx/Kconfig b/arch/powerpc/platforms/8xx/Kconfig
index ee56a9ea6a79..1fb0b3cddeb3 100644
--- a/arch/powerpc/platforms/8xx/Kconfig
+++ b/arch/powerpc/platforms/8xx/Kconfig
@@ -26,6 +26,7 @@ config MPC86XADS
config MPC885ADS
bool "MPC885ADS"
select CPM1
+ select OF_DYNAMIC... |
730c41d5ba583a9608300fc4e6cf236957cfe02a | Analyze and fix the following issue in the Linux kernel code: mlx4: Replacing pool_lock with mutex | Problem Details:
Under the spinlock we call request_irq(), which allocates memory with GFP_KERNEL,
This causes the following trace when DEBUG_SPINLOCK is enabled, it can cause
the following trace:
BUG: spinlock wrong CPU on CPU#2, ethtool/2595
lock: ffff8801f9cbc2b0, .magic: dead4ead, .owner: ethtool/2595, .owner_cp... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c
index 8fa41f3082cf..9129ace02560 100644
--- a/drivers/net/ethernet/mellanox/mlx4/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
@@ -1036,7 +1036,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vect... |
0dee00686da88cc32753e02e4e8efdd9e326e4d2 | Analyze and fix the following issue in the Linux kernel code: mac80211: Fix a warning on changing to monitor mode from STA | Problem Details:
nothing needs to be done for monitor/AP_VLAN mode on calling
ieee80211_bss_info_change_notify -> drv_bss_info_changed with the change
flag 'BSS_CHANGED_IDLE'. 'wl1271' seems to use BSS_CHANGED_IDLE only for
STA and IBSS mode. further the non-idle state of the monitor mode is
taken care by the 'count' v... | ```diff
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 01a21c2f6ab3..8e2137bd87e2 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1332,6 +1332,9 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
hw_roc = true;
list_for_each_entry(sdata, &local->interfaces, list) {
+ ... |
8617b093d0031837a7be9b32bc674580cfb5f6b5 | Analyze and fix the following issue in the Linux kernel code: mac80211: zero initialize count field in ieee80211_tx_rate | Problem Details:
rate control algorithms concludes the rate as invalid
with rate[i].idx < -1 , while they do also check for rate[i].count is
non-zero. it would be safer to zero initialize the 'count' field.
recently we had a ath9k rate control crash where the ath9k rate control
in ath_tx_status assumed to check only fo... | ```diff
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index ad64f4d5271a..f9b8e819ca63 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -344,7 +344,7 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
info->control.rates[i].idx = ... |
5dcbf480473f6c3f06ad2426b7517038a2a18911 | Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix key removal | Problem Details:
When trying to remove a key, we always send key
flags just setting the key type, not including
the multicast flag and the key ID. As a result,
whenever any key was removed, the unicast key 0
would be removed, causing a complete connection
loss after the second rekey (the first doesn't
cause a key remov... | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index 7353826095f1..e483cfa8d14e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -1187,6 +1187,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
... |
7be081539e540517d5e1fcbf96b8080074afbf08 | Analyze and fix the following issue in the Linux kernel code: rt2x00: fix a possible NULL pointer dereference | Problem Details:
The 'rt2x00lib_probe_dev' function tries to
allocate the workqueue. If the allocation
fails, 'rt2x00_lib_remove_dev' is called on
the error path. Because 'rt2x00dev->workqueue'
is NULL in this case, the 'destroy_workqueue'
call will cause a NULL pointer dereference.
Signed-off-by: Gabor Juhos <juhosg@... | ```diff
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index c3e1aa7c1a80..d2a1ea98d0f2 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1220,7 +1220,8 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
canc... |
9bbb8168ed3d8b946f9c1901a63a675012de88f2 | Analyze and fix the following issue in the Linux kernel code: ath9k_hw: prevent writes to const data on AR9160 | Problem Details:
Duplicate the data for iniAddac early on, to avoid having to do redundant
memcpy calls later. While we're at it, make AR5416 < v2.2 use the same
codepath. Fixes a reported crash on x86.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Magnus Määttä <magnus.maatta@logica.com>
Cc: stable@vger... | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index f901a17f76ba..86a891f93fc9 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -489,8 +489,6 @@ static int ar5008_hw_rf_alloc_ext_banks(struct at... |
ed9b5f2fa053adce8dac88a385d2225a8ac5f0b5 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix connectable/discoverable response values | Problem Details:
The connectable/discoverable flags need to be changed before sending the
response since otherwise the settings value will be incorrect.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 08b867a4d0e6..e8f890d7256a 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2965,8 +2965,6 @@ int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable)
bool changed = false;
int err = 0;
- mgmt_pending_foreach(MGMT_OP_SET_DI... |
a297e97cf7228467a8c5c76216945ccf029ae2a4 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix clearing of persistent dev_flags | Problem Details:
Now that most flags are persistent, only the LE_SCAN flag should be
cleared after a reset.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org> | ```diff
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 5d0f92a948c2..2a5d05c05e35 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -192,9 +192,8 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb)
hci_req_complete(hdev, HCI_OP_RESET, status);
-... |
0224d2fafbbed4ac0cb05d08d3adab506a398451 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix New Settings event for connectable/discoverable | Problem Details:
When powered off and doing changes to the Connectable or Discoverable
setting we should also send an appropriate New Settings event in
addition to the command response.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 439ec786ff8c..08b867a4d0e6 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -876,11 +876,20 @@ static int set_discoverable(struct sock *sk, u16 index, void *data, u16 len)
}
if (!hdev_is_powered(hdev)) {
- if (cp->val)
- set_... |
f1f0eb02213a3003ecb10b9c61694e588267b824 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix current settings values when powered off | Problem Details:
We should not stop iterating through the various settings if powered off
since most may still be set even then.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index eec70a4ba36c..86e63a707f5a 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -392,10 +392,7 @@ static u32 get_current_settings(struct hci_dev *hdev)
{
u32 settings = 0;
- if (!test_bit(HCI_UP, &hdev->flags))
- return settings;
-
... |
df2c6c5ed5c0bc13b78e855d3e5d9aa3472567ba | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix Removing discoverable timeout in set_connectable | Problem Details:
When switching connectable mode off any pending discoverable timeout
must also be disabled to avoid duplicate write_scan_enable commands.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 6311be775ff2..eec70a4ba36c 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -935,9 +935,14 @@ static int set_connectable(struct sock *sk, u16 index, void *data, u16 len)
if (cp->val)
scan = SCAN_PAGE;
- else
+ else {
scan = ... |
e920d5971d706290c5a6281f719e16c25021f964 | Analyze and fix the following issue in the Linux kernel code: percpu: use raw_local_irq_* in _this_cpu op | Problem Details:
It doesn't make sense to trace irq off or do irq flags
lock proving inside 'this_cpu' operations, so replace local_irq_*
with raw_local_irq_* in 'this_cpu' op.
Also the patch fixes onelockdep warning[1] by the replacement, see
below:
In commit: 933393f58fef9963eac61db8093689544e29a600(percpu:
Remove ... | ```diff
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 3b609eb9cd7d..594c0040fdd8 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -348,9 +348,9 @@ do { \
#define _this_cpu_generic_to_op(pcp, val, op) \
do { \
unsigned long flags; \
- local_irq_save(fla... |
7129d383d9f46eb8276bee5fb46df63f09a70130 | Analyze and fix the following issue in the Linux kernel code: rcu: Trace only after NULL-pointer check | Problem Details:
Fix a bonehead error introduced when adding event tracing to rcutorture.
Move the traces to follow the NULL-pointer checks.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ```diff
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 5cfa23be43bd..ed1c72bd9c09 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -1000,12 +1000,12 @@ static void rcu_torture_timer(unsigned long unused)
rcu_read_lock_bh_held() ||
rcu_read_lock_sched_held() ||
srcu_read_l... |
c0cfbbb0d4fca14b828a7635a59784adfba8989d | Analyze and fix the following issue in the Linux kernel code: rcu: No interrupt disabling for rcu_prepare_for_idle() | Problem Details:
The rcu_prepare_for_idle() function is always called with interrupts
disabled, so there is no reason to disable interrupts again within
rcu_prepare_for_idle(). Therefore, this commit removes all of the
interrupt disabling, also removing a latent disabling-unbalance bug.
Signed-off-by: Paul E. McKenne... | ```diff
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 98ce17cf1fb5..5e25ee327ccb 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -2096,10 +2096,6 @@ static void rcu_cleanup_after_idle(int cpu)
*/
static void rcu_prepare_for_idle(int cpu)
{
- unsigned long flags;
-
- loca... |
6b1bee9035d430c4b4f586df6df4b3f840e89b5b | Analyze and fix the following issue in the Linux kernel code: perf tools: fix broken perf record -a mode | Problem Details:
The following commit:
b52956c perf tools: Allow multiple threads or processes in record, stat, top
introduced a bug in the thread_map code which caused perf record -a to
not setup system-wide monitoring properly.
$ taskset -c 1 noploop 1000 &
$ perf record -a -C 1 sleep 10
$ perf report -D | tail -20... | ```diff
diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c
index e15983cf077d..84d9bd782004 100644
--- a/tools/perf/util/thread_map.c
+++ b/tools/perf/util/thread_map.c
@@ -229,7 +229,7 @@ static struct thread_map *thread_map__new_by_tid_str(const char *tid_str)
if (!tid_str) {
threads = mall... |
105617da8dc0ae3cf5f5a581330b1e4846fe87f2 | Analyze and fix the following issue in the Linux kernel code: rcu: Make documentation give more realistic rcutorture duration | Problem Details:
The torture.txt documentation gives an example rcutorture run with a
100-second duration. This is ridiculously short, unless maybe testing
a fix for a egregious bug. Use a more-realistic one-hour duration for
the example.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ```diff
diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt
index 01a809b1dbc6..d25be872ae33 100644
--- a/Documentation/RCU/torture.txt
+++ b/Documentation/RCU/torture.txt
@@ -278,7 +278,7 @@ The following script may be used to torture RCU:
#!/bin/sh
modprobe rcutorture
- sleep 100
+ sleep ... |
c44e2cddacc2cf299186bad5697d738ea19668b7 | Analyze and fix the following issue in the Linux kernel code: rcu: Check for idle-loop entry while in RCU read-side critical section | Problem Details:
The inner idle loop is an extended quiescent state for all flavors
of RCU, but there have been recent bug involving use of RCU read-side
primitives from within the idle loop. Therefore, this commit enlists
lockdep-RCU to detect attempts to enter the inner idle loop while in
an RCU read-side critical s... | ```diff
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 0569ba11e35a..195bf1fb59ea 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -366,6 +366,17 @@ static void rcu_idle_enter_common(struct rcu_dynticks *rdtp, long long oldval)
atomic_inc(&rdtp->dynticks);
smp_mb__after_atomic_inc(); /* Force orderi... |
8762705ad4ac860bb78434409df463d02ac8f027 | Analyze and fix the following issue in the Linux kernel code: rcu: Inform RCU of irq_exit() activity | Problem Details:
This is a port to TINY_RCU of Peter Zijlstra's commit #ec433f0c5
The rcu_read_unlock_special() function relies on in_irq() to exclude
scheduler activity from interrupt level. This fails because exit_irq()
can invoke the scheduler after clearing the preempt_count() bits that
in_irq() uses to determine... | ```diff
diff --git a/kernel/rcutiny_plugin.h b/kernel/rcutiny_plugin.h
index 95df60ebe363..387c2759e1b0 100644
--- a/kernel/rcutiny_plugin.h
+++ b/kernel/rcutiny_plugin.h
@@ -570,7 +570,7 @@ static noinline void rcu_read_unlock_special(struct task_struct *t)
rcu_preempt_cpu_qs();
/* Hardware IRQ handlers cannot ... |
26861faf896a4cfdc4243281e5c305755f4bad52 | Analyze and fix the following issue in the Linux kernel code: rcu: Protect __rcu_read_unlock() against scheduler-using irq handlers | Problem Details:
This commit ports commit #10f39bb1b2 (rcu: protect __rcu_read_unlock()
against scheduler-using irq handlers) from TREE_PREEMPT_RCU to
TINY_PREEMPT_RCU. The following is a corresponding port of that
commit message.
The addition of RCU read-side critical sections within runqueue and
priority-inheritanc... | ```diff
diff --git a/kernel/rcutiny_plugin.h b/kernel/rcutiny_plugin.h
index 4b905404a5bd..432ed2bc05ad 100644
--- a/kernel/rcutiny_plugin.h
+++ b/kernel/rcutiny_plugin.h
@@ -132,6 +132,7 @@ static struct rcu_preempt_ctrlblk rcu_preempt_ctrlblk = {
RCU_TRACE(.rcb.name = "rcu_preempt")
};
+static void rcu_read_unlo... |
e5601400081651060a59bd1f45f2821bb8e97f95 | Analyze and fix the following issue in the Linux kernel code: rcu: Simplify offline processing | Problem Details:
Move ->qsmaskinit and blkd_tasks[] manipulation to the CPU_DYING
notifier. This simplifies the code by eliminating a potential
deadlock and by reducing the responsibilities of force_quiescent_state().
Also rename functions to make their connection to the CPU-hotplug
stages explicit.
Signed-off-by: Pa... | ```diff
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index acf2d67ad2f4..575f91d03f06 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -943,6 +943,10 @@ rcu_start_gp_per_cpu(struct rcu_state *rsp, struct rcu_node *rnp, struct rcu_dat
* in preparation for detecting the next grace period. The caller must ho... |
5c8806a037ad4f53259146060b32600566475e29 | Analyze and fix the following issue in the Linux kernel code: rcu: Move RCU_TRACE to lib/Kconfig.debug | Problem Details:
The RCU_TRACE kernel parameter has always been intended for debugging,
not for production use. Formalize this by moving RCU_TRACE from
init/Kconfig to lib/Kconfig.debug.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ```diff
diff --git a/init/Kconfig b/init/Kconfig
index 3f42cd66f0f8..72f33faca44f 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -438,15 +438,6 @@ config PREEMPT_RCU
This option enables preemptible-RCU code that is common between
the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations.
-config RCU_TRACE
- ... |
fe15d706cfc1cb321dbe2329b04b5ca185edff60 | Analyze and fix the following issue in the Linux kernel code: rcu: Add lockdep-RCU checks for simple self-deadlock | Problem Details:
It is illegal to have a grace period within a same-flavor RCU read-side
critical section, so this commit adds lockdep-RCU checks to splat when
such abuse is encountered. This commit does not detect more elaborate
RCU deadlock situations. These situations might be a job for lockdep
enhancements.
Sign... | ```diff
diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
index 977296dca0a4..8e00d461911e 100644
--- a/kernel/rcutiny.c
+++ b/kernel/rcutiny.c
@@ -319,6 +319,10 @@ static void rcu_process_callbacks(struct softirq_action *unused)
*/
void synchronize_sched(void)
{
+ rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map) ... |
7d96b3e55ad45ebe4ff1a1daad27ac1fff8682ec | Analyze and fix the following issue in the Linux kernel code: percpu: fix generic definition of __this_cpu_add_and_return() | Problem Details:
This patch adds missed "__" into function prefix.
Otherwise on all archectures (except x86) it expands to irq/preemtion-safe
variant: _this_cpu_generic_add_return(), which do extra irq-save/irq-restore.
Optimal generic implementation is __this_cpu_generic_add_return().
Signed-off-by: Konstantin Khlebn... | ```diff
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 32cd1f67462e..3b609eb9cd7d 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -718,7 +718,8 @@ do { \
# ifndef __this_cpu_add_return_8
# define __this_cpu_add_return_8(pcp, val) __this_cpu_generic_add_return(pcp, val)... |
5180bb392a8aab5233e6db858ac1d8371533e20f | Analyze and fix the following issue in the Linux kernel code: ARM/audit: include audit header and fix audit arch | Problem Details:
Both bugs being fixed were introduced in:
29ef73b7a823b77a7cd0bdd7d7cded3fb6c2587b
Include linux/audit.h to fix below build errors:
CC arch/arm/kernel/ptrace.o
arch/arm/kernel/ptrace.c: In function 'syscall_trace':
arch/arm/kernel/ptrace.c:919: error: implicit declaration of function 'audit_sy... | ```diff
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index e33870ff0ac0..ede6443c34d9 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -23,6 +23,7 @@
#include <linux/perf_event.h>
#include <linux/hw_breakpoint.h>
#include <linux/regset.h>
+#include <linux/audit.h>
#inclu... |
0cbf4ed6e6f43ac399afefdd14a1ee86db8de7d0 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix pairable setting upon initialization | Problem Details:
When mgmt is not in use the HCI_PAIRABLE flag will get implicitly set so
that pairing still works with old user space versions. However, as soon
as mgmt comes into play we should clear this flag so that it can be
properly set through the set_pairable command by user space.
Signed-off-by: Johan Hedberg... | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 563190c9f7b0..0f87030f9c30 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -604,9 +604,17 @@ static void service_cache_off(struct work_struct *work)
static void mgmt_init_hdev(struct hci_dev *hdev)
{
- if (!test_and_set_bit(HCI_M... |
5400c044f3fac38f521362d76711e4c170f78b89 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix set_fast_connectable error return | Problem Details:
This patch ensures that Set Fast Connectable fails apropriately if we
are not already in a connectable state (which is a pre-requisite for
fast connectable).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 03a13843cd16..563190c9f7b0 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2560,6 +2560,13 @@ static int set_fast_connectable(struct sock *sk, u16 index,
if (!hdev)
return cmd_status(sk, index, MGMT_OP_SET_FAST_CONNECTABLE,
... |
b5235a65ad19f47c5995f054d3dcce90570d1a1c | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix set_local_name and set_dev_class powered checks | Problem Details:
Both the Set Local Name and the Set Device Class commands should fail if
the adapter is not powered on.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org> | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index c27481c3c95d..03a13843cd16 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1272,6 +1272,12 @@ static int set_dev_class(struct sock *sk, u16 index, void *data, u16 len)
hci_dev_lock(hdev);
+ if (!hdev_is_powered(hdev)) {
+ err... |
4b34ee782164fbaf29b2e7c0e8cb3a898c0986ca | Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix powered checks for commands | Problem Details:
Having the HCI_AUTO_OFF flag set means that from a mgmt interface
perspective we're still not powered, so all tests for HCI_UP should also
include a test for HCI_AUTO_OFF. This patch adds a convenience macro for
it.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marc... | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index c25cb648059e..c27481c3c95d 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -118,6 +118,9 @@ static const u16 mgmt_events[] = {
#define SERVICE_CACHE_TIMEOUT (5 * 1000)
+#define hdev_is_powered(hdev) (test_bit(HCI_UP, &hdev->flag... |
5b34926114e39e12005031269613d2b13194aeba | Analyze and fix the following issue in the Linux kernel code: tracing: Don't use p->len field to determine output in __print_*() functions | Problem Details:
If more than one __print_*() function is used in a tracepoint
(__print_flags(), __print_symbols(), etc), then the temp seq buffer will
not be zero on entry. Using the temp seq buffer's length to know if
data has been printed or not in the current function is incorrect and
may produce incorrect results.... | ```diff
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 3efd718984fb..c5a01873567d 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -319,7 +319,7 @@ ftrace_print_flags_seq(struct trace_seq *p, const char *delim,
/* check for left over flags */
if (flags) {... |
af14cca162ddcdea017b648c21b9b091e4bf1fa4 | Analyze and fix the following issue in the Linux kernel code: netfilter: ctnetlink: fix soft lockup when netlink adds new entries | Problem Details:
Marcell Zambo and Janos Farago noticed and reported that when
new conntrack entries are added via netlink and the conntrack table
gets full, soft lockup happens. This is because the nf_conntrack_lock
is held while nf_conntrack_alloc is called, which is in turn wants
to lock nf_conntrack_lock while evic... | ```diff
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 9307b033c0c9..cc705175765c 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -1367,15 +1367,12 @@ ctnetlink_create_conntrack(struct net *net, u16 zone,
nf_ct_pr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.