id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
87438494152a9313ee56b8a0026ad5e6e87c5972
Analyze and fix the following issue in the Linux kernel code: cdv: Fix typos in initialization of mdfld_chip_ops
Problem Details: Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/gma500/mdfld_device.c b/drivers/gpu/drm/gma500/mdfld_device.c index a0bd48cd92f4..717f4db28c3c 100644 --- a/drivers/gpu/drm/gma500/mdfld_device.c +++ b/drivers/gpu/drm/gma500/mdfld_device.c @@ -672,8 +672,8 @@ const struct psb_ops mdfld_chip_ops = { .accel_2d = 0, .pipes = 3, ...
43671cc96e58458b2711f1e97ff24a4c0e7cd1ac
Analyze and fix the following issue in the Linux kernel code: powerpc/windfarm: don't pass const strings to snprintf
Problem Details: Fixes these build warnings: drivers/macintosh/windfarm_smu_sat.c: In function 'wf_sat_probe': drivers/macintosh/windfarm_smu_sat.c:290:3: warning: passing argument 1 of 'snprintf' discards qualifiers from pointer target type include/linux/kernel.h:323:5: note: expected 'char *' but argument is of type...
```diff diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index 72dfe191235b..e2989cef2309 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c @@ -287,7 +287,7 @@ static int wf_sat_probe(struct i2c_client *client, sens->sat = sat; sen...
ca7d593e0ac8cf806aa750815daf12594345f5f6
Analyze and fix the following issue in the Linux kernel code: powerpc/windfarm: fix compiler warning
Problem Details: Fixes this warning: drivers/macintosh/windfarm_pm91.c: In function 'wf_smu_cpu_fans_tick': drivers/macintosh/windfarm_pm91.c:237:2: warning: passing argument 1 of 'wf_sensor_get' from incompatible pointer type drivers/macintosh/windfarm.h:124:19: note: expected 'struct wf_sensor *' but argument is of ...
```diff diff --git a/drivers/macintosh/windfarm_pm91.c b/drivers/macintosh/windfarm_pm91.c index e18002bcc1c3..7653603cb00e 100644 --- a/drivers/macintosh/windfarm_pm91.c +++ b/drivers/macintosh/windfarm_pm91.c @@ -234,7 +234,7 @@ static void wf_smu_cpu_fans_tick(struct wf_smu_cpu_fans_state *st) return; } - rc ...
5a8887d39e1ba5ee2d4ccb94b14d6f2dce5ddfca
Analyze and fix the following issue in the Linux kernel code: sungem: Fix WakeOnLan
Problem Details: WakeOnLan was broken in this driver because gp->asleep_wol is a 1-bit bitfield and it was being assigned WAKE_MAGIC, which is (1 << 5). gp->asleep_wol remains 0 and the machine never wakes up. Fixed by casting gp->wake_on_lan to bool. Tested on an iBook G4. Signed-off-by: Gerard Lledo <gerard.lledo@...
```diff diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c index 558409ff4058..4ba969096717 100644 --- a/drivers/net/ethernet/sun/sungem.c +++ b/drivers/net/ethernet/sun/sungem.c @@ -2339,7 +2339,7 @@ static int gem_suspend(struct pci_dev *pdev, pm_message_t state) netif_device_detach(...
923dd347b8904c24bcac89bf038ed4da87f8aa90
Analyze and fix the following issue in the Linux kernel code: net: take care of cloned skbs in tcp_try_coalesce()
Problem Details: Before stealing fragments or skb head, we must make sure skbs are not cloned. Alexander was worried about destination skb being cloned : In bridge setups, a driver could be fooled if skb->data_len would not match skb nr_frags. If source skb is cloned, we must take references on pages instead. Bug ha...
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7096790e06bf..a8829370f712 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -4532,6 +4532,7 @@ static inline int tcp_try_rmem_schedule(struct sock *sk, unsigned int size) * @sk: socket * @to: prior buffer * @from: buffer to add ...
b49960a05e32121d29316cfdf653894b88ac9190
Analyze and fix the following issue in the Linux kernel code: tcp: change tcp_adv_win_scale and tcp_rmem[2]
Problem Details: tcp_adv_win_scale default value is 2, meaning we expect a good citizen skb to have skb->len / skb->truesize ratio of 75% (3/4) In 2.6 kernels we (mis)accounted for typical MSS=1460 frame : 1536 + 64 + 256 = 1856 'estimated truesize', and 1856 * 3/4 = 1392. So these skbs were considered as not bloated....
```diff diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index bd80ba5847d2..1619a8c80873 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt @@ -147,7 +147,7 @@ tcp_adv_win_scale - INTEGER (if tcp_adv_win_scale > 0) or bytes-byt...
eeb7fc7bc095546b21188e8e076a59bce73f9ca6
Analyze and fix the following issue in the Linux kernel code: be2net: Fix EEH error reset before a flash dump completes
Problem Details: An EEH error can cause the FW to trigger a flash debug dump. Resetting the card while flash dump is in progress can cause it not to recover. Wait for it to finish before letting EEH flow to reset the card. Signed-off-by: Sathya Perla <Sathya.Perla@emulex.com> Signed-off-by: Somnath Kotur <somnath.kotu...
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index b7bc905a93fb..6d5d30be0481 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -3821,6 +3821,11 @@ static pci_ers_result_t be_eeh_err_detected(st...
682256dbef8e827385cf214f3ada8b62f6c227ed
Analyze and fix the following issue in the Linux kernel code: be2net: Fix to apply duplex value as unknown when link is down.
Problem Details: Suggested-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c index c9ba2cbbd518..747f68fa976d 100644 --- a/drivers/net/ethernet/emulex/benet/be_ethtool.c +++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c @@ -618,7 +618,7 @@ static int be_get_settings(struct net...
22ca7a6e9a68a7e0c149b22ebed9dcd106245bb7
Analyze and fix the following issue in the Linux kernel code: be2net: Fix to not set link speed for disabled functions of a UMC card
Problem Details: This renders the interface view somewhat inconsistent from the Host OS POV considering the rest of the interfaces are showing their respective speeds based on the bandwidth assigned to them. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c index 7b06f3592bd7..c9ba2cbbd518 100644 --- a/drivers/net/ethernet/emulex/benet/be_ethtool.c +++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c @@ -558,7 +558,7 @@ static int be_get_settings(struct net...
84768edbb2721637620b2d84501bb0d5aed603f1
Analyze and fix the following issue in the Linux kernel code: net: l2tp: unlock socket lock before returning from l2tp_ip_sendmsg
Problem Details: l2tp_ip_sendmsg could return without releasing socket lock, making it all the way to userspace, and generating the following warning: [ 130.891594] ================================================ [ 130.894569] [ BUG: lock held when returning to user space! ] [ 130.897257] 3.4.0-rc5-next-20120501-s...
```diff diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c index 585d93ecee2d..6274f0be82b0 100644 --- a/net/l2tp/l2tp_ip.c +++ b/net/l2tp/l2tp_ip.c @@ -442,8 +442,9 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m daddr = lip->l2tp_addr.s_addr; } else { + rc = -EDESTADDRREQ...
4fdcfa12843bca38d0c9deff70c8720e4e8f515f
Analyze and fix the following issue in the Linux kernel code: drop_monitor: prevent init path from scheduling on the wrong cpu
Problem Details: I just noticed after some recent updates, that the init path for the drop monitor protocol has a minor error. drop monitor maintains a per cpu structure, that gets initalized from a single cpu. Normally this is fine, as the protocol isn't in use yet, but I recently made a change that causes a failed ...
```diff diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 7592943513e3..a7cad741df01 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c @@ -49,6 +49,7 @@ struct per_cpu_dm_data { struct sk_buff __rcu *skb; atomic_t dm_hit_count; struct timer_list send_timer; + int cpu; }; st...
5c6239c8f89f301c47e96bf9d2931c446b934be0
Analyze and fix the following issue in the Linux kernel code: net/pasemi: fix compiler warning
Problem Details: Fix this compiler warning (on PowerPC) by not marking a parameter as const: drivers/net/ethernet/pasemi/pasemi_mac.c: In function 'pasemi_mac_replenish_rx_ring': drivers/net/ethernet/pasemi/pasemi_mac.c:646:3: warning: passing argument 1 of 'netdev_alloc_skb' discards qualifiers from pointer target ty...
```diff diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c index ddc95b0ac78d..e559dfa06d6a 100644 --- a/drivers/net/ethernet/pasemi/pasemi_mac.c +++ b/drivers/net/ethernet/pasemi/pasemi_mac.c @@ -623,7 +623,7 @@ static void pasemi_mac_free_rx_resources(struct pasemi_mac *m...
a4723848d05dd31d298c551fb77ad28481309999
Analyze and fix the following issue in the Linux kernel code: usbnet: fix failure handling in usbnet_probe
Problem Details: If register_netdev returns failure, the dev->interrupt and its transfer buffer should be released, so just fix it. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index ca6fd80c2b40..2d927fb4adf4 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1444,7 +1444,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) status = register_netdev (net); if (statu...
720f3d7cb19eb27f85f72836c8f8004ccb257f39
Analyze and fix the following issue in the Linux kernel code: usbnet: fix leak of transfer buffer of dev->interrupt
Problem Details: The transfer buffer of dev->interrupt is allocated in .probe path, but not freed in .disconnet path, so mark the interrupt URB as URB_FREE_BUFFER to free the buffer when the URB is destroyed. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David...
```diff diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index b7b3f5b0d406..ca6fd80c2b40 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -210,6 +210,7 @@ static int init_status (struct usbnet *dev, struct usb_interface *intf) } else { usb_fill_int_urb(dev->interrupt, dev-...
69c326b38f2f895ca4f09fd9b65782a021f4ba6c
Analyze and fix the following issue in the Linux kernel code: bnx2x: fix handling single MSIX mode for 57710/57711
Problem Details: commit 30a5de7723a8a4211be02e94236e9167a424fd07 added ability to use single MSI-X vector, but lack proper handling for 57710/57711 HW Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 35b82e00d052..fcf73518f63c 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -1281,14 +1281,17 @@ static void bnx2x_hc_int_...
2d2111ea2cf25cc60f7027130ceb34af2d03745d
Analyze and fix the following issue in the Linux kernel code: staging: comedi: fix build errors caused by module_init/module_exit refactor
Problem Details: A couple build errors were introduced with the module_init/module_exit refactor. The struct comedi_driver variable was being accessed directly in the attach and detach routines. Instead of doing this, access the variable indirectly using the driver pointer in struct comedi_device. Signed-off-by: H Ha...
```diff diff --git a/drivers/staging/comedi/drivers/pcmda12.c b/drivers/staging/comedi/drivers/pcmda12.c index 4846d984fb4e..a82b343755fc 100644 --- a/drivers/staging/comedi/drivers/pcmda12.c +++ b/drivers/staging/comedi/drivers/pcmda12.c @@ -172,10 +172,10 @@ static int pcmda12_attach(struct comedi_device *dev, io...
2878bda864c53db599c4a3e3b136ed3e2af68ca0
Analyze and fix the following issue in the Linux kernel code: Extcon: fix section mismatch in extcon_gpio.c
Problem Details: Fix the section mismatch be renaming the struct platform_driver variable. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg K...
```diff diff --git a/drivers/extcon/extcon_gpio.c b/drivers/extcon/extcon_gpio.c index 5c0f08506f93..fe7a07b47336 100644 --- a/drivers/extcon/extcon_gpio.c +++ b/drivers/extcon/extcon_gpio.c @@ -153,7 +153,7 @@ static int __devexit gpio_extcon_remove(struct platform_device *pdev) return 0; } -static struct platfor...
9dd8fb16c36178df2066387d2abd44d8b4dca8c8
Analyze and fix the following issue in the Linux kernel code: rcu: Make exit_rcu() more precise and consolidate
Problem Details: When running preemptible RCU, if a task exits in an RCU read-side critical section having blocked within that same RCU read-side critical section, the task must be removed from the list of tasks blocking a grace period (perhaps the current grace period, perhaps the next grace period, depending on timin...
```diff diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index bbfe7854a6a6..29665a3b3ac5 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -191,6 +191,7 @@ extern void rcu_idle_enter(void); extern void rcu_idle_exit(void); extern void rcu_irq_enter(void); extern void rcu_irq_ex...
8fa196478b8fb30e59456252ab4b309985f67443
Analyze and fix the following issue in the Linux kernel code: alpha: include module.h to fix modpost on Tsunami
Problem Details: Signed-off-by: Jim Faulkner <jfaulkne@ccs.neu.edu> Signed-off-by: Matt Turner <mattst88@gmail.com>
```diff diff --git a/arch/alpha/kernel/core_tsunami.c b/arch/alpha/kernel/core_tsunami.c index 5e7c28f92f19..61893d7bdda5 100644 --- a/arch/alpha/kernel/core_tsunami.c +++ b/arch/alpha/kernel/core_tsunami.c @@ -11,6 +11,7 @@ #include <asm/core_tsunami.h> #undef __EXTERN_INLINE +#include <linux/module.h> #include <...
62004978df3898649e152751eb6ac264a323ec36
Analyze and fix the following issue in the Linux kernel code: fixing dmi match for hp t5745 and hp st5747 thin client
Problem Details: Match the correct information which is DMI_PRODUCT_NAME instead of DMI_BOARD_NAME See dmidecode information on launchpad for both thin client: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/911920 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/911916 Signed-off-by: Marc Gariepy <mgariepy@...
```diff diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 30e2c82101de..9c71183629c2 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -750,7 +750,7 @@ static const struct dmi_system_id intel_no_lvds[] = { .ident = "Hewlett-Packard t5745"...
1a058f5288a74a20d5567a85ab1a04a9de69a212
Analyze and fix the following issue in the Linux kernel code: gfs2: fix recovery during unmount
Problem Details: Journal recovery from lock_dlm should not be ignored if there is an unmount in progress. Ignoring it will causes the recovery to get stuck. The recovery process will correctly handle an in-progess unmount. Signed-off-by: David Teigland <teigland@redhat.com>
```diff diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index d33172c291ba..9c2592b1d5ff 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -368,10 +368,7 @@ int gfs2_recover_set(struct gfs2_sbd *sdp, unsigned jid) struct gfs2_jdesc *jd; int rv; - rv = -ESHUTDOWN; spin_lock(&sdp->sd_jindex_spin); - if (test_bit(SDF_N...
c651214e90e5c150015f7524a6bfc298ad61435f
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix include header files in util/parse-events.h
Problem Details: Include header fixes for ... bool: util/parse-events.h:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘have_tracepoints’ ... and types.h: util/parse-events.h:28: error: expected ‘)’ before ‘config’ util/parse-events.h:34: error: expected declaration specifiers or ‘...’ before...
```diff diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h index ca069f893381..5cb002894a17 100644 --- a/tools/perf/util/parse-events.h +++ b/tools/perf/util/parse-events.h @@ -4,7 +4,9 @@ * Parse symbolic events/counts passed in as options: */ +#include <stdbool.h> #include "../../../i...
23080e4cd224013c06444e7850fe0bcb55c129ff
Analyze and fix the following issue in the Linux kernel code: perf test: Make the rdpmc test honour 'verbose' mode
Problem Details: It was unconditionally printing debug stuff when in non -v mode we should just print the name and result of the test. Now: [root@sandy ~]# perf test rdpmc 6: x86 rdpmc test: Ok [root@sandy ~]# perf test -v rdpmc 6: x86 rdpmc test: --- start --- 0: 6030 1: ...
```diff diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c index 1c5b9801ac61..5502a4a2a4f6 100644 --- a/tools/perf/builtin-test.c +++ b/tools/perf/builtin-test.c @@ -1549,8 +1549,6 @@ static int __test__rdpmc(void) sa.sa_sigaction = segfault_handler; sigaction(SIGSEGV, &sa, NULL); - fprintf(stder...
9d1ceac5c6f7e77ea914de376ec17ced3eb22e5f
Analyze and fix the following issue in the Linux kernel code: Revert "ath9k_hw: Fix incorrect spur_freq_sd for AR9003"
Problem Details: This reverts commit a844adfd7bee4edc66d337de6c33b348e83552a8. The commit a844adfd is degrading rx sensitivity of lower rate in HT40 mode and it is confirmed that reverting the change is improving rx sensitivity. spur_freq_sd (for self-corr in AGC) is defined with respect to the center of each 20MHz ch...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index deb6cfb2959a..600aca9fe6b1 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c @@ -373,7 +373,7 @@ static void ar9003_hw_spur_ofdm_work(struct ath_h...
cf04317227d0c53d931a0b963e7ac6f7f0125e8a
Analyze and fix the following issue in the Linux kernel code: brcmfmac: fix a double spin_unlock_irqrestore issue in dpc
Problem Details: dpc_tl_lock is not acquired in the error handle code for bus down. But it's unlocked using spin_unlock_irqrestore after finishing task list walk down. Grab the lock before breaking the loop to avoid a double unlock. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Franky Lin <frank...
```diff diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index eb3829b03cd3..e2b34e1563f4 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c @@ -2637,6 +2637,7 @@ static int brcmf_sd...
aac10aaa8cc65a6fef6f5bc7d0b96035b0225a61
Analyze and fix the following issue in the Linux kernel code: memory: emif: add debugfs entries for emif
Problem Details: Add debug entries for: 1. calculated registers per frequency 2. last polled value of MR4(temperature level of LPDDR2 memory) Signed-off-by: Aneesh V <aneesh@ti.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Benoit Cousson <b-cousson@ti.com> [santosh.shilimkar@ti.com:...
```diff diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 3dfffbb8ab40..33a4396b24cb 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -18,6 +18,7 @@ #include <linux/platform_device.h> #include <linux/interrupt.h> #include <linux/slab.h> +#include <linux/debugfs.h> #include <linux/seq...
dbf34207c62bdec16b49721d119647c470a3443c
Analyze and fix the following issue in the Linux kernel code: vhost_net: re-poll only on EAGAIN or ENOBUFS
Problem Details: Currently, we restart tx polling unconditionally when sendmsg() fails. This would cause unnecessary wakeups of vhost wokers and waste cpu utlization when evil userspace(guest driver) is able to hit EFAULT or EINVAL. The polling is only needed when the socket send buffer were exceeded or not enough mem...
```diff diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 35abe9019ba7..f54b1d5fc234 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -257,7 +257,8 @@ static void handle_tx(struct vhost_net *net) UIO_MAXIOV; } vhost_discard_vq_desc(vq, 1); - tx_poll_start(net, sock); + if (err ...
c460f0573941cb28dc7f35595679c3508f0ce41f
Analyze and fix the following issue in the Linux kernel code: vhost_net: zerocopy: fix possible NULL pointer dereference of vq->bufs
Problem Details: When we want to disable vhost_net backend while there's a tx work, a possible NULL pointer defernece may happen we we try to deference the vq->bufs after vhost_net_set_backend() assign a NULL to it. As suggested by Michael, fix this by checking the vq->bufs instead of vhost_sock_zcopy(). Signed-off-b...
```diff diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 1f21d2a1e528..35abe9019ba7 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -166,7 +166,7 @@ static void handle_tx(struct vhost_net *net) if (wmem < sock->sk->sk_sndbuf / 2) tx_poll_stop(net); hdr_size = vq->vhost_hlen; - zcopy = v...
01d6657b388438def19c8baaea28e742b6ed32ec
Analyze and fix the following issue in the Linux kernel code: macvtap: zerocopy: set SKBTX_DEV_ZEROCOPY only when skb is built successfully
Problem Details: Current the SKBTX_DEV_ZEROCOPY is set unconditionally after zerocopy_sg_from_iovec(), this would lead NULL pointer when macvtap fails to build zerocopy skb because destructor_arg was not initialized. Solve this by set this flag after the skb were built successfully. Signed-off-by: Jason Wang <jasowang...
```diff diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 9ab182a40648..a4ff694cea22 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -699,10 +699,9 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m, if (!skb) goto err; - if (zerocopy) { + if (zerocopy) ...
4ef67ebedffa44ed9939b34708ac2fee06d2f65f
Analyze and fix the following issue in the Linux kernel code: macvtap: zerocopy: fix truesize underestimation
Problem Details: As the skb fragment were pinned/built from user pages, we should account the page instead of length for truesize. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
```diff diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index bd4a70d8605f..7cb2684a8792 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -519,6 +519,7 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from, struct page *page[MAX_SKB_FRAGS]; int num_pages; ...
3afc9621f15701c557e60f61eba9242bac2771dd
Analyze and fix the following issue in the Linux kernel code: macvtap: zerocopy: fix offset calculation when building skb
Problem Details: This patch fixes the offset calculation when building skb: - offset1 were used as skb data offset not vector offset - reset offset to zero only when we advance to next vector Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
```diff diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 0427c6561c84..bd4a70d8605f 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -505,10 +505,11 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from, if (copy > size) { ++from; --count; - } + ...
7a1d082c83d24bfc0d3072cfecc98172bd0a5a3b
Analyze and fix the following issue in the Linux kernel code: [media] V4L2 Spec: fix typo
Problem Details: V4L2_CID_JPEG_COMPRESION_QUALITY -> V4L2_CID_JPEG_COMPRESSION_QUALITY Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 5038a3a9a24c..5e12257dfcef 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -3538,12 +3538,12 @@ interface and may change in the future.</...
e90f3b61f4432e3c5bb6b57f4b3e8d8cba747541
Analyze and fix the following issue in the Linux kernel code: drm/i915: Only enable IPS polling for gen5
Problem Details: On SandyBridge IPS was entirely implemented in hardware and not reliant on the driver monitoring power consumption and feeding back desired run states, so the hardware is able to adapt quicker and more flexibly. Which is a huge relief for us as we no longer have to carry empirically derived magic algor...
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index b505b70dba05..e6162a1681f0 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1224,6 +1224,9 @@ static int i915_emon_status(struct seq_file *m, void *unused) unsigned long t...
074b5e1a99fb5017122591d70098601e0484ca6a
Analyze and fix the following issue in the Linux kernel code: drm/i915: Do not read non-existent DPLL registers on PCH hardware
Problem Details: We only execute intel_decrease_pllclock for pre-PCH hardware, typically gen4 mobiles. However, in the variable declaration we did read from the non-PCH DPLL register, quite naughty and detected by SandyBridge. Reported-and-tested-by: Andrey Rahmatullin <wrar@wrar.name> Bugzilla: https://bugs.freedeskt...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 5908cd563400..1b1cf3b3ff51 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -7072,9 +7072,6 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc) struct drm_dev...
1aa1b11c57a69fc483218794172f660d74882944
Analyze and fix the following issue in the Linux kernel code: drm/kms: reduce some messages to debug level (v2)
Problem Details: These can all be trigged from userspace if you pass the right values. v2: rebase on later kernel. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index a9ca1b80fc28..3519b6c174a9 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -2104,7 +2104,7 @@ int drm_mode_addfb(struct drm_device *dev, fb = dev->mode_config.funcs->fb_create(dev, file_priv, &r); if (IS...
435a7ef52db7d86e67a009b36cac1457f8972391
Analyze and fix the following issue in the Linux kernel code: ARM: 7409/1: Do not call flush_cache_user_range with mmap_sem held
Problem Details: We can't be holding the mmap_sem while calling flush_cache_user_range because the flush can fault. If we fault on a user address, the page fault handler will try to take mmap_sem again. Since both places acquire the read lock, most of the time it succeeds. However, if another thread tries to acquire th...
```diff diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 55b2f3dc6bb3..63d402f75e25 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -496,7 +496,9 @@ do_cache_op(unsigned long start, unsigned long end, int flags) if (end > vma->vm_end) end = vma->vm_end; + up_read(&mm-...
69e1e0197ce739d86ca33fd275962d6cbd1b107a
Analyze and fix the following issue in the Linux kernel code: e1000e: fix .ndo_set_rx_mode for 82579
Problem Details: Secondary unicast and multicast addresses are added to the Receive Address registers (RAR) for most parts supported by the driver. For 82579, there is only one actual RAR and a number of Shared Receive Address registers (SHRAR) that are shared among the driver and f/w which can be reserved and write-p...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c index a212846a6574..66f9877bc4ec 100644 --- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c +++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c @@ -1439,6 +1439,7 @@ static const struct e1000_mac_o...
62bc813e48aef39c187bb426ddd5441862f1d8d1
Analyze and fix the following issue in the Linux kernel code: e1000e: workaround EEPROM configuration change on 82579
Problem Details: An update to the EEPROM on 82579 will extend a delay in hardware to fix an issue with WoL not working after a G3->S5 transition which is unrelated to the driver. However, this extended delay conflicts with nominal operation of the device when it is initialized by the driver and after every reset of th...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h index 7ca1b68e2e3d..3a5acb54cd4e 100644 --- a/drivers/net/ethernet/intel/e1000e/hw.h +++ b/drivers/net/ethernet/intel/e1000e/hw.h @@ -51,6 +51,7 @@ enum e1e_registers { E1000_FEXTNVM = 0x00028, /* Future Extended NVM...
6838e601e6dc63440fd4315c1c2f3a2ef4ccdd6e
Analyze and fix the following issue in the Linux kernel code: ARM: mx53: fix pad definitions for MX53_PAD_EIM_D28__I2C1_SDA and MX53_PAD_GPIO_8__CAN1_RXCAN
Problem Details: MX53_PAD_EIM_D28__I2C1_SDA uses an undefined PAD_CTRL_I2C MX53_PAD_GPIO_8__CAN1_RXCAN has an incorrect input_select value Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx53.h b/arch/arm/plat-mxc/include/mach/iomux-mx53.h index 527f8fe3e31b..9761e003bde2 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx53.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx53.h @@ -573,7 +573,7 @@ #define MX53_PAD_EIM_D28__UART2_CTS IOMUX_PAD(...
07f0450e34e4cd4ecb5a79eaedea26a0e4213faa
Analyze and fix the following issue in the Linux kernel code: ARM: imx/eukrea_mbimx27-baseboard: fix typo in error message
Problem Details: Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index 5f2f91d1798b..b46cab0ced53 100644 --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c @@ -243,7 +243,7 @@ static const struct imxuart_platform_data uar...
dba4258068f822b7dafc78c28fe9c99c551eca7e
Analyze and fix the following issue in the Linux kernel code: Input: evdev - properly access RCU-protected 'grab' data
Problem Details: We should use rcu_dereference_protected() when checking if given client is the one that grabbed the device. This fixes warnings produced by sparse. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 4b2e10d5d641..9226b4d9118f 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -180,7 +180,10 @@ static int evdev_grab(struct evdev *evdev, struct evdev_client *client) static int evdev_ungrab(struct evdev *evdev, struct evdev_cli...
0c9e300adec668fd323b0e79c85b9136fccab649
Analyze and fix the following issue in the Linux kernel code: Input: wacom - fix sparse warning
Problem Details: This fixes the following warning from sparse warning: Using plain integer as NULL pointer Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 86b96f94cd84..364f2c3432ff 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -1030,13 +1030,13 @@ static void wacom_wireless_work(struct work_struct *work) wacom = usb_get_intfdata(usbd...
f898ae09a043cf9c3c4be82c04e08fcf00fe82c1
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: gadget: issue Update Transfer command after queuing isoc request
Problem Details: Issue an Update Transfer command after queuing a request to an isoc EP with an active transfer. This is required according to the dwc3 databook. Pratyush Anand reports that this fixes a problem he was having with Isoc IN transfers. Tested-by: Pratyush Anand<pratyush.anand@st.com> Signed-off-by: Paul Z...
```diff diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 49ee83ed68b7..31ffc5c27354 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -957,10 +957,12 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param, } dep->flags |= DWC3_EP_BUSY; - dep->r...
5bb196ad29c58c3e69dde8ed34b99a07c0719e7f
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix line over 80 character issue in rtd520.c
Problem Details: This is a patch to the rtd520.c file that fixes up a line over 80 character warning found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index 1559d570d9f3..0c15b82d997b 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -369,8 +369,11 @@ struct rtdPrivate { u8 utcCtrl[4]; /* crtl mode for 3 utc + r...
65c5cfa695fa38272e393841ee80fd53ef2ef12e
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix line indentation issue in dt9812.c
Problem Details: Replaced the spaces with a tab. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/dt9812.c b/drivers/staging/comedi/drivers/dt9812.c index 89a49dda4482..72110fc87f0e 100644 --- a/drivers/staging/comedi/drivers/dt9812.c +++ b/drivers/staging/comedi/drivers/dt9812.c @@ -196,7 +196,7 @@ struct dt9812_flash_data { }; #define DT9812_MAX_NUM_MULTI_BY...
6a8576360a77be2c39ef2e151b5a60b214f67fd6
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix printk issue in pcmmio.c
Problem Details: This is a patch to the pcmmio.c file that fixes up a printk warning found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c index e05d1572e27c..d7f98d575f45 100644 --- a/drivers/staging/comedi/drivers/pcmmio.c +++ b/drivers/staging/comedi/drivers/pcmmio.c @@ -337,7 +337,7 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev, } ...
e265af1bfa48dbacfe5727237ce6d756ce96431e
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix line over 80 character issue in usbduxfast.c
Problem Details: This is a patch to the usbduxfast.c file that fixes up a line over 80 character warning found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index 2b4d25128995..c672ea3784a6 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c @@ -455,14 +455,15 @@ static int usbduxfastsub_start(struct usbduxfas...
8ef3a7ed35a09431336faf2f3ce53d4d0959cea1
Analyze and fix the following issue in the Linux kernel code: staging:rtl8192u Fix typos and comments
Problem Details: Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index ebcb5b06de65..b4e99f42123f 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -98,7 +98,7 @@ do { if(rt_global_debug_component & component) \ #define COMP_INIT BIT2 // during driv...
ffae3055d23275b7b0abd4c1b0b750662b62ccf1
Analyze and fix the following issue in the Linux kernel code: staging: rtl8192u Fix a typo.
Problem Details: Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192u/r8180_93cx6.c b/drivers/staging/rtl8192u/r8180_93cx6.c index 0e8ff75e291b..3c515b7bc542 100644 --- a/drivers/staging/rtl8192u/r8180_93cx6.c +++ b/drivers/staging/rtl8192u/r8180_93cx6.c @@ -14,7 +14,7 @@ Parts of this driver are based on the Intel Pro Wireless 2100 GPL...
bf3313a1b6bd819fc4ca6f54b465481fb8b5f0a8
Analyze and fix the following issue in the Linux kernel code: staging: et131x: Fix coding style issues
Problem Details: Signed-off-by: joseph daniel <josephdanielwalter@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 886f5650444e..5b11c5e3622e 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -1710,7 +1710,8 @@ static int et131x_mdio_read(struct mii_bus *bus, int phy_addr, int reg) return value; } -...
156d17905e783d057061b3b56a9b3befec064e47
Analyze and fix the following issue in the Linux kernel code: CIFS: Fix indentation in cifs_show_options
Problem Details: Trivial patch which fixes a misplaced tab in cifs_show_options(). Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 811245b1ff2e..ca6a3796a33b 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -442,7 +442,7 @@ cifs_show_options(struct seq_file *s, struct dentry *root) seq_printf(s, ",rsize=%u", cifs_sb->rsize); seq_printf(s, ",wsize=%u", cifs_sb->wsize); /* c...
f864b60ad0078b74c765f00f0600588b85c0a239
Analyze and fix the following issue in the Linux kernel code: USB: input: usbtouchscreen.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Henrik Rydberg <rydberg@euromail.se> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Viresh Kumar <viresh.kumar@st.com> C...
```diff diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 955441cb030d..4127cf7bb25a 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -1380,7 +1380,7 @@ exit: usb_mark_last_busy(interface_to_usbdev(usbt...
1b5ca928e7d09c5ce0cefe6aec7392e4a3aa1d3b
Analyze and fix the following issue in the Linux kernel code: USB: input: wacom_sys.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Ping Cheng <pingc@wacom.com> CC: Chris Bagwell <chris@cnpbagwell.com> CC: Eduard Hasenleithner <eduard@hasenleithner.at...
```diff diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 3db4684a0b77..821d2a958e44 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -122,7 +122,7 @@ static void wacom_sys_irq(struct urb *urb) usb_mark_last_busy(wacom->usbdev); retval = us...
3415b57cb3d7b6b6cd5fcbf5f3f64ca28a3f95e2
Analyze and fix the following issue in the Linux kernel code: USB: input: kbtab.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index 1eb6341f81c5..be717d758cb2 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c @@ -80,7 +80,7 @@ static void kbtab_irq(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev...
88d5ab3a1817bcfe192ae79ef85ef3fb3e8c6669
Analyze and fix the following issue in the Linux kernel code: USB: input: gtco.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index fed555bf9ff7..937215373e95 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c @@ -806,7 +806,7 @@ static void gtco_urb_callback(struct urb *urbinfo) resubmit: rc = usb_submit_urb(urbinfo, GFP_ATOMIC); if (...
383c52f3388b5ddb2fbf1ec073081bc9c4bdfeff
Analyze and fix the following issue in the Linux kernel code: USB: input: aiptek.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Jesper Juhl <jj@chaosbits.net> CC: JJ Ding <dgdunix@gmail.com> CC: Edwin van Vliet <edwin@cheatah.nl> Signed-off-by: Gr...
```diff diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index b8d43eb3c8f1..dc16bfd24738 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c @@ -811,7 +811,7 @@ static void aiptek_irq(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval !...
b30662c4721ea77ca5930dd60f3294cd1413067f
Analyze and fix the following issue in the Linux kernel code: USB: input: acecad.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index da6c34106190..a81a2b060284 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c @@ -105,7 +105,7 @@ static void usb_acecad_irq(struct urb *urb) resubmit: status = usb_submit_urb(urb, GFP_ATOMIC); if (...
140b1230a19b65489317271da36465e42865f2e4
Analyze and fix the following issue in the Linux kernel code: USB: input: bcm5974.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Henrik Rydberg <rydberg@euromail.se> CC: Alessandro Rubini <rubini@ipvvis.unipv.it> Signed-off-by: Greg Kroah-Hartman <...
```diff diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index 8cd7c932c202..e2e8d815da76 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c @@ -584,7 +584,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) int retval = 0, size; if (!data) {...
80f8594f63dd35179235aa22901dfa5ce786fe00
Analyze and fix the following issue in the Linux kernel code: USB: input: appletouch.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Alessandro Rubini <rubini@ipvvis.unipv.it> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 90db679b44af..a5f15477a7ea 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@ -253,8 +253,9 @@ MODULE_PARM_DESC(debug, "Activate debugging output"); * packets (Report ID 2). This code ch...
aa330384a6444682126de5dd49982fa428badd08
Analyze and fix the following issue in the Linux kernel code: USB: input: yealink.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Henk Vergonet <Henk.Vergonet@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index 4984823b3681..9f71bb174eed 100644 --- a/drivers/input/misc/yealink.c +++ b/drivers/input/misc/yealink.c @@ -428,7 +428,7 @@ static void urb_irq_callback(struct urb *urb) int ret, status = urb->status; if (status) - dev_err(&yl...
6b37dbba5d5f4e167eb5ca57e43c1bd49a696831
Analyze and fix the following issue in the Linux kernel code: USB: input: powermate.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index 71ec621fbefa..3091b82b1f97 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c @@ -110,7 +110,7 @@ static void powermate_irq(struct urb *urb) exit: retval = usb_submit_urb (urb, GFP_ATOMIC); if (...
3b449fe5d5585a43f26bda4c3d86b7677d4c80db
Analyze and fix the following issue in the Linux kernel code: USB: input: keyspan_remote.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c index 9a45c88bc65f..7f017d497d83 100644 --- a/drivers/input/misc/keyspan_remote.c +++ b/drivers/input/misc/keyspan_remote.c @@ -267,7 +267,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.test...
388fd2026633acf2a23fcb7918ba24d9d646bcfb
Analyze and fix the following issue in the Linux kernel code: USB: input: cm109.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Axel Lin <axel.lin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c index 412fe5719cb6..9e76ab18e944 100644 --- a/drivers/input/misc/cm109.c +++ b/drivers/input/misc/cm109.c @@ -327,7 +327,7 @@ static void cm109_submit_buzz_toggle(struct cm109_dev *dev) error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); i...
39e85a2673c0c9696939dbe10e79c2fb4b91b91c
Analyze and fix the following issue in the Linux kernel code: USB: input: xpad.c: fix up dev_err() usage
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: "Magnus Hörlin" <magnus@alefors.se> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Mauro Carvalho Chehab <mchehab@redhat...
```diff diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index bee9c00032ee..d760031430a3 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -492,7 +492,7 @@ static void xpad_irq_in(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval)...
0f1103e40f9186bd2cdac4dde6c5bbd2f5273365
Analyze and fix the following issue in the Linux kernel code: x86/PCI: fix unused variable warning in amd_bus.c
Problem Details: Fix this warning: arch/x86/pci/amd_bus.c: In function 'early_fill_mp_bus_info': arch/x86/pci/amd_bus.c:56:6: warning: unused variable 'j' [-Wunused-variable] introduced by commit d28e5ac2a07e ("x86/PCI: dynamically allocate pci_root_info for native host bridge drivers"). Reported-by: Stephen Rot...
```diff diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c index 459a7316375c..5aed49bff058 100644 --- a/arch/x86/pci/amd_bus.c +++ b/arch/x86/pci/amd_bus.c @@ -44,6 +44,15 @@ static struct pci_root_info __init *find_pci_root_info(int node, int link) return NULL; } +static void __init set_mp_bus_range_to...
d331efdd993f4c392f5f63f970b3a55996e3a959
Analyze and fix the following issue in the Linux kernel code: USB: input: joystick: iforce: fix up dev_err() usages
Problem Details: We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 137326a5c2aa..68f5f1e2d73b 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -257,7 +257,7 @@ int iforce_get_id_packet(struct iforc...
ade749a6bde26511925c888d734c989c5bbec919
Analyze and fix the following issue in the Linux kernel code: usb: [ARM] fix unresolved err() reference in host/ohci-pxa27x.c
Problem Details: Commit af4e1ee04026908086d7ed252db2619a8ceaa333 (usb-next) "USB: remove err() macro" was preceeded by a tree-wide cleanup of users, however this one squeaked through the cracks because it had whitespace between the function name and the bracket for the args. Map it onto dev_err, just like all th...
```diff diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index c31b2815be1c..e1a3cc6d28dc 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c @@ -419,7 +419,8 @@ ohci_pxa27x_start (struct usb_hcd *hcd) return ret; if ((ret = ohci_run (ohci)) < 0) { - err ...
50447d74fd2f402d5e4f3ab3fc362b5da273be10
Analyze and fix the following issue in the Linux kernel code: usb: [MIPS] fix unresolved err() reference in host/ohci-pnx8550.c
Problem Details: Commit af4e1ee04026908086d7ed252db2619a8ceaa333 (usb-next) "USB: remove err() macro" was preceeded by a tree-wide cleanup of users, however this one squeaked through the cracks because it had whitespace between the function name and the bracket for the args. Map it onto dev_err, just like all th...
```diff diff --git a/drivers/usb/host/ohci-pnx8550.c b/drivers/usb/host/ohci-pnx8550.c index f13d08f94d6b..148d27d6a67c 100644 --- a/drivers/usb/host/ohci-pnx8550.c +++ b/drivers/usb/host/ohci-pnx8550.c @@ -157,7 +157,8 @@ ohci_pnx8550_start (struct usb_hcd *hcd) return ret; if ((ret = ohci_run (ohci)) < 0) { - ...
3b1f1ad6d1a2b4dcbc8f0ad27b6dd05c3ca79d0e
Analyze and fix the following issue in the Linux kernel code: usb: [MIPS] fix unresolved err() reference in host/ohci-au1xxx.c
Problem Details: Commit af4e1ee04026908086d7ed252db2619a8ceaa333 (usb-next) "USB: remove err() macro" was preceeded by a tree-wide cleanup of users, however this one squeaked through the cracks because it had whitespace between the function name and the bracket for the args. Map it onto dev_err, just like all th...
```diff diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c index 4ea63b2cac42..c611699b4aa6 100644 --- a/drivers/usb/host/ohci-au1xxx.c +++ b/drivers/usb/host/ohci-au1xxx.c @@ -37,7 +37,8 @@ static int __devinit ohci_au1xxx_start(struct usb_hcd *hcd) return ret; if ((ret = ohci_run(ohci...
bc71c0961c61d6082472203bfae9596899c9c896
Analyze and fix the following issue in the Linux kernel code: ARM: ux500: core U9540 support
Problem Details: This adds support for the U9540 variant of the U8500 series. This is an application processor without internal modem. This is the most basic part with ASIC ID, CPU-related fixes, IRQ list, register ranges, timer, UART, and L2 cache setup. This is based on a patch by Michel Jaouen which was rewritten to...
```diff diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c index 5af36aa56c08..b29a788f498c 100644 --- a/arch/arm/mach-ux500/board-mop500-uib.c +++ b/arch/arm/mach-ux500/board-mop500-uib.c @@ -102,7 +102,7 @@ static int __init mop500_uib_init(void) struct i2c_adapter *i2c0; ...
a9f6991b6cd3f55aa8482633337cd811d84d0dd8
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix a typo in NFS4_enc_link_sz
Problem Details: Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 4c3cc0ed9543..fe6142417dd9 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -626,9 +626,9 @@ static int nfs4_stat_to_errno(int); encode_savefh_maxsz + \ encode_putfh_maxsz + \ encode_link_maxsz + \ - decode_getattr_maxsz + \ + en...
b86ff9820fd5df69295273b9aa68e58786ffc23f
Analyze and fix the following issue in the Linux kernel code: PM / Sleep: Add user space interface for manipulating wakeup sources, v3
Problem Details: Android allows user space to manipulate wakelocks using two sysfs file located in /sys/power/, wake_lock and wake_unlock. Writing a wakelock name and optionally a timeout to the wake_lock file causes the wakelock whose name was written to be acquired (it is created before is necessary), optionally with...
```diff diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power index 237c735db6c9..31725ffeeb3a 100644 --- a/Documentation/ABI/testing/sysfs-power +++ b/Documentation/ABI/testing/sysfs-power @@ -189,3 +189,45 @@ Description: Reading from this file causes the last string successf...
5a21d489fd9541a4a66b9a500659abaca1b19a51
Analyze and fix the following issue in the Linux kernel code: PM / Hibernate: Hibernate/thaw fixes/improvements
Problem Details: 1. Do not allocate memory for buffers from emergency pools, unless absolutely required. Do not warn about and do not retry non-essential failed allocations. 2. Do not check the amount of free pages left on every single page write, but wait until one map is completely populated and then ch...
```diff diff --git a/kernel/power/swap.c b/kernel/power/swap.c index eef311a58a64..11e22c068e8b 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -6,7 +6,7 @@ * * Copyright (C) 1998,2001-2005 Pavel Machek <pavel@ucw.cz> * Copyright (C) 2006 Rafael J. Wysocki <rjw@sisk.pl> - * Copyright (C) 2010 Bojan ...
84f904ecd3aa2ccb5779b815b69c1cb592f07bb5
Analyze and fix the following issue in the Linux kernel code: vt: Fix deadlock on scroll-lock
Problem Details: Fixing the locking accidentally replaced a race in the scroll lock handling with a deadlock. Turn it back into a race for now. The basic problem is that there are two paths into the tty stop/start helpers. One via the tty layer ^S/^Q handling where we need to take the kbd_event_lock and one via the sp...
```diff diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 86dd1e302bb3..29ca20dbd335 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -1085,15 +1085,21 @@ void vt_set_led_state(int console, int leds) * * Handle console start. This is a wrapper for the VT layer * so ...
116a0fc31c6c9b8fc821be5a96e5bf0b43260131
Analyze and fix the following issue in the Linux kernel code: netem: fix possible skb leak
Problem Details: skb_checksum_help(skb) can return an error, we must free skb in this case. qdisc_drop(skb, sch) can also be feeded with a NULL skb (if skb_unshare() failed), so lets use this generic helper. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Da...
```diff diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 5da548fa7ae9..ebd22966f748 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -408,10 +408,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) if (q->corrupt && q->corrupt >= get_crandom(&q->corrupt_cor)) { if...
f9a9111b540fd67db5dab332f4b83d86c90e27b1
Analyze and fix the following issue in the Linux kernel code: 8250.c: less than 2400 baud fix.
Problem Details: We noticed that we were loosing data at speed less than 2400 baud. It turned out our (TI16750 compatible) uart with 64 byte outgoing fifo was truncated to 16 byte (bit 5 sets fifo len) when modifying the fcr reg. The input code still fills the buffer with 64 bytes if I remember correctly and thus data ...
```diff diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c index 182efcc90e2e..c9ac4eabe35a 100644 --- a/drivers/tty/serial/8250/8250.c +++ b/drivers/tty/serial/8250/8250.c @@ -2259,10 +2259,11 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, quot++; if (up...
e072b3fad5f3915102c94628b4971f52ff99dd05
Analyze and fix the following issue in the Linux kernel code: sky2: fix receive length error in mixed non-VLAN/VLAN traffic
Problem Details: Bug: The VLAN bit of the MAC RX Status Word is unreliable in several older supported chips. Sometimes the VLAN bit is not set for valid VLAN packets and also sometimes the VLAN bit is set for non-VLAN packets that came after a VLAN packet. This results in a receive length error when VLAN hardware taggi...
```diff diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 0ced3117abc6..487a6c8bd4ec 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c @@ -2495,9 +2495,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2, skb->ip_summed ...
3f42941b5d1d13542b1a755a9e4f633aa72e4d3e
Analyze and fix the following issue in the Linux kernel code: sky2: propogate rx hash when packet is copied
Problem Details: When a small packet is received, the driver copies it to a new skb to allow reusing the full size Rx buffer. The copy was propogating the checksum offload but not the receive hash information. The bug is impact was mostly harmless and therefore not observed until reviewing this area of code. Signed-of...
```diff diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index c9b504e2dfc3..0ced3117abc6 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c @@ -2494,8 +2494,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2, skb_copy_from_l...
6a23ccd216b6a8ba2c67a9f9d8969b4431ad2920
Analyze and fix the following issue in the Linux kernel code: usb: usbtest: two super speed fixes for usbtest
Problem Details: bMaxPacketSize0 field for super speed is a power of 2, not a count. The size itself is always 512. Max packet size for a super speed bulk endpoint is 1024, so allocate the urb size in halt_simple() accordingly. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Acked-by: Felipe Balbi <balbi@ti.com> C...
```diff diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 9dcb68f04f03..055b84adedac 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -1028,7 +1028,10 @@ test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param *param) case 13: /* short read, resembling case 1...
8815bb09af21316aeb5f8948b24ac62181670db2
Analyze and fix the following issue in the Linux kernel code: usbhid: prevent deadlock during timeout
Problem Details: On some HCDs usb_unlink_urb() can directly call the completion handler. That limits the spinlocks that can be taken in the handler to locks not held while calling usb_unlink_urb() To prevent a race with resubmission, this patch exposes usbcore's infrastructure for blocking submission, uses it and so dr...
```diff diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 5bf91dbad59d..4bbb883a3dd2 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -399,6 +399,16 @@ static int hid_submit_ctrl(struct hid_device *hid) * Output interrupt completion handler. */ +stat...
5622c07b4741e0afd7607bce6e850b76eeb23210
Analyze and fix the following issue in the Linux kernel code: perf stat: Fix case where guest/host monitoring is not supported by kernel
Problem Details: By default, perf stat sets exclude_guest = 1. But when you run perf on a kernel which does not support host/guest filtering, then you get an error saying the event in unsupported. This comes from the fact that when the perf_event_attr struct passed by the user is larger than the one known to the kerne...
```diff diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index c941bb640f49..4532a789fbe3 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -283,6 +283,8 @@ static int create_perf_stat_counter(struct perf_evsel *evsel, { struct perf_event_attr *attr = &evsel->attr; struct ...
afda0f94483f46a4caddb529b8f95e0aaf015de6
Analyze and fix the following issue in the Linux kernel code: perf build-id: Fix filename size calculation
Problem Details: The filename is a pointer variable so the sizeof(filename) will return length of a pointer. Fix it by using 'size'. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.ke...
```diff diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 4c7c2d73251f..c0b70c697a36 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -296,7 +296,7 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, if (mkdir_p(filename, 0755)) goto out_free; - s...
f511fc624642f0bb8cf65aaa28979737514d4746
Analyze and fix the following issue in the Linux kernel code: rcu: Ensure that RCU_FAST_NO_HZ timers expire on correct CPU
Problem Details: Timers are subject to migration, which can lead to the following system-hang scenario when CONFIG_RCU_FAST_NO_HZ=y: 1. CPU 0 executes synchronize_rcu(), which posts an RCU callback. 2. CPU 0 then goes idle. It cannot immediately invoke the callback, but there is nothing RCU needs from ti, so it ent...
```diff diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index ad61da79b311..d01e26df55a1 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h @@ -2110,6 +2110,8 @@ static void rcu_cleanup_after_idle(int cpu) */ static void rcu_prepare_for_idle(int cpu) { + struct timer_list *tp; + /* ...
b704871124b477807966f06789c2b32f2de58bf7
Analyze and fix the following issue in the Linux kernel code: hwmon: (coretemp) fix oops on cpu unplug
Problem Details: coretemp tries to access core_data array beyond bounds on cpu unplug if core id of the cpu if more than NUM_REAL_CORES-1. BUG: unable to handle kernel NULL pointer dereference at 000000000000013c IP: [<ffffffffa00159af>] coretemp_cpu_callback+0x93/0x1ba [coretemp] PGD 673e5a067 PUD 66e9b3067 PMD 0 Oop...
```diff diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 0d3141fbbc20..54a70fe12441 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -709,6 +709,10 @@ static void __cpuinit put_core_offline(unsigned int cpu) indx = TO_ATTR_NO(cpu); + /* The core id is too big, just ret...
d961949660fa1c1b7eb0c3a3c157989c90f14e8e
Analyze and fix the following issue in the Linux kernel code: net: fix two typos in skbuff.h
Problem Details: fix kernel doc typos in function names Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 775292a66fa4..111f26b6e28b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1020,7 +1020,7 @@ static inline void skb_queue_splice(const struct sk_buff_head *list, } /** - * skb_queue_splice - join two skb lists and reinit...
5de7aee5413cdfe6f96289a84a5ad22b1314e873
Analyze and fix the following issue in the Linux kernel code: l2tp: fix locking of 64-bit counters for smp
Problem Details: L2TP uses 64-bit counters but since these are not updated atomically, we need to make them safe for smp. This patch addresses that. Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index 0ca9bc39150f..f1bfae3e1ba6 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -330,8 +330,10 @@ static void l2tp_recv_queue_skb(struct l2tp_session *session, struct sk_buff *sk struct sk_buff *skbp; struct sk_buff *tmp; u32 ns = L...
516cf1be07cf3ab52e6d2f64da33b0fa5d9e0042
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: use printk(KERN_WARNING..) in stub function
Problem Details: drivers/infiniband/ulp/srp/ib_srp.c #defines pr_fmt() PFX fmt, but PFX is not #defined until after <linux/*> headers are included. This results in a bad expansion of the pr_warn() in the stub function. 2084c2084 < printk("<4>" PFX "dyndbg supported only in " "CONFIG_DYNAMIC_DEBUG builds\n") Signed...
```diff diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 4697e4b59d6f..c18257b0fa72 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -109,7 +109,8 @@ static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, const char *modname) { ...
759a3cc625e77161ae457459489178dd0921524e
Analyze and fix the following issue in the Linux kernel code: ktest: Fix reboot on success stopping all reboots
Problem Details: The change to let individual tests decide to reboot the machine on success of the entire test also prevented errors from rebooting when an error was detected. The "no_reboot" variable was only cleared if the test had reboot_on_success set. But the no_reboot variable also prevents the test rebooting wh...
```diff diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index d2ede59b9a3c..4915408f6a98 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -183,6 +183,9 @@ my %force_config; # do not force reboots on config problems my $no_reboot = 1; +# reboot on success +my $...
5158ba3ea7fc8c3deafec769a32bc6eb869c3608
Analyze and fix the following issue in the Linux kernel code: ktest.pl: Fix combined usage of BISECT_REVERSE and BISECT_SKIP
Problem Details: When BISECT_REVERSE and BISECT_SKIP are used together with boot or test testing, build failures are treated as boot or test failures and 'git bisect bad' is executed instead of 'git bisect skip'. This is because the $ret value of -1 is treated as a build failure, but the $reverse_bisect logic does not ...
```diff diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 95d6a6f7c33a..d2ede59b9a3c 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -2192,7 +2192,7 @@ sub run_bisect { } # Are we looking for where it worked, not failed? - if ($reverse_bisect) ...
2a039bf5a6caa6b41c3839c1e3a19b20fb38270b
Analyze and fix the following issue in the Linux kernel code: HID: hid-logitech: Collect report descriptors before sending
Problem Details: The current code allows several consecutive calls to hid_parse_report(), which may have happened to work before, but would cause a memory leak and generally be incorrect. This patch collects all the reports before sending them once. Cc: Nestor Lopez Casado <nlopezcasad@logitech.com> Tested-by: Benjami...
```diff diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index 2b56efcbdf61..e1c38bba4375 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c @@ -155,6 +155,14 @@ static const char media_descriptor[] = { /* Maximum size of all defined hid reports in bytes (including...
4c394bb1683dbd110314ab37da7bfa6c9a77073d
Analyze and fix the following issue in the Linux kernel code: mfd: Fix build breakage in omap-usb-host.c
Problem Details: 'ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue' removes the include for linux/gpio.h from omap-usb-host.c. This include indirectly includes plat/cpu.h which is required by omap-usb-host.c. Fix the build breakage by including it directly. Acked-by: Keshava Munegowda <keshava_mgowda@ti.com> Acked-b...
```diff diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index c8aae6640e64..7e96bb229724 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -25,6 +25,7 @@ #include <linux/clk.h> #include <linux/dma-mapping.h> #include <linux/spinlock.h> +#include <plat/cpu.h> #inclu...
13176a89e1c4a0011bd9f576730b0338ecb619ff
Analyze and fix the following issue in the Linux kernel code: mfd: Fix build breakage in omap-usb-host.c
Problem Details: 'ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue' removes the include for linux/gpio.h from omap-usb-host.c. This include indirectly includes plat/cpu.h which is required by omap-usb-host.c. Fix the build breakage by including it directly. Acked-by: Keshava Munegowda <keshava_mgowda@ti.com> Acked-b...
```diff diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index c8aae6640e64..7e96bb229724 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -25,6 +25,7 @@ #include <linux/clk.h> #include <linux/dma-mapping.h> #include <linux/spinlock.h> +#include <plat/cpu.h> #inclu...
441e1719f21356ef84d2debc6ca3e6d07e6c8889
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix calling skb_put on nonlinear skb assertion bug
Problem Details: With the support to bounce buffer added, the skb is coming as nonlinear in the case of non-DDPed data frames for FCoE, which is mostly ok as the FCoE stack would take care of that. However, for target mode, we have to set the FC CRC and FC EOF field to allow the protocol stack to not drop the frame for...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c index 77ea4b716535..bc07933d67da 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c @@ -437,6 +437,7 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *...
2b1588c3fafc3fd2b3bc49202a380eaecbbc2193
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix a memory leak in IEEE DCB
Problem Details: The driver was freeing memory in shutdown instead of remove. As a result we were leaking memory if IEEE DCB was enabled and we loaded/unloaded the driver. This change moves the freeing of the memory into the remove routine where it belongs. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index a7f3cd872caf..88f6b2e9b72d 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -4873,10 +4873,6 @@ static int __ixgbe_shutdown(struct pci...
9bd1be457d2b9568c3c8f8f6b8e450a501bff402
Analyze and fix the following issue in the Linux kernel code: igbvf: fix the bug when initializing the igbvf
Problem Details: Maybe it's a typo, but it cause that igbvf can't be initialized successfully. Set perm_addr value using valid dev_addr, although which is equal to hw.mac.addr. Signed-off-by: Samuel Liao <samuelliao@tencent.com> Signed-off-by: Shan Wei <davidshan@tencent.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kir...
```diff diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c index d61ca2a732f0..8ec74b07f940 100644 --- a/drivers/net/ethernet/intel/igbvf/netdev.c +++ b/drivers/net/ethernet/intel/igbvf/netdev.c @@ -2731,14 +2731,14 @@ static int __devinit igbvf_probe(struct pci_dev *pdev...
b140504aa3903feaba6f6bc77a4478a944fc12d2
Analyze and fix the following issue in the Linux kernel code: smsc75xx: fix phy interrupt acknowledge
Problem Details: smsc75xx phy interrupt acknowledge needs an mdio_write to clear PHY_INT_SRC instead of just a read like in smsc95xx. Signed-off-by: Stephane Fillod <fillods@users.sf.net> Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c index cc23a589e40f..4941782358ef 100644 --- a/drivers/net/usb/smsc75xx.c +++ b/drivers/net/usb/smsc75xx.c @@ -508,9 +508,10 @@ static int smsc75xx_link_reset(struct usbnet *dev) u16 lcladv, rmtadv; int ret; - /* clear interrupt status */...
8a1d59d79fffdad4bb1b3b5d069da4c6c52db2e6
Analyze and fix the following issue in the Linux kernel code: smsc75xx: fix phy init reset loop
Problem Details: fix bug in phy_init loop that was ignoring BMCR reset bit, akin to smsc95xx's d946092000698fd204d82a9d239103c656fb63bf Signed-off-by: Stephane Fillod <fillods@users.sf.net> Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c index 1de778527813..cc23a589e40f 100644 --- a/drivers/net/usb/smsc75xx.c +++ b/drivers/net/usb/smsc75xx.c @@ -661,7 +661,7 @@ static int smsc75xx_phy_initialize(struct usbnet *dev) bmcr = smsc75xx_mdio_read(dev->net, dev->mii.phy_id, MII_BM...
cb8722d30c20386e4d4b4bc3a2ceceacd35f818a
Analyze and fix the following issue in the Linux kernel code: smsc75xx: fix mdio reads and writes
Problem Details: smsc75xx needs MII_ACCESS_BUSY to be set to correctly trigger mdio I/O. Note smsc75xx is different from smsc95xx in this regard. Signed-off-by: Stephane Fillod <fillods@users.sf.net> Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c index b1b4649802aa..f97207a709d6 100644 --- a/drivers/net/usb/smsc75xx.c +++ b/drivers/net/usb/smsc75xx.c @@ -171,7 +171,7 @@ static int smsc75xx_mdio_read(struct net_device *netdev, int phy_id, int idx) idx &= dev->mii.reg_num_mask; addr ...
7bdd305e024d78cfb4f32a1badeb5562791ee5b8
Analyze and fix the following issue in the Linux kernel code: smsc75xx: mark link down on startup and let PHY interrupt deal with carrier changes
Problem Details: This patch fixes the same issue as reported on smsc95xx, where the usb device is connected with no ethernet cable plugged-in. Without this patch sysfs reports the cable as present flag@flag-desktop:~$ cat /sys/class/net/eth0/carrier 1 while it's not: flag@flag-desktop:~$ sudo mii-tool eth0 eth0: no...
```diff diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c index a2349483cd2a..b1b4649802aa 100644 --- a/drivers/net/usb/smsc75xx.c +++ b/drivers/net/usb/smsc75xx.c @@ -1212,7 +1212,7 @@ static const struct driver_info smsc75xx_info = { .rx_fixup = smsc75xx_rx_fixup, .tx_fixup = smsc75xx_tx_fixup,...
d344c4f3103c6faa1635b155d8f516e8a7e0aa4e
Analyze and fix the following issue in the Linux kernel code: pch_gbe: reprogram multicast address register on reset
Problem Details: The reset logic after a Rx FIFO overrun will clear the programmed multicast addresses. This patch fixes the issue by reprogramming the registers after the reset. The commit eefc48b ("pch_gbe: reprogram multicast address register on reset") tried to fix this problem, but it introduces unnecessary codes...
```diff diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 107f41a46a41..9dc7e5023671 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c @@ -120,6 +120,7 @@ static unsign...