id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
d7e9711760a17aef3a94fc6dff4759fa5961de25
Analyze and fix the following issue in the Linux kernel code: quota: Fix double lock in add_dquot_ref() with CONFIG_QUOTA_DEBUG
Problem Details: When CONFIG_QUOTA_DEBUG is enabled we call inode_get_rsv_space() from add_dquot_ref() while holding i_lock. But inode_get_rsv_space() is trying to get i_lock as well resulting in double lock. Fix the problem by moving inode_get_rsv_space() call out of i_lock. Reported-and-analyzed-by: Jie Liu <jeff.l...
```diff diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index d69a1d1d7e15..0dcdda305c99 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -907,14 +907,14 @@ static void add_dquot_ref(struct super_block *sb, int type) spin_unlock(&inode->i_lock); continue; } -#ifdef CONFIG_QUOTA_DEBUG - if (unlikely(...
799030b75a4398b4e75ca5cb5ec790dc75986111
Analyze and fix the following issue in the Linux kernel code: NFC: Quiet nci/ntf.c sparse noise about plain integer as NULL pointer
Problem Details: Pointers should be cleared with NULL, not 0. Quiets a couple sparse warnings of the type: warning: Using plain integer as NULL pointer Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openb...
```diff diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c index 99e1632e6aac..cb2646179e5f 100644 --- a/net/nfc/nci/ntf.c +++ b/net/nfc/nci/ntf.c @@ -497,7 +497,7 @@ static void nci_rf_deactivate_ntf_packet(struct nci_dev *ndev, /* drop partial rx data packet */ if (ndev->rx_data_reassembly) { kfree_skb(ndev->r...
040487f364e03fc4d9fcab5549618642cc3f6fe7
Analyze and fix the following issue in the Linux kernel code: NFC: Quiet nci/data.c sparse noise about plain integer as NULL pointer
Problem Details: Pointers should be cleared with NULL, not 0. Quiets a couple sparse warnings of the type: warning: Using plain integer as NULL pointer Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openb...
```diff diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c index a0bc326308a5..76c48c5324f8 100644 --- a/net/nfc/nci/data.c +++ b/net/nfc/nci/data.c @@ -49,7 +49,7 @@ void nci_data_exchange_complete(struct nci_dev *ndev, struct sk_buff *skb, if (cb) { ndev->data_exchange_cb = NULL; - ndev->data_exchange_cb_co...
51c25be857156493247d17c371d01735dc9b8658
Analyze and fix the following issue in the Linux kernel code: NFC: Fix LLCP compilation warning
Problem Details: nfc_llcp_general_bytes is defined in nfc/core.c as: nfc_llcp_general_bytes(struct nfc_dev *dev, size_t *gb_len). as in nfc/nfc.h: nfc_llcp_general_bytes(struct nfc_dev *dev, u8 *gb_len), if CONFIG_NFC_LLCP is not defined. so we got some warnings, net/nfc/core.c:207:2: warning: passing argument 2 of ‘...
```diff diff --git a/net/nfc/nfc.h b/net/nfc/nfc.h index 7d589a81942e..3dd4232ae664 100644 --- a/net/nfc/nfc.h +++ b/net/nfc/nfc.h @@ -84,7 +84,7 @@ static inline int nfc_llcp_set_remote_gb(struct nfc_dev *dev, return 0; } -static inline u8 *nfc_llcp_general_bytes(struct nfc_dev *dev, u8 *gb_len) +static inline u8...
4260c13ba9102d466f017139de990dfffaf4d997
Analyze and fix the following issue in the Linux kernel code: NFC: Update the LLCP poll mask
Problem Details: Fix the poll mask depending on the socket state. POLLOUT was missing for example. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c index 99196d3b84eb..3f339b19d140 100644 --- a/net/nfc/llcp/sock.c +++ b/net/nfc/llcp/sock.c @@ -340,11 +340,24 @@ static unsigned int llcp_sock_poll(struct file *file, struct socket *sock, mask |= POLLERR; if (!skb_queue_empty(&sk->sk_receive_queue))...
a202abb1ee98ee28faaca460bbbf684d05e94310
Analyze and fix the following issue in the Linux kernel code: NFC: Update Documentation/nfc-hci.txt
Problem Details: Document the new HCI ops and fix a few typos and spelling mistakes. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/Documentation/nfc/nfc-hci.txt b/Documentation/nfc/nfc-hci.txt index 216b7254fcc3..320f9336c781 100644 --- a/Documentation/nfc/nfc-hci.txt +++ b/Documentation/nfc/nfc-hci.txt @@ -22,9 +22,9 @@ response to arrive. HCI events can also be received from the host controller. They will be handled and a ...
536acc085c641ff8ba46c2c0e97b5e137cbc22d6
Analyze and fix the following issue in the Linux kernel code: nl80211: fix typos in comments
Problem Details: Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 2540e86d99ab..f296a64d103b 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h @@ -1994,9 +1994,9 @@ enum nl80211_reg_rule_flags { * enum nl80211_dfs_regions - regulatory DFS regions * * @NL80211_DFS_UNSET: Country has no ...
8f4b20388fa77226a3605627a33a23f90d559e50
Analyze and fix the following issue in the Linux kernel code: b43legacy: Fix error due to MMIO access with SSB unpowered
Problem Details: There is a dummy read of a PCI MMIO register that occurs before the SSB bus has been powered, which is an error. This bug has not been seen earlier, but was apparently exposed when udev was updated to version 182. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable <stable@vger.kernel.o...
```diff diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 1be214b815fb..1deafaac43e3 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c @@ -1573,8 +1573,6 @@ static void b43legacy_request_firmware(struct work_struct *work) cons...
8a90555fea9f2e1498a9efe4f25c32d2846f257f
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: Fix RTT calibration
Problem Details: This patch fixes multiple issues with the current RTT implementation in ath9k. * The data that is obtained from the RTT interface registers are stored in 31:5 - mask out the extra bits when reading them. * A history buffer is maintained which is not needed at all. Remove this array and just store...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c index a0387a027db0..9fdd70fcaf5b 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c @@ -892,34 +892,6 @@ static void ar9003_hw_tx_iq_cal_reload(s...
7d4e15b177835dfddcab9851a889c28a85dde92e
Analyze and fix the following issue in the Linux kernel code: mac80211: fix the increment of unicast/multicast counters for forwarded PREQ
Problem Details: Forwarded PREQ is either unicast or multicast. The appropriate counters should be incremented accordingly. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 503016f58631..70ac7d180077 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -603,7 +603,10 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, hopcount, ttl, cpu_to_le32(lifetime), cpu...
a46c3e424b2325c2592b65999466d4445e410b24
Analyze and fix the following issue in the Linux kernel code: iwlwifi: don't flood logs when HT debug flag is set
Problem Details: We have TX_REPLY for that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index f2e9f298a947..d8b6fa2aa01f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c @@ -1300,10 +1300,11 @@ int iwlagn_rx_reply_compressed_ba(struct iwl_priv *pr...
11e116517be13da44da99f9532cfc23d08d9efb4
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix power index handling
Problem Details: The power index that the user gives as module parameter in in range 1-5, but we need to decrease it in order to create an array index out of it (0-4) for the power table command. Signed-off-by: Amit Beka <amit.beka@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Li...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 8352265dbc4b..544ddf17f5bd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c @@ -253,6 +253,8 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv, I...
99e126fdc04fb567567a6ec14317fae16a7a2de1
Analyze and fix the following issue in the Linux kernel code: mwifiex: fix coding style issue in mwifiex_deauthenticate
Problem Details: Documentation/CodingStyle says "Do not unnecessarily use braces where a single statement will do." Use "switch/case", instead of "if/else_if/else", so that more cases can be added later. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John...
```diff diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c index 8a390982463e..aeb0b3fc4599 100644 --- a/drivers/net/wireless/mwifiex/join.c +++ b/drivers/net/wireless/mwifiex/join.c @@ -1377,19 +1377,21 @@ static int mwifiex_deauthenticate_infra(struct mwifiex_private *priv, u8 *mac...
2a4ffa4c8934bd9a36c8354a4b87a529114baf62
Analyze and fix the following issue in the Linux kernel code: mac80211_hwsim: Fix rate control by correctly reporting transmission counts
Problem Details: Drivers need to report the number of transmission attempts for each rate as well as to terminate the rate array with -1. The in-kernel datapath of hwsim simulates a perfect medium, therefore the driver only needs to report that the first transmission attempt was sucessfully completed at the most favor...
```diff diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 03c0c6b1372c..fb787df01666 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -746,6 +746,11 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *s...
fec0f72f5f7bceb75234417999a149abe24da347
Analyze and fix the following issue in the Linux kernel code: [media] V4L: sh_mobile_ceu_camera: don't fail TRY_FMT
Problem Details: VIDIOC_TRY_FMT shouldn't fail if the user requests an unsupported pixel format. Instead the driver should replace it with a supported one. Fix the sh_mobile_ceu_camera driver accordingly. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat....
```diff diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 2ffeb21dfe33..61f7f91de931 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -1858,8 +1858,12 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera...
67e86524b907ed2189f4875cdbe7a5249c71ebb2
Analyze and fix the following issue in the Linux kernel code: [media] V4L: mx2-camera: avoid overflowing 32-bits
Problem Details: In mx2_camera_try_fmt(), when applying i.MX25 restrictions to frame sizes, the height is checked to be <= 0xffff. But later an integer multiplication height * 4 * 0x3ffff is performed, which will overflow even for bounded height values. This patch switches to using 64-bit multiplication and division to...
```diff diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index ecd83faf9038..ded26b7286fa 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c @@ -22,6 +22,7 @@ #include <linux/gcd.h> #include <linux/interrupt.h> #include <linux/kernel.h> +#include <lin...
914f05c8118e17d65c4626ae3ed2edcf79f00031
Analyze and fix the following issue in the Linux kernel code: [media] soc-camera: Support user-configurable line stride
Problem Details: Add a capabilities field to the soc_camera_host structure to flag hosts that support user-configurable line strides. soc_camera_try_fmt() then passes the user-provided bytesperline and sizeimage format fields to such hosts, and expects the host to check (and fix if needed) the values. Signed-off-by: L...
```diff diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index b63168781cfe..ecd83faf9038 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c @@ -1787,6 +1787,8 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev) pcdev->soc_host.priv ...
4e0e620ce713893b2883522a16a71b5589e8e3db
Analyze and fix the following issue in the Linux kernel code: [media] soc-camera: Fix bytes per line computation for planar formats
Problem Details: The V4L2 specification defines bytesperline for planar formats as the number of bytes per line for the largest plane. Modify soc_mbus_bytes_per_line() accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-of...
```diff diff --git a/drivers/media/video/soc_mediabus.c b/drivers/media/video/soc_mediabus.c index 44dba6c0f790..a7073142f9f1 100644 --- a/drivers/media/video/soc_mediabus.c +++ b/drivers/media/video/soc_mediabus.c @@ -378,6 +378,9 @@ EXPORT_SYMBOL(soc_mbus_samples_per_pixel); s32 soc_mbus_bytes_per_line(u32 width, ...
584943aa0692fea9ec3356c7d4677dd7a225cdef
Analyze and fix the following issue in the Linux kernel code: [media] mx2_camera: Fix sizeimage computation in try_fmt()
Problem Details: The try_fmt() handler restricts the image width based on the hardware limits and updates the bytesperline value, but doesn't update sizeimage. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro C...
```diff diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index 7c3c0e8eda42..36d17f3483eb 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c @@ -1416,6 +1416,7 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, pix->bytesperline = soc_mb...
9f486619f4545a8e36fa0fcae60722cb9e075887
Analyze and fix the following issue in the Linux kernel code: dummy: documentation is stale
Problem Details: dummy0/1/2 names are always used and there are options to set multiple dummy devices. Remove the obsolete text Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42865 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index b98285446a5a..78a6259f5c1c 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -66,10 +66,7 @@ config DUMMY <http://www.tldp.org/docs.html#guide>. To compile this driver as a module, choose M here: the module - will be called dum...
70168dfa1cfa9489062264d89a273e0c30bf044b
Analyze and fix the following issue in the Linux kernel code: sparc32: cleanup mm/fault_32.c
Problem Details: - remove unused variables - fix coding style issues that hurts my eyes Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index 28a67bfa71c1..cbbbed5cb3aa 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h @@ -361,8 +361,6 @@ void srmmu_mapiorange(unsigned int bus, unsigned long xpa, ...
3ab77bf271e6a41512e366dfa5110edb981ed1d3
Analyze and fix the following issue in the Linux kernel code: pch_gbe: fix transmit races
Problem Details: Andy reported pch_gbe triggered "NETDEV WATCHDOG" errors. May 11 11:06:09 kontron kernel: WARNING: at net/sched/sch_generic.c:261 dev_watchdog+0x1ec/0x200() (Not tainted) May 11 11:06:09 kontron kernel: Hardware name: N/A May 11 11:06:09 kontron kernel: NETDEV WATCHDOG: eth0 (pch_gbe): transmit queue ...
```diff diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h index dd14915f54bb..ba781747d174 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h @@ -584,7 +584,6 @@ struct pch_gbe_hw_stats { /** ...
5b6e9bcdeb65634b4ad604eb4536404bbfc62cfa
Analyze and fix the following issue in the Linux kernel code: usbnet: fix skb traversing races during unlink(v2)
Problem Details: Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid recursive locking in usbnet_stop()) fixes the recursive locking problem by releasing the skb queue lock before unlink, but may cause skb traversing races: - after URB is unlinked and the queue lock is released, the refered skb and skb-...
```diff diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 2d927fb4adf4..b38db48b1ce0 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -282,17 +282,32 @@ int usbnet_change_mtu (struct net_device *net, int new_mtu) } EXPORT_SYMBOL_GPL(usbnet_change_mtu); +/* The caller must...
c7f5f2389377b66028bc129890aa653deafe8d39
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8994: Fix AIF2ADC power down
Problem Details: Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
```diff diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 6c1fe3afd4b5..2de12ebe43b5 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -1144,7 +1144,7 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w, snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, ...
0f1dcfae6bc5563424346ad3a03282b8235a4c33
Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb4: Always wake up waiters in c4iw_peer_abort_intr()
Problem Details: This fixes a race where an ingress abort fails to wake up the thread blocked in rdma_init() causing the app to hang. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Cc: <stable@vger.kernel.org> Signed-off-by: Roland Dreier <roland@purestorage.com>
```diff diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 86542cd759f6..b770a044fb8a 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -2667,11 +2667,8 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb) /* * Wake up ...
9ce3ce4d4a8dc80b2a2265650be54a86e854561e
Analyze and fix the following issue in the Linux kernel code: [media] V4L: mem2mem: fix alignment in mem2mem-testdev
Problem Details: Fix a trivial alignment calculation issue. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/mem2mem_testdev.c b/drivers/media/video/mem2mem_testdev.c index ee3efbd83bdb..d2dec585e61b 100644 --- a/drivers/media/video/mem2mem_testdev.c +++ b/drivers/media/video/mem2mem_testdev.c @@ -40,7 +40,7 @@ MODULE_VERSION("0.1.1"); #define MIN_H 32 #define MAX_W 640 #define MAX_...
730fa039f16df58c2dc3ff2894b7d767f100cf6e
Analyze and fix the following issue in the Linux kernel code: MIPS: lantiq: fix cmdline parsing
Problem Details: The code tested if the KSEG1 mapped address of argv was != 0. We need to use CPHYSADDR instead to make the conditional actually work. Signed-off-by: Thomas Langer <thomas.langer@lantiq.com> Signed-off-by: John Crispin <blogic@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linu...
```diff diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c index 664b7b722248..cd568921f191 100644 --- a/arch/mips/lantiq/prom.c +++ b/arch/mips/lantiq/prom.c @@ -45,10 +45,12 @@ static void __init prom_init_cmdline(void) char **argv = (char **) KSEG1ADDR(fw_arg1); int i; + arcs_cmdline[0] = '\0'; + ...
7705f6867bfc6f2ea42c3965a85df72abf070c86
Analyze and fix the following issue in the Linux kernel code: MIPS: lantiq: fix early printk
Problem Details: The code was using a 32bit write operations in the early_printk code. This resulted in 3 zero bytes also being written to the serial port. This patch changes the memory access to 8bit. Signed-off-by: Thomas Langer <thomas.langer@lantiq.com> Signed-off-by: John Crispin <blogic@openwrt.org> Cc: linux-mi...
```diff diff --git a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h index 8a3c6be669d2..8bc9030525c0 100644 --- a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h +++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h @@ -34,6 +34,12 @@ #define LTQ_ASC1_...
3489d72d1592deee6628ca223e06da5363a12f4d
Analyze and fix the following issue in the Linux kernel code: MIPS: remove unused prototype kgdb_config
Problem Details: Trivial fix that removes an orphaned prototype. Signed-off-by: John Crispin <blogic@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3701/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h index 46c08563e532..6e23ceb0ba8c 100644 --- a/arch/mips/include/asm/mips-boards/generic.h +++ b/arch/mips/include/asm/mips-boards/generic.h @@ -93,8 +93,4 @@ extern void mips_pcibios_init(void); #define mips_...
e9b62e8ef9d71ed977797529fc0dfc352448d50b
Analyze and fix the following issue in the Linux kernel code: MIPS: ath79: update copyright headers of PCI related files
Problem Details: Add copyright records according to the recent changes in the PCI code. Also fix up the descriptions. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3503/ Signed-off-by: Ralf B...
```diff diff --git a/arch/mips/ath79/pci.c b/arch/mips/ath79/pci.c index 253a382f63b2..bc40070e45c9 100644 --- a/arch/mips/ath79/pci.c +++ b/arch/mips/ath79/pci.c @@ -2,6 +2,10 @@ * Atheros AR71XX/AR724X specific PCI setup code * * Copyright (C) 2011 René Bolldorf <xsecute@googlemail.com> + * Copyright (C) 200...
a68ad4d892c6254310d2bfc3d6b0c0d989377636
Analyze and fix the following issue in the Linux kernel code: MIPS: ath79: allow to use board specific pci_plat_dev_init functions
Problem Details: Th current implementation causes NULL pointer dereference if 'pci_data' is not set: pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit] pci 0000:00:00.0: BAR 0: set to [mem 0x10000000-0x1000ffff 64bit] (PCI address [0x10000000-0x1000ffff]) CPU 0 Unable to handle kernel paging request a...
```diff diff --git a/arch/mips/ath79/mach-ubnt-xm.c b/arch/mips/ath79/mach-ubnt-xm.c index 1e6b986cb470..ca47ba57a206 100644 --- a/arch/mips/ath79/mach-ubnt-xm.c +++ b/arch/mips/ath79/mach-ubnt-xm.c @@ -85,16 +85,27 @@ static struct ath9k_platform_data ubnt_xm_eeprom_data; static struct ar724x_pci_data ubnt_xm_pci_dat...
93ef85b5598ad2cc23f38d97ed565027b969c0aa
Analyze and fix the following issue in the Linux kernel code: MIPS: ath79: fix a wrong IRQ number
Problem Details: The Ubiquiti XM board setup code uses an invalid IRQ number, because it if above of NR_IRQS. This leads to failed 'request_irq' calls: ath9k 0000:00:00.0: request_irq failed ath9k: probe of 0000:00:00.0 failed with error -22 Preserve some IRQ numbers for the built-in IRQ controller of PCI host co...
```diff diff --git a/arch/mips/ath79/mach-ubnt-xm.c b/arch/mips/ath79/mach-ubnt-xm.c index 3266ee063bd6..0d95b67a7d4f 100644 --- a/arch/mips/ath79/mach-ubnt-xm.c +++ b/arch/mips/ath79/mach-ubnt-xm.c @@ -17,6 +17,8 @@ #include <linux/ath9k_platform.h> #endif /* CONFIG_PCI */ +#include <asm/mach-ath79/irq.h> + #incl...
6015a856f16ccf33e9f83643d04c2e15be2384eb
Analyze and fix the following issue in the Linux kernel code: MIPS: ath79: add a workaround for a PCI controller bug in AR7240 SoCs
Problem Details: The PCI controller of the AR724X SoCs has a hardware bag. If the BAR0 register of the PCI device is set to the proper base address, the memory address space of the device is not accessible. When the device driver tries to access the memory address space of the PCI device, it leads to data bus error, s...
```diff diff --git a/arch/mips/pci/pci-ar724x.c b/arch/mips/pci/pci-ar724x.c index bb4f2162d4e4..07b7e3071735 100644 --- a/arch/mips/pci/pci-ar724x.c +++ b/arch/mips/pci/pci-ar724x.c @@ -9,6 +9,7 @@ */ #include <linux/pci.h> +#include <asm/mach-ath79/ath79.h> #include <asm/mach-ath79/pci.h> #define AR724X_PCI_...
64adb6bb62bee11ad04c2f9c3c797799e329c351
Analyze and fix the following issue in the Linux kernel code: MIPS: ath79: fix broken ar724x_pci_{read,write} functions
Problem Details: The current ar724x_pci_{read,write} functions are broken. Due to that, pci_read_config_byte returns with bogus values, and pci_write_config_{byte,word} unconditionally clears the accessed PCI configuration registers instead of changing the value of them. The patch fixes the broken functions, thus the ...
```diff diff --git a/arch/mips/pci/pci-ar724x.c b/arch/mips/pci/pci-ar724x.c index 342bf4ab8960..bb4f2162d4e4 100644 --- a/arch/mips/pci/pci-ar724x.c +++ b/arch/mips/pci/pci-ar724x.c @@ -22,8 +22,9 @@ static void __iomem *ar724x_pci_devcfg_base; static int ar724x_pci_read(struct pci_bus *bus, unsigned int devfn, int w...
f9ded5692c96bae085713bf25558bd932fefeb7f
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix several implicit uses of export.h/module.h
Problem Details: These will show up as a build failure once we clean up a misuse of module.h in the mips termios header. Uses export.h: (EXPORT_SYMBOL) arch/mips/cavium-octeon/setup.c arch/mips/pmc-sierra/yosemite/setup.c arch/mips/rb532/devices.c arch/mips/sni/setup.c Uses module.h: (symbol_get/put) a...
```diff diff --git a/arch/mips/alchemy/devboards/db1200.c b/arch/mips/alchemy/devboards/db1200.c index a83302b96c01..7dde01642d6b 100644 --- a/arch/mips/alchemy/devboards/db1200.c +++ b/arch/mips/alchemy/devboards/db1200.c @@ -22,6 +22,7 @@ #include <linux/gpio.h> #include <linux/i2c.h> #include <linux/init.h> +#inc...
03751e792420f88e224ce247dfdd26a6ba3e4091
Analyze and fix the following issue in the Linux kernel code: MIPS: Code formatting fixes.
Problem Details: Signed-off-by: Steven J. Hill <sjhill@mips.com> Cc: linux-mips@linux-mips.org Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 5099201fb7bc..6ae7ce4ac63e 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -340,7 +340,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] = "R2000"; ...
daf76dbbb09f3937e71e9ef6d8fa68b306281d84
Analyze and fix the following issue in the Linux kernel code: MIPS: Include export.h in for EXPORT_SYMBOL in ops-loongson2.c
Problem Details: Fixes warning: data definition has no type or storage class [enabled by default] warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int] warning: parameter names (without types) in function declaration [enabled by default] Signed-off-by: Matt Turner <mattst88@gmail.com> Cc: ...
```diff diff --git a/arch/mips/pci/ops-loongson2.c b/arch/mips/pci/ops-loongson2.c index d657ee0bc131..afd221122d22 100644 --- a/arch/mips/pci/ops-loongson2.c +++ b/arch/mips/pci/ops-loongson2.c @@ -15,6 +15,7 @@ #include <linux/pci.h> #include <linux/kernel.h> #include <linux/init.h> +#include <linux/export.h> #...
75af271ed5f51b1f3506c7c1d567b1f32e5c9206
Analyze and fix the following issue in the Linux kernel code: dlm: NULL dereference on failure in kmem_cache_create()
Problem Details: We aren't allowed to pass NULL pointers to kmem_cache_destroy() so if both allocations fail, it leads to a NULL dereference. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Teigland <teigland@redhat.com>
```diff diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c index da64df7576e1..7cd24bccd4fe 100644 --- a/fs/dlm/memory.c +++ b/fs/dlm/memory.c @@ -21,21 +21,19 @@ static struct kmem_cache *rsb_cache; int __init dlm_memory_init(void) { - int ret = 0; - lkb_cache = kmem_cache_create("dlm_lkb", sizeof(struct dlm_lkb), ...
29f233cfffe7fbc6672938117ce7e4154a2f515f
Analyze and fix the following issue in the Linux kernel code: mm: frontswap: core frontswap functionality
Problem Details: This patch, 3of4, provides the core frontswap code that interfaces between the hooks in the swap subsystem and a frontswap backend via frontswap_ops. --- New file added: mm/frontswap.c [v14: add support for writethrough, per suggestion by aarcange@redhat.com] [v11: sjenning@linux.vnet.ibm.com: s/puts...
```diff diff --git a/mm/frontswap.c b/mm/frontswap.c new file mode 100644 index 000000000000..8c0a5f8683f0 --- /dev/null +++ b/mm/frontswap.c @@ -0,0 +1,314 @@ +/* + * Frontswap frontend + * + * This code provides the generic "frontend" layer to call a matching + * "backend" driver implementation of frontswap. See + *...
38b5faf4b178d5279b1fca5d7dadc68881342660
Analyze and fix the following issue in the Linux kernel code: mm: frontswap: core swap subsystem hooks and headers
Problem Details: This patch, 2of4, contains the changes to the core swap subsystem. This includes: (1) makes available core swap data structures (swap_lock, swap_list and swap_info) that are needed by frontswap.c but we don't need to expose them to the dozens of files that include swap.h so we create a new swapfile.h ...
```diff diff --git a/include/linux/swap.h b/include/linux/swap.h index b1fd5c7925fe..50a55e2d58ec 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -197,6 +197,10 @@ struct swap_info_struct { struct block_device *bdev; /* swap device or bdev of swap file */ struct file *swap_file; /* seldom reference...
3911ff30f5d1175e2e67e73244405e3492b35c79
Analyze and fix the following issue in the Linux kernel code: genirq: export handle_edge_irq() and irq_to_desc()
Problem Details: Export handle_edge_irq() and irq_to_desc() to modules to allow them to do things such as __irq_set_handler_locked(...., handle_edge_irq); This fixes ERROR: "handle_edge_irq" [drivers/gpio/gpio-pch.ko] undefined! ERROR: "irq_to_desc" [drivers/gpio/gpio-pch.ko] undefined! when gpio-pch is being bu...
```diff diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 6080f6bc8c33..3914c1e03cff 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -518,6 +518,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) out_unlock: raw_spin_unlock(&desc->lock); } +EXPORT_SYMBOL(handle_edge_irq); #ifdef CONFI...
4d82a1debbffec129cc387aafa8f40b7bbab3297
Analyze and fix the following issue in the Linux kernel code: lockdep: fix oops in processing workqueue
Problem Details: Under memory load, on x86_64, with lockdep enabled, the workqueue's process_one_work() has been seen to oops in __lock_acquire(), barfing on a 0xffffffff00000000 pointer in the lockdep_map's class_cache[]. Because it's permissible to free a work_struct from its callout function, the map used is an ons...
```diff diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index d36619ead3ba..00e46376e28f 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -157,6 +157,24 @@ struct lockdep_map { #endif }; +static inline void lockdep_copy_map(struct lockdep_map *to, + struct lockdep_map *fro...
b89225a1c803d50271f86be15ecfccc0b0215007
Analyze and fix the following issue in the Linux kernel code: [media] smiapp: Remove smiapp-debug.h in favour of dynamic debug
Problem Details: Remove smiapp-debug.h and let people use CONFIG_DYNAMIC_DEBUG instead. The option only affected to when debug information was being printed. Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/smiapp-pll.c b/drivers/media/video/smiapp-pll.c index 501da413dfad..a416e27a4282 100644 --- a/drivers/media/video/smiapp-pll.c +++ b/drivers/media/video/smiapp-pll.c @@ -22,8 +22,6 @@ * */ -#include "smiapp/smiapp-debug.h" - #include <linux/gcd.h> #include <linux/lcm.h> ...
579e92ffac65c717c9c8a50feb755a035a51bb3f
Analyze and fix the following issue in the Linux kernel code: [media] V4L: JPEG class documentation corrections
Problem Details: This patch fixes following compilation warning: Error: no ID for constraint linkend: v4l2-jpeg-chroma-subsampling. and adds missing JPEG control class at the Table A.58. Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.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 132b0cc29832..89941329290e 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -3978,7 +3978,7 @@ interface and may change in the future.</pa...
bc050e6702725c6629cc0f1db95c49e63f1f32e8
Analyze and fix the following issue in the Linux kernel code: [media] af9015: various small changes and clean-ups
Problem Details: Clean-up dvb_usb_device_properties and fix errors reported by checkpatch.pl. Some other very minor changes. Functionality remains untouched. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index 7e70ea50ef26..677fed79b01e 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c @@ -244,8 +244,7 @@ static int af9015_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], u8 unini...
f9b26cd8e2cb8979694c48ea642d30784e7aceb3
Analyze and fix the following issue in the Linux kernel code: [media] smiapp: fix compilation breakage
Problem Details: The usage of ../*.h breaks out-of-tree compilation and likely breaks compilation when O= argument is used. Instead of doing that, just add the include path via Makefile. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/smiapp/Makefile b/drivers/media/video/smiapp/Makefile index 5a207eecd357..36b0cfa2c541 100644 --- a/drivers/media/video/smiapp/Makefile +++ b/drivers/media/video/smiapp/Makefile @@ -1,3 +1,5 @@ smiapp-objs += smiapp-core.o smiapp-regs.o \ smiapp-quirk.o smiapp-limits....
d509835e32bd761a2b7b446034a273da568e5573
Analyze and fix the following issue in the Linux kernel code: [media] media: mx2_camera: Fix mbus format handling
Problem Details: Remove MX2_CAMERA_SWAP16 and MX2_CAMERA_PACK_DIR_MSB flags so that the driver can negotiate with the attached sensor whether the mbus format needs convertion from UYUV to YUYV or not. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.co...
```diff diff --git a/arch/arm/plat-mxc/include/mach/mx2_cam.h b/arch/arm/plat-mxc/include/mach/mx2_cam.h index 3c080a32dbf5..7ded6f1f74bc 100644 --- a/arch/arm/plat-mxc/include/mach/mx2_cam.h +++ b/arch/arm/plat-mxc/include/mach/mx2_cam.h @@ -23,7 +23,6 @@ #ifndef __MACH_MX2_CAM_H_ #define __MACH_MX2_CAM_H_ -#defin...
002eaf90a24451e423221d7a5826cdfdea1a0451
Analyze and fix the following issue in the Linux kernel code: [media] media: tvp5150: Fix mbus format
Problem Details: According to p.14 fig 3-3 of the datasheet (SLES098A) this decoder transmits data in UYVY format. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 476a6a0bd108..b7867427e5c4 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c @@ -822,7 +822,7 @@ static int tvp5150_enum_mbus_fmt(struct v4l2_subdev *sd, unsigned index, if (index) return -EINVAL; ...
b115f400946dba529cfa9a769c2327ae6dbe3694
Analyze and fix the following issue in the Linux kernel code: [media] cxd2820r: tweak search algorithm behavior
Problem Details: MPIS based STBs running 3.x kernels and the Enigma2 OS are not able to tune DVB-T channels with the PCTV 290e using the current cxd2820r driver. DVB-T2 channels instead work properly. This patch fixes the problem by changing the condition to break out from the wait lock loop in the "search" function o...
```diff diff --git a/drivers/media/dvb/frontends/cxd2820r_core.c b/drivers/media/dvb/frontends/cxd2820r_core.c index 5c7c2aaf9bf5..3bba37d74f57 100644 --- a/drivers/media/dvb/frontends/cxd2820r_core.c +++ b/drivers/media/dvb/frontends/cxd2820r_core.c @@ -526,12 +526,12 @@ static enum dvbfe_search cxd2820r_search(struct...
6e6d76cdc541e28bf4f609141d76c488c6c0d263
Analyze and fix the following issue in the Linux kernel code: [media] v4l2-event: fix regression with initial event handling
Problem Details: If the V4L2_EVENT_SUB_FL_SEND_INITIAL was set, then the application expects to receive an initial event of the initial value of the control. However, commit c53c2549333b340e2662dc64ec81323476b69a97 that added the new v4l2_subscribed_event_ops introduced a regression: while the code still queued that i...
```diff diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index 28363b72ff8a..f3bd66c500b6 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c @@ -1250,7 +1250,7 @@ static void uvc_ctrl_send_events(struct uvc_fh *handle, } } -static int uvc_ct...
7f217794ffa72f208a250b79ab0b7ea3de19677f
Analyze and fix the following issue in the Linux kernel code: mmc: dt: Consolidate DT bindings
Problem Details: This patch unifies the current DT MMC bindings documentation and code, adds generic MMC DT bindings documentation, and updates .dts files for consistency. [cjb: typo fixes, addition of max-frequency property] Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
```diff diff --git a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt index 64bcb8be973c..0d93b4b0e0e3 100644 --- a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt +++ b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt @@ -11,9 +11,11 @@ Required propertie...
9ab494b010e1b4c4693afa297ffbcf0f09bb9063
Analyze and fix the following issue in the Linux kernel code: [media] it913x.: Fix a misuse of ||
Problem Details: On Mon, 2012-05-07 at 07:45 -0300, Mauro Carvalho Chehab wrote: > Malcolm, > > Em 04-04-2012 20:00, Joe Perches escreveu: > > Likely these should be && not || > > > > drivers/scsi/FlashPoint.c: if(bit_cnt != 0 || bit_cnt != 8) > > > drivers/media/dvb/dvb-usb/it913x.c: if (ret == 0 || ret != -EBUSY ...
```diff diff --git a/drivers/media/dvb/dvb-usb/it913x.c b/drivers/media/dvb/dvb-usb/it913x.c index 482d249ca7f3..6244fe9d1a3a 100644 --- a/drivers/media/dvb/dvb-usb/it913x.c +++ b/drivers/media/dvb/dvb-usb/it913x.c @@ -81,7 +81,7 @@ static int it913x_bulk_write(struct usb_device *dev, for (i = 0; i < IT913X_RETRY; i+...
cd624c7b7ce3c3cfa09845dcefbe856bf9f9c4c6
Analyze and fix the following issue in the Linux kernel code: [media] drivers/media: add missing __devexit_p() annotations
Problem Details: Drivers that refer to a __devexit function in an operations structure need to annotate that pointer with __devexit_p so replace it with a NULL pointer when the section gets discarded. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by...
```diff diff --git a/drivers/media/dvb/ddbridge/ddbridge-core.c b/drivers/media/dvb/ddbridge/ddbridge-core.c index 115777ec7536..131b938e9e81 100644 --- a/drivers/media/dvb/ddbridge/ddbridge-core.c +++ b/drivers/media/dvb/ddbridge/ddbridge-core.c @@ -1695,7 +1695,7 @@ static struct pci_driver ddb_pci_driver = { .name...
d1257081aecf44455fcab8675f1d54e8b242faa1
Analyze and fix the following issue in the Linux kernel code: HID: uclogic: Add support for UC-Logic TWHL850
Problem Details: Add support for UC-Logic Wireless Tablet TWHL850. It is known to be sold as Genius MousePen M508W. This tablet has a bug in the default (compatibility) mode which is used in this driver: frame button assignments are mixed up. This is to be fixed with a driver supporting the vendor-specific protocol. ...
```diff diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index dc05d9b5022b..4e57eeba9778 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1576,6 +1576,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TAB...
05c69d298c96703741cac9a5cbbf6c53bd55a6e2
Analyze and fix the following issue in the Linux kernel code: block: fix buffer overflow when printing partition UUIDs
Problem Details: 6d1d8050b4bc8 "block, partition: add partition_meta_info to hd_struct" added part_unpack_uuid() which assumes that the passed in buffer has enough space for sprintfing "%pU" - 37 characters including '\0'. Unfortunately, b5af921ec0233 "init: add support for root devices specified by partition UUID" su...
```diff diff --git a/block/genhd.c b/block/genhd.c index df9816ede75b..9cf5583c90ff 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -743,7 +743,7 @@ void __init printk_all_partitions(void) struct hd_struct *part; char name_buf[BDEVNAME_SIZE]; char devt_buf[BDEVT_SIZE]; - u8 uuid[PARTITION_META_INFO_UUIDLTH ...
b0791dda813c179e539b0fc1ecd3f5f30f2571e2
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/idt - Fix power-map for speaker-pins with some HP laptops
Problem Details: BIOS on some HP laptops don't set the speaker-pins as fixed but expose as jacks, and this confuses the driver as if these pins are jack-detectable. As a result, the machine doesn't get sounds from speakers because the driver prepares the power-map update via jack unsol events which never come up in re...
```diff diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 4742cac26aa9..2cb1e08f962a 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4415,9 +4415,9 @@ static int stac92xx_init(struct hda_codec *codec) def_conf = get_defcfg_connect(def_conf); /*...
ceffec5541cc22486d3ff492e3d76a33a68fbfa3
Analyze and fix the following issue in the Linux kernel code: gfp flags for security_inode_alloc()?
Problem Details: Dave Chinner wrote: > Yes, because you have no idea what the calling context is except > for the fact that is from somewhere inside filesystem code and the > filesystem could be holding locks. Therefore, GFP_NOFS is really the > only really safe way to allocate memory here. I see. Thank you. I'm not ...
```diff diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index df45d3939188..5f80075d7713 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -79,7 +79,7 @@ struct inode_smack *new_inode_smack(char *smack) { struct inode_smack *isp; - isp = kzalloc(sizeof(struct inode_sm...
d41160524d8d8ee721296e5c7e15f1ed727df7eb
Analyze and fix the following issue in the Linux kernel code: dmaengine: fix cyclic dma usage
Problem Details: for cyclic dma, dont makr the descriptor as complte. Fix the remaining users of cyclic dma which do so Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Mika Westerberg <mika.westerberg...
```diff diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 445fdf811695..bf0d7e4e345b 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -245,7 +245,9 @@ atc_chain_complete(struct at_dma_chan *atchan, struct at_desc *desc) dev_vdbg(chan2dev(&atchan->chan_common), "descriptor %u com...
92a486eabefadca1169fbf15d737feeaf2bda844
Analyze and fix the following issue in the Linux kernel code: kirkwood/orion: fix orion_gpio_set_blink
Problem Details: gpio registers are for 32 gpios. Given that orion_gpio_set_blink is called directly and not through gpiolib, it needs to make sure that the pin value given to the internal functions are between 0 and 31. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Tested-By: Adam Baker <linux@baker-net.or...
```diff diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index 10d160888133..d3401e77ff3d 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c @@ -289,8 +289,8 @@ void orion_gpio_set_blink(unsigned pin, int blink) return; spin_lock_irqsave(&ochip->lock, flags); - __set_lev...
bda14606a3c055dbbccd998fa91eb87c4c7b2027
Analyze and fix the following issue in the Linux kernel code: sunrpc: fix kernel-doc warnings
Problem Details: Fix kernel-doc warnings in sunrpc/rpc_pipe.c and sunrpc/rpcb_clnt.c: Warning(net/sunrpc/rpcb_clnt.c:428): No description found for parameter 'net' Warning(net/sunrpc/rpcb_clnt.c:567): No description found for parameter 'net' Warning(net/sunrpc/rpc_pipe.c:133): No description found for parameter 'pipe...
```diff diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 3b62cf288031..7fb49c53ed61 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -120,7 +120,7 @@ EXPORT_SYMBOL_GPL(rpc_pipe_generic_upcall); /** * rpc_queue_upcall - queue an upcall message to userspace - * @inode: inode of upcal...
f8c5a875c9124cb6439f0c97ada3570faa0d6860
Analyze and fix the following issue in the Linux kernel code: stmmac: fix suspend/resume locking
Problem Details: Upon resume from standby, there is a possible interrupt unsafe locking scenario raised when configure the Kernel with CONFIG_PROVE_LOCKING. So this patch fixes that in PM driver stuff by calling lock/unlock_irqsave/restore. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Davi...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index d1d084018877..d07bc6de4387 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1989,6 +1989,7 @@ int stmmac_suspend(stru...
cffb13f4d6fb5976f907c37e7fc7f6e6acb10d5f
Analyze and fix the following issue in the Linux kernel code: stmmac: extend mac addr reg and fix perfect filering
Problem Details: This patch is to extend the number of MAC address registers for 16 to 32. In fact, other new 16 registers are available in new chips and this can help on perfect filter mode for unicast. This patch also fixes the perfect filtering mode by setting the bit 31 in the MAC address registers. v2: fixed Cod...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h index f5dedcbf4651..7164509e3832 100644 --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h @@ -280,7 +280,7 @@ struct stmmac_ops { /* Handle extra events ...
edc318d9fea6854df752ec8c645b960b0d5a1d23
Analyze and fix the following issue in the Linux kernel code: target: Fix SPC-2 RELEASE bug for multi-session iSCSI client setups
Problem Details: This patch addresses a bug in a special case for target core SPC-2 RELEASE logic where the same physical client (eg: iSCSI InitiatorName) with differing iSCSI session identifiers (ISID) is allowed to incorrectly release the same client's SPC-2 reservation from the non reservation holding path. Note th...
```diff diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index 86f0c3b5d500..c3148b10b4b3 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c @@ -220,6 +220,9 @@ int target_scsi2_reservation_release(struct se_task *task) if (dev->dev_reserved_node_acl != se...
544ecf310f0e7f51fa057ac2a295fc1b3b35a9d3
Analyze and fix the following issue in the Linux kernel code: workqueue: skip nr_running sanity check in worker_enter_idle() if trustee is active
Problem Details: worker_enter_idle() has WARN_ON_ONCE() which triggers if nr_running isn't zero when every worker is idle. This can trigger spuriously while a cpu is going down due to the way trustee sets %WORKER_ROGUE and zaps nr_running. It first sets %WORKER_ROGUE on all workers without updating nr_running, releas...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 211eadb23323..c36c86cf7900 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1213,8 +1213,13 @@ static void worker_enter_idle(struct worker *worker) } else wake_up_all(&gcwq->trustee_wait); - /* sanity check nr_running */ - WARN_ON_ONC...
669d67bf777def468970f2dcba1537edf3b2d329
Analyze and fix the following issue in the Linux kernel code: net: codel: fix build errors
Problem Details: Fix the following build error: net/sched/sch_fq_codel.c: In function 'fq_codel_dump_stats': net/sched/sch_fq_codel.c:464:3: error: unknown field 'qdisc_stats' specified in initializer net/sched/sch_fq_codel.c:464:3: warning: missing braces around initializer net/sched/sch_fq_codel.c:464:3: warning: (n...
```diff diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c index a7b3754d21c8..337ff204f272 100644 --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c @@ -461,13 +461,14 @@ static int fq_codel_dump_stats(struct Qdisc *sch, struct gnet_dump *d) struct fq_codel_sched_data *q = qdisc_priv(sch); ...
12bcb3f7d4371f74bd25372e98e0d2da978e82b2
Analyze and fix the following issue in the Linux kernel code: xfs: Properly exclude IO type flags from buffer flags
Problem Details: Recent event tracing during a debugging session showed that flags that define the IO type for a buffer are leaking into the flags on the buffer incorrectly. Fix the flag exclusion mask in xfs_buf_alloc() to avoid problems that may be caused by such leakage. Signed-off-by: Dave Chinner <dchinner@redhat...
```diff diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index af8480d5c71d..b2795bab1a01 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -178,9 +178,10 @@ xfs_buf_alloc( return NULL; /* - * We don't want certain flags to appear in b_flags. + * We don't want certain flags to appear in b_flags unless th...
bc4010ecb8f4d4316e1a63a879a2715e49d113ad
Analyze and fix the following issue in the Linux kernel code: xfs: use iolock on XFS_IOC_ALLOCSP calls
Problem Details: fsstress has a particular effective way of stopping debug XFS kernels. We keep seeing assert failures due finding delayed allocation extents where there should be none. This shows up when extracting extent maps and we are holding all the locks we should be to prevent races, so this really makes no sens...
```diff diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 6c187450f1c8..9b6c94e7546e 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c @@ -2315,17 +2315,33 @@ xfs_change_file_space( case XFS_IOC_ALLOCSP64: case XFS_IOC_FREESP: case XFS_IOC_FREESP64: + /* + * These operations actuall...
aa0e8833b05cbd9d34d6a1ddaf23a74a58d76a03
Analyze and fix the following issue in the Linux kernel code: xfs: use blocks for storing the desired IO size
Problem Details: Now that we pass block counts everywhere, and index buffers by block number and length in units of blocks, convert the desired IO size into block counts rather than bytes. Convert the code to use block counts, and those that need byte counts get converted at the time of use. Rename the b_desired_count...
```diff diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 382c49a42ac2..ab3c4491777b 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -198,12 +198,12 @@ xfs_buf_alloc( bp->b_target = target; /* - * Set length and count_desired to the same value initially. - * I/O routines should use count_desired, w...
e70b73f84f474cc594a39bd8ff083974e6d69aea
Analyze and fix the following issue in the Linux kernel code: xfs: clean up buffer get/read call API
Problem Details: The xfs_buf_get/read API is not consistent in the units it uses, and does not use appropriate or consistent units/types for the variables. Convert the API to use disk addresses and block counts for all buffer get and read calls. Use consistent naming for all the functions and their declarations, and c...
```diff diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index f463dce42515..d3a1974c91d5 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -172,8 +172,8 @@ xfs_buf_stale( struct xfs_buf * xfs_buf_alloc( struct xfs_buftarg *target, - xfs_off_t range_base, - size_t range_length, + xfs_daddr_t blkno, + size...
ead360c50d33772f45943792893a58865adf3638
Analyze and fix the following issue in the Linux kernel code: xfs: fix incorrect b_offset initialisation
Problem Details: Because we no longer use the page cache for buffering, there is no direct block number to page offset relationship anymore. xfs_buf_get_pages is still setting up b_offset as if there was some relationship, and that is leading to incorrectly setting up *uncached* buffers that don't overwrite b_offset on...
```diff diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 86d9af70ab3b..ddfc58f40506 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -227,7 +227,6 @@ _xfs_buf_get_pages( { /* Make sure that we have a page list */ if (bp->b_pages == NULL) { - bp->b_offset = xfs_buf_poff(bp->b_file_offset); bp->b_pa...
fe2429b0966a7ec42b5fe3bf96f0f10de0a3b536
Analyze and fix the following issue in the Linux kernel code: xfs: fix buffer lookup race on allocation failure
Problem Details: When memory allocation fails to add the page array or tht epages to a buffer during xfs_buf_get(), the buffer is left in the cache in a partially initialised state. There is enough state left for the next lookup on that buffer to find the buffer, and for the buffer to then be used without finishing the...
```diff diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index b82fc5c67fed..da2541e5ff81 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -552,18 +552,20 @@ xfs_buf_get( if (unlikely(!new_bp)) return NULL; + error = xfs_buf_allocate_memory(new_bp, flags); + if (error) { + kmem_zone_free(xfs_buf_zone, ne...
aff3a9edb7080f69f07fe76a8bd089b3dfa4cb5d
Analyze and fix the following issue in the Linux kernel code: xfs: Use preallocation for inodes with extsz hints
Problem Details: xfstest 229 exposes a problem with buffered IO, delayed allocation and extent size hints. That is when we do delayed allocation during buffered IO, we reserve space for the extent size hint alignment and allocate the physical space to align the extent, but we do not zero the regions of the extent that ...
```diff diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 392833ccc9c6..f7650a6825b1 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -1175,7 +1175,7 @@ __xfs_get_blocks( (!nimaps || (imap.br_startblock == HOLESTARTBLOCK || imap.br_startblock == DELAYSTARTBLOCK))) { - if (direct) {...
d3bc815afb549eecb3679a4b2f0df216e34df998
Analyze and fix the following issue in the Linux kernel code: xfs: punch new delalloc blocks out of failed writes inside EOF.
Problem Details: When a partial write inside EOF fails, it can leave delayed allocation blocks lying around because they don't get punched back out. This leads to assert failures like: XFS: Assertion failed: XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0, file: fs/xfs/xfs_super.c, line: 847 when evicting...
```diff diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 139e495b0cd3..392833ccc9c6 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -1187,11 +1187,18 @@ __xfs_get_blocks( &imap, nimaps); if (error) return -error; + new = 1; } else { /* * Delalloc reservations do no...
7582df516c93046b8d2111a780c69de77f9882fb
Analyze and fix the following issue in the Linux kernel code: xfs: using GFP_NOFS for blkdev_issue_flush
Problem Details: Issuing a block device flush request in transaction context using GFP_KERNEL directly can cause deadlocks due to memory reclaim recursion. Use GFP_NOFS to avoid recursion from reclaim context. Signed-off-by: Shaohua Li <shli@fusionio.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Be...
```diff diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index b5aafc395ea1..28d1f508b578 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -622,7 +622,7 @@ void xfs_blkdev_issue_flush( xfs_buftarg_t *buftarg) { - blkdev_issue_flush(buftarg->bt_bdev, GFP_KERNEL, NULL); + blkdev_issue_flush(buftarg->b...
01c84d2dc1311fb76ea217dadfd5b3a5f3cab563
Analyze and fix the following issue in the Linux kernel code: xfs: punch all delalloc blocks beyond EOF on write failure.
Problem Details: I've been seeing regular ASSERT failures in xfstests when running fsstress based tests over the past month. xfs_getbmap() has been failing this test: XFS: Assertion failed: ((iflags & BMV_IF_DELALLOC) != 0) || (map[i].br_startblock != DELAYSTARTBLOCK), file: fs/xfs/xfs_bmap.c, line: 5650 where it is ...
```diff diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 0fd7c2bfa402..79a01395c4c3 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -1434,7 +1434,7 @@ xfs_vm_write_failed( * Check if there are any blocks that are outside of i_size * that need to be trimmed back. */ - start_fsb = XFS_B_TO_...
50544bce4c46561fe9d3f817941bd95d8ae6fedd
Analyze and fix the following issue in the Linux kernel code: sparc32: remove runtime btfix support
Problem Details: - remove all uses of btfixup header - remove the btfixup header - remove the btfixup code Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/include/asm/asmmacro.h b/arch/sparc/include/asm/asmmacro.h index 90db649f26dc..1d511615c7cd 100644 --- a/arch/sparc/include/asm/asmmacro.h +++ b/arch/sparc/include/asm/asmmacro.h @@ -6,7 +6,6 @@ #ifndef _SPARC_ASMMACRO_H #define _SPARC_ASMMACRO_H -#include <asm/btfixup.h> #include <...
f4ec9e9531ac79ee2521faf7ad3d98978f747e42
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Change bitmap allocator to work in round-robin fashion
Problem Details: Under most circumstances, the bitmap allocator does not allocate the same full 24-bit QP number immediately after a QP is destroyed. This works by using the upper bits of a 24-bit QP number, beyond the number of QPs that are actually available in the low level driver. For example, say that the HCA is ...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/alloc.c b/drivers/net/ethernet/mellanox/mlx4/alloc.c index 8be20e7ea3d1..06fef5b44f77 100644 --- a/drivers/net/ethernet/mellanox/mlx4/alloc.c +++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c @@ -124,9 +124,6 @@ void mlx4_bitmap_free_range(struct mlx4_bitmap *bitma...
5a81b4a0b673bf34823191a83318377c0e66e713
Analyze and fix the following issue in the Linux kernel code: Staging: ipack: fix a few sparse warnings
Problem Details: Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c index 80cdd9ec2ba6..4e812a79b3d1 100644 --- a/drivers/staging/ipack/bridges/tpci200.c +++ b/drivers/staging/ipack/bridges/tpci200.c @@ -16,7 +16,7 @@ #include <linux/module.h> #include "tpci200.h" -struct ipack_bu...
7086e6e5baae90047ecfb1416082409634868e66
Analyze and fix the following issue in the Linux kernel code: staging: "rts5139" Fix typos.
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/rts5139/ms.c b/drivers/staging/rts5139/ms.c index b593e6606c54..6eef33b03f55 100644 --- a/drivers/staging/rts5139/ms.c +++ b/drivers/staging/rts5139/ms.c @@ -3149,7 +3149,7 @@ Fail: TRACE_RET(chip, STATUS_FAIL); sec_cnt = chip->rsp_buf[0]; - RTS51X_DEBUGP("%d pages need be tr...
1d73fad8335784fa53349ed2c5284c1339e3b103
Analyze and fix the following issue in the Linux kernel code: staging: r8712u: Remove needless test for NULL
Problem Details: In commit ee6aeff, a swatch warning was fixed by moving some code inside an if block that is executed only when the pointer padapter is not NULL. In fact, padapter can never be NULL and the corect fix should have been the removal of the test of padapter. Reported-by: Ben Hutchings <ben@decadent.org.uk...
```diff diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index a0de043305de..9bd18e2d0513 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -621,25 +621,23 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf) struct usb_device ...
1996e6c572969a8cf6d7fa97eef621219acd94a9
Analyze and fix the following issue in the Linux kernel code: USB: EHCI: work around bug in the Philips ISP1562 controller
Problem Details: This patch (as1556) works around a bug in the Philips ISP1562 EHCI controller. Although the controller claims to support frame-list lengths smaller than the default of 1024 for its periodic schedule, in fact smaller values don't work. A new quirk flag is added to indicate when the bug is present, and...
```diff diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 5cb775b1802d..f644ba9529ed 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -639,7 +639,7 @@ static int ehci_init(struct usb_hcd *hcd) INIT_LIST_HEAD(&ehci->cached_itd_list); INIT_LIST_HEAD(&ehci->cache...
65b8e5cbdddc86474372bdb48dc233b06710a576
Analyze and fix the following issue in the Linux kernel code: USB: EHCI: improve full-speed isochronous scheduling routine
Problem Details: This patch (as1555) improves the code ehci-hcd uses while checking the periodic schedule for isochronous transfers to full-speed devices. In addition to making sure that a new transfer does not violate the restrictions on the high-speed schedule, it also has to check the restrictions on the full-speed...
```diff diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index cb7667967e5a..33182c6d1ff9 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c @@ -1331,34 +1331,36 @@ sitd_slot_ok ( if (mask & ~0xffff) return 0; + /* check bandwidth */ + uframe %= period_uframe...
d3e5132814fb7c80c4b1c4a0ec6b4fa06943d6d5
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix for the ORD value of the connecting peer
Problem Details: Set ORD value of the connecting peer to be at least one in order to accommodate an RDMA READ Request message. Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> Signed-off-by: Donald Wood <Donald.E.Wood@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
```diff diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 71edfbbcce1c..5c10cbfa2668 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -3320,6 +3320,10 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) n...
61af9c3f894a48297db3cc01aa38910bd6f92c27
Analyze and fix the following issue in the Linux kernel code: usb: musb: cppi: add missing include to fix compilation
Problem Details: This fixes compilation as module. Signed-off-by: Reinhard Tartler <tartler@cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c index 66bc376005d2..8637c1f69fc3 100644 --- a/drivers/usb/musb/cppi_dma.c +++ b/drivers/usb/musb/cppi_dma.c @@ -6,6 +6,7 @@ * The TUSB6020, using VLYNQ, has CPPI that looks much like DaVinci. */ +#include <linux/module.h> #include <li...
6199c8961e1bcd38c112bee9028d482e2a7768eb
Analyze and fix the following issue in the Linux kernel code: IB/qib: Fix M_Key lease timeout handling
Problem Details: If a port has an M_Key lease set, the M_Key protect bits set to 1, and a SubnSet arrives with an invalid M_Key, an M_Key mismatch trap is generated, the lease timer begins as expected, and eventually the M_Key protect bits will be set back to 0 as per the spec. However, if any other SMP with an invali...
```diff diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c index 9292c76380fd..ed611e8df64f 100644 --- a/drivers/infiniband/hw/qib/qib_mad.c +++ b/drivers/infiniband/hw/qib/qib_mad.c @@ -396,6 +396,7 @@ static int get_linkdowndefaultstate(struct qib_pportdata *ppd) static int chec...
f665acb3cbc4d7d83bd655d21e4c7edc45029c46
Analyze and fix the following issue in the Linux kernel code: IB/qib: Fix QLE734X link cycling
Problem Details: The SERDES was using the incorrect Frequency Loop Bandwidth setting causing the link to cycle through the Physical link negotiation state machine. Fixing the Frequency Loop Bandwidth setting in the SERDES helps the link come up faster and more reliably. Signed-off-by: Mitko Haralanov <mitko.haralanov...
```diff diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index e7b9ad34fe2e..c881e744c091 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c @@ -7709,7 +7709,7 @@ static int serdes_7322_init_new(struct qib_pportdata *ppd) ib...
6ceaadee341da89af143c5cd56a3652b406e1ff5
Analyze and fix the following issue in the Linux kernel code: IB/qib: Display correct value for number of contexts
Problem Details: A "fix" for a bug with the number of contexts on a single-port board caused the calculation to be off by one, which causes problems with the upper layers. The same problem exists for number of free contexts, which is also fixed here. Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-o...
```diff diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index cf0cd30adc8d..dc14e100a7f1 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c @@ -102,6 +102,8 @@ void qib_set_ctxtcnt(struct qib_devdata *dd) dd->cfgctxts = qib_cfgctxts; ...
a39fbb1d747aa88e410d0a25af92cd9e179ba0f4
Analyze and fix the following issue in the Linux kernel code: [media] via-camera: specify XO-1.5 camera clock speed
Problem Details: For the ov7670 camera to return images at the requested frame rate, it needs to make calculations based on the clock speed, which is a completely external factor (depends on the wiring of the system). On the XO-1.5, which is the only known via-camera user, the camera is clocked at 90MHz. Pass this in...
```diff diff --git a/drivers/media/video/via-camera.c b/drivers/media/video/via-camera.c index 20f7237b8242..308e150a39bc 100644 --- a/drivers/media/video/via-camera.c +++ b/drivers/media/video/via-camera.c @@ -18,6 +18,7 @@ #include <media/v4l2-device.h> #include <media/v4l2-ioctl.h> #include <media/v4l2-chip-ident...
356c05d58af05d582e634b54b40050c73609617b
Analyze and fix the following issue in the Linux kernel code: sysfs: get rid of some lockdep false positives
Problem Details: This patch (as1554) fixes a lockdep false-positive report. The problem arises because lockdep is unable to deal with the tree-structured locks created by the device core and sysfs. This particular problem involves a sysfs attribute method that unregisters itself, not from the device it was called for...
```diff diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index 566d9f94f735..9a56e3adf476 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c @@ -73,7 +73,7 @@ set_bConfigurationValue(struct device *dev, struct device_attribute *attr, return (value < 0) ? value : count; } -static D...
a299e407b9ef356bf14fbb49793dc026877440df
Analyze and fix the following issue in the Linux kernel code: [media] av7110: fix v4l2_compliance test issues
Problem Details: Besides the usual inconsistencies in input enumeration there was also a kernel crash if you tried to poll on a vbi node. The checks for sliced vbi output vs vbi capture were not complete enough. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.c...
```diff diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index 428a543ec2ce..7d42c11c8684 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c @@ -309,6 +309,8 @@ static int fops_mmap(struct file *file, struct vm_area_struct * vma) case VFL_T...
fa0fcf46f3b5353b531994edcd73e6d442bc3211
Analyze and fix the following issue in the Linux kernel code: [media] hexium-orion: fix incorrect input table
Problem Details: Fix the standard and audioset values. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/hexium_orion.c b/drivers/media/video/hexium_orion.c index e549339f32d6..a1eb26d11070 100644 --- a/drivers/media/video/hexium_orion.c +++ b/drivers/media/video/hexium_orion.c @@ -41,15 +41,15 @@ static int hexium_num; #define HEXIUM_INPUTS 9 static struct v4l2_input hexium_in...
332e799cea32b17c969a1d67e4ed1586d878286f
Analyze and fix the following issue in the Linux kernel code: [media] hexium-gemini: remove B&W control, fix input table
Problem Details: The B&W control never worked, and you get the same effect by setting saturation to the lowest value. So it has been removed. Also fixed some incorrect entries in the input table. This driver now passes v4l2-compliance. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho ...
```diff diff --git a/drivers/media/video/hexium_gemini.c b/drivers/media/video/hexium_gemini.c index 22650322d0a9..366434f5647e 100644 --- a/drivers/media/video/hexium_gemini.c +++ b/drivers/media/video/hexium_gemini.c @@ -40,15 +40,15 @@ static int hexium_num; #define HEXIUM_INPUTS 9 static struct v4l2_input hexiu...
313fce750a073b041526f6e595f755f6233f8e73
Analyze and fix the following issue in the Linux kernel code: [media] fixes and add querystd support to mxb
Problem Details: Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c index f1dc6e76a6a1..3b7a624b5e9f 100644 --- a/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/drivers/media/dvb/ttpci/av7110_v4l.c @@ -811,6 +811,16 @@ int av7110_init_v4l(struct av7110 *av7110) vv_data->vid_ops.vidioc_s_frequ...
ab49ae0f201f1e7e07250d011fffde8ed2530175
Analyze and fix the following issue in the Linux kernel code: [media] saa7146: fix querycap, vbi/video separation and g/s_register
Problem Details: The querycap ioctl returned an incorrect version number and incorrect capabilities (mixing up vbi and video caps). The reason for that was that video nodes could do vbi activities: that should be separated between the vbi and video nodes. There were also a few minor problems with dbg_g/s_register tha...
```diff diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index dfb396568ab6..428a543ec2ce 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c @@ -478,7 +478,8 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv) v4...
4894b709d14c593466cc05e55ee493af931205e8
Analyze and fix the following issue in the Linux kernel code: [media] mxb: fix audio and standard handling
Problem Details: Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c index d26781871b1a..db0c5ddec87f 100644 --- a/drivers/media/video/mxb.c +++ b/drivers/media/video/mxb.c @@ -63,13 +63,13 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); enum { TUNER, AUX1, AUX3, AUX3_YC }; static s...
8bb5bafa8057a91613d50f7b0bec025852360237
Analyze and fix the following issue in the Linux kernel code: [media] tda9840: fix setting of the audio mode
Problem Details: You have to first detect the current rxsubchans (mono, stereo or bilingual), and depending on that you can set the audio mode. It does not automatically switch when the audio channels change. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c index 465d7086babf..3d7ddd93282d 100644 --- a/drivers/media/video/tda9840.c +++ b/drivers/media/video/tda9840.c @@ -66,29 +66,53 @@ static void tda9840_write(struct v4l2_subdev *sd, u8 reg, u8 val) val, reg); } +static int tda984...
6680427791c94e611220a6cb34ae47dac9e3aa98
Analyze and fix the following issue in the Linux kernel code: [media] mxb: fix audio handling
Problem Details: Instead of using custom ioctls use the VIDIOC_ENUM/G/S/_AUDIO ioctls. Also send the same audio to both CDROM-out and line-out. This is what you would expect and anyway, the CDROM-out connector is unlikely to be used these days as it is obsolete. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Si...
```diff diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c index aa3d75c1e351..a698c24bea20 100644 --- a/drivers/media/video/mxb.c +++ b/drivers/media/video/mxb.c @@ -31,10 +31,11 @@ #include <media/saa7115.h> #include <linux/module.h> -#include "mxb.h" #include "tea6415c.h" #include "tea6420.h" ...
671267bf3aac3dae0555730b07ef29c042e325b2
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix device_connected sending order
Problem Details: The mgmt_ev_device_connected signal must be sent before any event indications happen for sockets associated with the connection. Otherwise e.g. device authorization for the sockets will fail with ENOTCONN as user space things that there is no baseband link. This patch fixes the issue by ensuring that ...
```diff diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index edfd61addcec..d6dc44cd15b0 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -2784,6 +2784,14 @@ static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb) if (conn) { hci_conn_enter_active_mo...
d69f4a517c0a9b0b4795f4604aed8cf96dcd5223
Analyze and fix the following issue in the Linux kernel code: [media] mxb: fix initial audio + ntsc/secam support
Problem Details: Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c index 2bed92ff9476..aa3d75c1e351 100644 --- a/drivers/media/video/mxb.c +++ b/drivers/media/video/mxb.c @@ -268,6 +268,8 @@ static int mxb_probe(struct saa7146_dev *dev) /* we store the pointer in our private data field */ dev->ext_priv = mx...
6e65ca942b9664a987866ac0c62e7e450777056b
Analyze and fix the following issue in the Linux kernel code: [media] mxb/saa7146: first round of cleanups
Problem Details: Convert to the control framework, fix the easy v4l2-compliance failures. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index 8d7df1a0bcd0..f14e218bed16 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c @@ -429,8 +429,13 @@ static void vv_callback(struct saa7146_dev *dev, unsigned long status) } } ...