id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
38eaed327dc5bea2e5548ea3d195de83a2070c6d
Analyze and fix the following issue in the Linux kernel code: gpio: em: do not discard em_gio_irq_domain_cleanup
Problem Details: The newly added gpio-em driver marks its em_gio_irq_domain_cleanup function as __devexit, which would lead to that function being discarded in case CONFIG_HOTPLUG is disabled. However, the function is also called by the error handling logic em_gio_probe, which would cause a jump into a NULL pointer if ...
```diff diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index 150d9768811d..ae37181798b3 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c @@ -266,7 +266,7 @@ static int __devinit em_gio_irq_domain_init(struct em_gio_priv *p) return 0; } -static void __devexit em_gio_irq_domain_cleanup(...
de64c0ee7dbcbfbbe63bd9ea45783d87babc6452
Analyze and fix the following issue in the Linux kernel code: ALSA: cs46xx - signedness bug in snd_cs46xx_codec_read()
Problem Details: This function returns its own error codes instead of normal negative error codes. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index f75f5ffdfdfb..a71d1c14a0f6 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c @@ -94,7 +94,7 @@ static unsigned short snd_cs46xx_codec_read(struct snd_cs46xx *chip, if (snd_BUG_ON(codec_index != CS46...
367e43c50d7f7c3b0cec17f4d855a96f47f5e17b
Analyze and fix the following issue in the Linux kernel code: link-vmlinux.sh: Fix stray "echo" in error message
Problem Details: Reported-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 4629038c9e5a..4235a6361fec 100644 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -211,7 +211,7 @@ if [ -n "${CONFIG_KALLSYMS}" ]; then if ! cmp -s System.map .tmp_System.map; then echo >&2 Inconsistent kallsyms data - e...
f22eb25cf5b1157b29ef88c793b71972efc47143
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_nat_sip: fix via header translation with multiple parameters
Problem Details: Via-headers are parsed beginning at the first character after the Via-address. When the address is translated first and its length decreases, the offset to start parsing at is incorrect and header parameters might be missed. Update the offset after translating the Via-address to fix this. Signed-off-...
```diff diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c index eef8f29e8bf8..4ad9cf173992 100644 --- a/net/ipv4/netfilter/nf_nat_sip.c +++ b/net/ipv4/netfilter/nf_nat_sip.c @@ -148,7 +148,7 @@ static unsigned int ip_nat_sip(struct sk_buff *skb, unsigned int dataoff, if (ct_sip_parse_head...
02b69cbdc2fb2e1bfbfd9ac0c246d7be1b08d3cd
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_ct_sip: fix IPv6 address parsing
Problem Details: Within SIP messages IPv6 addresses are enclosed in square brackets in most cases, with the exception of the "received=" header parameter. Currently the helper fails to parse enclosed addresses. This patch: - changes the SIP address parsing function to enforce square brackets when required, and acce...
```diff diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h index 0dfc8b7210a3..89f2a627f3f0 100644 --- a/include/linux/netfilter/nf_conntrack_sip.h +++ b/include/linux/netfilter/nf_conntrack_sip.h @@ -164,7 +164,7 @@ extern int ct_sip_parse_address_param(const struct nf...
e9324b2ce656e1910d2385b9b47a2f926456dbe3
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_ct_sip: fix helper name
Problem Details: Commit 3a8fc53a (netfilter: nf_ct_helper: allocate 16 bytes for the helper and policy names) introduced a bug in the SIP helper, the helper name is sprinted to the sip_names array instead of instead of into the helper structure. This breaks the helper match and the /proc/net/nf_conntrack_expect output....
```diff diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 758a1bacc126..2fb666920cc9 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c @@ -1515,7 +1515,6 @@ static int sip_help_udp(struct sk_buff *skb, unsigned int protoff, } static struct nf_c...
2bd5ed002c0c493ac328f13a9e2a504261a7d48e
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Fix wrong check for ARRAY_SIZE()
Problem Details: The check in the for-loop is broken. Fix it and the boot-crash it causes in AMD IOMMUv2 systems. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 0a2ea317120a..18a89b760aaa 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -1111,7 +1111,7 @@ static void print_iommu_info(void) if (iommu->cap & (1 << IOMMU_CAP_EFR)) { pr_info("AMD-V...
32ab31e01e2def6f48294d872d9bb42573aae00f
Analyze and fix the following issue in the Linux kernel code: irq_remap: disable IRQ remapping if any IOAPIC lacks an IOMMU
Problem Details: The ACPI tables in the Macbook Air 5,1 define a single IOAPIC with id 2, but the only remapping unit described in the DMAR table matches id 0. Interrupt remapping fails as a result, and the kernel panics with the message "timer doesn't work through Interrupt-remapped IO-APIC." To fix this, check each ...
```diff diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c index e0b18f3ae9a8..af8904de1d44 100644 --- a/drivers/iommu/intel_irq_remapping.c +++ b/drivers/iommu/intel_irq_remapping.c @@ -736,6 +736,7 @@ int __init parse_ioapics_under_ir(void) { struct dmar_drhd_unit *drhd; int i...
63d02d157ec4124990258d66517b6c11fd6df0cf
Analyze and fix the following issue in the Linux kernel code: net: tcp: ipv6_mapped needs sk_rx_dst_set method
Problem Details: commit 5d299f3d3c8a2fb (net: ipv6: fix TCP early demux) added a regression for ipv6_mapped case. [ 67.422369] SELinux: initialized (dev autofs, type autofs), uses genfs_contexts [ 67.449678] SELinux: initialized (dev autofs, type autofs), uses genfs_contexts [ 92.631060] BUG: unable to handle ke...
```diff diff --git a/include/net/tcp.h b/include/net/tcp.h index e19124b84cd2..1f000ffe7075 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -464,6 +464,7 @@ extern int tcp_disconnect(struct sock *sk, int flags); void tcp_connect_init(struct sock *sk); void tcp_finish_connect(struct sock *sk, struct sk_buff ...
be97fdb5fbcc828240c51769cd28cba609158703
Analyze and fix the following issue in the Linux kernel code: ipvs: generalize app registration in netns
Problem Details: Get rid of the ftp_app pointer and allow applications to be registered without adding fields in the netns_ipvs structure. v2: fix coding style as suggested by Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
```diff diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 95374d1696a1..4b8f18ff4789 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -808,8 +808,6 @@ struct netns_ipvs { struct list_head rs_table[IP_VS_RTAB_SIZE]; /* ip_vs_app */ struct list_head app_list; - /* ip_vs_ftp */ - struct ip_vs...
3de5bffddbf5fa9d04f3d181dadcaedc1efa0158
Analyze and fix the following issue in the Linux kernel code: [media] xc5000: change filename to production/redistributable xc5000c firmware
Problem Details: The original xc5000c driver support was based on a beta version of the firmware, and there were no redistribution rights. Change over to using the release version, for which freely redistributable firmware can be found here: http://kernellabs.com/firmware/xc5000/README.xc5000c http://kernellabs.com/f...
```diff diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index 0720d90c985f..dc93cf338f36 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c @@ -226,7 +226,7 @@ static const struct xc5000_fw_cfg xc5000a_1_6_114 = { .pll_reg = 0x806c, }...
e58071f024aa337b7ce41682578b33895b024f8b
Analyze and fix the following issue in the Linux kernel code: [media] au0828: fix a couple of missed edge cases for i2c gate with analog
Problem Details: This patch addresses a couple of cases where I forgot to pop open the gate when in analog mode (a correlary to fix the change made in patch 1c58d5b4a5fca42dce5428bd79b9405878017735). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com...
```diff diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index 4d5b670973ad..fa0fa9ae91c7 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c @@ -1325,12 +1325,19 @@ static int vidioc_s_std(struct file *file, void *priv...
ca60a45dd4a85151068f24148dac38eca6ec2d1c
Analyze and fix the following issue in the Linux kernel code: [media] xc5000: show debug version fields in decimal instead of hex
Problem Details: The driver prints out a dotted version number but it's in hex. As a result, the version doesn't visibly match the filename for the firmware, and it caused a bunch of confusion while discussing different versions with the chip manufacturer. Change the firmware printout to be in decimal. Signed-off-by...
```diff diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index b488c0e1bcd7..0720d90c985f 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c @@ -704,7 +704,7 @@ static void xc_debug_dump(struct xc5000_priv *priv) xc_get_version(priv, &...
21dc61d3c0a4c0ee11e3e4a4e4888d4c71875b6d
Analyze and fix the following issue in the Linux kernel code: [media] au0828: tweak workaround for i2c clock stretching bug
Problem Details: The hack I put in a couple of years ago to avoid clock stretching issues when talking to the xc5000 worked fine for writes, but intermittently fails for register reads, because the xc5000 may stretch the clock for longer between bytes (I was seeing cases of 21 us on the analyzer). The problem manifest...
```diff diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c index e3fe9a6637f6..448361c6a13e 100644 --- a/drivers/media/video/au0828/au0828-cards.c +++ b/drivers/media/video/au0828/au0828-cards.c @@ -46,7 +46,7 @@ struct au0828_board au0828_boards[] = { .name = "Hauppau...
a595c1ce4c9d572cf53513570b9f1a263d7867f2
Analyze and fix the following issue in the Linux kernel code: [media] au0828: fix case where STREAMOFF being called on stopped stream causes BUG()
Problem Details: We weren't checking whether the resource was in use before calling res_free(), so applications which called STREAMOFF on a v4l2 device that wasn't already streaming would cause a BUG() to be hit (MythTV). Reported-by: Larry Finger <larry.finger@lwfinger.net> Reported-by: Jay Harbeston <jharbestonus@gm...
```diff diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index df9232281d64..4d5b670973ad 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c @@ -1702,14 +1702,18 @@ static int vidioc_streamoff(struct file *file, void *...
d6b8267800c59872bf2daf48c3399e83bee3a5ba
Analyze and fix the following issue in the Linux kernel code: [media] au8522: fix regression in logging introduced by separation of modules
Problem Details: The au8522 driver was broken into three modules (dig, decoder, common), and as a result the debug modprobe option doesn't work for any of the common functions. Copy the module macros over to the common module so that the debug option works again. Signed-off-by: Devin Heitmueller <dheitmueller@kernell...
```diff diff --git a/drivers/media/dvb/frontends/au8522_common.c b/drivers/media/dvb/frontends/au8522_common.c index 5cfe151ee394..8b4da40192d5 100644 --- a/drivers/media/dvb/frontends/au8522_common.c +++ b/drivers/media/dvb/frontends/au8522_common.c @@ -26,8 +26,6 @@ #include "dvb_frontend.h" #include "au8522_priv.h...
549ee4df1951c8a1a123e81a073d73c2e1c26588
Analyze and fix the following issue in the Linux kernel code: [media] au0828: fix race condition that causes xc5000 to not bind for digital
Problem Details: In some cases users would see the xc5000_attach() call failing for the digital side of the tuner on initialization. This is because of udev running v4l-id while the digital side of the board is still coming up. This is the exact same race condition which was present in em28xx (not surprising since I ...
```diff diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c index 1e4ce5068ec2..b2c4254e6ec3 100644 --- a/drivers/media/video/au0828/au0828-core.c +++ b/drivers/media/video/au0828/au0828-core.c @@ -205,6 +205,8 @@ static int au0828_usb_probe(struct usb_interface *interface, ...
7c287f1849cd904c210608a6a7bcec055bcb1152
Analyze and fix the following issue in the Linux kernel code: [media] xc5000: add support for showing the SNR and gain in the debug output
Problem Details: When debugging is enabled, also show the analog SNR and the total gain status values. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index a8f108652f55..a3f775a2ccd7 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c @@ -111,6 +111,7 @@ struct xc5000_priv { #define XREG_PRODUCT_ID 0x08 #define XREG_BUSY ...
364d2db2791aa3a808d2590ef62c53b4a83c25dd
Analyze and fix the following issue in the Linux kernel code: [media] au0828: Make the s_reg and g_reg advanced debug calls work against the bridge
Problem Details: The g_reg and s_reg calls worked properly if acting on subdev registers (such as the au8522), but didn't work against the au0828 itself. Copy the logic over from em28xx. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index ac3dd733ab81..6e30c094c56f 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c @@ -1717,8 +1717,12 @@ static int vidioc_g_register(struct file *file, void *...
43f2cccfc81c0af719a425ea816ce8003bb09748
Analyze and fix the following issue in the Linux kernel code: [media] au8522: properly recover from the au8522 delivering misaligned TS streams
Problem Details: There is an apparent bug in the au8522 TS clocking which can result in it delivering a TS payload to the au0828 that is shifted by some number of bits. For example, the device will announce a packet containing "FA 38 FF F8" which if you shift left one bit is "1F 47 1F FF F0..." This presents itself as...
```diff diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c index 39ece8e24985..b328f6550d0b 100644 --- a/drivers/media/video/au0828/au0828-dvb.c +++ b/drivers/media/video/au0828/au0828-dvb.c @@ -101,11 +101,14 @@ static struct tda18271_config hauppauge_woodbury_tunerconfig = ...
b0c4878ebe3ad9706ea2e452331550fd6d171977
Analyze and fix the following issue in the Linux kernel code: [media] au8522: Fix off-by-one in SNR table for QAM256
Problem Details: The table of valid SNR values for QAM 256 is off by one, and as a result if the SNR is oscillating between 40.0 and 39.9 dB, tools like azap show it going back and forth between 40.0 and 0 (misleading some people, including myself, to think signal lock is being lost or there is a problem with register ...
```diff diff --git a/drivers/media/dvb/frontends/au8522_dig.c b/drivers/media/dvb/frontends/au8522_dig.c index 5fc70d6cd04f..ee8cf81cf750 100644 --- a/drivers/media/dvb/frontends/au8522_dig.c +++ b/drivers/media/dvb/frontends/au8522_dig.c @@ -157,54 +157,54 @@ static struct mse2snr_tab qam64_mse2snr_tab[] = { /* QAM...
a307cfa55e2bf7889792e158e45355ccb1e63d80
Analyze and fix the following issue in the Linux kernel code: [media] au8522: fix intermittent lockup of analog video decoder
Problem Details: It turns up the autodetection for the video standard in the au8522 is prone to hanging the chip until a reset is performed. This condition is trivial to reproduce simply by tuning to a station and then rapidly unplugging/ replugging the coax feed. Because we've never claimed to support anything other...
```diff diff --git a/drivers/media/dvb/frontends/au8522_decoder.c b/drivers/media/dvb/frontends/au8522_decoder.c index 55b6390198e3..f2e786b606fd 100644 --- a/drivers/media/dvb/frontends/au8522_decoder.c +++ b/drivers/media/dvb/frontends/au8522_decoder.c @@ -257,9 +257,11 @@ static void setup_decoder_defaults(struct au...
2070ffa2c8d4dc17cd8fc4b30d2710bcde27b051
Analyze and fix the following issue in the Linux kernel code: bnx2x: Fix recovery flow cleanup during probe
Problem Details: During probe, every function probed clears the recovery registers from all functions on its path - thus signaling that given a future recovery event, there will be no need to wait for those functions. This is a flawed behaviour - each function should only be responsible for its own bit. Since this re...
```diff diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 5384a6dd155f..02b5a343b195 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -4041,20 +4041,6 @@ static bool bnx2x_get_load...
8eee694c3e667e6f0856d9c8525208058f9d42bf
Analyze and fix the following issue in the Linux kernel code: bnx2x: fix unload previous driver flow when flr-capable
Problem Details: The existing previous driver unload flow is flawed, causing the probe of functions reaching the 'uncommon fork' in flr-capable devices to fail. This patch resolves this, as well as fixing the flow for hypervisors which disable flr capabilities from functions as they pass them as PDA to VMs, as we cann...
```diff diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index dd451c3dd83d..5384a6dd155f 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -9384,32 +9384,24 @@ static int __devinit bnx2...
b14f243a42c7aa43de71f878641acd003f223022
Analyze and fix the following issue in the Linux kernel code: net: Dont use ifindices in hash fns
Problem Details: Eric noticed, that when there will be devices with equal indices, some hash functions that use them will become less effective as they could. Fix this in advance by mixing the net_device address into the hash value instead of the device index. This is true for arp and ndisc hash fns. The netlabel, can...
```diff diff --git a/include/linux/hash.h b/include/linux/hash.h index b80506bdd733..24df9e70406f 100644 --- a/include/linux/hash.h +++ b/include/linux/hash.h @@ -67,4 +67,14 @@ static inline unsigned long hash_ptr(const void *ptr, unsigned int bits) { return hash_long((unsigned long)ptr, bits); } + +static inline ...
a399a8053164ec8bcb06fed52be9941a26ecde11
Analyze and fix the following issue in the Linux kernel code: time: jiffies_delta_to_clock_t() helper to the rescue
Problem Details: Various /proc/net files sometimes report crazy timer values, expressed in clock_t units. This happens when an expired timer delta (expires - jiffies) is passed to jiffies_to_clock_t(). This function has an overflow in : return div_u64((u64)x * TICK_NSEC, NSEC_PER_SEC / USER_HZ); commit cbbc719fccdb...
```diff diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 265e2c3cbd1c..aded9b1ac5ca 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -303,7 +303,13 @@ extern void jiffies_to_timespec(const unsigned long jiffies, extern unsigned long timeval_to_jiffies(const struct timeval *valu...
66d1b9263a371abd15806c53f486f0645ef31a8f
Analyze and fix the following issue in the Linux kernel code: tun: don't zeroize sock->file on detach
Problem Details: This is a fix for bug, introduced in 3.4 kernel by commit 1ab5ecb90cb6a3df1476e052f76a6e8f6511cb3d ("tun: don't hold network namespace by tun sockets"), which, among other things, replaced simple sock_put() by sk_release_kernel(). Below is sequence, which leads to oops for non-persistent devices: tun_...
```diff diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 926d4db5cb38..3a16d4fdaa05 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -187,7 +187,6 @@ static void __tun_detach(struct tun_struct *tun) netif_tx_lock_bh(tun->dev); netif_carrier_off(tun->dev); tun->tfile = NULL; - tun->socket.file = N...
9270388e184fddb83e3b69c6b7f5b523c070e53d
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix up ilk drps/ips locking
Problem Details: We change the drps/ips sw/hw state from different callers: Our own irq handler, the external intel-ips module and from process context. Most of these callers don't take any lock at all. Protect everything by making the mchdev_lock irqsave and grabbing it in all relevant callsites. Note that we have to...
```diff diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 3e203da61c69..d15ea50f5854 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -296,14 +296,22 @@ static void i915_hotplug_work_func(struct work_struct *work) drm_helper_hpd_irq_event(dev); ...
73edd18f610b6dd900cc3a180919dc643fff8513
Analyze and fix the following issue in the Linux kernel code: drm/i915: DE_PCU_EVENT irq is ilk-only
Problem Details: Like all the other drps/ips stuff. Hence add the corresponding check, give the function a preciser prefix and move the single reg clearing into the rps handling function, too. Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Chris Wilson ...
```diff diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 74c9a0e52507..3e203da61c69 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -296,12 +296,14 @@ static void i915_hotplug_work_func(struct work_struct *work) drm_helper_hpd_irq_event(dev); ...
02d719562ef40483648b2cc46899d4a2ff5953bb
Analyze and fix the following issue in the Linux kernel code: drm/i915: properly guard ilk ips state
Problem Details: The update_gfx_val function called from mark_busy wasn't taking the mchdev_lock, as it should have. Also sprinkle a few spinlock asserts over the code to document things better. Things are still rather confusing, especially since a few variables in dev_priv are used by both the gen6+ rps code and the ...
```diff diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 5050bb8026c0..ec3fe92cfd44 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -2710,6 +2710,21 @@ static const struct cparams { { 0, 800, 231, 23784 }, }; +/** + * Lock protecting IPS rel...
e95829f474f0db3a4d940cae1423783edd966027
Analyze and fix the following issue in the Linux kernel code: xhci: Switch PPT ports to EHCI on shutdown.
Problem Details: The Intel desktop boards DH77EB and DH77DF have a hardware issue that can be worked around by BIOS. If the USB ports are switched to xHCI on shutdown, the xHCI host will send a spurious interrupt, which will wake the system. Some BIOS will work around this, but not all. The bug can be avoided if the...
```diff diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index df0828cb2aa3..c5e9e4a76f14 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -800,6 +800,13 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev) } EXPORT_SYMBOL_GPL(usb_enable_xhci_ports); +v...
b25085be457b4292a563c0bf2fab2ef5b7bb3c45
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix /etc config related installation
Problem Details: Fix missing /etc/bash_completion.d directory creation, otherwise the installation fails miserably on systems that don't have bash completion installed yet or on specific target: $ make DESTDIR=/tmp/junk-perf O=/tmp/pbuild -C tools/perf/ install ... install -m 755 bash_completion /tmp/junk-...
```diff diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 84b422786949..a9458b9dd7b8 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -700,6 +700,7 @@ perfexecdir_SQ = $(subst ','\'',$(perfexecdir)) template_dir_SQ = $(subst ','\'',$(template_dir)) htmldir_SQ = $(subst ','\'',$(htmldir)) pref...
b2a1ef473b031b630a26685c91a46b9ae668d35c
Analyze and fix the following issue in the Linux kernel code: regulator: core: request only valid gpio pins for regulator enable
Problem Details: Commit 65f735082de3 ("regulator: core: Add core support for GPIO controlled enable lines") introduced enable gpio entry in regulator configuration structure. Some drivers use '-1' as a placeholder for marking that such gpio line is not available, because '0' is considered as a valid gpio number. This p...
```diff diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index f092588a078c..48385318175a 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3217,7 +3217,7 @@ regulator_register(const struct regulator_desc *regulator_desc, dev_set_drvdata(&rdev->dev, rdev); - if (config->ena_...
745ca3be810b37fba8dd113a028ea71d42e1d892
Analyze and fix the following issue in the Linux kernel code: drm/i915: add parentheses around PIXCLK_GATE definitions
Problem Details: By looking at the current way we're using these definitions I don't think this commit will fix any bug, but programmers from the future are evil and will certainly find ways to combine macro expansion with operator precedence to introduce bugs that are hard to find. Signed-off-by: Paulo Zanoni <paulo....
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index af41d03bff82..321ae7261320 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -4395,8 +4395,8 @@ /* LPT PIXCLK_GATE */ #define PIXCLK_GATE 0xC6020 -#define PIXCLK_GATE_UNGATE 1<<0 -#de...
3f7c447faab3e750b0b2f94edad605ba8eb28a7f
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix pipe DDI mode select
Problem Details: Mask the value before changing it and also select DVI when needed. DVI was working in cases where the BIOS was setting the correct value because we were not masking the value before changing it. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Si...
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 1310caaaafd6..97f00fb5307f 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -4302,6 +4302,7 @@ /* Those bits are ignored by pipe EDP since it can only connect to DDI A */ #define PIPE_DDI...
87b6a3ad40ba304ec468b972e979e7e410852476
Analyze and fix the following issue in the Linux kernel code: perf script python: Correct handler check and spelling errors
Problem Details: Correct the checking for handler returned by PyDict_GetItemString(), also fix some spelling error and remove some data code in event_analyzing_sample.py, as suggested by Namhyung Kim. v2: restore back the wrongly removed trace_unhandled() func Signed-off-by: Feng Tang <feng.tang@intel.com> Acked-by: ...
```diff diff --git a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py index 6372431188de..9e0985794e20 100755 --- a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py +++ b/tools/perf/scripts/python/Perf-T...
97c6a3d17b978092d0df94d5d68dbfc7c74f0902
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix forgotten ifdef CONFIG_SND_HDA_PATCH_LOADER
Problem Details: The firmware callback must be protected by that ifdef. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 3de3a5cbf1dc..23ad7e216a6b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -3159,6 +3159,7 @@ static void power_down_all_codecs(struct azx *chip) #endif } +#ifdef CONFIG_SND_HDA_PATCH_LOADER /* callback from ...
5b6e3eb576e8ad03264d46982afed77bdc6323a3
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP4: sleep: Save the complete used register stack frame
Problem Details: OMAP4 sleep entry code even though itself don't use many CPU registers makes call to the v7_flush_dcache_all() which uses them. Since v7_flush_dcache_all() doesn't make use of stack, the caller must take care of the stack frame. Otherwise it will lead to corrupted stack frame. Fix it by saving used re...
```diff diff --git a/arch/arm/mach-omap2/sleep44xx.S b/arch/arm/mach-omap2/sleep44xx.S index 9f6b83d1b193..91e71d8f46f0 100644 --- a/arch/arm/mach-omap2/sleep44xx.S +++ b/arch/arm/mach-omap2/sleep44xx.S @@ -56,9 +56,13 @@ ppa_por_params: * The restore function pointer is stored at CPUx_WAKEUP_NS_PA_ADDR_OFFSET. * I...
07a67bbb95ea7977846bd851dab5f4f2be8e488c
Analyze and fix the following issue in the Linux kernel code: usb: musb: Make dma_controller_create __devinit
Problem Details: dma_controller_create is called only from musb_init_controller which is __devint so annotate dma_controller_create also with __devint. fixes the warn WARNING: vmlinux.o(.devinit.text+0x6fa8): Section mismatch in reference from the function musb_init_controller() to the function .init.text:dma_control...
```diff diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c index 8637c1f69fc3..e19da82b4782 100644 --- a/drivers/usb/musb/cppi_dma.c +++ b/drivers/usb/musb/cppi_dma.c @@ -1316,7 +1316,7 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id) } /* Instantiate a software object representing a DMA con...
389d7b26d9e4f78b17366c23a3aa16b3c5cb3bde
Analyze and fix the following issue in the Linux kernel code: bio: Fix potential memory leak in bio_find_or_create_slab()
Problem Details: Do not leak memory by updating pointer with potentially NULL realloc return value. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/fs/bio.c b/fs/bio.c index 73922abba832..fed1f799cb56 100644 --- a/fs/bio.c +++ b/fs/bio.c @@ -73,7 +73,7 @@ static struct kmem_cache *bio_find_or_create_slab(unsigned int extra_size) { unsigned int sz = sizeof(struct bio) + extra_size; struct kmem_cache *slab = NULL; - struct bio_slab *bslab; ...
798bd59ce94c8218332996e650ded48ded039fe1
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: more regulator fixes for Harmony
Problem Details: Commit 3d55c29 "ARM: tegra: harmony: add regulator supply name and its input supply" was supposed to fix all the problems with regulators on Harmony. However, it appears that I only tested it when booting using board files, not when booting using device tree. This change fixes two problems with regulat...
```diff diff --git a/arch/arm/mach-tegra/board-harmony-power.c b/arch/arm/mach-tegra/board-harmony-power.c index 8fd387bf31f0..b7344beec102 100644 --- a/arch/arm/mach-tegra/board-harmony-power.c +++ b/arch/arm/mach-tegra/board-harmony-power.c @@ -51,7 +51,7 @@ static struct regulator_init_data ldo0_data = { .consumer...
8b5eae137b91cb2db15fe2c5a913cafde4629339
Analyze and fix the following issue in the Linux kernel code: ASoC: bfin: fix memory leak in sport3 controller driver
Problem Details: Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/blackfin/bf6xx-sport.c b/sound/soc/blackfin/bf6xx-sport.c index 318c5ba5360f..dfb744381c42 100644 --- a/sound/soc/blackfin/bf6xx-sport.c +++ b/sound/soc/blackfin/bf6xx-sport.c @@ -413,7 +413,14 @@ EXPORT_SYMBOL(sport_create); void sport_delete(struct sport_device *sport) { + if (sport...
0d624275720a4b01217693eb80d967a0d5f1f3a3
Analyze and fix the following issue in the Linux kernel code: ASoC: Davinci: McASP: Flush the FIFO before enabling
Problem Details: FIFO should be flushed before it is enabled for the first time. This fixes the I/O errors reported by the ASoC core on a fresh boot Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com> Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.co...
```diff diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 95441bfc8190..ce5e5cd254dd 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -380,14 +380,20 @@ static void mcasp_start_tx(struct davinci_audio_dev *dev) static void davinci_mcasp_st...
57911504a93909034ba5b90c20f3e6df8409ebd8
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: gadget: Fix dwc3_stop_active_transfer for synchronization delay
Problem Details: dwc3_stop_active_transfer has been called from two places. After each calling of this function , we should allow 100 us delay to synchronize with interconnect. It would be better if we put this delay in that function only, rather than into calling routine of this function. Signed-off-by: Pratyush Ana...
```diff diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index fc059107c052..dd5945ca9c86 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -563,27 +563,7 @@ static void dwc3_remove_requests(struct dwc3 *dwc, struct dwc3_ep *dep) if (!list_empty(&dep->req_queued)) { dwc3_s...
64eb0620296f924d5fded755c5ed95fb73649e06
Analyze and fix the following issue in the Linux kernel code: KVM: correctly detect APIC SW state in kvm_apic_post_state_restore()
Problem Details: For apic_set_spiv() to track APIC SW state correctly it needs to see previous and next values of the spurious vector register, but currently memset() overwrite the old value before apic_set_spiv() get a chance to do tracking. Fix it by calling apic_set_spiv() before overwriting old value. Signed-off-b...
```diff diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 333c27fa6e9f..18d149d80209 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -1389,13 +1389,16 @@ int kvm_get_apic_interrupt(struct kvm_vcpu *vcpu) return vector; } -void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu) +void kv...
a2d6a1d5a435b051d3660961d5dee5b33b15f754
Analyze and fix the following issue in the Linux kernel code: igb: Fix register defines for all non-82575 hardware
Problem Details: It looks like the register defines for DCA were never updated after going from 82575 to 82576. This change addresses that by updating the defines. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Peter P Waskiewicz Jr <pet...
```diff diff --git a/drivers/net/ethernet/intel/igb/e1000_regs.h b/drivers/net/ethernet/intel/igb/e1000_regs.h index 10efcd88dca0..28394bea5253 100644 --- a/drivers/net/ethernet/intel/igb/e1000_regs.h +++ b/drivers/net/ethernet/intel/igb/e1000_regs.h @@ -156,8 +156,12 @@ : (0x0E018 + ((_n) * 0x40))) #define E...
f0c5dadff3fbda77a65b8577fee437c3d771233d
Analyze and fix the following issue in the Linux kernel code: e1000e: fix panic while dumping packets on Tx hang with IOMMU
Problem Details: This patch resolves a "BUG: unable to handle kernel paging request at ..." oops while dumping packet data. The issue occurs with IOMMU enabled due to the address provided by phys_to_virt(). This patch avoids phys_to_virt() by using skb->data and the address of the pages allocated for Rx. Signed-off-b...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 95b245310f17..46c3b1f9ff89 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -178,6 +178,24 @@ static void e1000_regdump(struct e1000_hw *hw, struc...
b669588abaceb5c6d70699b6c009e5cedc42449b
Analyze and fix the following issue in the Linux kernel code: igb: fix panic while dumping packets on Tx hang with IOMMU
Problem Details: This patch resolves a "BUG: unable to handle kernel paging request at ..." oops while dumping packet data. The issue occurs with IOMMU enabled due to the address provided by phys_to_virt(). This patch avoids phys_to_virt() by making using skb->data and the address of the pages allocated for Rx. Signe...
```diff diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index b7c2d5050572..48cc4fb1a307 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -462,10 +462,10 @@ static void igb_dump(struct igb_adapter *adapter) ...
94c142a160d63edac0e1fca7848960dcf75dd2a9
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix pop noise in headphones on S3 for Asus X55A, X55V
Problem Details: To turn off pin control for the pin was tested, and helped against this issue. BugLink: https://bugs.launchpad.net/bugs/1034779 Tested-by: Chih-Hsyuan Ho <chih.ho@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 80d90cb42853..430771776915 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -1752,6 +1752,14 @@ static int via_suspend(struct hda_codec *codec) { struct via_spec *spec = codec->spec; vt1708_stop_hp_work(spec);...
d9e0d149b5dcc2ef4688afc572b9906bcda941ef
Analyze and fix the following issue in the Linux kernel code: ARM: dma-mapping: fix incorrect freeing of atomic allocations
Problem Details: Commit e9da6e9905e639b0f842a244bc770b48ad0523e9 (ARM: dma-mapping: remove custom consistent dma region) changed the way atomic allocations are handled. However, arm_dma_free() was not modified accordingly, and as a result freeing of atomic allocations does not work correctly when CMA is disabled. Memor...
```diff diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 4bdeccd24d93..4e7d1182e8a3 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -648,12 +648,12 @@ void arm_dma_free(struct device *dev, size_t size, void *cpu_addr, if (arch_is_coherent() || nommu()) { __dma_fr...
e4ea6918c93b9f59d34e8ca2124b2b64b1afe73b
Analyze and fix the following issue in the Linux kernel code: ARM: dma-mapping: fix atomic allocation alignment
Problem Details: The alignment mask is calculated incorrectly. Fixing the calculation makes strange hangs/lockups disappear during the boot with Amstrad E3 and 3.6-rc1 kernel. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
```diff diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 334dd79ad5e6..4bdeccd24d93 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -423,7 +423,7 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page) unsigned int pageno; unsigned long flags; void ...
39f78e70567a07a6fc0d7a4ca9e3331e44dd400d
Analyze and fix the following issue in the Linux kernel code: ARM: mm: fix MMU mapping of CMA regions
Problem Details: Fix dma_contiguous_remap() so that it continues through all the regions, even after encountering one that is outside lowmem. Without this change, if you have two CMA regions, the first outside lowmem and the seocnd inside lowmem, only the second one will get set up in the MMU. Data written to that regi...
```diff diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index c2cdf6500f75..334dd79ad5e6 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -358,7 +358,7 @@ void __init dma_contiguous_remap(void) if (end > arm_lowmem_limit) end = arm_lowmem_limit; if (start >= end) - ...
1026023705b0baa2b37df2a0d1da0022fc7b985e
Analyze and fix the following issue in the Linux kernel code: sh: intc: Handle domain association for sparseirq pre-allocated vectors.
Problem Details: Presently it's assumed that the irqdomain code handles the irq_desc allocation for us, but this isn't necessarily the case when we've pre-allocated IRQs via sparseirq. Previously we had a -EEXIST check in the code that attempted to trap these cases and simply update them in-place, but this behaviour wa...
```diff diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c index 2374468615ed..32c26d795ed0 100644 --- a/drivers/sh/intc/core.c +++ b/drivers/sh/intc/core.c @@ -324,8 +324,16 @@ int __init register_intc_controller(struct intc_desc *desc) res = irq_create_identity_mapping(d->domain, irq); if (unlikely(...
d0b464d67001d202e59f7e60a30074c4d74021aa
Analyze and fix the following issue in the Linux kernel code: sh: sh7269: Fix LCD pinmux
Problem Details: There are two ports that can output the LCD data, therefore they have to use separate pimux identifiers so we can select the one we want to use. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/include/cpu-sh2a/cpu/sh7269.h b/arch/sh/include/cpu-sh2a/cpu/sh7269.h index 48d14498e774..2a0ca8780f0d 100644 --- a/arch/sh/include/cpu-sh2a/cpu/sh7269.h +++ b/arch/sh/include/cpu-sh2a/cpu/sh7269.h @@ -183,18 +183,30 @@ enum { GPIO_FN_DV_DATA1, GPIO_FN_DV_DATA0, GPIO_FN_LCD_CLK, GPIO_FN...
800fb3ddee2c50918d651fbd70515f1e38857305
Analyze and fix the following issue in the Linux kernel code: sh: dma: fix request_irq usage
Problem Details: When calling request_irq with IRQF_SHARED, the dev cookie must be set (i.e. non-NULL), otherwise the code rejects it immediately with -EINVAL. So restore the logic here where we'd pass a pointer to the name as a dummy unique val. Otherwise, booting up on my LANDISK system would fail with: DMAC Addres...
```diff diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c index 4c171f13b0e8..b22565623142 100644 --- a/arch/sh/drivers/dma/dma-sh.c +++ b/arch/sh/drivers/dma/dma-sh.c @@ -335,7 +335,7 @@ static int dmae_irq_init(void) for (n = 0; n < NR_DMAE; n++) { int i = request_irq(get_dma_error_irq(n...
7364e445f62825758fa61195d237a5b8ecdd06ec
Analyze and fix the following issue in the Linux kernel code: net/core: Fix potential memory leak in dev_set_alias()
Problem Details: Do not leak memory by updating pointer with potentially NULL realloc return value. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/dev.c b/net/core/dev.c index f91abf800161..a39354ee1432 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1055,6 +1055,8 @@ rollback: */ int dev_set_alias(struct net_device *dev, const char *alias, size_t len) { + char *new_ifalias; + ASSERT_RTNL(); if (len >= IFALIASZ) @@ -10...
155e4e12b9f49c2dc817bb4c44e9416c46833c3d
Analyze and fix the following issue in the Linux kernel code: batman-adv: Fix mem leak in the batadv_tt_local_event() function
Problem Details: Memory is allocated for 'tt_change_node' with kmalloc(). 'tt_change_node' may go out of scope really being used for anything (except have a few members initialized) if we hit the 'del:' label. This patch makes sure we free the memory in that case. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by...
```diff diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index a438f4b582fc..99dd8f75b3ff 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -197,6 +197,7 @@ static void batadv_tt_local_event(struct batadv_priv *bat_priv, del: list_del(&en...
0c03eca3d995e73d691edea8c787e25929ec156d
Analyze and fix the following issue in the Linux kernel code: net: fib: fix incorrect call_rcu_bh()
Problem Details: After IP route cache removal, I believe rcu_bh() has very little use and we should remove this RCU variant, since it adds some cycles in fast path. Anyway, the call_rcu_bh() use in fib_true is obviously wrong, since some users only assert rcu_read_lock(). Signed-off-by: Eric Dumazet <edumazet@google....
```diff diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index f0cdb30921c0..57bd978483e1 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -367,7 +367,7 @@ static void __leaf_free_rcu(struct rcu_head *head) static inline void free_leaf(struct leaf *l) { - call_rcu_bh(&l->rcu, __leaf_free_rcu); + ...
08252b32311c3fa84219ad794d640af7399b5485
Analyze and fix the following issue in the Linux kernel code: pptp: lookup route with the proper net namespace
Problem Details: pptp always use init_net as the net namespace to lookup route, this will cause route lookup failed in container. because we already set the correct net namespace to struct sock in pptp_create,so fix this by using sock_net(sk) to replace &init_net. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Sign...
```diff diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c index 1c98321b56cc..162464fe86bf 100644 --- a/drivers/net/ppp/pptp.c +++ b/drivers/net/ppp/pptp.c @@ -189,7 +189,7 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb) if (sk_pppox(po)->sk_state & PPPOX_DEAD) goto tx_error; - ...
99aa3473e672ca610905838997fa018b95cd643f
Analyze and fix the following issue in the Linux kernel code: af_packet: Quiet sparse noise about using plain integer as NULL pointer
Problem Details: Quiets the sparse warning: warning: Using plain integer as NULL pointer Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index ceaca7c134a0..f016f6634a79 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1079,7 +1079,7 @@ static void *packet_current_rx_frame(struct packet_sock *po, default: WARN(1, "TPACKET version not supported\n"); BUG(); - ...
920d087e44c228be6270e07fdb59043380a4bb00
Analyze and fix the following issue in the Linux kernel code: drivers: net: irda: bfin_sir: fix compile error
Problem Details: Bit IREN is replaced by UMOD_IRDA and UMOD_MASK since blackfin 60x added, but this driver didn't update which will cause bfin_sir build error: drivers/net/irda/bfin_sir.c:161:9: error: 'IREN' undeclared (first use in this function) drivers/net/irda/bfin_sir.c:435:18: error: 'IREN' undeclared (first us...
```diff diff --git a/drivers/net/irda/bfin_sir.c b/drivers/net/irda/bfin_sir.c index a561ae44a9ac..c6a0299aa9f9 100644 --- a/drivers/net/irda/bfin_sir.c +++ b/drivers/net/irda/bfin_sir.c @@ -158,7 +158,7 @@ static int bfin_sir_set_speed(struct bfin_sir_port *port, int speed) /* If not add the 'RPOLC', we can't catch ...
65bccb5c708bd9f00d24f041f4f7c45130359448
Analyze and fix the following issue in the Linux kernel code: drm/i915: fixup desired rps frequency computation
Problem Details: In commit commit 20b46e59dd102665ce7168baa215e5b1ee66b69b Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Thu Jul 26 11:16:14 2012 +0200 drm/i915: Only set the down rps limit when at the loweset frequency The computation for the new desired frequency was extracted, but since the desired f...
```diff diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index d0ce894ba6e6..5050bb8026c0 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -2272,13 +2272,13 @@ static void ironlake_disable_drps(struct drm_device *dev) * ourselves, instead of doing a r...
c6fd893da927c6cefb2ece22402765379921a834
Analyze and fix the following issue in the Linux kernel code: x86, avx: don't use avx instructions with "noxsave" boot param
Problem Details: Clear AVX, AVX2 features along with clearing XSAVE feature bits, as part of the parsing "noxsave" parameter. Fixes the kernel boot panic with "noxsave" boot parameter. We could have checked cpu_has_osxsave along with cpu_has_avx etc, but Peter mentioned clearing the feature bits will be better for us...
```diff diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 46d8786d655e..a5fbc3c5fccc 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -144,6 +144,8 @@ static int __init x86_xsave_setup(char *s) { setup_clear_cpu_cap(X86_FEATURE_XSAVE); setup_clear_cpu_cap...
47fbf7976e0b7d9dcdd799e2a1baba19064d9631
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Remove a bogus BUG_ON() in nfs4_layoutreturn_done
Problem Details: Ever since commit 0a57cdac3f (NFSv4.1 send layoutreturn to fence disconnected data server) we've been sending layoutreturn calls while there is potentially still outstanding I/O to the data servers. The reason we do this is to avoid races between replayed writes to the MDS and the original writes to th...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index f94f6b3928fc..c77d296bdaa6 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -6359,12 +6359,8 @@ static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata) return; } spin_lock(&lo->plh_inode->i_lock); - if (task->tk_status ==...
50d0206fcaea3e736f912fd5b00ec6233fb4ce44
Analyze and fix the following issue in the Linux kernel code: xhci: Fix bug after deq ptr set to link TRB.
Problem Details: This patch fixes a particularly nasty bug that was revealed by the ring expansion patches. The bug has been present since the very beginning of the xHCI driver history, and could have caused general protection faults from bad memory accesses. The first thing to note is that a Set TR Dequeue Pointer c...
```diff diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 0c93f5dcea6f..643c2f3f3e73 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -145,29 +145,37 @@ static void next_trb(struct xhci_hcd *xhci, */ static void inc_deq(struct xhci_hcd *xhci, struct xhci_ri...
b2f0fa828ee7265028f1bca87928b0dc69663b53
Analyze and fix the following issue in the Linux kernel code: mfd/asic3: fix asic3_mfd_probe return value
Problem Details: In commit 4f304245b "mfd: Set asic3 DS1WM clock_rate", a possible path through asic3_mfd_probe was introduced that would lead to an unpredictable return value, if everything succeeds but there are pdata->leds is NULL. This was reported correctly by gcc. Without this patch, building magician_defconfig ...
```diff diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index 383421bf5760..683e18a23329 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c @@ -925,6 +925,7 @@ static int __init asic3_mfd_probe(struct platform_device *pdev, goto out; } + ret = 0; if (pdata->leds) { int i; ```
300d3739e873d50d4c6e3656f89007a217fb1d29
Analyze and fix the following issue in the Linux kernel code: Revert "NMI watchdog: fix for lockup detector breakage on resume"
Problem Details: Revert commit 45226e9 (NMI watchdog: fix for lockup detector breakage on resume) which breaks resume from system suspend on my SH7372 Mackerel board (by causing a NULL pointer dereference to happen) and is generally wrong, because it abuses the CPU hotplug functionality in a shamelessly blatant way. T...
```diff diff --git a/include/linux/sched.h b/include/linux/sched.h index c147e7024f11..b8c86648a2f9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -334,14 +334,6 @@ static inline void lockup_detector_init(void) } #endif -#if defined(CONFIG_LOCKUP_DETECTOR) && defined(CONFIG_SUSPEND) -void lockup_...
d06a8a4fe7d81e8d1fa3d753be9b14c785b4b2e7
Analyze and fix the following issue in the Linux kernel code: drivers/cpufreq/pcc-cpufreq.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/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c index cdc02ac8f41a..503996a94a6a 100644 --- a/drivers/cpufreq/pcc-cpufreq.c +++ b/drivers/cpufreq/pcc-cpufreq.c @@ -454,6 +454,7 @@ static int __init pcc_cpufreq_probe(void) mem_resource->address_length); if (pcch_virt_addr == NU...
2e01f16601d8924b12b1acf1cdc49a0d1cc1cfb2
Analyze and fix the following issue in the Linux kernel code: xen/arm: Xen detection and shared_info page mapping
Problem Details: Check for a node in the device tree compatible with "xen,xen", if it is present set xen_domain_type to XEN_HVM_DOMAIN and continue initialization. Map the real shared info page using XENMEM_add_to_physmap with XENMAPSPACE_shared_info. Changes in v4: - simpler parsing of Xen version in the compatible...
```diff diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index c53554032a60..6a0217d4e662 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -5,6 +5,9 @@ #include <asm/xen/hypervisor.h> #include <asm/xen/hypercall.h> #include <linux/module.h> +#include <linux/of.h> +#include <lin...
475f230c6072fb2186f48b23943afcd0ee3a8343
Analyze and fix the following issue in the Linux kernel code: dlm: fix unlock balance warnings
Problem Details: The in_recovery rw_semaphore has always been acquired and released by different threads by design. To work around the "BUG: bad unlock balance detected!" messages, adjust things so the dlm_recoverd thread always does both down_write and up_write. Signed-off-by: David Teigland <teigland@redhat.com>
```diff diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index 9d3e485f88c8..871c1abf6029 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h @@ -604,6 +604,7 @@ struct dlm_ls { struct idr ls_recover_idr; spinlock_t ls_recover_idr_lock; wait_queue_head_t ls_wait_general; + wait_queue_head_t...
aa2466d21bd9e872690693d56feb946781443f28
Analyze and fix the following issue in the Linux kernel code: xen/arm: hypercalls
Problem Details: Use r12 to pass the hypercall number to the hypervisor. We need a register to pass the hypercall number because we might not know it at compile time and HVC only takes an immediate argument. Among the available registers r12 seems to be the best choice because it is defined as "intra-procedure call s...
```diff diff --git a/arch/arm/include/asm/xen/hypercall.h b/arch/arm/include/asm/xen/hypercall.h new file mode 100644 index 000000000000..4ac062414369 --- /dev/null +++ b/arch/arm/include/asm/xen/hypercall.h @@ -0,0 +1,50 @@ +/****************************************************************************** + * hypercall....
6ad2291624824c1de19dbbbbb6d4f9f601b60781
Analyze and fix the following issue in the Linux kernel code: dlm: fix uninitialized spinlock
Problem Details: Use DEFINE_SPINLOCK for global dlm_cb_seq_spin. Signed-off-by: David Teigland <teigland@redhat.com>
```diff diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c index 63dc19c54d5a..27a6ba9aaeec 100644 --- a/fs/dlm/ast.c +++ b/fs/dlm/ast.c @@ -15,8 +15,8 @@ #include "lock.h" #include "user.h" -static uint64_t dlm_cb_seq; -static spinlock_t dlm_cb_seq_spin; +static uint64_t dlm_cb_seq; +static DEFINE_SPINLOCK(dlm_cb_seq_spi...
36b71a8bfbc92e1ba164e9aec840c0180ee933b5
Analyze and fix the following issue in the Linux kernel code: dlm: fix deadlock between dlm_send and dlm_controld
Problem Details: A deadlock sometimes occurs between dlm_controld closing a lowcomms connection through configfs and dlm_send looking up the address for a new connection in configfs. dlm_controld does a configfs rmdir which calls dlm_lowcomms_close which waits for dlm_send to cancel work on the workqueues. The dlm_se...
```diff diff --git a/fs/dlm/config.c b/fs/dlm/config.c index 9ccf7346834a..a0387dd8b1f0 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c @@ -750,6 +750,7 @@ static ssize_t comm_local_write(struct dlm_comm *cm, const char *buf, static ssize_t comm_addr_write(struct dlm_comm *cm, const char *buf, size_t len) { stru...
0cf260131c52f681533d17db6fd07545a3dc184e
Analyze and fix the following issue in the Linux kernel code: tools lib traceevent: Fix cast from pointer to integer for 32 bit
Problem Details: Fixing the integer cast reported by the following warning: tools/lib/traceevent/event-parse.c:3488:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: Ingo Molnar <mingo@kernel.org> Link: http://lkml.kernel.or...
```diff diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 5f34aa371b56..b7c2c491f61e 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c @@ -31,6 +31,7 @@ #include <stdarg.h> #include <ctype.h> #include <errno.h> +#include <stdint.h> #i...
b527bab59be7ca2154f644fcc4b9e3c267a6d855
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix parsing of 64 bit raw config value for 32 bit
Problem Details: perf record fails on 32 bit with: invalid or unsupported event: 'r40000F7E0' Fixing this by parsing 64 bit num values. Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: Ingo Molnar <mingo@kernel.org> Link: http://lkml.kernel.org/r/1344361396-7237-4-git-send-email-robert.richter@amd.com Sig...
```diff diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 74a5af4d33ec..8bdfa3e5c8c7 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -551,7 +551,7 @@ static int config_attr(struct perf_event_attr *attr, } int parse_events_add_numeric(struct list_h...
2ede8303db75ead3250f95c3390e6ba200cbe7d4
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix lib/traceevent build dir with OUTPUT variable set
Problem Details: With the OUTPUT variable set the libtraceevent.a file is wrongly built in the source directory: + make -d OUTPUT=/.../.build/perf-user/ DESTDIR=/.../.install/perf-user/ ... Considering target file `../lib/traceevent//libtraceevent.a'. File `../lib/traceevent//libtraceevent.a' does not exi...
```diff diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 35655c3a7b7a..2d4bf6ef1c5a 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -186,10 +186,10 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) TRACE_EVENT_DIR = ../lib/traceevent/ -ifeq ("$(origin O)", "command line") - TE_PATH=$(OUTPUT)/ ...
e6b978335424029d05edc01374744516b21b1ede
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix version file for perf documentation with OUTPUT variable set
Problem Details: Fixes the following: + make OUTPUT=/.../.build/perf-user/ DESTDIR=/.../.install/perf-user/ man install-man make -C Documentation man make[1]: Entering directory `/.../.source/linux.perf/tools/perf/Documentation' make[2]: Entering directory `/.../.source/linux.perf/tools/perf' make[2]: *** No rule...
```diff diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile index ca600e09c8d4..9f2e44f2b17a 100644 --- a/tools/perf/Documentation/Makefile +++ b/tools/perf/Documentation/Makefile @@ -195,10 +195,10 @@ install-pdf: pdf #install-html: html # '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTD...
55cf87fe0e9783e25f442be1e48b8319d86131ea
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix superfluous "-in" suffix from CA0132 capture items
Problem Details: Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index d0d3540e39e7..2685590925ff 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -988,12 +988,12 @@ static void ca0132_config(struct hda_codec *codec) /* Mic-in */ spec->input_pins[0] = 0x12; - spec->i...
e85871218513c54f7dfdb6009043cb638f2fecbe
Analyze and fix the following issue in the Linux kernel code: s390/compat: fix mmap compat system calls
Problem Details: The native 31 bit and the compat behaviour for the mmap system calls differ: In native 31 bit mode the passed in address for the mmap system call will be unmodified passed to sys_mmap_pgoff(). In compat mode however the passed in address will be modified with compat_ptr() which masks out the most sign...
```diff diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index d1225089a4bb..f606d935f495 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c @@ -620,7 +620,6 @@ asmlinkage unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg) return -EFAULT; ...
82aabdb6f1eb61e0034ec23901480f5dd23db7c4
Analyze and fix the following issue in the Linux kernel code: s390/compat: fix compat wrappers for process_vm system calls
Problem Details: The compat wrappers incorrectly called the non compat versions of the system process_vm system calls. Cc: stable@vger.kernel.org Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index e835d6d5b7fd..2d82cfcbce5b 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S @@ -1635,7 +1635,7 @@ ENTRY(compat_sys_process_vm_readv_wrapper) llgfr %r6,%r6 # unsigned long llgf %r0...
5ab37e1b226b7b40a44eea7d8d1fe19e67ff65a9
Analyze and fix the following issue in the Linux kernel code: s390: do not clobber personality flags in sys_32_personality()
Problem Details: There are multiple errors in how sys_32_personality() handles personality flags stored in top three bytes. - directly comparing current->personality against PER_LINUX32 doesn't work in cases when any of the personality flags stored in the top three bytes are used. - directly forcefully setting per...
```diff diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c index b4a29eee41b8..d0964d22adb5 100644 --- a/arch/s390/kernel/sys_s390.c +++ b/arch/s390/kernel/sys_s390.c @@ -81,11 +81,12 @@ SYSCALL_DEFINE1(s390_personality, unsigned int, personality) { unsigned int ret; - if (current->personality ...
6c691b5df1fcd93f2e9f65e1a8a3dd0e6fd158ea
Analyze and fix the following issue in the Linux kernel code: omap: Fix multi.h when only ARCH_OMAP3 and SOC_AM33XX are selected
Problem Details: When only ARCH_OMAP3 (or -2,-4,...) and SOC_AM33XX are selected, multi.h doesn't set MULTI_OMAP2. In this case, cpu.h will simply define cpu_is_omap24xx() as 1. This causes problems for example for omap_hwmod.c:omap_hwmod_init which checks for cpu_is_omap24xx() first, using the wrong soc_ops for AM33x...
```diff diff --git a/arch/arm/plat-omap/include/plat/multi.h b/arch/arm/plat-omap/include/plat/multi.h index 045e320f1067..324d31b14852 100644 --- a/arch/arm/plat-omap/include/plat/multi.h +++ b/arch/arm/plat-omap/include/plat/multi.h @@ -108,4 +108,13 @@ # endif #endif +#ifdef CONFIG_SOC_AM33XX +# ifdef OMAP_NAME ...
48a08bab3066a9452216f8c52e0d6f35566de04d
Analyze and fix the following issue in the Linux kernel code: ASoC: mxs: Fix the name of the SoC family
Problem Details: SND_SOC_MXS_SGTL5000 is used on MXS boards, so fix the SoC family name. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/mxs/Kconfig b/sound/soc/mxs/Kconfig index 99a997f19bb9..b6fa77678d97 100644 --- a/sound/soc/mxs/Kconfig +++ b/sound/soc/mxs/Kconfig @@ -10,7 +10,7 @@ menuconfig SND_MXS_SOC if SND_MXS_SOC config SND_SOC_MXS_SGTL5000 - tristate "SoC Audio support for i.MX boards with sgtl5000" + trista...
0d8957c8a90bbb5d34fab9a304459448a5131e06
Analyze and fix the following issue in the Linux kernel code: drm/i915: correctly order the ring init sequence
Problem Details: We may only start to set up the new register values after having confirmed that the ring is truely off. Otherwise the hw might lose the newly written register values. This is caught later on in the init sequence, when we check whether the register writes have stuck. Cc: stable@vger.kernel.org Reviewed...
```diff diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index bf0195a96d53..414af1e2973b 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -289,8 +289,6 @@ static int init_ring_common(struct intel_ring_buffer *ring) I91...
012e7eb1e501d0120e0383b81477f63091f5e365
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad
Problem Details: The same ID is twice in the quirk table, so the second one is not used. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Cc: <stable@vger.kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index daa5103eb936..4f81dd44c837 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6099,6 +6099,8 @@ static const struct alc_fixup alc269_fixups[] = { [ALC269_FIXUP_PCM_44K] = { .type = ALC_FIXUP_FUN...
54f32a35f4d3a653a18a2c8c239f19ae060bd803
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Fix dmtimer set source clock failure
Problem Details: Calling the dmtimer function omap_dm_timer_set_source() fails if following a call to pm_runtime_put() to disable the timer. For example the following sequence would fail to set the parent clock ... omap_dm_timer_stop(gptimer); omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_32_KHZ); The following ...
```diff diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 626ad8cad7a9..7b6689af0cce 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -258,7 +258,7 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_enable); void omap_dm_timer_disable(struct omap_dm_timer *timer) { - pm_r...
4df7309af6f7988da15fc9a0175fc60b997cc0d7
Analyze and fix the following issue in the Linux kernel code: leds: lp8788: Fix updating scale configuration bits
Problem Details: We need to do left shift (cfg->num + LP8788_ISINK_SCALE_OFFSET) bits for updating scale configuration. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com> Tested-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
```diff diff --git a/drivers/leds/leds-lp8788.c b/drivers/leds/leds-lp8788.c index 53bd136f1ef0..0ade6ebfc914 100644 --- a/drivers/leds/leds-lp8788.c +++ b/drivers/leds/leds-lp8788.c @@ -63,7 +63,7 @@ static int lp8788_led_init_device(struct lp8788_led *led, /* scale configuration */ addr = LP8788_ISINK_CTRL; mas...
c0401241c01705205ed6f2b88460df1133591f58
Analyze and fix the following issue in the Linux kernel code: ARM: Samsung: Make uart_save static in pm.c file
Problem Details: Fixes the following sparse warning: arch/arm/plat-samsung/pm.c:77:21: warning: symbol 'uart_save' was not declared. Should it be static? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
```diff diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 64ab65f0fdbc..15070284343e 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -74,7 +74,7 @@ unsigned char pm_uart_udivslot; #ifdef CONFIG_SAMSUNG_PM_DEBUG -struct pm_uart_save uart_save[CONFIG_SERIAL_SAMSUN...
b01858c7806e7e6f6121da2e51c9222fc4d21dc6
Analyze and fix the following issue in the Linux kernel code: ARM: S3C24XX: Fix s3c2410_dma_enqueue parameters
Problem Details: Commit d670ac019f60 (ARM: SAMSUNG: DMA Cleanup as per sparse) changed the prototype of the s3c2410_dma_* functions to use the enum dma_ch instead of an generic unsigned int. In the s3c24xx dma.c s3c2410_dma_enqueue seems to have been forgotten, the other functions there were changed correctly. Signed...
```diff diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 28f898f75380..db98e7021f0d 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c @@ -430,7 +430,7 @@ s3c2410_dma_canload(struct s3c2410_dma_chan *chan) * when necessary. */ -int s3c2410_dma_enqueue(unsigned in...
e0e29fd74c3c8bd2ef83bbaa73d528d58a944610
Analyze and fix the following issue in the Linux kernel code: Revert "ARM: OMAP3: PM: call pre/post transition per powerdomain"
Problem Details: This reverts commit 58f0829b7186150318c79515f0e0850c5e7a9c89. Converstion to per-pwrdm per/post transition calls was a bit premature. Only tracking MPU, PER & CORE in the idle path means we lose the accounting for all the other powerdomains which may also transition in idle. On OMAP3, due to autodep...
```diff diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index e4fc88c65dbd..05bd8f02723f 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -272,21 +272,16 @@ void omap_sram_idle(void) per_next_state = pwrdm_read_next_pwrst(per_pwrdm); core_next_state = pwrdm_re...
5cb7df2b2d3afee7638b3ef23a5bcb89c6f07bd9
Analyze and fix the following issue in the Linux kernel code: xhci: Add Etron XHCI_TRUST_TX_LENGTH quirk.
Problem Details: Gary reports that with recent kernels, he notices more xHCI driver warnings: xhci_hcd 0000:03:00.0: WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk? We think his Etron xHCI host controller may have the same buggy behavior as the Fresco Logic xHCI host. When a short transfer ...
```diff diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 18b231b0c5d3..92eaff6097c0 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -99,6 +99,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == PCI_DEVICE_ID_ASROCK_P67...
cfa9cfbc083c7fc882286dcfba59c7e5a1a15545
Analyze and fix the following issue in the Linux kernel code: regulator: ab3100: add missing voltage table
Problem Details: The conversion to voltage tables in commit a3beb74261f26142019847128b2441b0301797ac "regulator: ab3100: Use regulator_list_voltage_table()" missed to add the voltage table to the buck. Fix this and it works like a charm. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Axel Lin <axe...
```diff diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c index 182b553059c9..c151fd5d8c97 100644 --- a/drivers/regulator/ab3100.c +++ b/drivers/regulator/ab3100.c @@ -486,6 +486,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = { .id = AB3100_BUCK, .ops = &regulator_ops_variable_sleepable...
3e2a928472daa839e7be0d71c1d8320334ea76e1
Analyze and fix the following issue in the Linux kernel code: regulator: anatop: Fix wrong mask used in anatop_get_voltage_sel
Problem Details: The mask used in anatop_get_voltage_sel does not match the mask used in anatop_set_voltage_sel. We need to do left shift anatop_reg->vol_bit_shift bits for the correct mask. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index e9c2085f9dfb..ce0fe72a428e 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c @@ -64,14 +64,15 @@ static int anatop_set_voltage_sel(struct regulator_dev *reg, unsigned selecto...
1c9d2d71a3cb0fcbfe91307b3c18d22f7d93f0cd
Analyze and fix the following issue in the Linux kernel code: regulator: palmas: Fix palmas_probe error handling
Problem Details: Fix below error handling cases: 1. If reading PALMAS_SMPS_CTRL fails, simply returns ret rather than goto err_unregister_regulator because we have not call regulator_register(). 2. If palmas_ldo_init() fails, we need to call regulator_unregister() for the regulator we just successfully registere...
```diff diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index de68347cbc69..46c7e88f8381 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -633,7 +633,7 @@ static __devinit int palmas_probe(struct platform_device *pdev) ret = pal...
12565b166dab7966c2991c1561f3c22e9dad5535
Analyze and fix the following issue in the Linux kernel code: regulator: palmas: Fix regmap offsets for PALMAS_REG_SMPS10 vsel_reg
Problem Details: Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 0fcf3550f65d..9e3e7f3c4086 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -679,7 +679,9 @@ static __devinit int palmas_probe(struct platform_device *pdev) case PALMA...
a5f8ae2154eeb7ed18c6e3dbf6ac095ea4c3d5cf
Analyze and fix the following issue in the Linux kernel code: regulator: palmas: Fix calculating selector in palmas_map_voltage_ldo
Problem Details: This patch fixes below issues when choosing selector: 1. Current code returns negative selector if min_uV < 900000 which is wrong. For example, it is possible to satisfy the request with selector = 1 if the requested min_uV is 850000. 2. Current code may select a voltage lower than requested min...
```diff diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 17d19fbbc490..0fcf3550f65d 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -486,9 +486,12 @@ static int palmas_map_voltage_ldo(struct regulator_dev *rdev, { int ret, ...
2f6c797f84fd764efb5eeb7cbb6a80a7244bd13c
Analyze and fix the following issue in the Linux kernel code: regulator: core: Fix cast to pointer from integer of different size warning
Problem Details: This is to address the following warning during compilation time: (Compile on x86_64) CC drivers/regulator/core.o drivers/regulator/core.c: In function '_regulator_do_set_voltage': drivers/regulator/core.c:2183:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ...
```diff diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index b28221af648e..5f2221095a46 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2179,9 +2179,12 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev, } } - if (ret == 0 && best_val >= 0) + if (ret == ...
709aea6b05f8f6c852c293fb5d47a6461373b4dd
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=y
Problem Details: When CONFIG_SND_VERBOSE_PRINTK=y is set, the debug print in hda_auto_parser.c looks really ugly like: ALSA sound/pci/hda/hda_auto_parser.c:331 mono: mono_out=0x0 ALSA sound/pci/hda/hda_auto_parser.c:334 dig-out=0x12/0x0 ALSA sound/pci/hda/hda_auto_parser.c:335 inputs: ALSA sound/pci/h...
```diff diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c index 647218d69f68..4f7d2dfcef7b 100644 --- a/sound/pci/hda/hda_auto_parser.c +++ b/sound/pci/hda/hda_auto_parser.c @@ -332,13 +332,12 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec, if (cfg->dig_outs) snd_printd(" di...
d0db84e713eaaccea2a435e1625fb3150b335f4a
Analyze and fix the following issue in the Linux kernel code: ASoC: omap-mcbsp: Fix 6pin mux configuration
Problem Details: The check for the mux_signal callback was wrong which prevents us to configure the 6pin port's FSR/CLKR signal mux. Reported-by: CF Adad <cfadad@rocketmail.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@o...
```diff diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c index 34835e8a9160..d33c48baaf71 100644 --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c @@ -745,7 +745,7 @@ int omap_mcbsp_6pin_src_mux(struct omap_mcbsp *mcbsp, u8 mux) { const char *signal, *src; - if (mcbsp->pdata->mux_signal) + if (...
87abb3b15c62033409f5bf2ffb5620c94f91cf2c
Analyze and fix the following issue in the Linux kernel code: tracing/trivial: Fix some typos in kernel/trace
Problem Details: Fix some typos in kernel/trace. Link: http://lkml.kernel.org/r/1343887320.2228.9.camel@louis-ThinkPad-T410 Signed-off-by: Wang Tianhong <wangthbj@linux.vnet.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 49491fa7daa2..b32ed0e385a5 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -2816,7 +2816,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_record_enable); * to the buffer after this will fail and return NULL. * * This ...