id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
7edc3453e54432a9f1c636b6481f1107c9db19bd
Analyze and fix the following issue in the Linux kernel code: ifb: fix a lockdep splat
Problem Details: After recent ifb changes, we must use lockless __skb_dequeue() since lock is not anymore initialized. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Jamal Hadi Salim <hadi@cyberus.ca> Cc: Changli Gao <xiaosuo@gmail.com> Acked-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: David S. Miller...
```diff diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index bfa03db66691..8bcacd7c7715 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c @@ -71,7 +71,7 @@ static void ri_tasklet(unsigned long dev) } } - while ((skb = skb_dequeue(&dp->tq)) != NULL) { + while ((skb = __skb_dequeue(&dp->tq)) != NULL) { ...
7d743b7e952261f4d9ee091100b6403f3ce8a2af
Analyze and fix the following issue in the Linux kernel code: sctp: fix the return value of getting the sctp partial delivery point
Problem Details: Get the sctp partial delivery point using SCTP_PARTIAL_DELIVERY_POINT socket option should return 0 if success, not -ENOTSUPP. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 0b9ee34ad35c..fff0926b1111 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -5053,7 +5053,7 @@ static int sctp_getsockopt_partial_delivery_point(struct sock *sk, int len, if (copy_to_user(optval, &val, len)) return -EFAULT; - return -ENOTS...
0d0b16727f24f8258eeb33818347ca0f4557f982
Analyze and fix the following issue in the Linux kernel code: net: Fix drivers advertising HW_CSUM feature to use csum_start
Problem Details: Some drivers are using skb_transport_offset(skb) instead of skb->csum_start for NETIF_F_HW_CSUM offload. This does not matter now, but if someone implements checksumming of encapsulated packets then this will break silently. TSO output paths are left as they are, since they are for IP+TCP only (might...
```diff diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c index 09b099bfab2b..e48ea956c51f 100644 --- a/drivers/net/atl1c/atl1c_main.c +++ b/drivers/net/atl1c/atl1c_main.c @@ -2078,7 +2078,7 @@ static int atl1c_tso_csum(struct atl1c_adapter *adapter, check_sum: if (likely(skb->ip_summed ==...
0b7967503dc97864f283a3a06fbe23e041876138
Analyze and fix the following issue in the Linux kernel code: net/veth: Fix packet checksumming
Problem Details: We can't change ip_summed from CHECKSUM_PARTIAL to CHECKSUM_NONE or CHECKSUM_UNNECESSARY because checksum in packet's headers is not valid and will cause invalid checksum when frame is forwarded. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.n...
```diff diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 0bbc0c323135..cc83fa71c3ff 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -166,7 +166,9 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) if (!(rcv->flags & IFF_UP)) goto tx_drop; - if (dev->features & NETI...
76d661586c8131453ba75a2e027c1f21511a893a
Analyze and fix the following issue in the Linux kernel code: bridge: fix IPv6 queries for bridge multicast snooping
Problem Details: This patch fixes a missing ntohs() for bridge IPv6 multicast snooping. Signed-off-by: David L Stevens <dlstevens@us.ibm.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index eb5b256ffc88..f19e347f56f6 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -437,7 +437,7 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br, ip6h = ipv6_hdr(skb); *(__force __be32 *...
fcbdf09d9652c8919dcf47072e3ae7dcb4eb98ac
Analyze and fix the following issue in the Linux kernel code: net: fix nulls list corruptions in sk_prot_alloc
Problem Details: Special care is taken inside sk_port_alloc to avoid overwriting skc_node/skc_nulls_node. We should also avoid overwriting skc_bind_node/skc_portaddr_node. The patch fixes the following crash: BUG: unable to handle kernel paging request at fffffffffffffff0 IP: [<ffffffff812ec6dd>] udp4_lib_lookup2+0...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index 659d968d95c5..7d3f7ce239b5 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -754,6 +754,7 @@ struct proto { void (*unhash)(struct sock *sk); void (*rehash)(struct sock *sk); int (*get_port)(struct sock *sk, unsigned short snum); +...
bc2ce894e113ed95b92541134b002fdc641e8080
Analyze and fix the following issue in the Linux kernel code: tcp: relax tcp_paws_check()
Problem Details: Some windows versions have wrong RFC1323 implementations, with SYN and SYNACKS messages containing zero tcp timestamps. We relaxed in commit fc1ad92dfc4e363 the passive connection case (Windows connects to a linux machine), but the reverse case (linux connects to a Windows machine) has an analogue pro...
```diff diff --git a/include/net/tcp.h b/include/net/tcp.h index 3f227baee4be..2ab6c9c1c53a 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1038,7 +1038,13 @@ static inline int tcp_paws_check(const struct tcp_options_received *rx_opt, return 1; if (unlikely(get_seconds() >= rx_opt->ts_recent_stamp + TCP...
49c2fa08a77a7eefa4cbc73601f64984aceacfa7
Analyze and fix the following issue in the Linux kernel code: PCI: Update MCP55 quirk to not affect non HyperTransport variants
Problem Details: I wrote this quirk awhile ago to properly setup MCP55 chips on hypertransport busses so that interrupts reached whatever cpu happend to boot the kdump kernel. while that works well, it was recently shown to me that a a non-hypertransport variant of the MCP55 exists, and on those system the register tha...
```diff diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 6f9350cabbd5..313c0bda0a8d 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2329,6 +2329,9 @@ static void __devinit nvbridge_check_legacy_irq_routing(struct pci_dev *dev) { u32 cfg; + if (!pci_find_capability(dev, PCI_CAP_ID_HT)...
1121584f5db8a99a7ad94c6c5d62431b3187ad98
Analyze and fix the following issue in the Linux kernel code: modpost: Put .zdebug* section on white list
Problem Details: "as --compress-debug-sections" will generate compressed debug sections with section names ".zdebug*". This patch puts .zdebug* section on white list. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 33122ca04e7c..194e2c453609 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -790,6 +790,7 @@ static const char *section_white_list[] = { ".comment*", ".debug*", + ".zdebug*", /* Compressed debug sections. */ ".GCC-command-...
225db7d35c33f076115a583abec238a696f4467e
Analyze and fix the following issue in the Linux kernel code: ext4: Fix up comments in inode.c
Problem Details: This fixes up some broken argument descriptions that Namhyung Kim had originally submitted for ext3. This fixes the comments that were still applicable in ext4. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index e659597b690b..db3cc913ee8f 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -552,7 +552,7 @@ static ext4_fsblk_t ext4_find_goal(struct inode *inode, ext4_lblk_t block, } /** - * ext4_blks_to_allocate: Look up the block map and count the number + * ex...
0247a7bcd4273fa10c4aba9b3f567c659bab2d2b
Analyze and fix the following issue in the Linux kernel code: USB: ehci-mxc: Setup portsc register prior to accessing OTG viewport
Problem Details: In order to read/write to the i.MX OTG viewport register it is necessary to setup the PORTSCx register first. By default i.MX OTG port is configured for USB serial PHY. In order to use a ULPI PHY the PORTSCx register needs to be configured properly. commit 724c852 (USB: ehci/mxc: compile fix) placed ...
```diff diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index f6e5d44c06b6..535dcae7949f 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c @@ -36,14 +36,8 @@ struct ehci_mxc_priv { static int ehci_mxc_setup(struct usb_hcd *hcd) { struct ehci_hcd *ehci = hcd_to_ehci(hc...
2c8245c4990e75d86ab30bb0af9bb90cbe04985d
Analyze and fix the following issue in the Linux kernel code: USB: atmel_usba_udc: fix freeing irq in usba_udc_remove()
Problem Details: Add a free_irq() call on vbus gpio when we remove udc so that the vbus irq is properly released. Signed-off-by: Rob Emanuele <rje@crystalfontz.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Greg Kroah-Hartma...
```diff diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 717ff653fa23..e7c65a4408fb 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -2057,8 +2057,10 @@ static int __exit usba_udc_remove(struct platform_device *pdev) usba_ep_cle...
6ef9fc657bd69c708ada2ee9fd3b2e13f7600a3d
Analyze and fix the following issue in the Linux kernel code: usb: ehci-omap: fix tll channel enable mask
Problem Details: The TLL channel enable code searches for the wrong mask, and could end up enabling the wrong port. Fix this. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 0374eb47f09b..680f2ef4e59f 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -90,9 +90,9 @@ #define OMAP_TLL_ULPI_SCRATCH_REGISTER(num) (0x816 + 0x100 * num) #define OMAP_TLL_CHANNEL_COUNT 3 -#de...
a0c9e95dfc6898dbc178d7b962916f3823434e6e
Analyze and fix the following issue in the Linux kernel code: usb: ohci-omap3: fix trivial typo
Problem Details: This is the ohci-omap3 driver, not ehci-omap. Correct this obvious typo. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/ohci-omap3.c b/drivers/usb/host/ohci-omap3.c index 2cc8a504b18c..a37d5993e4e3 100644 --- a/drivers/usb/host/ohci-omap3.c +++ b/drivers/usb/host/ohci-omap3.c @@ -648,7 +648,7 @@ static int __devinit ohci_hcd_omap3_probe(struct platform_device *pdev) ret = omap3_start_ohci(omap, ...
7c25a82684364da44643cbe3bdbd0f8835293767
Analyze and fix the following issue in the Linux kernel code: USB: gadget: ci13xxx: fix complete() callback for no_interrupt rq's
Problem Details: CI13xxx UDC driver doesn't call complete() callback for requests with flag no_interrupt set. Thus gadget drivers (like g_ether) are never notifed about successfully (or not) transmitted requests. As a result in case of g_ether and queued request with no_interrupt=1 fields g_ether is never notifed about...
```diff diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c index f20e861deebf..0060eef0e923 100644 --- a/drivers/usb/gadget/ci13xxx_udc.c +++ b/drivers/usb/gadget/ci13xxx_udc.c @@ -1551,7 +1551,7 @@ __acquires(mEp->lock) list_del_init(&mReq->queue); mReq->req.status = -ESHUTDOWN; -...
d9bb9c1820cb2a7aeb5e42a5470cf208002d9aa8
Analyze and fix the following issue in the Linux kernel code: USB: gadget: update ci13xxx to work with g_ether
Problem Details: There is one nasty scenario when CI13xxx driver fails: a) two or more rx requests are queued (g_ether does that) b) rx request completed, interrupt fires and ci13xxx dequeues rq c) request complete() callback gets called and in turn it calls ep_queue() c1) in ep_queu...
```diff diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c index 03505cbae873..f20e861deebf 100644 --- a/drivers/usb/gadget/ci13xxx_udc.c +++ b/drivers/usb/gadget/ci13xxx_udc.c @@ -1794,18 +1794,20 @@ __acquires(mEp->lock) dbg_done(_usb_addr(mEp), mReq->ptr->token, retval); + if (!li...
6549e8b7f34b456d5689b98c2c0cf38c98414e47
Analyze and fix the following issue in the Linux kernel code: USB: gadgets: ci13xxx: fix probing of compiled-in gadget drivers
Problem Details: Built-in gadget drivers have NULL-ifed unbind() function. Checking whether unbind() is NULL will never let any compiled into kernel driver attach. Signed-off-by: Artem Leonenko <tikkeri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c index f200e472e476..03505cbae873 100644 --- a/drivers/usb/gadget/ci13xxx_udc.c +++ b/drivers/usb/gadget/ci13xxx_udc.c @@ -2393,7 +2393,6 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver, if (driver ==...
caafa84251b886feb6cdf23d50e2cc99dcdaaaf3
Analyze and fix the following issue in the Linux kernel code: bonding: add the debugfs interface to see RLB hash table
Problem Details: This patch provices the debugfs interface to see RLB hash table like the following: # cat /sys/kernel/debug/bonding/bond0/rlb_hash_table SourceIP DestinationIP Destination MAC DEV 10.124.196.205 10.124.196.205 ff:ff:ff:ff:ff:ff eth4 10.124.196.205 10.124.196.81 00:19:99:XX:XX:XX eth3 1...
```diff diff --git a/drivers/net/bonding/bond_debugfs.c b/drivers/net/bonding/bond_debugfs.c index ae1eb2fc3a47..3680aa251dea 100644 --- a/drivers/net/bonding/bond_debugfs.c +++ b/drivers/net/bonding/bond_debugfs.c @@ -4,6 +4,7 @@ #include <linux/netdevice.h> #include "bonding.h" +#include "bond_alb.h" #ifdef CO...
7d5e77aafa39f3210b6273a44fe07508e837c3cb
Analyze and fix the following issue in the Linux kernel code: cxgb4: distinguish between 1-lane KR/KX and 4-lane KR/KX/KX4 ports
Problem Details: And fix the supported flags ethtool reports for the two cases. Signed-off-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index 3012a8aeff45..3f33d515f62e 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c @@ -1375,7 +1375,12 @@ static unsigned int from_fw_linkcaps(unsigned int type, unsigned int caps) } else if (type == FW...
5928c8baf67a36f553fe23a1b7820c7745e8bb2e
Analyze and fix the following issue in the Linux kernel code: bnx2x: replace FW to 6.2.5
Problem Details: Includes FCoE releated fixes in FW flows Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2x/bnx2x_hsi.h b/drivers/net/bnx2x/bnx2x_hsi.h index ed90ec831fe0..6238d4f63989 100644 --- a/drivers/net/bnx2x/bnx2x_hsi.h +++ b/drivers/net/bnx2x/bnx2x_hsi.h @@ -1832,8 +1832,8 @@ struct host_func_stats { #define BCM_5710_FW_MAJOR_VERSION 6 -#define BCM_5710_FW_MINOR_VERSION ...
6ce5b1ce5f6922db32599e73bcb22f5cdcbf241f
Analyze and fix the following issue in the Linux kernel code: tty: fix typos/errors in tty_driver.h comments
Problem Details: Fix various typos and other errors in comments of tty_driver.h. The most significant is the wrong name of a function for the description of TTY_DRIVER_DYNAMIC_DEV. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 09678ed370f8..c3d43eb4150c 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -102,7 +102,7 @@ * unsigned int cmd, unsigned long arg); * * This routine allows the tty driver to implement - * device-sp...
1c5189976ffc130416e808f41049c12615a6380c
Analyze and fix the following issue in the Linux kernel code: pch_uart : fix warnings for 64bit compile
Problem Details: Fix the following warnings drivers/serial/pch_uart.c: In function ‘dma_handle_rx’: drivers/serial/pch_uart.c:685:24: warning: cast from pointer to integer of different size drivers/serial/pch_uart.c: In function ‘dma_handle_tx’: drivers/serial/pch_uart.c:778:23: warning: cast from pointer to integer of...
```diff diff --git a/drivers/serial/pch_uart.c b/drivers/serial/pch_uart.c index b94d1fa76973..70a61458ec42 100644 --- a/drivers/serial/pch_uart.c +++ b/drivers/serial/pch_uart.c @@ -682,7 +682,8 @@ static int dma_handle_rx(struct eg20t_port *priv) sg_dma_len(sg) = priv->fifo_size; sg_set_page(&priv->sg_rx, virt_...
be7a7411d63ccad165d66fe8e0b11b2ee336159b
Analyze and fix the following issue in the Linux kernel code: n_gsm: Fix message length handling when building header
Problem Details: Fix message length handling when building header When the message length is greater than 127, the length field in the header is built incorrectly. According to the spec, when the length is less than 128 the length field is a single byte formatted as: bbbbbbb1. When it is greater than 127 then the fiel...
```diff diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 81b46585edf7..2fc5cf27152a 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -716,8 +716,8 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg) if (msg->len < 128) *--dp = (msg->len << 1) | EA; else { - *...
f88a4a9b65a6f3422b81be995535d0e69df11bb8
Analyze and fix the following issue in the Linux kernel code: bonding/vlan: Fix mangled NAs on slaves without VLAN tag insertion
Problem Details: bond_na_send() attempts to insert a VLAN tag in between building and sending packets of the respective formats. If the slave does not implement hardware VLAN tag insertion then vlan_put_tag() will mangle the network-layer header because the Ethernet header is not present at this point (unlike in bond_...
```diff diff --git a/drivers/net/bonding/bond_ipv6.c b/drivers/net/bonding/bond_ipv6.c index 121b073a6c3f..84fbd4ebd778 100644 --- a/drivers/net/bonding/bond_ipv6.c +++ b/drivers/net/bonding/bond_ipv6.c @@ -88,7 +88,12 @@ static void bond_na_send(struct net_device *slave_dev, } if (vlan_id) { - skb = vlan_put_ta...
45241e50e3e741ee2a148693888b48e90e806de9
Analyze and fix the following issue in the Linux kernel code: Staging: hv: Use only one txf buffer per channel and kmalloc/GFP_KERNEL on initialize
Problem Details: Correct issue with not checking kmalloc return value. This fix now only uses one receive buffer for all hv_utils channels, and will do only one kmalloc on init and will return with a -ENOMEM if kmalloc fails on initialize. And properly clean up memory on failure. Thanks to Evgeniy Polyakov <zbr@iorem...
```diff diff --git a/drivers/staging/hv/hv_utils.c b/drivers/staging/hv/hv_utils.c index 53e1e290b0f1..0074581f20e8 100644 --- a/drivers/staging/hv/hv_utils.c +++ b/drivers/staging/hv/hv_utils.c @@ -38,12 +38,14 @@ #include "vmbus_api.h" #include "utils.h" +static u8 *shut_txf_buf; +static u8 *time_txf_buf; +static...
bf6506f60c46c8a709df534408cc6d470df657ff
Analyze and fix the following issue in the Linux kernel code: staging: hv: convert vmbus_on_msg_dpc to not call osd_schedule_callback
Problem Details: The additional abstraction is unneeded. This also fixes a sleeping while atomic issue as osd_schedule_callback can sleep which is not allowed for vmbus_on_msg_dpc running in a tasklet. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16701 Reviewed-By: Hank Janssen <hjanssen@microsoft.com> Cc: H...
```diff diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c index 0f4d6093f674..6f393e7d8e25 100644 --- a/drivers/staging/hv/channel_mgmt.c +++ b/drivers/staging/hv/channel_mgmt.c @@ -753,7 +753,6 @@ void vmbus_onmessage(void *context) hdr->msgtype, size); print_hex_dump_bytes("...
af3e5bd5f650163c2e12297f572910a1af1b8236
Analyze and fix the following issue in the Linux kernel code: bonding: Fix slave selection bug.
Problem Details: The returned slave is incorrect, if the net device under check is not charged yet by the master. Signed-off-by: Hillf Danton <dhillf@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index c2f081352a03..4feeb2d650a4 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -269,11 +269,11 @@ static inline struct slave *bond_get_slave_by_dev(struct bonding *bond, struct n bond_for_each_slav...
12b9d5bf76bfa20d3207ef24fca9c8254a586a58
Analyze and fix the following issue in the Linux kernel code: Staging: IIO: DDS: AD9833 / AD9834 driver
Problem Details: Changes since RFC/v1: IIO: Apply list review feedback Apply list review feedback: Rename attributes to fit IIO convention used in other drivers. Fix typos. Provide ddsX_out_enable as opposed to ddsX_out_disable. Use proper __devexit marking. Use strict_strtoul() to avoid negatives. Changes since...
```diff diff --git a/drivers/staging/iio/dds/Kconfig b/drivers/staging/iio/dds/Kconfig index 7969be29b0eb..a047da62daf0 100644 --- a/drivers/staging/iio/dds/Kconfig +++ b/drivers/staging/iio/dds/Kconfig @@ -17,6 +17,16 @@ config AD9832 Say yes here to build support for Analog Devices DDS chip ad9832 and ad9835,...
4851d97d87c8dfa8c97037965690cdefe99a767d
Analyze and fix the following issue in the Linux kernel code: Staging: IIO: dds.h convenience macros
Problem Details: Changes since RFC/v1: IIO: Apply list review feedback Apply list review feedback: Rename attributes to fit IIO convention used in other drivers. Provide ddsX_out_enable as opposed to ddsX_out_disable. Fix typos. Changes since v2: IIO: dds.h: Apply more list review feedback Fix mixture of X and [...
```diff diff --git a/drivers/staging/iio/dds/dds.h b/drivers/staging/iio/dds/dds.h new file mode 100644 index 000000000000..d8ac3a93baf6 --- /dev/null +++ b/drivers/staging/iio/dds/dds.h @@ -0,0 +1,110 @@ +/* + * dds.h - sysfs attributes associated with DDS devices + * + * Copyright (c) 2010 Analog Devices Inc. + * + *...
f8ce33bbd57a0c9c302ebb273fd963c5efb1a264
Analyze and fix the following issue in the Linux kernel code: Staging: IIO: Direct digital synthesis abi documentation
Problem Details: Changes since RFC/v1: IIO: Apply list review feedback: Apply list review feedback: Restructure documentation according to list feedback. Rename attributes to fit IIO convention used in other drivers. Fix typos. Provide ddsX_out_enable as opposed to ddsX_out_disable Changes since v2: IIO: sysfs-bu...
```diff diff --git a/drivers/staging/iio/Documentation/sysfs-bus-iio-dds b/drivers/staging/iio/Documentation/sysfs-bus-iio-dds new file mode 100644 index 000000000000..ffdd5478a35d --- /dev/null +++ b/drivers/staging/iio/Documentation/sysfs-bus-iio-dds @@ -0,0 +1,93 @@ + +What: /sys/bus/iio/devices/.../ddsX_freqY +Ker...
f15a4bb2637253680f09f0161d51e22446b6478f
Analyze and fix the following issue in the Linux kernel code: ath5k: Fix survey
Problem Details: The old survey implementation was broken and returned nonsense data. Clear cycle counters and survey data on reset. Since the cycle counters easily overflow it's better to keep a local version of collected survey data (in ms resolution, instead of clockrate) and update this every time survey is retrie...
```diff diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 4e3b97c3d7c2..b3c7241a62a5 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -2654,6 +2654,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, ...
4aea248dd7a67097d683a97f94a0aeaf0d248f3f
Analyze and fix the following issue in the Linux kernel code: rtl8192ce: Fix build on powerpc
Problem Details: After merge of the rtl8192ce driver, a powerpc build fails with: drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c: In function 'rtl92c_init_sw_vars': drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c:76: error: implicit declaration of function 'vmalloc' drivers/net/wireless/rtlwifi/rtl8192ce/rt...
```diff diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c index 3cdca006be2a..4c76ad6401be 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192c-sw.c @@ -27,6 +27,8 @@ * *********...
931299cf87701962ea1811dc216f48f3f7a4ebc8
Analyze and fix the following issue in the Linux kernel code: ath: fix NULL pointer dereference on reg_notifier()
Problem Details: The reg_notifier() was recently updated as being capable of having the request passed as NULL, fix ath to follow this API change. Without this we end up oopsing: BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 IP: [<ffffffffa02fb8cb>] ath_reg_notifier_apply+0x5b/0xa0 [ath] PG...
```diff diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c index 3f4244f56ce5..2b14775e6bc6 100644 --- a/drivers/net/wireless/ath/regd.c +++ b/drivers/net/wireless/ath/regd.c @@ -342,6 +342,14 @@ int ath_reg_notifier_apply(struct wiphy *wiphy, /* We always apply this */ ath_reg_apply_rad...
2784fe915cd25adf23ea28534019308d8a144721
Analyze and fix the following issue in the Linux kernel code: cfg80211: fix null pointer dereference with a custom regulatory request
Problem Details: Once we moved the core regulatory request to the queue and let the scheduler process it last_request will have been left NULL until the schedular decides to process the first request. When this happens and we are loading a driver with a custom regulatory request like all Atheros drivers we end up with ...
```diff diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 3d1c09b777e8..6dc665a727c2 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1419,7 +1419,9 @@ struct ieee80211_txrx_stypes { /** * struct wiphy - wireless hardware description - * @reg_notifier: the driver's regulatory n...
c9c62f4e2c9b526c5cbade3f3a61f126e6587c16
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: Fix checkpatch.pl issues in file s526.c
Problem Details: This patch fixes the following issues in s526.c: WARNING: printk() should include KERN_ facility level WARNING: line over 80 characters ERROR: do not use C99 // comments WARNING: space prohibited between function name and open parenthesis '(' WARNING: braces {} are not necessary for any arm of this st...
```diff diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c index 3607aaee4af6..2b34daedc3d7 100644 --- a/drivers/staging/comedi/drivers/s526.c +++ b/drivers/staging/comedi/drivers/s526.c @@ -114,7 +114,7 @@ static const int s526_ports[] = { }; struct counter_mode_register_t {...
3555a4c35e59c0217983f5df0cfe39a9fa65c2df
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: Fix coding style issues in ii_pci20kc.c
Problem Details: This patch fixes the following issues in file ii_pci20kc.c: WARNING: please, no space before tabs WARNING: unnecessary whitespace before a quoted newline WARNING: line over 80 characters 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/ii_pci20kc.c b/drivers/staging/comedi/drivers/ii_pci20kc.c index 39a6a850d63c..e4711ef54719 100644 --- a/drivers/staging/comedi/drivers/ii_pci20kc.c +++ b/drivers/staging/comedi/drivers/ii_pci20kc.c @@ -19,7 +19,7 @@ * - 16 bit * * only ONE PCI-20341 module p...
91cda632ebc6ea84fd7a45efb6d4452c34985731
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Fix kernel panic when use ioctl.
Problem Details: During ioctl testing was observed kernel panic beuase file->private_data pointer was not correctly set when debugfs file was created. Add correct pointer setup. 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_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c index e39809229d46..149ba59f96bf 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c @@ -174,7 +174,7 @@ int ft1000_create_dev(struct ...
0ce72ea3b2f29e5755b095a5b217b9bab8386a03
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Fix camelcase variable names.
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_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c index e4905ad2badc..17546d8ec08d 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c @@ -772,26 +772,26 @@ static u32 writ...
c346541f3d8c6e90b6aadc0511c27a6de15fdee5
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Rename ft1000_chdev.c to ft1000_debug.c.
Problem Details: Name of old file was misleading because it is currently updated to debugfs so change also file name. 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/Makefile b/drivers/staging/ft1000/ft1000-usb/Makefile index dd87ecd7918e..f0f524015888 100644 --- a/drivers/staging/ft1000/ft1000-usb/Makefile +++ b/drivers/staging/ft1000/ft1000-usb/Makefile @@ -1,3 +1,3 @@ obj-$(CONFIG_FT1000_USB) += ft1000.o -ft1000-y := ft10...
dab56ffe9acc59a6cbe8f857a95adf75f42970b9
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Fix camelcase function names.
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 0f271c281b85..b87542abbe86 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c @@ -201,7 +201,7 @@ static struct notifier_block ft10...
3be305fd7c0d07cdbb175467b4fe706ea10eb732
Analyze and fix the following issue in the Linux kernel code: Staging: rt2860: include KERN_* in printk
Problem Details: Fix checkpatch complains. Signed-off-by: L. Alberto Giménez <agimenez@sysvalve.es> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rt2860/common/ee_efuse.c b/drivers/staging/rt2860/common/ee_efuse.c index 03412f5bc990..fed0ba452271 100644 --- a/drivers/staging/rt2860/common/ee_efuse.c +++ b/drivers/staging/rt2860/common/ee_efuse.c @@ -264,7 +264,7 @@ int set_eFuseGetFreeBlockCount_Proc(struct rt_rtmp_adapter *p...
82b89152f00f7ad17844d5614d5011e8d7944ac9
Analyze and fix the following issue in the Linux kernel code: MIPS: LD/SD o32 macro GAS fix update
Problem Details: I am about to commit: http://sourceware.org/ml/binutils/2010-10/msg00033.html that fixes a problem with the LD/SD macro currently implemented by GAS for the o32 ABI in an inconsistent way. This is best illustrated with a simple program, which I'm copying here from the message above for easier refere...
```diff diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index c98bf514ec7d..5b017f23e243 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -329,10 +329,14 @@ static inline void pfx##write##bwlq(type val, \ "dsrl32 %L0, %L0, 0" "\n\t" \ "dsll32 %M0, %M0, 0" "...
cf745a39dcb10ef80c4a2ff38448f57b69d4c4eb
Analyze and fix the following issue in the Linux kernel code: MIPS: Alchemy: fix build with SERIAL_8250=n
Problem Details: In commit 7d172bfe ("Alchemy: Add UART PM methods") I introduced platform PM methods which call a function of the 8250 driver; this patch works around link failures when the kernel is built without 8250 support. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> To: Linux-MIPS <linux-mips@linux...
```diff diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index 3691630931d6..9e7814db3d03 100644 --- a/arch/mips/alchemy/common/platform.c +++ b/arch/mips/alchemy/common/platform.c @@ -27,6 +27,7 @@ static void alchemy_8250_pm(struct uart_port *port, unsigned int state, un...
a3aad4aaf871045ab1dd9c99be6c1ace881d8eb0
Analyze and fix the following issue in the Linux kernel code: MIPS: Rename mips_dma_cache_sync back to dma_cache_sync
Problem Details: This fixes IP22 and IP28 build errors. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 4fc1a0fbe007..21ea14efb837 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c @@ -288,7 +288,7 @@ int mips_dma_supported(struct device *dev, u64 mask) return plat_dma_supported(dev, mask); } -void mips_dma_cach...
d002aaadf84c081623a0a8502c122d1492fbd47c
Analyze and fix the following issue in the Linux kernel code: MIPS: MT: Fix typo in comment.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index 43e7cdc5ded2..c0e81418ba21 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c @@ -153,7 +153,7 @@ static void __cpuinit vsmp_init_secondary(void) { extern int gic_present; - /* This is Malta specific: IPI,performan...
3f84622d7c7818077f5e6cf4b8a0d1b10dc65147
Analyze and fix the following issue in the Linux kernel code: SSB: Fix nvram_get on BCM47xx platform
Problem Details: The nvram_get function was never in the mainline kernel, it only existed in an external OpenWrt patch. Use nvram_getenv function, which is in mainline and use an include instead of an extra function declaration. et0macaddr contains the mac address in text from like 00:11:22:33:44:55. We have to parse ...
```diff diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h index 942e38736901..eba52a100533 100644 --- a/include/linux/ssb/ssb_driver_gige.h +++ b/include/linux/ssb/ssb_driver_gige.h @@ -96,16 +96,21 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev) retu...
5878fc936aebf592cca418ca50773cd578f7daf4
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix CP0 COUNTER clockevent race
Problem Details: Consider the following test case: write_c0_compare(read_c0_count()); Even if the counter doesn't increment during execution, this might not generate an interrupt until the counter wraps around. The CPU may perform the comparison each time CP0 COUNT increments, not when CP0 COMPARE is written. If mi...
```diff diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c index 2f4d7a99bcc2..98c5a9737c14 100644 --- a/arch/mips/kernel/cevt-r4k.c +++ b/arch/mips/kernel/cevt-r4k.c @@ -32,7 +32,7 @@ static int mips_next_event(unsigned long delta, cnt = read_c0_count(); cnt += delta; write_c0_compare(cnt); -...
190fca3e40a65303eac35ac4fbae4f1f1342431c
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix regression on BCM4710 processor detection
Problem Details: BCM4710 uses the BMIPS32 core (like BCM6345), not the MIPS 4Kc core as was previously believed. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Tested-by: Alexandros C. Couloumbis <alex@ozo.com> Patchwork: https://patchwork.linux-mips.org/patch/1837/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org...
```diff diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h index 06d59dcbe243..86877539c6e8 100644 --- a/arch/mips/include/asm/cpu.h +++ b/arch/mips/include/asm/cpu.h @@ -111,8 +111,8 @@ * These are the PRID's for when 23:16 == PRID_COMP_BROADCOM */ -#define PRID_IMP_BMIPS4KC 0x4000 -#define P...
4afdea81821880d0fc35e6c7ff54eeed9ec0614d
Analyze and fix the following issue in the Linux kernel code: MIPS: JZ4740: Fix pcm device name
Problem Details: As part the ASoC multi-component patch (commit f0fba2ad) the jz4740 pcm driver was renamed to 'jz4740-pcm-audio'. Adjust the device name accordingly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mi...
```diff diff --git a/arch/mips/jz4740/platform.c b/arch/mips/jz4740/platform.c index 95bc2b5b14f1..1cc9e544d16b 100644 --- a/arch/mips/jz4740/platform.c +++ b/arch/mips/jz4740/platform.c @@ -208,7 +208,7 @@ struct platform_device jz4740_i2s_device = { /* PCM */ struct platform_device jz4740_pcm_device = { - .name ...
e5674ad6ca9f1020c2bcc009a55becba3c30d8a3
Analyze and fix the following issue in the Linux kernel code: MIPS: Separate two consecutive loads in memset.S
Problem Details: partial_fixup is used in noreorder block. Separating two consecutive loads can save one cycle on processors with GPR intrelock and can fix load-use on processors that need a load delay slot. Also do so for fwd_fixup. [Ralf: Only R2000/R3000 class processors are lacking the the load-user interlock an...
```diff diff --git a/arch/mips/lib/memset.S b/arch/mips/lib/memset.S index 77dc3b20110a..606c8a9efe3b 100644 --- a/arch/mips/lib/memset.S +++ b/arch/mips/lib/memset.S @@ -161,16 +161,16 @@ FEXPORT(__bzero) .Lfwd_fixup: PTR_L t0, TI_TASK($28) - LONG_L t0, THREAD_BUADDR(t0) andi a2, 0x3f + LONG_L t0, THREAD_BU...
0bc6791707694c77b3543de39f77972a65de917a
Analyze and fix the following issue in the Linux kernel code: MIPS: AR7: Fix loops per jiffies on TNETD7200 devices
Problem Details: TNETD7200 run their CPU clock faster than the default CPU clock we assume. In order to have the correct loops per jiffies settings, initialize clocks right before setting mips_hpt_frequency. As a side effect, we can no longer use msleep in clocks.c which requires other parts of the kernel to be initial...
```diff diff --git a/arch/mips/ar7/clock.c b/arch/mips/ar7/clock.c index fc0e7154e8d6..2ca4ada1c291 100644 --- a/arch/mips/ar7/clock.c +++ b/arch/mips/ar7/clock.c @@ -239,12 +239,12 @@ static void tnetd7300_set_clock(u32 shift, struct tnetd7300_clock *clock, calculate(base_clock, frequency, &prediv, &postdiv, &mul); ...
ff42d62047e45075c54a5543bd4f110dfd032d11
Analyze and fix the following issue in the Linux kernel code: MIPS: AR7: Fix double ar7_gpio_init declaration
Problem Details: Signed-off-by: Florian Fainelli <florian@openwrt.org> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1748/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/include/asm/mach-ar7/ar7.h b/arch/mips/include/asm/mach-ar7/ar7.h index 7919d76186bf..31c7ff539830 100644 --- a/arch/mips/include/asm/mach-ar7/ar7.h +++ b/arch/mips/include/asm/mach-ar7/ar7.h @@ -202,6 +202,4 @@ static inline void ar7_device_off(u32 bit) int __init ar7_gpio_init(void);...
863abad4f644b6c12bc8176206b35fa7e7cfe1a9
Analyze and fix the following issue in the Linux kernel code: MIPS: VPE loader: Check vmalloc return value in vpe_open
Problem Details: The return value of the vmalloc() call in arch/mips/kernel/vpe.c::vpe_open() is not checked, so we potentially store a null pointer in v->pbuffer. Add a check for a null return and then return -ENOMEM in that case. [Ralf: The check added by Jesper's original patch is where it logically should be. Ad...
```diff diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 3eb3cde2f661..6a1fdfef8fde 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c @@ -1092,6 +1092,10 @@ static int vpe_open(struct inode *inode, struct file *filp) /* this of-course trashes what was there before... */ v->pbuffer...
1d210386f6ef9000b1cd723cf453c5eb0377e722
Analyze and fix the following issue in the Linux kernel code: MIPS: jz4740: Fix section mismatch in prom.c
Problem Details: This patch fixes the following section mismatch: WARNING: arch/mips/built-in.o(.text+0xc): Section mismatch in reference from the function jz4740_init_cmdline() to the variable .init.data:arcs_cmdline While were at it, make jz4740_init_cmdline static as well. Signed-off-by: Lars-Peter Clausen <lar...
```diff diff --git a/arch/mips/jz4740/prom.c b/arch/mips/jz4740/prom.c index cfeac15eb2e4..4a70407f55bb 100644 --- a/arch/mips/jz4740/prom.c +++ b/arch/mips/jz4740/prom.c @@ -23,7 +23,7 @@ #include <asm/bootinfo.h> #include <asm/mach-jz4740/base.h> -void jz4740_init_cmdline(int argc, char *argv[]) +static __init vo...
fe749aab1d21cbb4d87527a7df8799583c233496
Analyze and fix the following issue in the Linux kernel code: MIPS: jz4740: qi_lb60: Fix gpio for the 6th row of the keyboard matrix
Problem Details: This patch fixes the gpio number for the 6th row of the keyboard matrix. (And fixes a typo in my name...) Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: linux-mips@linux-mips.org Cc: stable@kernel.org Signed-off-by: https://patchwork.linux-mips.org/patch/1754/ Signed-off-by: Ralf Baechle <ra...
```diff diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c index 5742bb4d78f4..5c0a3575877c 100644 --- a/arch/mips/jz4740/board-qi_lb60.c +++ b/arch/mips/jz4740/board-qi_lb60.c @@ -5,7 +5,7 @@ * * Copyright (c) 2009 Qi Hardware inc., * Author: Xiangfu Liu <xiangfu@qi-hardware.com> - ...
a989ff898f9740651d00388c33bdf4f2a7914920
Analyze and fix the following issue in the Linux kernel code: MIPS: Don't stomp on caller's ->regs[2] in copy_thread()
Problem Details: We never needed that (->regs[2] is overwritten on return from syscall paths with return value of syscall, so storing it there early made no sense) and with new restart logics since d27240bf7e61d2656de18e158ec910a902030847 it has become really bad - we lose the original syscall number before the place w...
```diff diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 99960940d4a4..ae167df73ddd 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -142,7 +142,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, childregs->regs[7] = 0; /* Clear error flag */ ch...
2b3e50234eafc40a04f5f4a2b7bb24b506fd7e87
Analyze and fix the following issue in the Linux kernel code: MIPS: Swarm: Fix typo in symbol name: RTC_M4LT81 -> RTC_M41T81
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c index c308989fc464..41707a245dea 100644 --- a/arch/mips/sibyte/swarm/setup.c +++ b/arch/mips/sibyte/swarm/setup.c @@ -82,7 +82,7 @@ int swarm_be_handler(struct pt_regs *regs, int is_fixup) enum swarm_rtc_type { RTC_NONE, RTC_XICOR...
4129ccf303593a1922a934697f99e682ff491504
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Avoid return code checking in rpcbind XDR encoder functions
Problem Details: Clean up. The trend in the other XDR encoder functions is to BUG() when encoding problems occur, since a problem here is always due to a local coding error. Then, instead of a status, zero is unconditionally returned. Update the rpcbind XDR encoders to behave this way. To finish the update, use the...
```diff diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index fa6d7ca2c851..d2a2ea090f95 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -705,14 +705,11 @@ static int rpcb_enc_mapping(struct rpc_rqst *req, __be32 *p, xdr_init_encode(&xdr, &req->rq_snd_buf, p); - p = xdr_reserve_sp...
98eb2b4f9323bcf2a46476576d3155758cb0a473
Analyze and fix the following issue in the Linux kernel code: NFS: Avoid return code checking in mount XDR encoder functions
Problem Details: Clean up. The trend in the other XDR encoder functions is to BUG() when encoding problems occur, since a problem here is always due to a local coding error. Then, instead of a status, zero is unconditionally returned. Update the mount client XDR encoders to behave this way. To finish the update, us...
```diff diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 4f981f1f6689..c82547e49ba1 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c @@ -280,20 +280,14 @@ out_call_err: * XDR encode/decode functions for MOUNT */ -static int encode_mntdirpath(struct xdr_stream *xdr, const char *pathname) +sta...
49b170047f4a9fe1483132e14a11bdf493bdb8af
Analyze and fix the following issue in the Linux kernel code: NSM: Avoid return code checking in NSM XDR encoder functions
Problem Details: Clean up. The trend in the other XDR encoder functions is to BUG() when encoding problems occur, since a problem here is always due to a local coding error. Then, instead of a status, zero is unconditionally returned. Update the NSM XDR encoders to behave this way. To finish the update, use the new...
```diff diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index e0c918949644..d812818d0258 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c @@ -401,26 +401,22 @@ void nsm_release(struct nsm_handle *nsm) * Status Monitor wire protocol. */ -static int encode_nsm_string(struct xdr_stream *xdr, const char *string) +static...
8111f373600cd43b3198b48b9238e3ad2fd9908d
Analyze and fix the following issue in the Linux kernel code: NFS: Fix hdrlen calculation in NFSv4's decode_read()
Problem Details: When computing the length of the header, be sure to include the four octets consumed by "count". Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index a48a43c75111..868815c55450 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -4475,7 +4475,7 @@ static int decode_read(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs_ goto out_overflow; eof = be32_to_cpup(p++); count = be32_to_cpup(p)...
3460f29a27344db8c7af62cafdb961286ef0b6cd
Analyze and fix the following issue in the Linux kernel code: lockd: Introduce new-style XDR functions for NLMv4
Problem Details: We'd like to prevent local buffer overflows caused by malicious or broken servers. New xdr_stream style decoders can do that. For efficiency, we also want to be able to pass xdr_streams from call_encode() to all XDR encoding functions, rather than building an xdr_stream in every XDR encoding function...
```diff diff --git a/fs/lockd/Makefile b/fs/lockd/Makefile index d0488b3bd00b..ca58d64374ca 100644 --- a/fs/lockd/Makefile +++ b/fs/lockd/Makefile @@ -6,5 +6,5 @@ obj-$(CONFIG_LOCKD) += lockd.o lockd-objs-y := clntlock.o clntproc.o clntxdr.o host.o svc.o svclock.o \ svcshare.o svcproc.o svcsubs.o mon.o xdr...
d9c407b138926132e1f93c01fb2dee50eb0bb615
Analyze and fix the following issue in the Linux kernel code: NFS: Introduce new-style XDR encoding functions for NFSv3
Problem Details: We're interested in taking advantage of the safety benefits of xdr_streams. These data structures allow more careful checking for buffer overflow while encoding. More careful type checking is also introduced in the new functions. For efficiency, we also eventually want to be able to pass xdr_streams...
```diff diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index f6cc60f06dac..3d1043f7667c 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c @@ -37,6 +37,7 @@ #define NFS3_filename_sz (1+(NFS3_MAXNAMLEN>>2)) #define NFS3_path_sz (1+(NFS3_MAXPATHLEN>>2)) #define NFS3_fattr_sz (21) +#define NFS3_cookieverf_sz (NFS...
2b061f9ef216b6d229b06267f188167fd6ab3d9b
Analyze and fix the following issue in the Linux kernel code: lockd: Introduce new-style XDR functions for NLMv3
Problem Details: We'd like to prevent local buffer overflows caused by malicious or broken servers. New xdr_stream style decoders can do that. For efficiency, we also eventually want to be able to pass xdr_streams from call_encode() and call_decode() to all XDR encoding functions, rather than building an xdr_stream i...
```diff diff --git a/fs/lockd/Makefile b/fs/lockd/Makefile index 97f6073ab339..d0488b3bd00b 100644 --- a/fs/lockd/Makefile +++ b/fs/lockd/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_LOCKD) += lockd.o -lockd-objs-y := clntlock.o clntproc.o host.o svc.o svclock.o svcshare.o \ - svcproc.o svcsubs.o mon.o xdr.o grac...
f796f8b3ae292abb9cb2931e8db6fc1d69bba09d
Analyze and fix the following issue in the Linux kernel code: NFS: Introduce new-style XDR decoding functions for NFSv2
Problem Details: We'd like to prevent local buffer overflows caused by malicious or broken servers. New xdr_stream style decoders can do that. For efficiency, we also eventually want to be able to pass xdr_streams from call_decode() to all XDR decoding functions, rather than building an xdr_stream in every XDR decodi...
```diff diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 8c2d9d83771e..6c6a9955bae9 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -187,7 +187,7 @@ extern void nfs_destroy_directcache(void); /* nfs2xdr.c */ extern int nfs_stat_to_errno(enum nfs_stat); extern struct rpc_procinfo nfs_procedures[]; -...
25a0866cc63281b480cc0c11ddeaccb2ffc57dc9
Analyze and fix the following issue in the Linux kernel code: NFS: Introduce new-style XDR encoding functions for NFSv2
Problem Details: We're interested in taking advantage of the safety benefits of xdr_streams. These data structures allow more careful checking for buffer overflow while encoding. More careful type checking is also introduced in the new functions. For efficiency, we also eventually want to be able to pass xdr_streams...
```diff diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index 5914a1911c95..869e2151a2b1 100644 --- a/fs/nfs/nfs2xdr.c +++ b/fs/nfs/nfs2xdr.c @@ -61,6 +61,23 @@ #define NFS_readdirres_sz (1) #define NFS_statfsres_sz (1+NFS_info_sz) + +/* + * While encoding arguments, set up the reply buffer in advance to + * recei...
20b7643d8ee44254fc972d42655bace81e7ab50a
Analyze and fix the following issue in the Linux kernel code: hfsplus: spaces/indentation clean-up
Problem Details: Fix incorrect spaces and indentation reported by checkpatch.pl. Signed-off-by: Anton Salikhmetov <alexo@tuxera.com> Signed-off-by: Christoph Hellwig <hch@tuxera.com>
```diff diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c index c423942793ee..f611d55c9f5e 100644 --- a/fs/hfsplus/dir.c +++ b/fs/hfsplus/dir.c @@ -213,7 +213,7 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) err = -EIO; goto out; } - next: +next: filp->f_pos++; if (fil...
596276c3571e2108f4b336be545ece2eacf3da59
Analyze and fix the following issue in the Linux kernel code: hfsplus: fix an artifact in ioctl flag checking
Problem Details: Fix a flag checking artifact in hfsplus_ioctl_getflags() routine found while doing clean-up against assignments inside `if's. Signed-off-by: Anton Salikhmetov <alexo@tuxera.com> Signed-off-by: Christoph Hellwig <hch@tuxera.com>
```diff diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c index f5a7224f4cbb..508ce662ce12 100644 --- a/fs/hfsplus/ioctl.c +++ b/fs/hfsplus/ioctl.c @@ -28,7 +28,7 @@ static int hfsplus_ioctl_getflags(struct file *file, int __user *user_flags) if (inode->i_flags & S_IMMUTABLE) flags |= FS_IMMUTABLE_FL; - if (i...
638428ece619495edc9579b1e21493eb00f9687c
Analyze and fix the following issue in the Linux kernel code: scsi: fix TUR error handling in sr_media_change()
Problem Details: sr_test_unit_ready() returns 0 iff TUR succeeded - IOW, when media is present and the device is actually ready, so the return value wouldn't be zero when TUR ends with sense data. sr_media_change() incorrectly tests (retval || (scsi_sense_valid(sshdr)...)) when it tries to test whether TUR failed witho...
```diff diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index d7b383c96d5d..c7e29bdec2cd 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -214,13 +214,17 @@ static int sr_media_change(struct cdrom_device_info *cdi, int slot) sshdr = kzalloc(sizeof(*sshdr), GFP_KERNEL); retval = sr_test_unit_ready(cd-...
f08f5a0add20834d3f3d876dfe08005a5df656db
Analyze and fix the following issue in the Linux kernel code: PM / Runtime: Fix pm_runtime_suspended()
Problem Details: There are some situations (e.g. in __pm_generic_call()), where pm_runtime_suspended() is used to decide whether or not to execute a device's (system) ->suspend() callback. The callback is not executed if pm_runtime_suspended() returns true, but it does so for devices that don't even support runtime PM...
```diff diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 489e9bacd165..41cc7b30d7dd 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt @@ -379,8 +379,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: zero) bool p...
be8cd644c49dca4212e975455c8e7119b848ebe8
Analyze and fix the following issue in the Linux kernel code: PM / Hibernate: Restore old swap signature to avoid user space breakage
Problem Details: Commit 3624eb0 (PM / Hibernate: Modify signature used to mark swap) attempted to modify hibernate signature used to mark swap partitions containing hibernation images, so that old kernels don't try to handle compressed images. However, this change broke resume from hibernation on Fedora 14 that appare...
```diff diff --git a/kernel/power/swap.c b/kernel/power/swap.c index baf667bb2794..8c7e4832b9be 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -30,7 +30,7 @@ #include "power.h" -#define HIBERNATE_SIG "LINHIB0001" +#define HIBERNATE_SIG "S1SUSPEND" /* * The swap map is a data structure used for ...
1497dd1d29c6a53fcd3c80f7ac8d0e0239e7389e
Analyze and fix the following issue in the Linux kernel code: PM / Hibernate: Fix PM_POST_* notification with user-space suspend
Problem Details: The user-space hibernation sends a wrong notification after the image restoration because of thinko for the file flag check. RDONLY corresponds to hibernation and WRONLY to restoration, confusingly. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: stable@...
```diff diff --git a/kernel/power/user.c b/kernel/power/user.c index 1b2ea31e6bd8..c36c3b9e8a84 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -137,7 +137,7 @@ static int snapshot_release(struct inode *inode, struct file *filp) free_all_swap_pages(data->swap); if (data->frozen) thaw_processes(); -...
846f40455276617275284a4b76b89311b4aed0b9
Analyze and fix the following issue in the Linux kernel code: GFS2: Don't flush delete workqueue when releasing the transaction lock
Problem Details: There is no requirement to flush the delete workqueue before a gfs2 filesystem is suspended. The workqueue's work will just be suspended along with the rest of the tasks on the filesystem. The resolves a deadlock situation where the transaction lock's demotion code was trying to flush the delete workq...
```diff diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 0d149dcc04e5..263561bf1a50 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -325,7 +325,6 @@ static void trans_go_sync(struct gfs2_glock *gl) if (gl->gl_state != LM_ST_UNLOCKED && test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) { - flush_workqueue...
7d5f01ad536afebde9a1c81d985f8d0eaf2a9ab6
Analyze and fix the following issue in the Linux kernel code: iwlwifi: Fix error: struct iwl_lq_sta has no member named dbg_fixed_rate
Problem Details: While compiling linux-next (next-20101216) I fell over this breakage: ... drivers/net/wireless/iwlwifi/iwl-agn-rs.c: In function ‘iwl_rs_rate_init’: drivers/net/wireless/iwlwifi/iwl-agn-rs.c:2876:8: error: ‘struct iwl_lq_sta’ has no member named ‘dbg_fixed_rate’ dbg_fixed_rate is only used when CONFIG...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 5083dba122ca..75fcd30a7c13 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c @@ -2873,7 +2873,9 @@ void iwl_rs_rate_init(struct iwl_priv *priv, struct iee...
bbde588bfacb990542eed043d89c8591d4ae9211
Analyze and fix the following issue in the Linux kernel code: perf buildid-list: Fix error return for success
Problem Details: It was always returning -1 (255), confusing test scripts. Reported-by: Han Pingtian <phan@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Han Pingtian <phan@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijls...
```diff diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c index 44a47e13bd67..c49837de7d3f 100644 --- a/tools/perf/builtin-buildid-list.c +++ b/tools/perf/builtin-buildid-list.c @@ -36,7 +36,6 @@ static const struct option options[] = { static int __cmd_buildid_list(void) { - int er...
68a7a771ad0e2959983729bf88cbc74a7014438f
Analyze and fix the following issue in the Linux kernel code: perf buildid-cache: Fix symbolic link handling
Problem Details: This was broken since link(2) doesn't dereference symbolic links. Instead 'filename' becomes a symbolic link to the same file that 'name' refers to. This had the bad effect to create dangling symlinks in the case that even can't be removed with perf-buildid-cache(1). LKML-Reference: <m38vzxxrql.fsf@g...
```diff diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 64a85bafde63..7cba0551a565 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -265,15 +265,16 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, const char *name, bool is_kallsyms) { const...
fd930ff91e7fda18f7790984a98489a85edb7c71
Analyze and fix the following issue in the Linux kernel code: perf probe: Fix use of kernel image path given by 'k' option
Problem Details: Users were not being able to have the explicitely specified vmlinux pathname used, instead a search on the vmlinux path was always being made. Reported-by: Francis Moreau <francis.moro@gmail.com> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: 2nddept-manager@sdl.hitachi.co.jp Cc: Fra...
```diff diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 2e000c068cc5..add163c9f0e7 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -249,6 +249,11 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) !params.show_lines)) usage_with_opti...
3e26f23091da06d02fa62da14c95f3688d27857c
Analyze and fix the following issue in the Linux kernel code: KVM: Fix preemption counter leak in kvm_timer_init()
Problem Details: Based on a patch from Thomas Meyer. Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index e3abd84750c7..b989e1f1e5d3 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4564,9 +4564,11 @@ static void kvm_timer_init(void) #ifdef CONFIG_CPU_FREQ struct cpufreq_policy policy; memset(&policy, 0, sizeof(policy)); - cpufreq_get_po...
8e92c20183ed0579d94501311b81c42b65cb2129
Analyze and fix the following issue in the Linux kernel code: sched: Fix the irqtime code for 32bit
Problem Details: Since the irqtime accounting is using non-atomic u64 and can be read from remote cpus (writes are strictly cpu local, reads are not) we have to deal with observing partial updates. When we do observe partial updates the clock movement (in particular, ->clock_task movement) will go funny (in either dir...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 79b557c63381..456c99054160 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1920,10 +1920,9 @@ static void deactivate_task(struct rq *rq, struct task_struct *p, int flags) * They are read and saved off onto struct rq in update_rq_clock(). * This may res...
fe44d62122829959e960bc699318d58966922a69
Analyze and fix the following issue in the Linux kernel code: sched: Fix the irqtime code to deal with u64 wraps
Problem Details: Some ARM systems have a short sched_clock() [ which needs to be fixed too ], but this exposed a bug in the irq_time code as well, it doesn't deal with wraps at all. Fix the irq_time code to deal with u64 wraps by re-writing the code to only use delta increments, which avoids the whole issue. Reviewed...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index da14302a9857..79b557c63381 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -636,23 +636,18 @@ static inline struct task_group *task_group(struct task_struct *p) #endif /* CONFIG_CGROUP_SCHED */ -static u64 irq_time_cpu(int cpu); -static void sched_irq_...
ce677831a4abd0f9f957c90ac6f6a0d0472bafb4
Analyze and fix the following issue in the Linux kernel code: perf: Fix off by one in perf_swevent_init()
Problem Details: The perf_swevent_enabled[] array has PERF_COUNT_SW_MAX elements. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20101024195041.GT5985@bicker> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 7b870174c56d..2870feee81dd 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -4719,7 +4719,7 @@ static int perf_swevent_init(struct perf_event *event) break; } - if (event_id > PERF_COUNT_SW_MAX) + if (event_id >= PERF_COUNT_SW_MAX)...
50308d813bf26500fed671882469939fd19403a3
Analyze and fix the following issue in the Linux kernel code: ocfs2: Try to free truncate log when meeting ENOSPC in write.
Problem Details: Recently, one of our colleagues meet with a problem that if we write/delete a 32mb files repeatly, we will get an ENOSPC in the end. And the corresponding bug is 1288. http://oss.oracle.com/bugzilla/show_bug.cgi?id=1288 The real problem is that although we have freed the clusters, they are in truncate...
```diff diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 592fae5007d1..8ec418dd9e36 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -5858,6 +5858,7 @@ int ocfs2_truncate_log_append(struct ocfs2_super *osb, ocfs2_journal_dirty(handle, tl_bh); + osb->truncated_clusters += num_clusters; bail: mlog_e...
da32dac101263fb5b155407507c548e3ac2a6a2a
Analyze and fix the following issue in the Linux kernel code: lguest: populate initial_page_table
Problem Details: Two x86 patches broke lguest: 1) v2.6.35-492-g72d7c3b, which changed x86 to use the memblock allocator. In lguest, the host places linear page tables at the top of mem, which used to be enough to get us up to the swapper_pg_dir page tables. With the first patch, the direct mapping tables used that me...
```diff diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index bcece91dd311..f0bea76f6ea5 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -620,13 +620,13 @@ ENTRY(initial_code) __PAGE_ALIGNED_BSS .align PAGE_SIZE_asm #ifdef CONFIG_X86_PAE -initial_pg_pmd: +ENTRY(initial_p...
bb6f1d9a99f1947d91693de62ed54ac3bf1e2dfe
Analyze and fix the following issue in the Linux kernel code: lguest: fix crash lguest_time_init
Problem Details: fe25c7fc2e "x86: lguest: Convert to new irq chip functions" converted enable_lguest_irq() to take a struct irq_data *, but didn't fix the one internal caller. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> To: x86@kernel.org
```diff diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 73b1e1a1f489..45e64b37b237 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c @@ -1002,7 +1002,7 @@ static void lguest_time_init(void) clockevents_register_device(&lguest_clockevent); /* Finally, we unblock the timer interrup...
d38bdf48f30f5dc0fac4c1ab656aff74f6804f07
Analyze and fix the following issue in the Linux kernel code: ARM: mmp: fix the typo - MMP2 is compatible with ARMv7
Problem Details: Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
```diff diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig index 95e7c4abb27f..5772e592fe61 100644 --- a/arch/arm/mach-mmp/Kconfig +++ b/arch/arm/mach-mmp/Kconfig @@ -56,7 +56,7 @@ config MACH_FLINT Flint Development Platform. MMP2-based board can't be co-existed with PXA168-based & PXA910-b...
947b10ae0aeda89fc066a7470fdba55f72b0b8fc
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix regression of garbage collection ioctl
Problem Details: On 2.6.37-rc1, garbage collection ioctl of nilfs was broken due to the commit 263d90cefc7d82a0 ("nilfs2: remove own inode hash used for GC"), and leading to filesystem corruption. The patch doesn't queue gc-inodes for log writer if they are reused through the vfs inode cache. Here, gc-inode is the in...
```diff diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c index 33ad25ddd5c4..caf9a6a3fb54 100644 --- a/fs/nilfs2/gcinode.c +++ b/fs/nilfs2/gcinode.c @@ -176,7 +176,6 @@ int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *bh) int nilfs_init_gcinode(struct inode *inode) { struct nilfs_inode_info *ii = NIL...
b4183e301ac1dfaf93e3e92fd70a0c3203c5a27d
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix vram start calculation on ontario (v2)
Problem Details: Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 522d29b37007..f7d7477daffb 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -1134,6 +1134,12 @@ static void evergreen_mc_program(struct radeon_device *rdev) rdev->mc.vram_end...
ab226e21ad34f6ef52e00d2ab399d2364b4cdfee
Analyze and fix the following issue in the Linux kernel code: ceph: fix direct-io on non-page-aligned buffers
Problem Details: The user buffer may be 512-byte aligned, not page-aligned. We were assuming the buffer was page-aligned and only accounting for non-page-aligned io offsets. Signed-off-by: Henry C Chang <henry_c_chang@tcloudcomputing.com> Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 8d79b8912e31..e860d8f1bb45 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -282,7 +282,8 @@ int ceph_release(struct inode *inode, struct file *file) static int striped_read(struct inode *inode, u64 off, u64 len, struct page **pages, int num_pages, ...
b5318d302f8a20eacbbfc01b0ee35b108085a363
Analyze and fix the following issue in the Linux kernel code: x86, olpc: Speed up device tree creation during boot
Problem Details: Calling alloc_bootmem() for tiny chunks of memory over and over is really slow; on an XO-1, it caused the time between when the kernel started booting and when the display came alive (post-lxfb probe) to increase to 44s. This patch optimizes the prom_early_alloc function by calling alloc_bootmem for 4...
```diff diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/olpc_dt.c index 70546975a920..dab874647530 100644 --- a/arch/x86/platform/olpc/olpc_dt.c +++ b/arch/x86/platform/olpc/olpc_dt.c @@ -126,14 +126,32 @@ static unsigned int prom_early_allocated __initdata; void * __init prom_early_alloc(unsi...
c10d1e260f7cb6766dc76b4e36ed8f4be53f195a
Analyze and fix the following issue in the Linux kernel code: x86, olpc: Add OLPC device-tree support
Problem Details: Make use of PROC_DEVICETREE to export the tree, and sparc's PROMTREE code to call into OLPC's Open Firmware to build the tree. v5: fix buglet with root node check (introduced in v4) v4: address some minor style issues pointed out by Grant, and explicitly cast negative phandle checks to s32. v3: ...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e330da21b84f..ef34031a8339 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2049,11 +2049,17 @@ config OLPC_OPENFIRMWARE bool "Support for OLPC's Open Firmware" depends on !X86_64 && !X86_PAE default n + select OF help This option adds s...
c45aadabb961501b3e64bc92d0bf12fdce26d37d
Analyze and fix the following issue in the Linux kernel code: drm/nv50: fix a couple of vm init issues
Problem Details: Fixes overwriting the first page table entry when testing that the PRAMIN BAR can be correctly read/written, and adds an additional bar flush after poking the BAR3 control regs. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c index 38f30270cb9f..adac4da98f7e 100644 --- a/drivers/gpu/drm/nouveau/nv50_instmem.c +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c @@ -182,16 +182,17 @@ nv50_instmem_init(struct drm_device *dev) nv_wr32(dev, 0x001704, ...
e5fd205f28f83b3514dc5049b2d1388b10065a6d
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: disable ss fixed ref divide
Problem Details: Seems to cause problems on certain laptops Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=24462 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Tested-by: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index df2b6f2b35f8..3ed27ad46f44 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -530,7 +530,7 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, dp_clock ...
4400ef311e10666a2e5acf97d040df89cb880cb2
Analyze and fix the following issue in the Linux kernel code: USB: uas: Fix up the Sense IU
Problem Details: Add a comment to the Sense IU data structure that it's also used for Read Ready and Write Ready. Remove the 'service response' element since it's gone from the current draft (04). Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 2054b1e25a65..3c7a24433784 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -49,14 +49,17 @@ struct command_iu { __u8 cdb[16]; /* XXX: Overflow-checking tools may misunderstand */ }; +/* + * Also used for the ...
ae90bdeaeac6b964b7a1e853a90a19f358a9ac20
Analyze and fix the following issue in the Linux kernel code: netfilter: fix compilation when conntrack is disabled but tproxy is enabled
Problem Details: The IPv6 tproxy patches split IPv6 defragmentation off of conntrack, but failed to update the #ifdef stanzas guarding the defragmentation related fields and code in skbuff and conntrack related code in nf_defrag_ipv6.c. This patch adds the required #ifdefs so that IPv6 tproxy can truly be used without...
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index e6ba898de61c..4f2db79a2abb 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -255,6 +255,11 @@ typedef unsigned int sk_buff_data_t; typedef unsigned char *sk_buff_data_t; #endif +#if defined(CONFIG_NF_DEFRAG_IPV4) || define...
14a085e77063090fb12ad391d0f4d46e593be225
Analyze and fix the following issue in the Linux kernel code: iwlagn: fix witespace damage
Problem Details: patch "iwlagn: check ready in iwlagn_bss_info_changed()" introduce whitespace, fix it please merge with the previous patch Reported by: Johannes Berg <johannes.berg@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-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index 769479eb6ea9..6d140bd53291 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c @@ -519,8 +519,8 @@ void iwlagn_bss_info_changed(struct ieee80211_hw ...
97c866defc0fc6e18b49603ac19f732f53e79c46
Analyze and fix the following issue in the Linux kernel code: ASoC: Move widgets from DAPM context to snd_soc_card
Problem Details: Decoupling widgets from DAPM context is required when extending the ASoC core to cross-device paths. Even the list of widgets are now kept in struct snd_soc_card, the widget listing in sysfs and debugs remain sorted per device. This patch makes possible to build cross-device paths but does not extend ...
```diff diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 2c1e0eed43d5..c0e7c47469fc 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -462,7 +462,7 @@ struct snd_soc_dapm_widget { /* DAPM context */ struct snd_soc_dapm_context { - struct list_head widgets; + int n_widgets...
248daa084cee4b212ff4408e9c9b05b3bdc0da0d
Analyze and fix the following issue in the Linux kernel code: wl12xx_sdio_test: rename files to match current style
Problem Details: Change some file names and Kconfig settings so that this new module matches the new way of using wl12xx instead of wl1271. Also fix SDIO power enabling and disabling to match the latest way of doing it. Cc: Roger Quadros <roger.quadros@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.co...
```diff diff --git a/drivers/net/wireless/wl12xx/Kconfig b/drivers/net/wireless/wl12xx/Kconfig index 085bc44d814b..0e65bce457d6 100644 --- a/drivers/net/wireless/wl12xx/Kconfig +++ b/drivers/net/wireless/wl12xx/Kconfig @@ -52,13 +52,15 @@ config WL12XX_SDIO If you choose to build a module, it'll be called wl12xx_sd...
4ce2c1e8e899831dd152bd0d534a60da6fb1582a
Analyze and fix the following issue in the Linux kernel code: kconfig: fix `zconfdebug' extern declaration
Problem Details: This symbol is only exist if YYDEBUG is defined. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index a542c6ba84b3..6d38b7c9c824 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h @@ -68,10 +68,12 @@ struct kconf_id { enum symbol_type stype; }; +#ifdef YYDEBUG +extern int zconfdebug; +#endif + int zconfparse(void); void zconfdum...
579fb8e741fecef7dfd64afcc7b0b0c68ea207cc
Analyze and fix the following issue in the Linux kernel code: kconfig: fix typos
Problem Details: Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index d1bab0f42d10..61c35bf2d9cb 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -937,7 +937,7 @@ static void randomize_choice_values(struct symbol *csym) int cnt, def; /* - * If choice is mod then we may hav...
fe04ce0bf955eaf53f7e4cd6bb35976fa94e0925
Analyze and fix the following issue in the Linux kernel code: kbuild/nconf: fix spaces damage
Problem Details: Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index 272a987f23e0..eda49ffc1c8c 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -248,7 +248,7 @@ search_help[] = N_( "Only relevant lines are shown.\n" "\n\n" "Search examples:\n" -"Examples: USB = > find all symbols cont...