id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c92bf70dcb9d08f821e4c9f09f8fc328495ba998
Analyze and fix the following issue in the Linux kernel code: vxge: fix crash of VF when unloading PF
Problem Details: Calling pci_disable_sriov when unloading a SR-IOV physical function driver from a host when a guest is using a virtual function from that device can cause a host crash or VM crash. The crash is caused by the virtual config space no longer being present when PF is removed (due to the pci_disable_sriov)...
```diff diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c index 70c327910f09..9c68c60f27d8 100644 --- a/drivers/net/vxge/vxge-main.c +++ b/drivers/net/vxge/vxge-main.c @@ -4182,6 +4182,20 @@ static int vxge_probe_fw_update(struct vxgedev *vdev) return ret; } +static int __devinit is_sriov_in...
40a010395cd66053f07bffeb3da5e44683bac30e
Analyze and fix the following issue in the Linux kernel code: SCTP: Fix SCTP_SET_PEER_PRIMARY_ADDR to accpet v4mapped address
Problem Details: SCTP_SET_PEER_PRIMARY_ADDR does not accpet v4mapped address, using v4mapped address in SCTP_SET_PEER_PRIMARY_ADDR socket option will get -EADDRNOTAVAIL error if v4map is enabled. This patch try to fix it by mapping v4mapped address to v4 address if allowed. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu...
```diff diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 6bd554323a34..0b9ee34ad35c 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -2932,6 +2932,7 @@ static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optva struct sctp_association *asoc = NULL; struct sctp_setpeerprim prim...
e4f05af136016958f52455da3070ca6622439b10
Analyze and fix the following issue in the Linux kernel code: 8250: fix uninitialized FIFOs
Problem Details: I have found a bug in 8250.c driver which causes that 16550A uart FIFOs are not turned on during initialization if they are manually configured by setserial. UART is then working only as plain 16450 without FIFOs. On systems with higher interrupt latency this causes buffer overruns and loss of received...
```diff diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 9839199c1d1d..8747215dc97c 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -1981,6 +1981,8 @@ static int serial8250_startup(struct uart_port *port) unsigned char lsr, iir; int retval; + up->port.fifosize = uart_config[up->p...
53139e36cdd7bbc5efcbdc5e70fbff66e2da3c09
Analyze and fix the following issue in the Linux kernel code: ip2: fix compiler warning on ip2main_pci_tbl
Problem Details: Annotate ip2main_pci_tbl as '__used' to fix following warning: CC drivers/char/ip2/ip2main.o drivers/char/ip2/ip2main.c:3227: warning: ‘ip2main_pci_tbl’ defined but not used Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: "Michael H. Warfield" <mhw@wittsend.com> Signed-off-by: Greg Kroah-...
```diff diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index fcd02baa7d65..c3a025356b8b 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c @@ -3224,7 +3224,7 @@ ip2trace (unsigned short pn, unsigned char cat, unsigned char label, unsigned lo MODULE_LICENSE("GPL"); -stati...
fd0f5c54eeb66e3e89e3cdd34c5abf8d5fbcf61c
Analyze and fix the following issue in the Linux kernel code: specialix: fix compiler warning on specialix_pci_tbl
Problem Details: Annotate specialx_pci_tbl as '__used' to fix following warning: CC drivers/char/specialix.o drivers/char/specialix.c:2358: warning: ‘specialx_pci_tbl’ defined but not used Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: Roger Wolff <R.E.Wolff@BitWizard.nl> Signed-off-by: Greg Kroah-Hartma...
```diff diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index 9f8495b4fc8f..499bb0ffd834 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c @@ -2356,7 +2356,7 @@ static void __exit specialix_exit_module(void) func_exit(); } -static struct pci_device_id specialx_pci_tbl[] __devini...
6835a209f6c24b3704aa58d8b558a513a5a08c52
Analyze and fix the following issue in the Linux kernel code: rocket: fix compiler warning on rocket_pci_ids
Problem Details: Annotate rocket_pci_ids as '__used' to fix following warning: CC drivers/char/rocket.o drivers/char/rocket.c:1767: warning: ‘rocket_pci_ids’ defined but not used Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 86308830ac42..3e4e73a0d7c1 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c @@ -1764,7 +1764,7 @@ static void rp_flush_buffer(struct tty_struct *tty) #ifdef CONFIG_PCI -static struct pci_device_id __devinitdata rocket_pci_ids[] ...
5ac387d983149d4658aad17242d24eef85a43fa8
Analyze and fix the following issue in the Linux kernel code: serial: fix pch_uart kconfig & build
Problem Details: The dma_request_channel/dma_release_channel interfaces are not built when DMADEVICES is not enabled, so make the driver depend on DMADEVICES. Also, the help text says that the driver enables & uses PCH_DMA, which is not enabled, so select that. ERROR: "__dma_request_channel" [drivers/serial/pch_uart....
```diff diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index fa02904c1910..ec3c214598d0 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -1650,8 +1650,9 @@ config SERIAL_IFX6X60 config SERIAL_PCH_UART tristate "Intel EG20T PCH UART" + depends on PCI && DMADEVICES select SERIAL_CO...
79aeec5822cea63cf732bbc0c9f3337542352616
Analyze and fix the following issue in the Linux kernel code: enic: Bug Fix: Pass napi reference to the isr that services receive queue
Problem Details: Pass reference to napi instead of enic device to the isr that services receive queue. Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index a466ef91dd43..aa28b270c045 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -1962,7 +1962,8 @@ static void enic_poll_controller(struct net_device *netdev) case VNIC_DEV_INTR_MODE_MSIX: for (i = 0; ...
e1f91505025db74c261962dc16d58f79b9b0c83c
Analyze and fix the following issue in the Linux kernel code: ifb: remove the useless debug stats
Problem Details: These debug stats are not exported, and become useless. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index fe337bd121aa..e4cd6632c7db 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c @@ -42,16 +42,6 @@ struct ifb_private { struct tasklet_struct ifb_tasklet; int tasklet_pending; - /* mostly debug stats leave in for now */ - unsigned long st_t...
ff176a4e2972bdc7a8d65cdcb0bd0d26ab1528cf
Analyze and fix the following issue in the Linux kernel code: usb: pch_udc: Fix setup transfers with data out
Problem Details: This patch fixes an issue where the driver does not handle out data in setup transactions. The per endpoint cached status register is cleared in the pch_udc_svc_control_out function. When there is out data available the function pch_udc_svc_data_out is called which tries to pick it up the status, whic...
```diff diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c index 216f648bae6c..0c8dd81dddca 100644 --- a/drivers/usb/gadget/pch_udc.c +++ b/drivers/usb/gadget/pch_udc.c @@ -2150,7 +2150,10 @@ static void pch_udc_svc_control_out(struct pch_udc_dev *dev) pch_udc_set_dma(dev, DMA_DIR_RX); } el...
49e208346616328e535b5d6ecd510ab38f210858
Analyze and fix the following issue in the Linux kernel code: usb: pch_udc: Fix compile error, warnings and checkpatch warnings
Problem Details: Building pch_udc in linux-next fails, this patch fixes the a compile error: drivers/usb/gadget/pch_udc.c: In function ‘usb_gadget_register_driver’: drivers/usb/gadget/pch_udc.c:2645: error: ‘struct usb_gadget_driver’ has no member named ‘bind’ drivers/usb/gadget/pch_udc.c:2664: error: ‘struct usb_gadg...
```diff diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c index 4a5256977d29..216f648bae6c 100644 --- a/drivers/usb/gadget/pch_udc.c +++ b/drivers/usb/gadget/pch_udc.c @@ -337,7 +337,7 @@ struct pch_udc_dev { struct usb_gadget_driver *driver; struct pci_dev *pdev; struct pch_udc_ep ep[PC...
0a91efa2f951d790969dec96fb675ca7869eca83
Analyze and fix the following issue in the Linux kernel code: USB: gadget: Fix "scheduling while atomic" bugs in ci13xxx_udc
Problem Details: dma_pool_alloc() require sleeping context when called with GFP_KERNEL argument. Hence release the spin lock before calling dma_pool_alloc(). usb_ep_alloc_request can also be called with non-atomic GFP flags. Hence get rid off spin lock while allocation request memory. Use GFP_ATOMIC flag for alloca...
```diff diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c index 4e9ec7d256fd..d19537a0613d 100644 --- a/drivers/usb/gadget/ci13xxx_udc.c +++ b/drivers/usb/gadget/ci13xxx_udc.c @@ -1626,7 +1626,7 @@ __acquires(udc->lock) spin_unlock(udc->lock); retval = usb_ep_enable(&mEp->ep, &ctrl_en...
66921edd7df109196bd1a41309c17896ea0913d7
Analyze and fix the following issue in the Linux kernel code: USB: serial: usb_wwan: Add missing uaccess.h / fix build failure
Problem Details: This patch fixes a build failure[1] by adding the missing uaccess.h needed for copy_from_user and copy_to_user References: http://kisskb.ellerman.id.au/kisskb/buildresult/3607218/ Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 660b7caef784..b004b2a485c3 100644 --- a/drivers/usb/serial/usb_wwan.c +++ b/drivers/usb/serial/usb_wwan.c @@ -31,6 +31,7 @@ #include <linux/tty_flip.h> #include <linux/module.h> #include <linux/bitops.h> +#include <linux/uaccess...
352a337832774a6929c16b569abe9cedc3db01cc
Analyze and fix the following issue in the Linux kernel code: USB: otg: fix link breakage, when the NOP USB Xceiver is a module
Problem Details: If the NOP USB OTG transceiver driver is built as a module, the otg.h header declares external functions, but if they are referenced from the kernel proper, as, e.g., in the OMAP3 case, where the omap3evm board is calling the usb_nop_xceiv_register() function, linkage breaks. This patch fixes this prob...
```diff diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 0a5b3711e502..a1a1e7a73ec9 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h @@ -116,7 +116,7 @@ struct otg_transceiver { /* for board-specific init logic */ extern int otg_set_transceiver(struct otg_transceiver *); -#if d...
34404082bbdc5d981fa8eb2f9f5dfaae74463877
Analyze and fix the following issue in the Linux kernel code: usb: gadget/imx-udc: fix interrupt name again
Problem Details: Commit 06c3859 (usb: gadget/imx-udc: remove usage of deprecated symbol USBD_INT0) was a bit precipitant because the name used instead didn't match the usual naming scheme for irqs on arm/imx. I renamed the irq to the right name in e083000 (ARM: imx: dynamically allocate imx_udc device) when 06c3859 di...
```diff diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index b30f85d70480..1210534822d6 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c @@ -1191,13 +1191,17 @@ static irqreturn_t imx_udc_ctrl_irq(int irq, void *dev) return IRQ_HANDLED; } +#ifndef MX1_INT_USBD0...
8170344cb8aaa726bf1afae83288946b7cfcb556
Analyze and fix the following issue in the Linux kernel code: USB: whci-hcd: fix compiler warning
Problem Details: Annotate whci_hcd_id_table as '__used' to fix following warning: CC drivers/usb/host/whci/hcd.o drivers/usb/host/whci/hcd.c:359: warning: ‘whci_hcd_id_table’ defined but not used Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/whci/hcd.c b/drivers/usb/host/whci/hcd.c index 72b6892fda67..9546f6cd01f0 100644 --- a/drivers/usb/host/whci/hcd.c +++ b/drivers/usb/host/whci/hcd.c @@ -356,7 +356,7 @@ static void __exit whci_hc_driver_exit(void) module_exit(whci_hc_driver_exit); /* PCI device ID's that we han...
c07224005dd3fe746246acadc9be652a588a4d7f
Analyze and fix the following issue in the Linux kernel code: net/ipv6/udp.c: fix typo in flush_stack()
Problem Details: skb1 should be passed as parameter to sk_rcvqueues_full() here. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 7aad12770867..26a8da3f2044 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -602,7 +602,7 @@ static void flush_stack(struct sock **stack, unsigned int count, sk = stack[i]; if (skb1) { - if (sk_rcvqueues_full(sk, skb)) { + if (sk_rcvqueues_full(s...
3dd1462e82bcab7625cec129952f26dae7a8b742
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix compiler warnings
Problem Details: ... regarding an unused function when !MIGRATION, and regarding a printk() format string vs argument mismatch. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 33b6d459494c..b803c2667673 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -696,6 +696,7 @@ static int btree_submit_bio_hook(struct inode *inode, int rw, struct bio *bio, __btree_submit_bio_done); } +#ifdef CONFIG_MIGRATION stati...
914ee295af418e936ec20a08c1663eaabe4cd07a
Analyze and fix the following issue in the Linux kernel code: Btrfs: pwrite blocked when writing from the mmaped buffer of the same page
Problem Details: This problem is found in meego testing: http://bugs.meego.com/show_bug.cgi?id=6672 A file in btrfs is mmaped and the mmaped buffer is passed to pwrite to write to the same page of the same file. In btrfs_file_aio_write(), the pages is locked by prepare_pages(). So when btrfs_copy_from_user() is called,...
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index c1faded5fca0..66836d85763b 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -48,30 +48,34 @@ static noinline int btrfs_copy_from_user(loff_t pos, int num_pages, struct page **prepared_pages, struct iov_iter *i) { - size_t copied; + size_t ...
f106e82caaa0d943e47cacc184f5b40d538e0044
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix a crash when mounting a subvolume
Problem Details: We should drop dentry before deactivating the superblock, otherwise we can hit this bug: BUG: Dentry f349a690{i=100,n=/} still in use (1) [unmount of btrfs loop1] ... Steps to reproduce the bug: # mount /dev/loop1 /mnt # mkdir save # btrfs subvolume snapshot /mnt save/snap1 # umount /mnt #...
```diff diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 47bf67cbe6bf..61bd79abb805 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -685,9 +685,9 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, mutex_unlock(&root->d_inode->i_mutex); if (IS_ERR(new_root)) { + dput(root); ...
75eaa0e22c055e38982df267d0f84cc510ba38bf
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix sync subvol/snapshot creation
Problem Details: We were incorrectly taking the async path even for the sync ioctls by passing in &transid unconditionally. There's ample room for further cleanup here, but this keeps the fix simple. Signed-off-by: Sage Weil <sage@newdream.net> Reviewed-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Chris Mason <c...
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index f1c9bb4079ed..7cc2e8e075b4 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -964,6 +964,15 @@ static noinline int btrfs_ioctl_snap_create(struct file *file, name = async_vol_args->name; fd = async_vol_args->fd; async_vol_args->name[BTRFS_SNA...
24ae63656a165c870c0d69fcc8aac1dc35e25e34
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix page leak in compressed writeback path
Problem Details: "start + num_bytes >= actual_end" can happen when compressed page writeback races with file truncation. In that case we need unlock and release pages past the end of file. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ae6c0d190bc1..4875d69871b5 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -495,7 +495,7 @@ again: add_async_extent(async_cow, start, num_bytes, total_compressed, pages, nr_pages_ret); - if (start + num_bytes < end && start + num_bytes <...
84cd948cb11041f205242de457e680b9bb872a36
Analyze and fix the following issue in the Linux kernel code: Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots
Problem Details: Not being able to delete an orphan item isn't a horrible thing. The worst that happens is the next time around we try and do the orphan cleanup and we can't find the referenced object and just delete the item and move on. Signed-off-by: Josef Bacik <josef@redhat.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index cec05e100142..41133b064d72 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6309,9 +6309,13 @@ int btrfs_drop_snapshot(struct btrfs_root *root, NULL, NULL); BUG_ON(ret < 0); if (ret > 0) { - ret = btrfs_del_o...
457de4383ec6144df7d5a82cdfb110c825305a51
Analyze and fix the following issue in the Linux kernel code: ipv6: Fix 'release_it' logic in tcp_v6_get_peer()
Problem Details: We accidently set it to "true" for the case where we are using a route bound peer. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 319458558df9..fee076891646 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -1877,7 +1877,7 @@ static struct inet_peer *tcp_v6_get_peer(struct sock *sk, bool *release_it) if (!rt->rt6i_peer) rt6_bind_peer(rt, 1); peer = rt->rt6i...
4c0833bcd4d302fe783b9f8286a00ca2999d6200
Analyze and fix the following issue in the Linux kernel code: bridge: Fix return values of br_multicast_add_group/br_multicast_new_group
Problem Details: If br_multicast_new_group returns NULL, we would return 0 (no error) to the caller of br_multicast_add_group, which is not what we want. Instead br_multicast_new_group should return ERR_PTR(-ENOMEM) in this case. Also propagate the error number returned by br_mdb_rehash properly. Signed-off-by: Tobias...
```diff diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 326e599f83fb..85a0398b221e 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -654,11 +654,13 @@ static struct net_bridge_mdb_entry *br_multicast_new_group( struct net_bridge_mdb_htable *mdb; struct net_bridge_md...
5f75a1042feca37c0a436ba42a4b1f7f75c35778
Analyze and fix the following issue in the Linux kernel code: ipv6: fix nl group when advertising a new link
Problem Details: New idev are advertised with NL group RTNLGRP_IPV6_IFADDR, but should use RTNLGRP_IPV6_IFINFO. Bug was introduced by commit 8d7a76c9. Signed-off-by: Wang Xuefu <xuefu.wang@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Thomas Graf <tgraf@infradead.org> Signed-off-by: D...
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 23cc8e1ce8d4..93b7a933a775 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -4021,11 +4021,11 @@ void inet6_ifinfo_notify(int event, struct inet6_dev *idev) kfree_skb(skb); goto errout; } - rtnl_notify(skb, net, 0, RTNLGRP_IPV6_IF...
e4fbce740f078bbc925ba5c86648d9c883968479
Analyze and fix the following issue in the Linux kernel code: r8169: Fix runtime power management
Problem Details: I noticed that one of the post-2.6.36 patches broke runtime PM of the r8169 on my MSI Wind test machine in such a way that the link was not brought up after reconnecting the network cable. In the process of debugging the issue I realized that we only should invoke the runtime PM functions in rtl8169_c...
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 7d33ef4bcb4a..53b13deade95 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -744,26 +744,36 @@ static void rtl8169_xmii_reset_enable(void __iomem *ioaddr) mdio_write(ioaddr, MII_BMCR, val & 0xffff); } -static void rtl8169_check_link_...
983bbfd091be5b3e1a729f31cce29431fbff2d27
Analyze and fix the following issue in the Linux kernel code: Staging: iio: fix up world writable sysfs files.
Problem Details: You should not be able to write to sysfs files from any user. Cc: Graf Yang <graf.yang@analog.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Cc: Jonathan Cameron <jic23@cam.ac.uk> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c index 34fb21aa8b07..c12f64cc40df 100644 --- a/drivers/staging/iio/resolver/ad2s1210.c +++ b/drivers/staging/iio/resolver/ad2s1210.c @@ -661,19 +661,19 @@ error_ret: static IIO_CONST_ATTR(description, "Variable Reso...
64d74c6cbe52fbec90ead8f3bf53bfb10a1540d5
Analyze and fix the following issue in the Linux kernel code: Staging: ft1000: fix world writable debugfs file
Problem Details: You should not be able to write to a debugfs file from any user. Cc: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c index da76f11a552f..e39809229d46 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c @@ -173,7 +173,7 @@ int ft1000_create_dev(struct ...
bc657f6e9130108651915fe37624e47638c46e0f
Analyze and fix the following issue in the Linux kernel code: staging: sep: fix comments in sep_get_static_pool_addr_handler
Problem Details: Original comments were inaccurate Signed-off-by: Mark Allyn <mark.a.allyn@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 2681fcf0c34d..ac5d56943d4b 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -2545,10 +2545,8 @@ static int sep_free_dma_tables_and_dcb(struct sep_device *sep, bool isapplet, /** * sep...
5b362ac3799ff4225c40935500f520cad4d7ed66
Analyze and fix the following issue in the Linux kernel code: NFS: Fix panic after nfs_umount()
Problem Details: After a few unsuccessful NFS mount attempts in which the client and server cannot agree on an authentication flavor both support, the client panics. nfs_umount() is invoked in the kernel in this case. Turns out nfs_umount()'s UMNT RPC invocation causes the RPC client to write off the end of the rpc_c...
```diff diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index eceafe74f473..4f981f1f6689 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c @@ -505,13 +505,13 @@ static struct rpc_procinfo mnt3_procedures[] = { static struct rpc_version mnt_version1 = { .number = 1, - .nrprocs = 2, + .nrprocs = ARR...
3506f27731439bf6ff3bfa86f04e0104f7edad68
Analyze and fix the following issue in the Linux kernel code: da850-evm, trivial: use da850_evm prefix for consistency
Problem Details: There was a single case of 'da850evm' prefix in the board-da850-evm.c file where the reset of the prefixes were 'da850_evm'; change it to 'da850_evm' for consistency. Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kevin Hilman <khilman@de...
```diff diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index f89b0b7cb6f2..fbdbd584cdf4 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -591,7 +591,7 @@ static struct tps6507x_board tps_board = { .tps6507x_ts_init_da...
12cdd3d71954c2cd6dd556eec25dd7d346735831
Analyze and fix the following issue in the Linux kernel code: davinci: aemif: signedness bug in davinci_aemif_setup_timing()
Problem Details: aemif_calc_rate() can return a negative error value, so all the variables that get tested for this value need to be signed. The maximum bit width of WSETUP(WSETUP_MAX) appears to be 30 bits (0xf << 26). Using a signed instead of an unsigned integer shouldn't make a difference here. Signed-off-by: Nic...
```diff diff --git a/arch/arm/mach-davinci/aemif.c b/arch/arm/mach-davinci/aemif.c index 9c3f500fc12f..1ce70a91f2e9 100644 --- a/arch/arm/mach-davinci/aemif.c +++ b/arch/arm/mach-davinci/aemif.c @@ -90,7 +90,7 @@ int davinci_aemif_setup_timing(struct davinci_aemif_timing *t, void __iomem *base, unsigned cs) { ...
ced98628bf6ca7705b2d06df9c71a80cd1cd49bb
Analyze and fix the following issue in the Linux kernel code: davinci: minor tnetv107x clock tree fixes
Problem Details: This patch applies the following modifications to the tnetv107x clock tree: - reparent tnetv107x usb clocks to usbss - mark timer1 as always enabled - enable set_rate on pll divider output clocks - adjust tnetv107x tsc sysclk rate lower to fix invalid reset defaults Signed-off-by: Cyril Ch...
```diff diff --git a/arch/arm/mach-davinci/devices-tnetv107x.c b/arch/arm/mach-davinci/devices-tnetv107x.c index c9a86d8130d1..85503debda51 100644 --- a/arch/arm/mach-davinci/devices-tnetv107x.c +++ b/arch/arm/mach-davinci/devices-tnetv107x.c @@ -344,7 +344,20 @@ static struct platform_device tsc_device = { void __i...
c0d8768af260e2cbb4bf659ae6094a262c86b085
Analyze and fix the following issue in the Linux kernel code: anon_inodes: fix wrong function name in comment
Problem Details: Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 57ce55b2564c..73097336ea2a 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -64,9 +64,9 @@ static const struct address_space_operations anon_aops = { }; /** - * anon_inode_getfd - creates a new file instance by hooking it up to an - * ...
a34f0b31398020e2d3be653eb695bd17a9cf3b55
Analyze and fix the following issue in the Linux kernel code: fix comment typos concerning "consistent"
Problem Details: Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/arm/mach-msm/include/mach/entry-macro-qgic.S b/arch/arm/mach-msm/include/mach/entry-macro-qgic.S index 4dc99aa65d07..12467157afb9 100644 --- a/arch/arm/mach-msm/include/mach/entry-macro-qgic.S +++ b/arch/arm/mach-msm/include/mach/entry-macro-qgic.S @@ -26,7 +26,7 @@ * The interrupt numberin...
dac36dd87de10d1fd81dc7b7a40256cb2e965abc
Analyze and fix the following issue in the Linux kernel code: poll: fix a typo in comment
Problem Details: Convert duplicated sys_poll to select. As Kosaki suggests, sys_poll() and sys_select() are now hidden by SYSCALL_DEFINEx() macros so it would be better to use plain select/poll syscall name. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> ...
```diff diff --git a/include/linux/poll.h b/include/linux/poll.h index 56e76af78102..1a2ccd6f3823 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h @@ -57,7 +57,7 @@ struct poll_table_entry { }; /* - * Structures and helpers for sys_poll/sys_poll + * Structures and helpers for select/poll syscall */ s...
594632efbb9a4ac323cbf8dbf37c608d418ca8c1
Analyze and fix the following issue in the Linux kernel code: usb: musb: Adding musb support for OMAP4430
Problem Details: OMAP4430 supports UTMI and ULPI types of transceiver interface. In UTMI mode: The PHY is embedded within OMAP4430. The transceiver functionality is split between the twl6030 PMIC chip and OMAP4430. The VBUS, ID pin sensing and OTG SRP generation part is integrated in TWL6030 and UTMI PHY functionality...
```diff diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index b9ea563d1c8e..d0c236f8e191 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -411,6 +411,7 @@ struct musb { struct timer_list otg_timer; #endif + struct notifier_block nb; struct dma_controller ...
77b1d3fa88dcb9d6e885926f972c421e4069b849
Analyze and fix the following issue in the Linux kernel code: mfd: TWL6030: USBOTG VBUS event generation on
Problem Details: With TWL6030-usb, VBUS SESS_VLD and SESS_END events are not generated as expected. When these interrupts are enabled, charger VBUS detection interrupt does not get generated. So USBOTG has to be dependent on charger VBUS interrupts. So added one bit for USBOTG and changed the handler to call the USBOTG...
```diff diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c index aaedb11d9d2c..06c8955907e9 100644 --- a/drivers/mfd/twl6030-irq.c +++ b/drivers/mfd/twl6030-irq.c @@ -74,7 +74,7 @@ static int twl6030_interrupt_mapping[24] = { USBOTG_INTR_OFFSET, /* Bit 16 ID_WKUP */ USBOTG_INTR_OFFSET, /* Bit 17 V...
a9c037832e9624e240c5019d0e01e9352e8f638d
Analyze and fix the following issue in the Linux kernel code: musb: am35x: fix compile error due to control apis
Problem Details: commit 4814ced5116e3b73dc4f63eec84999739fc8ed11 (OMAP: control: move plat-omap/control.h to mach-omap2/control.h) moved <plat/control.h> to another location, preventing drivers from accessing it, so we need to pass function pointers from arch code to be able to talk to internal PHY on AM35x. Signed-of...
```diff diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 9107883287f6..5298949d4b11 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -30,9 +30,102 @@ #include <mach/irqs.h> #include <mach/am35xx.h> #include <plat/usb.h> +#include "control.h" #if...
4bc65dd8d88671712d71592a83374cfb0b5fce7a
Analyze and fix the following issue in the Linux kernel code: filter: use size of fetched data in __load_pointer()
Problem Details: __load_pointer() checks data we fetch from skb is included in head portion, but assumes we fetch one byte, instead of up to four. This wont crash because we have extra bytes (struct skb_shared_info) after head, but this can read uninitialized bytes. Fix this using size of the data (1, 2, 4 bytes) in ...
```diff diff --git a/net/core/filter.c b/net/core/filter.c index e193e29d4671..e8a6ac411ffb 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -88,7 +88,7 @@ enum { }; /* No hurry in this branch */ -static void *__load_pointer(const struct sk_buff *skb, int k) +static void *__load_pointer(const struct sk_buf...
78347c8c6b2ddf20535bc1b18d749a3bbdea2a60
Analyze and fix the following issue in the Linux kernel code: xfrm: Fix xfrm_state_migrate leak
Problem Details: xfrm_state_migrate calls kfree instead of xfrm_state_put to free a failed state. According to git commit 553f9118 this can cause memory leaks. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Acked-by: Herbert Xu <herbert@gondor.ap...
```diff diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index eb96ce52f178..220ebc05c7af 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1268,7 +1268,7 @@ struct xfrm_state * xfrm_state_migrate(struct xfrm_state *x, return xc; error: - kfree(xc); + xfrm_state_put(xc); return NULL; ...
fb4fa76a1fa59340154c42d998d700e1f8bf21e0
Analyze and fix the following issue in the Linux kernel code: net: Convert netpoll blocking api in bonding driver to be a counter
Problem Details: A while back I made some changes to enable netpoll in the bonding driver. Among them was a per-cpu flag that indicated we were in a path that held locks which could cause the netpoll path to block in during tx, and as such the tx path should queue the frame for later use. This appears to have given r...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 2fee00a4c9ef..d0ea760ce419 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -171,7 +171,7 @@ MODULE_PARM_DESC(resend_igmp, "Number of IGMP membership reports to send on link /*-------------...
e83df17f178360a8e7874441bca04a710c869e42
Analyze and fix the following issue in the Linux kernel code: OMAP2+: PM/serial: fix console semaphore acquire during suspend
Problem Details: commit 0d8e2d0dad98a693bad88aea6876ac8b94ad95c6 (OMAP2+: PM/serial: hold console semaphore while OMAP UARTs are disabled) added use of the console semaphore to protect UARTs from being accessed after disabled during idle, but this causes problems in suspend. During suspend, the console semaphore is ac...
```diff diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index c85923e56b85..aaeea49b9bdd 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c @@ -53,6 +53,19 @@ #include <plat/powerdomain.h> #include <plat/clockdomain.h> +#ifdef CONFIG_SUSPEND +static suspend_state_t...
88ab8a8445838785e38af378740ab57f8cb6cb8a
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: Fix coding style issues in drivers.c
Problem Details: This patch fixes line over 80 characters warning issues found in file drivers.c Signed-off-by: Xenofon Foukas <foukas.xenofon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index ef24a530278b..dca861ee0466 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -117,8 +117,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it) for (dri...
96ff77f7350576d1b25908b59f15d2ab5222c432
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Fix coding style.
Problem Details: Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c index 773316fcecd7..bd28a6bfa86a 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c @@ -14,23 +14,19 @@ #define PUTX_TO_PAGE(len,page,...
85d47cff4ea2ab0d5380ba649ac4515d1a5bcf23
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Coding style fix in ft1000ReadProc.
Problem Details: Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c index c3fca23d551c..773316fcecd7 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c @@ -43,126 +43,122 @@ u16 ft1000_read_dpram16 (struct...
92914cc8bb6d2d710d102051c9bb7566b0ac75a0
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Fix coding style in ft1000NotifyProc.
Problem Details: Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c index f197523d0604..c3fca23d551c 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c @@ -166,30 +166,29 @@ ft1000ReadProc (char *page, cha...
04c6620117488c0ccc612da5f2bcbcde025e9301
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Fix coding style.
Problem Details: Fix coding style in ft1000CleanupProc and ft1000InitProc functions. Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c index dbd4a1ce9f55..f197523d0604 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c @@ -196,12 +196,12 @@ static struct notifier_block ft...
5fd866fb6401cf6a912e75e1b9c4b906bf42434e
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Fix proc initialization handling.
Problem Details: Cleaning proc entries when error occures was not handled correctly. So fix and also add proper cleaning. Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c index 105846d104ff..dbd4a1ce9f55 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c @@ -193,32 +193,44 @@ static struct notifier_block ft...
115884118a65c18af290476e44ca6c76a2c0a694
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Fix debug messages.
Problem Details: Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c index d249c8ae4f46..da76f11a552f 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c @@ -148,18 +148,18 @@ int ft1000_create_dev(struc...
4d791234f484002d57f634e3d90ca2cd51ed144e
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Fix camelcase functions and variables.
Problem Details: Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c index 4e5c8a3bc888..85f67e564f36 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c @@ -45,11 +45,11 @@ static int ft1000_flarion_cnt...
6d96940b2de8f8ac2bc938ea9249ed380cf906e0
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Fix private data pointer usage.
Problem Details: Assign private data pointer to device for usage in file operations. Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c index 1238b7759e5b..8b735e489878 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c @@ -347,12 +347,15 @@ void ft1000_DestroyDevice(s...
28dd31983f6c3a4d89369ff8f0c93de2cda868db
Analyze and fix the following issue in the Linux kernel code: OMAP1: SRAM: fix size for OMAP1611 SoCs
Problem Details: Kernel was failing to boot on omap1611 based OSK boards due to mis-configured SRAM size. Existing code was using a hard-coded value for 250k, which was then rounded down by PAGE_SIZE. Increasing this to 256k allows kernel to boot on omap1611 SoCs. Problem reported by and initial fix suggested by Tim...
```diff diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index e2c8eebe6b3a..74dac419d328 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c @@ -166,7 +166,7 @@ static void __init omap_detect_sram(void) cpu_is_omap1710()) omap_sram_size = 0x4000; /* 16K */ else if (c...
1f0613158ea14b399fd7a16470630a729ba9d0c3
Analyze and fix the following issue in the Linux kernel code: Staging: rt2860: fix previous patch error
Problem Details: Somehow Greg messed up the last patch and missed a chunk. This patch contains the missing chunk. Acked-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Chen, Chien-Chia <machen@novell.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rt2860/chips/rt30xx.c b/drivers/staging/rt2860/chips/rt30xx.c index e610d39bdca7..354debfe1477 100644 --- a/drivers/staging/rt2860/chips/rt30xx.c +++ b/drivers/staging/rt2860/chips/rt30xx.c @@ -442,7 +442,7 @@ void RT30xxReverseRFSleepModeSetup(struct rt_rtmp_adapter *pAd) /* V...
388c4bcb4e63e88fb1f312a2f5f9eb2623afcf5b
Analyze and fix the following issue in the Linux kernel code: ocfs2/dlm: Migrate lockres with no locks if it has a reference
Problem Details: o2dlm was not migrating resources with zero locks because it assumed that that resource would get purged by dlm_thread. However, some usage patterns involve creating and dropping locks at a high rate leading to the migrate thread seeing zero locks but the purge thread seeing an active reference. When t...
```diff diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index f564b0e5f80d..59f0f6bdfc62 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c @@ -2346,7 +2346,8 @@ static void dlm_deref_lockres_worker(struct dlm_work_item *item, void *data) */ static int dlm_is_lockres_migrateable(st...
efc70d241f5c7fc0a9f1c2a01781ed946d9dbe21
Analyze and fix the following issue in the Linux kernel code: perf, sparc: Fix CONFIG_PERF_EVENTS=y build error
Problem Details: Fix a typo in: 004417a6d468: perf, arch: Cleanup perf-pmu init vs lockup-detector Which caused a build failure on Sparc, reported by Stephen Rothwell. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.n...
```diff diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 75c5b1263970..39348b1cebd3 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c @@ -1323,7 +1323,7 @@ int __init init_hw_perf_events(void) return 0; } -early_initcall(init_hw_perf_event); +early_i...
05340d4ab2ec2b6b4962c1c41c6ea8fb550f947b
Analyze and fix the following issue in the Linux kernel code: xfs: log timestamp changes to the source inode in rename
Problem Details: Now that we don't mark VFS inodes dirty anymore for internal timestamp changes, but rely on the transaction subsystem to push them out, we need to explicitly log the source inode in rename after updating it's timestamps to make sure the changes actually get forced out by sync/fsync or an AIL push. We ...
```diff diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c index d2af0a8381a6..77a59891734e 100644 --- a/fs/xfs/xfs_rename.c +++ b/fs/xfs/xfs_rename.c @@ -297,6 +297,7 @@ xfs_rename( * it and some incremental backup programs won't work without it. */ xfs_trans_ichgtime(tp, src_ip, XFS_ICHGTIME_CHG); + xfs_t...
96a84c20d635fb1e98ab92f9fc517c4441f5c424
Analyze and fix the following issue in the Linux kernel code: lockup detector: Compile fixes from removing the old x86 nmi watchdog
Problem Details: My patch that removed the old x86 nmi watchdog broke other arches. This change reverts a piece of that patch and puts the change in the correct spot. Signed-off-by: Don Zickus <dzickus@redhat.com> Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: fweisbec@gmail.com Cc: yinghai@kernel.org LKML-Ref...
```diff diff --git a/arch/x86/kernel/apic/hw_nmi.c b/arch/x86/kernel/apic/hw_nmi.c index 057f1ebebe0c..2e94eb493591 100644 --- a/arch/x86/kernel/apic/hw_nmi.c +++ b/arch/x86/kernel/apic/hw_nmi.c @@ -24,8 +24,14 @@ u64 hw_nmi_get_sample_period(void) } #endif +#ifndef CONFIG_HARDLOCKUP_DETECTOR +void touch_nmi_watchd...
a5dc4f898c2a0f66e2cefada6c687db82ba2fcbc
Analyze and fix the following issue in the Linux kernel code: ACPI: EC: Add another dmi match entry for MSI hardware
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=15418 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> cc: stable@kernel.org Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 372ff80b7b0c..302b31ed31f1 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -934,6 +934,9 @@ static struct dmi_system_id __initdata ec_dmi_table[] = { ec_flag_msi, "MSI hardware", { DMI_MATCH(DMI_CHASSIS_VENDOR, "MICRO-Star")}, NULL}, { + e...
7c03b87048f2467087ae7e51392e5fb57ea8f58b
Analyze and fix the following issue in the Linux kernel code: [SCSI] hpsa: fix redefinition of PCI_DEVICE_ID_CISSF
Problem Details: PCI_DEVICE_ID_CISSF is defined as 323b in pci_ids.h but redefined as 3fff in hpsa.c. The ID of 3fff will _never_ ship as a standalone controller. It is intended only as part a complete storage solution. As such, this patch removes the redefinition and the StorageWorks P1210m from the product table. It...
```diff diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index b2fb2b2a6e70..a6dea08664fc 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -90,11 +90,7 @@ static const struct pci_device_id hpsa_pci_device_id[] = { {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3252}, {PCI_VENDOR_ID_...
3151dbb04ad5a5bd6358371c0bfb457216d00205
Analyze and fix the following issue in the Linux kernel code: ACPI ac: update AC status upon sysfs query
Problem Details: http://marc.info/?l=linux-acpi&m=128855015826728&w=2 https://bugzilla.kernel.org/show_bug.cgi?id=21722 Tested_by: Seblu <seblu@seblu.net> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index ba9afeaa23ac..25d3aaebc10d 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -100,24 +100,7 @@ static const struct file_operations acpi_ac_fops = { .release = single_release, }; #endif -static int get_ac_property(struct power_supply *psy, - ...
63abf3edaf42d0b9f278df90fe41c7ed4796b6b1
Analyze and fix the following issue in the Linux kernel code: drm/i915/sdvo: Only use the SDVO pin if it is in the valid range
Problem Details: BIOSes. Can't live without them (apparently), definitely can't live with them. Reported-by: Ben Gamari <bgamari@gmail.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=24312 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
```diff diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index d97e6cb52d34..27e63abf2a73 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -1908,9 +1908,12 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv, speed = mapping->i2c_s...
f8bbeabc34aa945ab4275abc9a4dfde0aea798ca
Analyze and fix the following issue in the Linux kernel code: xhci: Fix issue with port array setup and buggy hosts.
Problem Details: Fix two bugs with the port array setup. The first bug will only show up with broken xHCI hosts with Extended Capabilities registers that have duplicate port speed entries for the same port. The idea with the original code was to set the port_array entry to -1 if the duplicate port speed entry said th...
```diff diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 0fae58ef8afe..1d0f45f0e7a6 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -1680,6 +1680,7 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports, xhci->port_array[i] = (u8) -1;...
69abf61ea1005bc362b678639a4ae219e23829f3
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Properly set the return value in qla2xxx_eh_abort function.
Problem Details: A return value is not set for the successful case and it has a garbage value. This fix will set the default value to SUCCESS and in case of any failures it is changed. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by:...
```diff diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index b8731567aea5..2c0876c81a3f 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -829,7 +829,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) { scsi_qla_host_t *vha = shost_priv(cmd->device->host); srb_...
b8399dee478db7939cd0d6fda8ecacddf2facd03
Analyze and fix the following issue in the Linux kernel code: Btrfs: do not do fast caching if we are allocating blocks for tree_root
Problem Details: Since the fast caching uses normal tree locking, we can possibly deadlock if we get to the caching via a btrfs_search_slot() on the tree_root. So just check to see if the root we are on is the tree root, and just don't do the fast caching. Reported-by: Sage Weil <sage@newdream.net> Signed-off-by: Jos...
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 8c56f5b38948..cec05e100142 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -429,6 +429,7 @@ err: static int cache_block_group(struct btrfs_block_group_cache *cache, struct btrfs_trans_handle *trans, + struc...
2b20982e3154266106573beac2a4d4ba57a2789a
Analyze and fix the following issue in the Linux kernel code: Btrfs: deal with space cache errors better
Problem Details: Currently if the space cache inode generation number doesn't match the generation number in the space cache header we will just fail to load the space cache, but we won't mark the space cache as an error, so we'll keep getting that error each time somebody tries to cache that block group until we actua...
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index ddaf6340fe7f..8c56f5b38948 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2742,6 +2742,7 @@ static int cache_save_setup(struct btrfs_block_group_cache *block_group, struct btrfs_root *root = block_group->fs_info->tree_roo...
955256f2c3e25c94ad373c43fbc38d2ac8af2a71
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix use after free in O_DIRECT
Problem Details: This fixes a bug where we use dip after we have freed it. Instead just use the file_offset that was passed to the function. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0f34cae0a633..ae6c0d190bc1 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5934,8 +5934,7 @@ free_ordered: */ if (write) { struct btrfs_ordered_extent *ordered; - ordered = btrfs_lookup_ordered_extent(inode, - dip->logical_offse...
e55f87531c2c1eb071a296df7eb67f83d5f0b5df
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Issue FCP command without holding SCSI host_lock
Problem Details: Interrupting the connection to the FCP channel while I/O requests are being issued can lead to this deadlock. scsi_dispatch_cmd already holds the host_lock while the recovery trigger tries to acquire the host_lock again when iterating through the scsi_devices. INFO: lockdep is turned off. BUG: spinl...
```diff diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index f75707a8de2b..2eb7dd56ab80 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -2170,12 +2170,13 @@ int zfcp_fsf_fcp_cmnd(struct scsi_cmnd *scsi_cmnd) struct zfcp_adapter *adapter = zfcp_sdev->port->adap...
14718e3cd8e9c6937114cebbf3ce5d504328da8c
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Prevent usage w/o holding a reference
Problem Details: The ERP got values assigned for which no reference was taken. This can lead to an unpredictable race condition. Fix this by only assigning the values which are required and for which a reference was pulled or is held implicitly. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christo...
```diff diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 63422c13c7da..0bcd5806bd9a 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -190,6 +190,9 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status, atomic_set_mask(ZFCP_STATUS_CO...
6fbf25e86beef1c6719e760a241a7aef9ad145e3
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Correct false abort data assignment.
Problem Details: The request data assignment between the fsf abort initiator and its corresponding handler is not consistent and leads to an unpredictable behaviour, e.g. kernel panic. This patch fixes this issue and assigns the correct value. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof S...
```diff diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index aa0cd2322738..f75707a8de2b 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -851,7 +851,7 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_cmnd(struct scsi_cmnd *scmnd) zfcp_qdio_set_sbale_last(qdio, &req...
5bfb2c31487eaff3840e02548e6acf89a048765b
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Fix common FCP request reception
Problem Details: The reception of a common FCP request should only be evaluated if the corresponding SCSI request data is available. Therefore put the information under the lock protection and verify the existence before processing. This fixes the following kernel panic. Unable to handle kernel pointer dereference at...
```diff diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index be0317457147..aa0cd2322738 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -2069,8 +2069,6 @@ static void zfcp_fsf_fcp_cmnd_handler(struct zfcp_fsf_req *req) struct fcp_resp_with_ext *fcp_rsp; unsi...
b7613370db5ba66ad81e41cd3a5417fde4d5e03c
Analyze and fix the following issue in the Linux kernel code: ath: fix build break with ATH_DBG_WARN_ON_ONCE
Problem Details: Description by Hauke: "If CONFIG_ATH_DEBUG=y is set ATH_DBG_WARN_ON_ONCE uses WARN_ON_ONCE and returns something, but if CONFIG_ATH_DEBUG is not set it does not return anything. Now ATH_DBG_WARN_ON_ONCE is used in the boolean expression in an if case and is not returning anything and causes a compile ...
```diff diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index 3eb95e268f03..e43210c8585c 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h @@ -272,7 +272,10 @@ ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask, return 0; } #define ATH_DBG_WARN(foo...
b7ee1d01c5ff3bf2e51c8565ea00823cdbc2a9f3
Analyze and fix the following issue in the Linux kernel code: ath5k: Fix modinfo does not list alias -> pci-id lines
Problem Details: The AHB bus support patchset moved the table "Known PCI ids" from base.c to pci.c - unfortunately, MODULE_DEVICE_TABLE() was not transferred. With this fix 'modinfo ath5k' lists the alias -> pci-id lines, again. The issue was introduced by: commit e5b046d86fac609f636d127a38de94a175c7e83b "ath5k:...
```diff diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c index 39f033128c5a..7f8c5b0e9d2a 100644 --- a/drivers/net/wireless/ath/ath5k/pci.c +++ b/drivers/net/wireless/ath/ath5k/pci.c @@ -45,6 +45,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath5k_pci_id_table) = { { PCI_VDEVICE(ATHEROS,...
3bf9be40ff76b6df136f14a497167c116b2b3c53
Analyze and fix the following issue in the Linux kernel code: vhost: correctly set bits of dirty pages
Problem Details: Fix two bugs in dirty page logging: When counting pages we should increase address by 1 instead of VHOST_PAGE_SIZE. Make log_write() correctly process requests that cross pages with write_address not starting at page boundary. Reported-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsi...
```diff diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 916cdbc279e0..4c256d15c249 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -885,6 +885,7 @@ static int log_write(void __user *log_base, int r; if (!write_length) return 0; + write_length += write_address % VHOST_PAGE_SIZE;...
a290aec88a9c4747353ea7aa9b2569bd61297c3c
Analyze and fix the following issue in the Linux kernel code: vhost: fix typos in comment
Problem Details: Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
```diff diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index d10da280fa0f..14fc189ac0a8 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -452,7 +452,7 @@ static void handle_rx_mergeable(struct vhost_net *net) move_iovec_hdr(vq->iov, vq->hdr, vhost_hlen, in); else /* Copy the header for u...
3835bc00c5b2d8e337a6e9d7b44f47e02760dba3
Analyze and fix the following issue in the Linux kernel code: perf event: Prevent unbound event__name array access
Problem Details: event__name[] is missing an entry for PERF_RECORD_FINISHED_ROUND, but we happily access the array from the dump code. Make event__name[] static and provide an accessor function, fix up all callers and add the missing string. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ian Munsie <imunsie@au1.ibm...
```diff diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index e4cdc1ebe0fb..183aedd4db83 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -7,7 +7,7 @@ #include "strlist.h" #include "thread.h" -const char *event__name[] = { +static const char *event__name[] = { [0] = "TOTAL",...
8c0a6bfef165ccdbf5d73afb9dd660107b0c98d5
Analyze and fix the following issue in the Linux kernel code: drm/i915/ringbuffer: Handle wrapping of the autoreported HEAD
Problem Details: If the tail advances beyond the autoreport HEAD value, then we need to fallback to an uncached read of the HEAD register in order to ascertain the correct amount of remaining space in the ringbuffer. Reported-by: Fang, Xun <xunx.fang@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32...
```diff diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 89a65be8a3f3..31cd7e33e820 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -696,20 +696,17 @@ int intel_wait_ring_buffer(struct drm_device *dev, drm_i915_p...
a0968628097380be52db8b4664da98fc425546a5
Analyze and fix the following issue in the Linux kernel code: ASoC: WM8580: Fix R8 initial value
Problem Details: Acc to WM8580 manual, the default value for R8 is 0x10, not 0x1c. Signed-off-by: Seungwhan Youn <sw.youn@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
```diff diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 879dff2714dd..8725d4e75431 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@ -161,7 +161,7 @@ static const u16 wm8580_reg[] = { 0x0121, 0x017e, 0x007d, 0x0014, /*R3*/ 0x0121, 0x017e, 0x007d, 0x0194, /*R7*/ - 0x...
3f343f8512c7882a3637d9aea4ec6b3801cbcdc5
Analyze and fix the following issue in the Linux kernel code: ASoC: fix deemphasis control in wm8904/55/60 codecs
Problem Details: Deemphasis control's .get callback should update control's value instead of returning it - return value of callback function is used for indicating error or success of operation. Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown...
```diff diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index fca60a0b57b8..9001cc48ba13 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -818,7 +818,8 @@ static int wm8904_get_deemph(struct snd_kcontrol *kcontrol, struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); ...
3ee4fe15aba7531f75be4dcc331caa8f0c6369ec
Analyze and fix the following issue in the Linux kernel code: ASoC: tlv320dac33: Fix compillation error
Problem Details: Fix the compilation error introduced by patch: ASoC: tlv320dac33: Avoid multiple soft power up Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index cee0f9912408..b3445b362e96 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c @@ -646,6 +646,7 @@ static int dac33_add_widgets(struct snd_soc_codec *codec) static int dac33_set_bias_level(struct snd...
64db657b5a45f1676d421e2bdfb7d4910dce87d3
Analyze and fix the following issue in the Linux kernel code: regulator: tps6586x: Fix TPS6586X_DVM to store goreg/bit
Problem Details: Change-Id: Idacf5e1e51dbbbcd5ea93f310a4e907977e7359e Signed-off-by: Danny Huang <dahuang@nvidia.com> Signed-off-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (Split into separate patches) (Minor ...
```diff diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index 0e59e81fb87d..effa6770ead3 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -231,8 +231,7 @@ static int tps6586x_dvm_voltages[] = { }; #define TPS6586X_REGULA...
f3886f85cfde578f1d0ba6e40ac5f9d70043923b
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: don't apply 7xx HDP flush workaround on AGP
Problem Details: It should be required for all 7xx asics, but seems to cause problems on some AGP 7xx chips. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=19002 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Reported-and-Tested-by: Duncan <1i5t5.duncan@cox.net> Cc: stable@kernel.org Signed-off-by: Dave Airl...
```diff diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index a322d4f647bd..4d7a2e1bdb90 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -878,12 +878,15 @@ void r600_pcie_gart_tlb_flush(struct radeon_device *rdev) u32 tmp; /* flush hdp cache so updates ...
93430096f9d757104080f40f51afb2dada8877b5
Analyze and fix the following issue in the Linux kernel code: ALSA: ice1712 - working M-Audio Delta 66E support
Problem Details: Rev. E of the M-Audio Delta 66 is partially supported (commit ef2cd2ccad66b4aba518eca7514eface267ee0f3), but the layout of the GPIO pins was still unclear. This patch adds the GPIO definitions so that communication to the CS8247 & 2x AK4524 works correctly. ALSA bug#3327 has more details; users cap & ...
```diff diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c index 712c1710f9a2..7b62de089fee 100644 --- a/sound/pci/ice1712/delta.c +++ b/sound/pci/ice1712/delta.c @@ -96,6 +96,11 @@ static unsigned char ap_cs8427_codec_select(struct snd_ice1712 *ice) tmp |= ICE1712_DELTA_AP_CCLK | ICE1712_DELTA_AP_CS...
589a594be1fb8815b3f18e517be696c48664f728
Analyze and fix the following issue in the Linux kernel code: md: protect against NULL reference when waiting to start a raid10.
Problem Details: When we fail to start a raid10 for some reason, we call md_unregister_thread to kill the thread that was created. Unfortunately md_thread() will then make one call into the handler (raid10d) even though md_wakeup_thread has not been called. This is not safe and as md_unregister_thread is called after...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index b757da175180..e71c5fa527f5 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -6044,9 +6044,8 @@ static int md_thread(void * arg) || kthread_should_stop(), thread->timeout); - clear_bit(THREAD_WAKEUP, &thread->flags); - - thread->run(thread->...
1a855a0606653d2d82506281e2c686bacb4b2f45
Analyze and fix the following issue in the Linux kernel code: md: fix bug with re-adding of partially recovered device.
Problem Details: With v0.90 metadata, a hot-spare does not become a full member of the array until recovery is complete. So if we re-add such a device to the array, we know that all of it is as up-to-date as the event count would suggest, and so it a bitmap-based recovery is possible. However with v1.x metadata, the ...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index d66aaeddf95d..b757da175180 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5159,7 +5159,7 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info) PTR_ERR(rdev)); return PTR_ERR(rdev); } - /* set save_raid_disk if appropriate */ ...
a035fc3e2531703b539f23bec4ca7943cfc69349
Analyze and fix the following issue in the Linux kernel code: md: fix possible deadlock in handling flush requests.
Problem Details: As recorded in https://bugzilla.kernel.org/show_bug.cgi?id=24012 it is possible for a flush request through md to hang. This is due to an interaction between the recursion avoidance in generic_make_request, the insistence in md of only having one flush active at a time, and the possibility of dm ...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index 31f8e151d893..d66aaeddf95d 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -373,8 +373,9 @@ static void md_end_flush(struct bio *bio, int err) static void md_submit_flush_data(struct work_struct *ws); -static void submit_flushes(mddev_t *mddev) +st...
4e085e76cbe558b79b54cbab772f61185879bc64
Analyze and fix the following issue in the Linux kernel code: econet: Fix crash in aun_incoming().
Problem Details: Unconditional use of skb->dev won't work here, try to fetch the econet device via skb_dst()->dev instead. Suggested by Eric Dumazet. Reported-by: Nelson Elhage <nelhage@ksplice.com> Tested-by: Nelson Elhage <nelhage@ksplice.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index f180371fa415..15dcc1a586b4 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c @@ -851,9 +851,13 @@ static void aun_incoming(struct sk_buff *skb, struct aunhdr *ah, size_t len) { struct iphdr *ip = ip_hdr(skb); unsigned char st...
98b14d6b290d96b24ae993ceaccc59b2aa4b130c
Analyze and fix the following issue in the Linux kernel code: powerpc/powermac: Make auto-loading of therm_pm72 possible
Problem Details: The therm_pm72 driver, used on the PowerMac G5 range, cannot be auto-loaded, since the driver itself creates both the device node and the driver instance. Moving the device node creation to the platform setup code and adding the necessary MODULE_DEVICE_TABLE() information allows the driver to be autom...
```diff diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 9deb274841f1..d5aceb7fb125 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c @@ -506,6 +506,15 @@ static int __init pmac_declare_of_platform_devices(void) of_p...
bb2c458b8b8c8a53f65b78051d22a0f13d53abcb
Analyze and fix the following issue in the Linux kernel code: powerpc: Update compat_arch_ptrace
Problem Details: Update compat_arch_ptrace to follow recent changes in PTRACE_GET_DEBUGREG and the addition of PPC_PTRACE_{GETHWDBGINFO|{SET|DEL}HWDEBUG}. The latter three can be forwarded to arch_ptrace unchanged. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Benjamin Herrenschmidt <benh@kerne...
```diff diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c index 8a6daf4129f6..69c4be917d07 100644 --- a/arch/powerpc/kernel/ptrace32.c +++ b/arch/powerpc/kernel/ptrace32.c @@ -280,7 +280,11 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, /* We only support one ...
4dfbf290aeb9d63a058d9d8237203b0b72bfbbe3
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix PPC_PTRACE_SETHWDEBUG on PPC_BOOK3S
Problem Details: Properly set the DABR_TRANSLATION/DABR_DATA_READ/DABR_DATA_READ bits in the dabr when setting the debug register via PPC_PTRACE_SETHWDEBUG. Also don't reject trigger type of PPC_BREAKPOINT_TRIGGER_READ. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Benjamin Herrenschmidt <benh@...
```diff diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index a9b32967cff6..906536998291 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c @@ -1316,6 +1316,10 @@ static int set_dac_range(struct task_struct *child, static long ppc_set_hwdebug(struct task_struct *child...
bee376ff4c1fc178031dad51ba38ff18a98a39c8
Analyze and fix the following issue in the Linux kernel code: powerpc: Minor cleanups for machdep.h
Problem Details: Remove stale declaration of setup_pci_ptrs, aparently from ppc before 2.4.0 Remove #ifdef around struct existance delcaration Fix spelling of "linear" Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@ker...
```diff diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index d045b0145537..8433d36619a1 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h @@ -27,9 +27,7 @@ struct iommu_table; struct rtc_time; struct file; struct pci_controller; -#ifdef CON...
928a31978115b48ad634a97755915e8ab23c4749
Analyze and fix the following issue in the Linux kernel code: Powerpc: separate CONFIG_RELOCATABLE from CONFIG_CRASHDUMP in boot code
Problem Details: Fix head_64.S so that we can build a relocatable kernel that isn't necessarily a crash-dump kernel Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index ce41b97eb512..782f23df7c85 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S @@ -97,7 +97,7 @@ __secondary_hold_acknowledge: .llong hvReleaseData-KERNELBASE #endif /* CONFIG_PPC_ISERIES */ -#ifdef ...
8f4da26e9bf89f54b68d5cc3f3596f45e5f43911
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix incorrect comment about interrupt stack allocation
Problem Details: We now allow interrupt stacks anywhere in the first segment which can be 256M or 1TB. Fix the comment. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index ce6f61c6f871..5a0401fcaebd 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -437,8 +437,8 @@ static void __init irqstack_early_init(void) unsigned int i; /* - * interrupt stacks must be u...
7182afea8d1afd432a17c18162cc3fd441d0da93
Analyze and fix the following issue in the Linux kernel code: IB/uverbs: Handle large number of entries in poll CQ
Problem Details: In ib_uverbs_poll_cq() code there is a potential integer overflow if userspace passes in a large cmd.ne. The calls to kmalloc() would allocate smaller buffers than intended, leading to memory corruption. There iss also an information leak if resp wasn't all used. Unprivileged userspace may call this f...
```diff diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index b342248aec05..c42699285f8e 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -893,68 +893,81 @@ out: return ret ? ret : in_len; } +static int copy_wc_to_user(void __u...
be3e5b32462790b91c14d5869fbabaf5bfe7c901
Analyze and fix the following issue in the Linux kernel code: staging/zram: Fix sparse warning 'Using plain integer as NULL pointer'
Problem Details: This patch fixes the warning generated by sparse: "Using plain integer as NULL pointer" by replacing the offending 0s with NULL. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/zram/xvmalloc.c b/drivers/staging/zram/xvmalloc.c index 3fdbb8ada827..b64406739d05 100644 --- a/drivers/staging/zram/xvmalloc.c +++ b/drivers/staging/zram/xvmalloc.c @@ -187,7 +187,7 @@ static void insert_block(struct xv_pool *pool, struct page *page, u32 offset, slindex = get_ind...
597a1e7cccc9a5a0c47629267ac4b23bf8654578
Analyze and fix the following issue in the Linux kernel code: staging/line6: Fix sparse warning 'Using plain integer as NULL pointer'
Problem Details: This patch fixes the warning generated by sparse: "Using plain integer as NULL pointer" by replacing the offending 0s with NULL. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c index 1e3bb1406331..9647154a4923 100644 --- a/drivers/staging/line6/capture.c +++ b/drivers/staging/line6/capture.c @@ -147,7 +147,7 @@ void line6_capture_copy(struct snd_line6_pcm *line6pcm, char *fbuf, int fsize) const int bytes_...
fb657461abf6842b8f7603370ff349f42814ac5b
Analyze and fix the following issue in the Linux kernel code: staging: brcm80211: fix documentation on installing firmware
Problem Details: Fix the documentation to have the current firmware filenames and use the correct path. Signed-off-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/brcm80211/README b/drivers/staging/brcm80211/README index a27bb0b4f581..99e67669f26b 100644 --- a/drivers/staging/brcm80211/README +++ b/drivers/staging/brcm80211/README @@ -43,14 +43,8 @@ Firmware is available from the Linux firmware repository at: http://git.kernel.org/?p=linux/...
1226056d9608d241db4b558a0d88a347ad5c66ae
Analyze and fix the following issue in the Linux kernel code: Staging: rt3090: Fix RT3090 scan AP function
Problem Details: Fix RT3090 scan AP function. This patch fixes the rt3090 wireless module failed to scan AP around due to Windows driver causing rt3090 module unable to scan AP in Linux. Acked-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Chen, Chien-Chia <machen@novell.com> Cc: stable <stable@kernel.org> Signed...
```diff diff --git a/drivers/staging/rt2860/chips/rt3090.c b/drivers/staging/rt2860/chips/rt3090.c index 156eb36e56f2..334720ee1345 100644 --- a/drivers/staging/rt2860/chips/rt3090.c +++ b/drivers/staging/rt2860/chips/rt3090.c @@ -52,7 +52,8 @@ void NICInitRT3090RFRegisters(struct rt_rtmp_adapter *pAd) if (IS_RT3090(...
82a52043c7801f83c7387deb45bf9323af04644b
Analyze and fix the following issue in the Linux kernel code: b43: fix split of N-PHY devices into supported and not (based on PHY rev)
Problem Details: Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 670fd7b782e2..4d97aac38df0 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -4054,7 +4054,7 @@ static int b43_phy_versioning(struct b43_wldev *dev) break; #ifdef CONFIG_B43_NPHY case B...