id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
e4c3c13cb4c4985cb62cf28677fc0ace69a8d69f
Analyze and fix the following issue in the Linux kernel code: drivers/net: fix sparse warnings: make do-while a compound statement
Problem Details: While at it insert some extra curly braces and fix formatting. Fix this sparse warnings: drivers/net/atp.c:811:8: warning: do-while statement is not a compound statement drivers/net/atp.c:813:8: warning: do-while statement is not a compound statement drivers/net/atp.c:815:11: warning: do-while ...
```diff diff --git a/drivers/net/atp.c b/drivers/net/atp.c index 1d6b74c5d6c9..ea493ce23982 100644 --- a/drivers/net/atp.c +++ b/drivers/net/atp.c @@ -802,21 +802,22 @@ static void net_rx(struct net_device *dev) static void read_block(long ioaddr, int length, unsigned char *p, int data_mode) { - if (data_mode <= ...
2705d4f87c068552f45e5d6feaa5c468a312f761
Analyze and fix the following issue in the Linux kernel code: drivers/net: fix sparse warning: use ANSI-style function declaration
Problem Details: Fix this sparse warning: drivers/net/ne.c:932:24: warning: non-ANSI function declaration of function 'init_module' Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ne.c b/drivers/net/ne.c index cb02698d1286..5c3e242428f1 100644 --- a/drivers/net/ne.c +++ b/drivers/net/ne.c @@ -929,7 +929,7 @@ static void __init ne_add_devices(void) } #ifdef MODULE -int __init init_module() +int __init init_module(void) { int retval; ne_add_devices(); ```
d76e56b4c620c959fa8346c08d24ee4b2783a564
Analyze and fix the following issue in the Linux kernel code: ehea: use get_zeroed_page for alignment-sensitive allocation
Problem Details: With slub debug enabled, I see the following errors and crash with 2.6.28-rc9: IBM eHEA ethernet device driver (Release EHEA_0095) ehea: Error in ehea_h_register_rpage_mr: not on pageboundary ehea: Error in ehea_reg_mr_section: register_rpage_mr failed ehea: Error in ehea_reg_kernel_mr: registering mr...
```diff diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c index e8c952b61662..225c692b5d99 100644 --- a/drivers/net/ehea/ehea_qmr.c +++ b/drivers/net/ehea/ehea_qmr.c @@ -893,7 +893,7 @@ int ehea_reg_kernel_mr(struct ehea_adapter *adapter, struct ehea_mr *mr) unsigned long top; - pt = kzalloc(...
c6fbba0546d3ead18d4a623e76e28bcbaa66a325
Analyze and fix the following issue in the Linux kernel code: [CIFS] make sure that DFS pathnames are properly formed
Problem Details: The paths in a DFS request are supposed to only have a single preceding backslash, but we are sending them with a double backslash. This is exposing a bug in Windows where it also sends a path in the response that has a double backslash. The existing code that builds the mount option string however ex...
```diff diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 5ab6bcce880a..080703a15f44 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES @@ -4,7 +4,8 @@ Add "forcemandatorylock" mount option to allow user to use mandatory rather than posix (advisory) byte range locks, even though server would support posix byte ran...
85705524258f93a6086c3247a58f34a661b82b3d
Analyze and fix the following issue in the Linux kernel code: cifs: fix wait_for_response to time out sleeping processes correctly
Problem Details: cifs: fix wait_for_response to time out sleeping processes correctly The current scheme that CIFS uses to sleep and wait for a response is not quite what we want. After sending a request, wait_for_response puts the task to sleep with wait_event(). One of the conditions for wait_event is a timeout (usi...
```diff diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index cd4ed65d6cd9..4d076be46d90 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -410,11 +410,8 @@ static int wait_for_response(struct cifsSesInfo *ses, for (;;) { curr_timeout = timeout + jiffies; - wait_event(ses->server->response_q,...
8be0ed44c2fa4afcf2c6d2fb3102c926e9f989df
Analyze and fix the following issue in the Linux kernel code: [CIFS] Can not mount with prefixpath if root directory of share is inaccessible
Problem Details: Windows allows you to deny access to the top of a share, but permit access to a directory lower in the path. With the prefixpath feature of cifs (ie mounting \\server\share\directory\subdirectory\etc.) this should have worked if the user specified a prefixpath which put the root of the mount at a dire...
```diff diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 3d848f463c44..5ab6bcce880a 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES @@ -2,7 +2,9 @@ Version 1.56 ------------ Add "forcemandatorylock" mount option to allow user to use mandatory rather than posix (advisory) byte range locks, even though server w...
3de2091ac722e7dbc37d87d9112ab19ec6a871de
Analyze and fix the following issue in the Linux kernel code: [CIFS] fix typo
Problem Details: Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index fb676076946b..2ce04c73d74e 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h @@ -101,5 +101,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg); extern const struct export_operations cifs_export_ops; #endif /* EXPERIMEN...
b51968d676db1c4e541b4c84de7ce7af812c9e9f
Analyze and fix the following issue in the Linux kernel code: mlx4_en: Memory leak on completion queue free
Problem Details: If port is being destroyed without being activated before, CQ resources are not freed. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/mlx4/en_cq.c b/drivers/net/mlx4/en_cq.c index 1368a8010af4..1a936f4db2b7 100644 --- a/drivers/net/mlx4/en_cq.c +++ b/drivers/net/mlx4/en_cq.c @@ -68,6 +68,8 @@ int mlx4_en_create_cq(struct mlx4_en_priv *priv, err = mlx4_en_map_buffer(&cq->wqres.buf); if (err) mlx4_free_hwq_res(md...
88a44e51e9a5202f8856f72400fc87a39205186d
Analyze and fix the following issue in the Linux kernel code: net/appletalk: Remove redundant test
Problem Details: atif is tested for being NULL twice, with the same effect in each case. I have kept the second test, as it seems to fit well with the comment above it. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local i...
```diff diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index c3f002717378..5abce07fb50a 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c @@ -815,9 +815,6 @@ static int atif_ioctl(int cmd, void __user *arg) return -EPERM; if (sa->sat_family != AF_APPLETALK) return -EINVAL; - if (!atif) ...
c14ea0ca659d378dd377e417162ebd908d1da4ce
Analyze and fix the following issue in the Linux kernel code: drivers/net/wan: Remove redundant test
Problem Details: arg is checked not to be NULL a few lines before. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; position p1,p2; @@ if (x@p1 == NULL || ...) { ... when forall return ....
```diff diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index d67957af589c..c23fde0c0344 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c @@ -2718,9 +2718,8 @@ static int cpc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) } pc300patrntst.num_errors...
90f5dfcc6afafcc3e1c18298143c1213b071990d
Analyze and fix the following issue in the Linux kernel code: drivers/net: Remove redundant test
Problem Details: In each case, ap is checked not to be NULL a few lines before. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; position p1,p2; @@ if (x@p1 == NULL || ...) { ... when foral...
```diff diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index 451bdb57d6fc..6567fabd2e13 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c @@ -293,9 +293,6 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file, err = -EFAULT; switch (cmd) { case PPPIOCGCHAN: - err = -ENX...
662f44af635f6bde366d44abacaeec7916d9f168
Analyze and fix the following issue in the Linux kernel code: drivers/net/ehea: Remove redundant test
Problem Details: In each case, vpage is checked not to be NULL just after it is initialized at the beginning of each loop iteration. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; position...
```diff diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c index 3c0ec82f36fb..e8c952b61662 100644 --- a/drivers/net/ehea/ehea_qmr.c +++ b/drivers/net/ehea/ehea_qmr.c @@ -182,7 +182,7 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter, goto out_kill_hwq; } } else { - if ((h...
b0fd0d235df2b3cf8e5e244e301614092a9c317c
Analyze and fix the following issue in the Linux kernel code: drivers/net/au1000_eth.c: Remove redundant test
Problem Details: phydev is checked to be not NULL a few lines above. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; position p1,p2; @@ if (x@p1 == NULL || ...) { ... when forall return...
```diff diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index ecc2573b3dce..9c875bb3f76c 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c @@ -353,7 +353,6 @@ static int mii_probe (struct net_device *dev) } /* now we are supposed to have a proper phydev, to attach to... */ - BU...
619e803d3c1b7bcc17c45e81f309d0b9b3df2d5d
Analyze and fix the following issue in the Linux kernel code: netlink: fix (theoretical) overrun in message iteration
Problem Details: See commit 1045b03e07d85f3545118510a587035536030c1c ("netlink: fix overrun in attribute iteration") for a detailed explanation of why this patch is necessary. In short, nlmsg_next() can make "remaining" go negative, and the remaining >= sizeof(...) comparison will promote "remaining" to an unsigned ty...
```diff diff --git a/include/net/netlink.h b/include/net/netlink.h index 46b7764f1774..8a6150a3f4c7 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h @@ -332,7 +332,7 @@ static inline int nlmsg_attrlen(const struct nlmsghdr *nlh, int hdrlen) */ static inline int nlmsg_ok(const struct nlmsghdr *nlh, int ...
9fcb95a105758b81ef0131cd18e2db5149f13e95
Analyze and fix the following issue in the Linux kernel code: sctp: Avoid memory overflow while FWD-TSN chunk is received with bad stream ID
Problem Details: If FWD-TSN chunk is received with bad stream ID, the sctp will not do the validity check, this may cause memory overflow when overwrite the TSN of the stream ID. The FORWARD-TSN chunk is like this: FORWARD-TSN chunk Type = 192 Flags = 0 Length ...
```diff diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 9f2a3eb656e5..1c4e5d6c29c0 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -3689,6 +3689,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep, { struct sctp_chunk *chunk = arg; struct sctp_fwdts...
ea686a2653c5586b1c7192958b9d521abde66e92
Analyze and fix the following issue in the Linux kernel code: sctp: Fix a typo in socket.c
Problem Details: Just fix a typo in socket.c. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-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 0738843876a1..e432927310c9 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -2404,9 +2404,9 @@ static int sctp_setsockopt_delayed_ack(struct sock *sk, if (params.sack_delay == 0 && params.sack_freq == 0) return 0; } else if (optlen == si...
161c8d2f50109b44b664eaf23831ea1587979a61
Analyze and fix the following issue in the Linux kernel code: net: PHYLIB mdio fixes #2
Problem Details: The PHYLIB mdio code has more problems in error paths: - mdiobus_release can be called before bus->state is set to MDIOBUS_REGISTERED - mdiobus_scan allocates resources which need to be freed - the comment is wrong, the resistors used are actually pull-ups. Signed-off-by: Krzysztof Halasa <khc@pm.wa...
```diff diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 7a333601fbe8..11adf6ed4628 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -63,7 +63,9 @@ EXPORT_SYMBOL(mdiobus_alloc); static void mdiobus_release(struct device *d) { struct mii_bus *bus = to_mii_bus(d); ...
f7d1b9f5aafa371d7f51f644aa3c38bc914e9205
Analyze and fix the following issue in the Linux kernel code: vlan: fix convertion to net_device_ops
Problem Details: commit 656299f706e52e0409733d704c2761f1b12d6954 (vlan: convert to net_device_ops) added a net_device_ops with a NULL ndo_start_xmit field. This gives a crash in dev_hard_start_xmit() Fix it using two net_device_ops structures, one for hwaccel vlan, one for non hwaccel vlan. Signed-off-by: Eric Dumaz...
```diff diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 71193a6b10e6..89a3bbdfca3f 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -593,6 +593,8 @@ static const struct header_ops vlan_header_ops = { .parse = eth_header_parse, }; +static const struct net_device_ops vlan_netdev_ops, v...
d45227391c70ea12ec129ebfa97841e9b7ff34fd
Analyze and fix the following issue in the Linux kernel code: smsc911x: fix platform resource call during module unload
Problem Details: This patch fixes a typo, the platform_get_resource calls in smsc911x_drv_remove are supposed to look the same as those in smsc911x_drv_probe. Reported and fixed by dfoley@telus.net. Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index d94560f9eac7..5e989d884ddd 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@ -1874,7 +1874,7 @@ static int __devexit smsc911x_drv_remove(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, ...
dd0451938815d8b901488b1058f52023892c6cde
Analyze and fix the following issue in the Linux kernel code: smsc911x: fix BUG if module is removed while interface is up
Problem Details: If the module is removed while its interface is up, smsc911x_stop is not called until after smsc911x_drv_remove has disposed of phy_dev. This patch changes the stop method to handle this situation. This is a different problem to the one reported by dfoley@telus.net. Signed-off-by: Steve Glendinning ...
```diff diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index ecdde03d4167..8078f3545f16 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@ -1267,8 +1267,6 @@ static int smsc911x_stop(struct net_device *dev) struct smsc911x_data *pdata = netdev_priv(dev); unsigned int temp; - BUG_ON(...
c5612c1956597687e4bdf59f2649d20d60f5a2b6
Analyze and fix the following issue in the Linux kernel code: [S390] convert s390 debug feature printks to pr_xxx macros.
Problem Details: Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 21c90374a58c..ba03fc0a3a56 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -10,6 +10,9 @@ * Bugreports to: <Linux390@de.ibm.com> */ +#define KMSG_COMPONENT "s390dbf" +#define pr_fmt(fmt) KMSG_COMPONENT ": " f...
acfa922c5a00eca0abac0e2b6d6666c606c27345
Analyze and fix the following issue in the Linux kernel code: [S390] s390: Remove redundant test
Problem Details: The loop above the modified code only terminates when rc is a valid pointer. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; position p1,p2; @@ if (x@p1 == NULL || ...) { ...
```diff diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index d80fcd4a7fe1..21c90374a58c 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -388,7 +388,7 @@ debug_info_copy(debug_info_t* in, int mode) debug_info_free(rc); } while (1); - if(!rc || (mode == NO_AREAS)) +...
33b1d09ef317d64c58b135c2e811bb55b3f15b19
Analyze and fix the following issue in the Linux kernel code: [S390] panic_stack leak in smp_alloc_lowcore
Problem Details: Fix freeing of the panic_stack if the allocation of async_stack failed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index bf170c698f0c..1e7db1ab7453 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -500,18 +500,15 @@ static int __cpuinit smp_alloc_lowcore(int cpu) save_area = get_zeroed_page(GFP_KERNEL); if (!save_area) - goto out_save_...
b3b59d3339c907b1dec3ce19f62b2a7f120d142d
Analyze and fix the following issue in the Linux kernel code: [S390] sclp vt220: fix compile warning
Problem Details: get rid of this one: CC drivers/s390/char/sclp_vt220.o drivers/s390/char/sclp_vt220.c:588: warning: '__sclp_vt220_flush_buffer' defined but not used Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 9854f19f5e62..a839aa531d7c 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c @@ -583,23 +583,6 @@ sclp_vt220_chars_in_buffer(struct tty_struct *tty) return count; } -static void -__sclp_vt220_f...
2d6cd2a5908adecd06c8cee2a73814463ed71493
Analyze and fix the following issue in the Linux kernel code: [S390] remove warnings with functions ending in BUG
Problem Details: Functions which end in a BUG() statement and skip the return statement cause compile warnings on s390, e.g.: mm/bootmem.c: In function 'mark_bootmem': mm/bootmem.c:321: warning: control reaches end of non-void function To avoid the warning add an endless loop to the BUG() macro. Signed-off-by: Marti...
```diff diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h index 384e3621e341..7efd0abe8887 100644 --- a/arch/s390/include/asm/bug.h +++ b/arch/s390/include/asm/bug.h @@ -47,7 +47,10 @@ #endif /* CONFIG_DEBUG_BUGVERBOSE */ -#define BUG() __EMIT_BUG(0) +#define BUG() do { \ + __EMIT_BUG(0); ...
f444cc0e52523560a8dfc12f5374e5d5ecf5375b
Analyze and fix the following issue in the Linux kernel code: [S390] cio: commit all pmcw changes.
Problem Details: Sometimes we change the pmcw configuration but don't call msch to transmit these changes to the channel subsystem. The patch fixes this by calling cio_commit_config in such cases. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index d3127018fb81..6d714cf55064 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -1259,6 +1259,9 @@ static int io_subchannel_probe(struct subchannel *sch) return 0; } io_subchannel_init_fields(sch); + rc = cio_co...
6eff208f479d6fe99fd92c0e6bf7e930bb45cd30
Analyze and fix the following issue in the Linux kernel code: [S390] cio: Fix I/O subchannel refcounting.
Problem Details: Subchannel refcounting was incorrect in some places, especially a refcount was missing when ccw_device_call_sch_unregister() was called and the refcount was not correctly switched after moving devices. Fix this by establishing the following rules: - The ccw_device obtains a reference on its parent sub...
```diff diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 039ef03cf217..cba33aa1df79 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -718,6 +718,8 @@ ccw_device_release(struct device *dev) struct ccw_device *cdev; cdev = to_ccwdev(dev); + /* Release reference of pa...
9cd67421977a701272820987ff9e6f197b1b97b7
Analyze and fix the following issue in the Linux kernel code: [S390] cio: Fix reference counting for online/offline.
Problem Details: The current code attempts to get an extra reference count for online devices by doing a get_device() in ccw_device_online() and a put_device() in ccw_device_done(). However, this - incorrectly obtains an extra reference for disconnected devices becoming available again (since they are already onlin...
```diff diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 647cbaca298e..039ef03cf217 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -376,19 +376,23 @@ int ccw_device_set_offline(struct ccw_device *cdev) dev_fsm_event(cdev, DEV_EVENT_NOTOPER); } spin_unlock_irq...
c619d4223eaa063dd15ce44235b04487235f8cb7
Analyze and fix the following issue in the Linux kernel code: [S390] cio: fix ccwgroup online vs. ungroup race condition
Problem Details: Ensure atomicity of ungroup operation to prevent concurrent ungroup and online processing which may lead to use-after-release situations. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index 17fa009d9959..918e6fce2573 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c @@ -91,15 +91,23 @@ ccwgroup_ungroup_store(struct device *dev, struct device_attribute *attr, const gdev = to_ccwgroupdev(dev); ...
7a0b4cbc7d7d99763511b488b08bbc2607ddd1e3
Analyze and fix the following issue in the Linux kernel code: [S390] qdio: fix error reporting for hipersockets
Problem Details: Hipersocket connections can encounter temporary busy conditions. In case of the busy bit set we retry the SIGA operation immediatelly. If the busy condition still persists after 100 ms we fail and report the error to the upper layer. The second stage retry logic is removed. In case of ongoing busy cond...
```diff diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h index c60f2566d28c..42f2b09631b6 100644 --- a/drivers/s390/cio/qdio.h +++ b/drivers/s390/cio/qdio.h @@ -14,7 +14,6 @@ #include "chsc.h" #define QDIO_BUSY_BIT_PATIENCE 100 /* 100 microseconds */ -#define QDIO_BUSY_BIT_GIVE_UP 2000000 /* 2 secon...
9a1ce28aeb7a8b1666eaa9f104c1a2f5a149f9df
Analyze and fix the following issue in the Linux kernel code: [S390] qdio: fix compile warning under 31 bit
Problem Details: The QEBSM instructions are only available for CONFIG_64BIT, they are not used under 31 bit. Make compiler happy about the false positive: drivers/s390/cio/qdio_main.c: In function ?qdio_inbound_q_done?: drivers/s390/cio/qdio_main.c:532: warning: ?state? may be used uninitialized in this function Sign...
```diff diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index a44a8c5b91be..9e6ab41e5a3c 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -529,7 +529,7 @@ int qdio_inbound_q_moved(struct qdio_q *q) static int qdio_inbound_q_done(struct qdio_q *q) { - unsigned ...
bbd50e172f75b1d12ef9b1bcf593b51a44199016
Analyze and fix the following issue in the Linux kernel code: [S390] qdio: fix qeth port count detection
Problem Details: qeth needs to get the port count information before qdio has allocated a page for the chsc operation. Extend qdio_get_ssqd_desc() to store the data in the specified structure. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/include/asm/qdio.h b/arch/s390/include/asm/qdio.h index 4734c3f05354..27fc1746de15 100644 --- a/arch/s390/include/asm/qdio.h +++ b/arch/s390/include/asm/qdio.h @@ -373,16 +373,16 @@ struct qdio_initialize { #define QDIO_FLAG_SYNC_OUTPUT 0x02 #define QDIO_FLAG_PCI_OUT 0x10 -extern in...
8f2961c39eacd5d450048d8a3e91675486f3a015
Analyze and fix the following issue in the Linux kernel code: [S390] audit: get s390 ret_from_fork in sync with other architectures
Problem Details: On s390 we have ret_from_fork jump not to the "do all work we normally do on return from syscall" as on x86, ppc, etc., but to the "do all such work except audit". Historical reasons - the codepath triggered when we have AUDIT process flag set is separated from the normall one and they converge at sys...
```diff diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 198ea18a534d..c1cfc7e39ec9 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -436,7 +436,7 @@ ret_from_fork: basr %r14,%r1 TRACE_IRQS_ON stosm __SF_EMPTY(%r15),0x03 # reenable interrupts - b BASED(sysc_return) + b...
5439050f9f1aa92381ab9beccbea6ddf0c687c2b
Analyze and fix the following issue in the Linux kernel code: [S390] cpu topology: fix cpu_core_map initialization
Problem Details: Common code doesn't call arch_update_cpu_topology() anymore on cpu hotplug. But our architecture backend relied on that in order to update the cpu_core_map. For machines without cpu topology support this leads uninitialized cpu_core_maps for later on added cpus. To solve this just initialize the maps ...
```diff diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index a947899dcba1..586c5e33b3f4 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c @@ -78,7 +78,7 @@ cpumask_t cpu_coregroup_map(unsigned int cpu) cpus_clear(mask); if (!machine_has_topology) - return cpu_pres...
1fcccb008be12ea823aaa392758e1e41fb82de9a
Analyze and fix the following issue in the Linux kernel code: x86: traps.c replace #if CONFIG_X86_32 with #ifdef CONFIG_X86_32
Problem Details: Impact: cleanup, avoid warning on X86_64 Fixes this warning on X86_64: CC arch/x86/kernel/traps.o arch/x86/kernel/traps.c:695:5: warning: "CONFIG_X86_32" is not defined Signed-off-by: Jaswinder Singh <jaswinder@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index c320c29255c2..f37cee75ab58 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c @@ -691,7 +691,7 @@ void math_error(void __user *ip) err = swd & ~cwd & 0x3f; -#if CONFIG_X86_32 +#ifdef CONFIG_X86_32 if (!err) return; ...
9212ddb5eada64fec5a08b28207401f3cc3d0876
Analyze and fix the following issue in the Linux kernel code: stacktrace: provide save_stack_trace_tsk() weak alias
Problem Details: Impact: build fix Some architectures have not implemented save_stack_trace_tsk() yet: fs/built-in.o: In function `proc_pid_stack': base.c:(.text+0x3f140): undefined reference to `save_stack_trace_tsk' So warn about that if the facility is used. Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c index 94b527ef1d1e..eb212f8f8bc8 100644 --- a/kernel/stacktrace.c +++ b/kernel/stacktrace.c @@ -6,6 +6,7 @@ * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> */ #include <linux/sched.h> +#include <linux/kernel.h> #include <linux/modu...
e44aef58ecfbe061eb4c53b939bcc35fb1bee82d
Analyze and fix the following issue in the Linux kernel code: perfcounters: include asm/perf_counter.h only if CONFIG_PERF_COUNTERS=y
Problem Details: Impact: build fix on ia64 KOSAKI Motohiro reported that -tip doesnt build on ia64 because asm/perf_counter.h only exists on x86 for now. Fix it. Reported-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: KOSAKI Motohiro <kosaki....
```diff diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index ec77d1643d37..cc3a75a239a9 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h @@ -14,7 +14,10 @@ #define _LINUX_PERF_COUNTER_H #include <asm/atomic.h> -#include <asm/perf_counter.h> + +#ifdef CONFIG_PERF...
0ca59dd948a51c95d5a366d35f897bc5ef9df55d
Analyze and fix the following issue in the Linux kernel code: tracing/ftrace: don't trace on early stage of a secondary cpu boot, v3
Problem Details: Impact: fix a crash/hard-reboot on certain configs while enabling cpu runtime On some archs, the boot of a secondary cpu can have an early fragile state. On x86-64, the pda is not initialized on the first stage of a cpu boot but it is needed to get the cpu number and the current task pointer. This dat...
```diff diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index c2a812ebde89..b8a1799ea871 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -85,7 +85,8 @@ static inline void native_write_msr(unsigned int msr, asm volatile("wrmsr" : : "c" (msr), "a"(low), "d" (high) : "mem...
12d79bafb75639f406a9f71aab94808c414c836e
Analyze and fix the following issue in the Linux kernel code: rcu: provide RCU options on non-preempt architectures too
Problem Details: Impact: build fix Some old architectures still do not use kernel/Kconfig.preempt, so the moving of the RCU options there broke their build: In file included from /home/mingo/tip/include/linux/sem.h:81, from /home/mingo/tip/include/linux/sched.h:69, from /home/mingo/...
```diff diff --git a/init/Kconfig b/init/Kconfig index 9dd7958a71f0..6b0fdedf3596 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -928,6 +928,80 @@ source "block/Kconfig" config PREEMPT_NOTIFIERS bool +choice + prompt "RCU Implementation" + default CLASSIC_RCU + +config CLASSIC_RCU + bool "Classic RCU" + help + ...
664134d2916109be76648977705a2bea3ff76427
Analyze and fix the following issue in the Linux kernel code: crypto: testmgr - Fix error flow of test_comp
Problem Details: This warning: crypto/testmgr.c: In function ‘test_comp’: crypto/testmgr.c:829: warning: ‘ret’ may be used uninitialized in this function triggers because GCC correctly notices that in the ctcount == 0 && dtcount != 0 input condition case this function can return an undefined value, if the second ...
```diff diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 67dce77d49d5..67ff4aaa3c9c 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -853,7 +853,7 @@ static int test_comp(struct crypto_comp *tfm, struct comp_testvec *ctemplate, } for (i = 0; i < dtcount; i++) { - int ilen, ret, dlen = COMP_BUF_SIZE;...
d6a10c84a2a2b08bdd637852c9cc42c41e109b25
Analyze and fix the following issue in the Linux kernel code: crypto: hifn_795x - Fix queue management
Problem Details: Fix queue management. Change ring size and perform its check not one after another descriptor, but using stored pointers to the last checked descriptors. Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index a03fe571265b..ab4f94bec4ff 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -360,14 +360,14 @@ static atomic_t hifn_dev_number; #define HIFN_NAMESIZE 32 #define HIFN_MAX_RESULT_ORDER 5 -#define HIFN_D_CM...
ed4f92e3723a7d73bcd179ba09529094752063b2
Analyze and fix the following issue in the Linux kernel code: crypto: hifn_795x - Fix queue processing
Problem Details: Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index 97a77d7baca4..ce3a27ecfaa5 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -2158,7 +2158,7 @@ static int hifn_setup_crypto_req(struct ablkcipher_request *req, u8 op, static int hifn_process_queue(struct hif...
5df4c0c671bbb425e4a77dde5f51869aeebebd67
Analyze and fix the following issue in the Linux kernel code: crypto: hifn_795x - Fix request context corruption
Problem Details: HIFN uses the transform context to store per-request data, which breaks when more than one request is outstanding. Move per request members from struct hifn_context to a new struct hifn_request_context and convert the code to use this. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Ev...
```diff diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index 2b4940bc8356..97a77d7baca4 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -657,9 +657,15 @@ struct ablkcipher_walk struct hifn_context { - u8 key[HIFN_MAX_CRYPT_KEY_LENGTH], *iv; + u8 key[HIFN_MAX_CRY...
75741a034024f146ba5431602f3ad33a5df8363c
Analyze and fix the following issue in the Linux kernel code: crypto: hifn_795x - Fix DMA setup
Problem Details: Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index 2969ea99f7c7..27b8af983aae 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -662,7 +662,6 @@ struct hifn_context unsigned int keysize, ivsize; u8 op, type, mode, unused; struct ablkcipher_walk walk; - ...
09fbf7c0f24176ef3b450c590f220ed8033dd2c3
Analyze and fix the following issue in the Linux kernel code: crypto: ansi_cprng - fix inverted DT increment routine
Problem Details: The ANSI X9.31 PRNG docs aren't particularly clear on how to increment DT, but empirical testing shows we're incrementing from the wrong end. A 10,000 iteration Monte Carlo RNG test currently winds up not getting the expected result. From http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf : ...
```diff diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c index 1b3b1da1fd35..0fac8ffc2fb7 100644 --- a/crypto/ansi_cprng.c +++ b/crypto/ansi_cprng.c @@ -161,7 +161,7 @@ static int _get_more_prng_bytes(struct prng_context *ctx) /* * Now update our DT value */ - for (i = 0; i < DEFAULT_BLK_SZ; i++) { + for ...
aa1a85dbd1d3265ca36f684026fe7689b7836bed
Analyze and fix the following issue in the Linux kernel code: crypto: ansi_cprng - Avoid incorrect extra call to _get_more_prng_bytes
Problem Details: While working with some FIPS RNGVS test vectors yesterday, I discovered a little bug in the way the ansi_cprng code works right now. For example, the following test vector (complete with expected result) from http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf ... Key = f3b1666d13607242ed061...
```diff diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c index 486aa93646f7..1b3b1da1fd35 100644 --- a/crypto/ansi_cprng.c +++ b/crypto/ansi_cprng.c @@ -223,9 +223,10 @@ remainder: } /* - * Copy up to the next whole block size + * Copy any data less than an entire block */ if (byte_count < DEFAULT_BL...
53b146ae598268edbe2bf7ea7dfec721d51adddd
Analyze and fix the following issue in the Linux kernel code: libcrc32c: Fix "crc32c undefined" compilation error
Problem Details: The latest shash changes leave crc32c undefined: [...] Building modules, stage 2. MODPOST 1381 modules ERROR: "crc32c" [net/sctp/sctp.ko] undefined! ERROR: "crc32c" [net/ipv4/netfilter/nf_nat_proto_sctp.ko] undefined! Adding EXPORT_SYMBOL(crc32c) to lib/libcrc32c.c fixes the compile error. This...
```diff diff --git a/lib/libcrc32c.c b/lib/libcrc32c.c index 38b17ab52ff9..244f5480c898 100644 --- a/lib/libcrc32c.c +++ b/lib/libcrc32c.c @@ -57,6 +57,8 @@ u32 crc32c(u32 crc, const void *address, unsigned int length) return *(u32 *)desc.ctx; } +EXPORT_SYMBOL(crc32c); + static int __init libcrc32c_mod_init(void)...
2566578a6feb9d9e39da41326afe8ed6022db3c5
Analyze and fix the following issue in the Linux kernel code: crypto: ansi_cprng - Allow resetting of DT value
Problem Details: This is a patch that was sent to me by Jarod Wilson, marking off my outstanding todo to allow the ansi cprng to set/reset the DT counter value in a cprng instance. Currently crytpo_rng_reset accepts a seed byte array which is interpreted by the ansi_cprng as a {V key} tuple. This patch extends that t...
```diff diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c index 72db0fd763cc..486aa93646f7 100644 --- a/crypto/ansi_cprng.c +++ b/crypto/ansi_cprng.c @@ -349,15 +349,25 @@ static int cprng_get_random(struct crypto_rng *tfm, u8 *rdata, return get_prng_bytes(rdata, dlen, prng); } +/* + * This is the cprng_regi...
4b24ea971a93f5d0bec34bf7bfd0939f70cfaae6
Analyze and fix the following issue in the Linux kernel code: crypto: talitos - Preempt overflow interrupts off-by-one fix
Problem Details: In commit ec6644d6325b5a38525f1d5b20fd4bf7db05cf2a "crypto: talitos - Preempt overflow interrupts", the test in atomic_inc_not_zero was interpreted by the author to be applied after the increment operation (not before). This off-by-one fix prevents overflow error interrupts from occurring when requests...
```diff diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 16c97caa17ac..c3df3b1df857 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -1598,7 +1598,7 @@ static int talitos_probe(struct of_device *ofdev, goto err_out; } for (i = 0; i < priv->num_channels; i++) - atomic...
32bd78e0a5d34cd8e34046502bddcf31aeb38e64
Analyze and fix the following issue in the Linux kernel code: crypto: camellia - use kernel-provided bitops, unaligned access
Problem Details: Remove the private implementation of 32-bit rotation and unaligned access with byteswapping. As a bonus, fixes sparse warnings: crypto/camellia.c:602:2: warning: cast to restricted __be32 crypto/camellia.c:603:2: warning: cast to restricted __be32 crypto/camellia.c:604:2: warning: cast to restricted _...
```diff diff --git a/crypto/camellia.c b/crypto/camellia.c index 493fee7e0a8b..964635d163f4 100644 --- a/crypto/camellia.c +++ b/crypto/camellia.c @@ -35,6 +35,8 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/bitops.h> +#include <asm/unaligned.h> static const u32 c...
1c2e8811eea5f0c5da3213ea206c2864fa4614fd
Analyze and fix the following issue in the Linux kernel code: crypto: talitos - Implement done interrupt mitigation
Problem Details: In talitos_interrupt, upon one done interrupt, mask further done interrupts, and ack only any error interrupt. In talitos_done, unmask done interrupts after completing processing. In flush_channel, ack each done channel processed. Keep done overflow interrupts masked because even though each pkt is ack...
```diff diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index c429f684c79d..b5c2c9340a9c 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -319,9 +319,11 @@ static void flush_channel(struct device *dev, int ch, int error, int reset_ch) /* descriptors with their done bits set ...
a44b56cc69a5b017f396ed1daeaef6a63e086656
Analyze and fix the following issue in the Linux kernel code: crypto: hifn - Disable driver when physical size exceeds 32 bits
Problem Details: On Tue, Sep 23, 2008 at 08:06:32PM +0200, Dimitri Puzin (max@psycast.de) wrote: > With this patch applied it still doesn't work as expected. The overflow > messages are gone however syslog shows > [ 120.924266] hifn0: abort: c: 0, s: 1, d: 0, r: 0. > when doing cryptsetup luksFormat as in original e-m...
```diff diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index 4d22b21bd3e3..2969ea99f7c7 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -2782,6 +2782,11 @@ static int __devinit hifn_init(void) unsigned int freq; int err; + if (sizeof(dma_addr_t) > 4) { + printk(K...
40f15ad8aadff5ebb621b17a6f303ad2cd3f847d
Analyze and fix the following issue in the Linux kernel code: x86: disable X86_PTRACE_BTS
Problem Details: there's a new ptrace arch level feature in .28: config X86_PTRACE_BTS bool "Branch Trace Store" it has broken fork() handling: the old DS area gets copied over into a new task without clearing it. Fixes exist but they came too late: c5dee61: x86, bts: memory accounting bf53de9: x86, bts: ad...
```diff diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index b815664fe370..8e99073b9e0f 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu @@ -520,6 +520,7 @@ config X86_PTRACE_BTS bool "Branch Trace Store" default y depends on X86_DEBUGCTLMSR + depends on BROKEN help This adds a ptrace ...
c1c15b65ec30275575dac9322aae607075769fbc
Analyze and fix the following issue in the Linux kernel code: x86: PAT: fix address types in track_pfn_vma_new()
Problem Details: Impact: cleanup, fix warning This warning: arch/x86/mm/pat.c: In function track_pfn_vma_copy: arch/x86/mm/pat.c:701: warning: passing argument 5 of follow_phys from incompatible pointer type Triggers because physical addresses are resource_size_t, not u64. This really matters when calling an inte...
```diff diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 541bcc944a5b..85cbd3cd3723 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c @@ -684,7 +684,7 @@ int track_pfn_vma_copy(struct vm_area_struct *vma) { int retval = 0; unsigned long i, j; - u64 paddr; + resource_size_t paddr; unsigned long prot;...
25051158bbed127e8672b43396c71c5eb610e5f1
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix race in xfs_write() between direct and buffered I/O with DMAPI
Problem Details: The iolock is dropped and re-acquired around the call to XFS_SEND_NAMESP(). While the iolock is released the file can become cached. We then 'goto retry' and - if we are doing direct I/O - mapping->nrpages may now be non zero but need_i_mutex will be zero and we will hit the WARN_ON(). Since we have ...
```diff diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 92ce34b3787a..7e90daa0d1d1 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c @@ -707,7 +707,6 @@ start: } } -retry: /* We can write back this queue in page reclaim */ current->backing_dev_info = mapping-...
d519c8d9ccb7956e61a55ce3a0fd6a25f42cbb33
Analyze and fix the following issue in the Linux kernel code: edac: fix edac core deadlock when removing a device
Problem Details: When deleting an edac device, we have to wait for its edac_dev.work to be completed before deleting the whole edac_dev structure. Since we have no idea which work in current edac_poller's workqueue is the work we are conerned about, we wait for all work in the edac_poller's workqueue to be proceseed. ...
```diff diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index 5fcd3d89c75d..4041e9143283 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -394,6 +394,12 @@ static void edac_device_workq_function(struct work_struct *work_req) mutex_lock(&device_ctls_mutex); + /* If w...
20ca9b3f4c6dfa0af8dd5b18a64df17eb994b54d
Analyze and fix the following issue in the Linux kernel code: cgroups: avoid accessing uninitialized data in failure path
Problem Details: If cgroup_get_rootdir() failed, free_cg_links() will be called in the failure path, but tmp_cg_links hasn't been initialized at that time. I introduced this bug in the 2.6.27 merge window. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Cc: Paul Menage <menage@...
```diff diff --git a/kernel/cgroup.c b/kernel/cgroup.c index a3415507bd0a..2606d0fb4e54 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1024,7 +1024,7 @@ static int cgroup_get_sb(struct file_system_type *fs_type, if (ret == -EBUSY) { mutex_unlock(&cgroup_mutex); mutex_unlock(&inode->i_mutex); - goto...
f00a189257836e5237ace3265f6991ef66a16c86
Analyze and fix the following issue in the Linux kernel code: w1: fix slave selection on big-endian systems
Problem Details: During test of the w1-gpio driver i found that in "w1.c:679 w1_slave_found()" the device id is converted to little-endian with "cpu_to_le64()", but its not converted back to cpu format in "w1_io.c:293 w1_reset_select_slave()". Based on a patch created by Andreas Hummel. [akpm@linux-foundation.org: re...
```diff diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c index 0d15b0eaf79a..5139c25ca962 100644 --- a/drivers/w1/w1_io.c +++ b/drivers/w1/w1_io.c @@ -356,7 +356,9 @@ int w1_reset_select_slave(struct w1_slave *sl) w1_write_8(sl->master, W1_SKIP_ROM); else { u8 match[9] = {W1_MATCH_ROM, }; - memcpy(&match[1...
c3d80000e3a812fe5a200d6bde755fbd7fa65481
Analyze and fix the following issue in the Linux kernel code: x86: export vector_used_by_percpu_irq
Problem Details: Impact: build fix lguest can be built as a module and makes use of this new symbol: ERROR: "vector_used_by_percpu_irq" [drivers/lguest/lg.ko] undefined! export it. Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 3f1d9d18df67..bce53e1352a0 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@ -9,6 +9,7 @@ #include <asm/apic.h> #include <asm/io_apic.h> #include <asm/smp.h> +#include <asm/irq.h> atomic_t irq_err_count; @@ -190,3 +191,5 @@...
7d87d5365556b1c6e8c00abcc632c3ad1fdc58b8
Analyze and fix the following issue in the Linux kernel code: x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
Problem Details: These commits: commit 95d313cf1c1ecedc8bec5727b09bdacbf67dfc45 Author: Mike Travis <travis@sgi.com> Date: Tue Dec 16 17:33:54 2008 -0800 x86: Add cpu_mask_to_apicid_and and commit 6eeb7c5a99434596c5953a95baa17d2f085664e3 Author: Mike Travis <travis@sgi.com> Date: Tue Dec 16 17:33:55 2...
```diff diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c index d451c9b9fdff..6ce497cc372d 100644 --- a/arch/x86/kernel/genx2apic_cluster.c +++ b/arch/x86/kernel/genx2apic_cluster.c @@ -114,7 +114,7 @@ static unsigned int x2apic_cpu_mask_to_apicid(const struct cpumask *cpumask) in...
36dffab679c7eeb91c2507400cf4da6e9e01164e
Analyze and fix the following issue in the Linux kernel code: sched: nominate preferred wakeup cpu, fix
Problem Details: Andrew Morton reported: > kernel/sched.c: In function 'schedule': > kernel/sched.c:3679: warning: 'active_balance' may be used uninitialized in this function > > This warning is correct - the code is buggy. In sched.c load_balance_newidle, there's real potential use of uninitialised variable - fix it...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index ae5ca3f9e776..756d981d91a4 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -3670,7 +3670,7 @@ redo: } if (!ld_moved) { - int active_balance; + int active_balance = 0; schedstat_inc(sd, lb_failed[CPU_NEWLY_IDLE]); if (!sd_idle && sd->flags & ...
b77b881f21b29aa7efa668fde69ee3dc0372ae3f
Analyze and fix the following issue in the Linux kernel code: x86: fix lguest used_vectors breakage, -v2
Problem Details: Impact: fix lguest, clean up 32-bit lguest used used_vectors to record vectors, but that model of allocating vectors changed and got broken, after we changed vector allocation to a per_cpu array. Try enable that for 64bit, and the array is used for all vectors that are not managed by vector_irq per_c...
```diff diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h index e6b82b17b072..dc27705f5443 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h @@ -320,16 +320,14 @@ static inline void set_intr_gate(unsigned int n, void *addr) _set_gate(n, GATE_INTERRUPT, addr, 0, 0, __KERNE...
49c2559e29884fbb13fd273a108b213decd1d8a5
Analyze and fix the following issue in the Linux kernel code: NFS: fix comment placement in nfs4xdr.c
Problem Details: Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 29656c5090c2..273d0010060c 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -3789,6 +3789,10 @@ static int decode_delegreturn(struct xdr_stream *xdr) return decode_op_hdr(xdr, OP_DELEGRETURN); } +/* + * END OF "GENERIC" DECODE ROUTINES. + */ + ...
05d564fe00c05bf8ff93948057ca1acb5bc68e10
Analyze and fix the following issue in the Linux kernel code: NFS: fix tabs in nfs4xdr.c
Problem Details: Signed-off-by: Andy Adamson<andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 7dde309ce1ac..29656c5090c2 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -755,12 +755,12 @@ static int encode_commit(struct xdr_stream *xdr, const struct nfs_writeargs *arg { __be32 *p; - RESERVE_SPACE(16); - WRITE32(OP_COMMIT);...
027b6ca02192f381a5a91237ba8a8cf625dc6f6a
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix an infinite loop in the NFS state recovery code
Problem Details: Marten Gajda <marten.gajda@fernuni-hagen.de> states: I tracked the problem down to the function nfs4_do_open_expired. Within this function _nfs4_open_expired is called and may return -NFS4ERR_DELAY. When a further call to _nfs4_open_expired is executed and does not return -NFS4ERR_DELAY the "exception...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e8df52dc2bc5..49eebe25bbad 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1104,8 +1104,9 @@ static inline int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4 do { err = _nfs4_open_expired(ctx, state); - if (err == -NFS4E...
6dcd3926b214a1fb081df18305921dedae269977
Analyze and fix the following issue in the Linux kernel code: sunrpc: fix code that makes auth_gss send destroy_cred message (try #2)
Problem Details: There's a bit of a chicken and egg problem when it comes to destroying auth_gss credentials. When we destroy the last instance of a GSSAPI RPC credential, we should send a NULL RPC call with a GSS procedure of RPCSEC_GSS_DESTROY to hint to the server that it can destroy those creds. This isn't happeni...
```diff diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index b8561597f0c8..cb19c9ded1fa 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c @@ -693,7 +693,7 @@ gss_destroying_context(struct rpc_cred *cred) struct rpc_task *task; if (gss_cred->gc_ctx == NU...
9082a5cc1e33d081f091f54e6ed69a0628a4bdcc
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix up delegation callbacks
Problem Details: Currently, the callback server is listening on IPv6 if it is enabled. This means that IPv4 addresses will always be mapped. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/client.c b/fs/nfs/client.c index b643f0ec5c21..9b728f3565a1 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -223,31 +223,54 @@ void nfs_put_client(struct nfs_client *clp) } } -static int nfs_sockaddr_match_ipaddr4(const struct sockaddr_in *sa1, - const struct sockaddr_in *sa2)...
0d62f85a81216f30a0ba1479b93e84103a5d535b
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix a BAD_SEQUENCEID condition.
Problem Details: We really shouldn't be resetting the sequence ids when doing state expiration recovery, since we don't know if the server still remembers our previous state owners. There are servers out there that do attempt to preserve client state even if the lease has expired. Such a server would only release that ...
```diff diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 9e76712dcae9..6dc36a0d9a85 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -951,7 +951,6 @@ static void nfs4_clear_open_state(struct nfs4_state *state) clear_bit(NFS_O_WRONLY_STATE, &state->flags); clear_bit(NFS_O_RDWR_STATE, &state->fla...
f3c76491e7ecacbb7942633f3b2a3514b7476ef9
Analyze and fix the following issue in the Linux kernel code: NFSv4: Don't exit the state management if there are still tasks to do
Problem Details: Fix up a potential race... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 83f3dd39ac55..9e76712dcae9 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1112,7 +1112,7 @@ static void nfs4_state_manager(struct nfs_client *clp) int status = 0; /* Ensure exclusive access to NFSv4 state */ - while (!list_empty(&clp...
b79a4a1b45b2543e38026303a1956bdc0aababa0
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix state recovery when the client runs over the grace period
Problem Details: If the client for some reason is not able to recover all its state within the time allotted for the grace period, and the server reboots again, the client is not allowed to recover the state that was 'lost' using reboot recovery. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 0ac6bbb8eaa4..1c6fbd1cda97 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h @@ -40,6 +40,9 @@ struct idmap; enum nfs4_client_state { NFS4CLNT_STATE_RECOVER = 0, NFS4CLNT_LEASE_EXPIRED, + NFS4CLNT_RECLAIM_REBOOT, + NFS4CLNT_RECLAIM_NOGRACE, + NFS4C...
86e894899820f2b3094d5557124fc22743ae0fc7
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix up the dereferencing of delegation->inode
Problem Details: Without an extra lock, we cannot just assume that the delegation->inode is valid when we're traversing the rcu-protected nfs_client lists. Use the delegation->lock to ensure that it is truly valid. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index e0cb4ee3b23e..13f2044a30be 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -134,6 +134,17 @@ static int nfs_do_return_delegation(struct inode *inode, struct nfs_delegation * return res; } +static struct inode *nfs_delegation_grab_in...
343104308a33c4f1e23c8e841ede95e97b870842
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix up another delegation related race
Problem Details: When we can update_open_stateid(), we need to be certain that we don't race with a delegation return. While we could do this by grabbing the nfs_client->cl_lock, a dedicated spin lock in the delegation structure will scale better. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index cc563cfa6940..e0cb4ee3b23e 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -140,13 +140,17 @@ static struct nfs_delegation *nfs_detach_delegation_locked(struct nfs_inode *nfs if (delegation == NULL) goto nomatch; + spin_lock(&dele...
d740351bf0960e89ce1aef45cfe00167cb0f9e5b
Analyze and fix the following issue in the Linux kernel code: NFS: add "[no]resvport" mount option
Problem Details: The standard default security setting for NFS is AUTH_SYS. An NFS client connects to NFS servers via a privileged source port and a fixed standard destination port (2049). The client sends raw uid and gid numbers to identify users making NFS requests, and the server assumes an appropriate authority o...
```diff diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 27190337fc13..3a69cacc4fa4 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -627,7 +627,8 @@ static int nfs_init_client(struct nfs_client *clp, * Create a client RPC handle for doing FSSTAT with UNIX auth only * - RFC 2623, sec 2.3.2 */ - error ...
df94f000c46c055cf439f5b92807cd827557ffbc
Analyze and fix the following issue in the Linux kernel code: lockd: convert reclaimer thread to kthread interface
Problem Details: My understanding is that there is a push to turn the kernel_thread interface into a non-exported symbol and move all kernel threads to use the kthread API. This patch changes lockd to use kthread_run to spawn the reclaimer thread. I've made the assumption here that the extra module references taken wh...
```diff diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index 8307dd64bf46..94d42cc4e393 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c @@ -14,6 +14,7 @@ #include <linux/sunrpc/svc.h> #include <linux/lockd/lockd.h> #include <linux/smp_lock.h> +#include <linux/kthread.h> #define NLMDBG_FACILITY ...
136221fc3219b3805c48db5da065e8e3467175d4
Analyze and fix the following issue in the Linux kernel code: nfs: remove redundant tests on reading new pages
Problem Details: aops->readpages() and its NFS helper readpage_async_filler() will only be called to do readahead I/O for newly allocated pages. So it's not necessary to test for the always 0 dirty/uptodate page flags. The removal of nfs_wb_page() call also fixes a readahead bug: the NFS readahead has been synchronous...
```diff diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 40d17987d0e8..f856004bb7fa 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -533,12 +533,6 @@ readpage_async_filler(void *data, struct page *page) unsigned int len; int error; - error = nfs_wb_page(inode, page); - if (error) - goto out_unlock; - if (PageU...
a8ccf1d6f60e3e6ae63122e02378cd4d40dd4aac
Analyze and fix the following issue in the Linux kernel code: ring-buffer: fix dangling commit race
Problem Details: Impact: fix stuck trace-buffers If an interrupt comes in during the rb_set_commit_to_write and pushes the tail page forward just at the right time, the commit updates will miss the adding of the interrupt data. This will cause the commit pointer to cease from moving forward. Thanks to Jiaying Zhang f...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index bb6922a931b1..d03f4f44a823 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -838,6 +838,7 @@ rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer) * back to us). This allows us to do a simple loop t...
722d74219ea21223c74e5e894b0afcc5e4ca75a7
Analyze and fix the following issue in the Linux kernel code: dlm: fs/dlm/ast.c: fix warning
Problem Details: fs/dlm/ast.c: In function 'dlm_astd': fs/dlm/ast.c:64: warning: 'bastmode' may be used uninitialized in this function Cleans code up. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Teigland <teigland@redhat.com>
```diff diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c index fbe840d09493..dc2ad6008b2d 100644 --- a/fs/dlm/ast.c +++ b/fs/dlm/ast.c @@ -61,30 +61,23 @@ static void process_asts(void) struct dlm_lkb *lkb; void (*cast) (void *astparam); void (*bast) (void *astparam, int mode); - int type = 0, found, bastmode; - - for (;...
d6d7b702a3a1ca50f7ca2bebaa79c80425156bac
Analyze and fix the following issue in the Linux kernel code: dlm: fix up memory allocation flags
Problem Details: Use ls_allocation for memory allocations, which a cluster fs sets to GFP_NOFS. Use GFP_NOFS for allocations when no lockspace struct is available. Taking dlm locks needs to avoid calling back into the cluster fs because write-out can require taking dlm locks. Cc: Christine Caulfield <ccaulfie@redhat...
```diff diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 3962262f991a..1e720316300b 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -295,6 +295,7 @@ static int add_sock(struct socket *sock, struct connection *con) con->sock->sk->sk_write_space = lowcomms_write_space; con->sock->sk->sk_state_change...
0dff86aa7b9ec65a6d07167b7afb050b5fc98ddc
Analyze and fix the following issue in the Linux kernel code: x86, perfcounters: print out the ->used bitmask
Problem Details: Impact: extend debug printouts Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index 74090a393a7c..f3359c2b3910 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c @@ -255,6 +255,7 @@ static int pmc_generic_enable(struct perf_counter *counter) idx = find_first_zero_...
78b6084c907cea15bb40a564b974e072f5163781
Analyze and fix the following issue in the Linux kernel code: perfcounters: fix init context lock
Problem Details: Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 54fa2fa2c8e4..467cff545c30 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -116,7 +116,9 @@ extern struct group_info init_groups; #ifdef CONFIG_PERF_COUNTERS # define INIT_PERF_COUNTERS(tsk) \ .perf_counte...
aa9c4c0f967fdb482ea95e8473ec3d201e6e0781
Analyze and fix the following issue in the Linux kernel code: perfcounters: fix task clock counter
Problem Details: Impact: fix per task clock counter precision Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 4a145caeee07..1b2e3242497c 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -66,7 +66,15 @@ static inline unsigned int kstat_irqs(unsigned int irq) return sum; } + +/* + * Lock/unlock the current runqu...
8fb9331391af95ca1f4e5c0a0da8120b13cbae01
Analyze and fix the following issue in the Linux kernel code: perfcounters: remove warnings
Problem Details: Impact: remove debug checks Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index bdbdb56eaa34..89fad5d4fb37 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c @@ -64,7 +64,6 @@ x86_perf_counter_update(struct perf_counter *counter, { u64 prev_raw_count, new_raw_...
231ffc9c07021afcfb1afa229aa4935730e5163b
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (9920): em28xx: fix NULL pointer dereference in call to VIDIOC_INT_RESET command
Problem Details: Fix a NULL pointer dereference that would occur if the video decoder tied to the em28xx supports the VIDIOC_INT_RESET call (for example: the cx25840 driver) Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 610f535a257c..4ea1f1e04897 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -549,10 +549,11 @@ static int em28xx_config(struct em28xx *dev) static vo...
af14a1ad792621942a03e4bd0e5f17b6e177e2e0
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix available blocks count
Problem Details: Take into account that 2 eraseblocks are never available because they are reserved for the index. This gives more realistic count of FS blocks. To avoid future confusions like this, introduce a constant. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
```diff diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c index d5a65037e172..e42342547001 100644 --- a/fs/ubifs/budget.c +++ b/fs/ubifs/budget.c @@ -280,13 +280,8 @@ int ubifs_calc_min_idx_lebs(struct ubifs_info *c) * extra LEB to compensate. */ ret += 1; - /* - * At present the index needs at least 2 LEBs: ...
d3cf502b6ccee1c52890d42cd18cbc98b7526126
Analyze and fix the following issue in the Linux kernel code: UBIFS: various comment improvements and fixes
Problem Details: Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
```diff diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c index 10ba663eb329..dfd2bcece27a 100644 --- a/fs/ubifs/lprops.c +++ b/fs/ubifs/lprops.c @@ -520,13 +520,13 @@ static int is_lprops_dirty(struct ubifs_info *c, struct ubifs_lprops *lprops) * @flags: new flags * @idx_gc_cnt: change to the count of idx_gc list...
24fa9e9438b263600737c839b36543981d87d65b
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix tnc dumping
Problem Details: debugfs tnc dumping was broken because of an obvious typo. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
```diff diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 934db1855f09..367d97520d95 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -2443,7 +2443,7 @@ static ssize_t write_debugfs_file(struct file *file, const char __user *buf, spin_lock(&c->space_lock); dbg_dump_budg(c); spin_unlock(&c->space_lo...
3a0c58ddcd4f0edb37d6008db2a33c9756ec916c
Analyze and fix the following issue in the Linux kernel code: Input: ads7846 - strict_strtoul takes unsigned long
Problem Details: Fix sparse warning introduced by: commit 160f1fef7e52e974489b3c70fbd4e094c06965c2 Input: convert drivers to use strict_strtoul() Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 6017ea6e994e..d0004dc44c86 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -472,7 +472,7 @@ static ssize_t ads7846_disable_store(struct device *dev, const char *bu...
7b37b5fd9ba32c0c5afc3537eed7e7466f2173e2
Analyze and fix the following issue in the Linux kernel code: ACPI: disable MPS when NO APIC-table found
Problem Details: When ACPI is asked to find an MADT (APIC table) and fails, then ACPI expects to run in PIC mode. However, if an MP Table is was found, IRQs will be registered as if an IOAPIC is being used, even though ACPI is configuring interrupt links links for PIC mode. In this scenario, disable MPS so that IRQs ...
```diff diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 4c51a2f8fd31..de8ce79dd881 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -1359,6 +1359,17 @@ static void __init acpi_process_madt(void) "Invalid BIOS MADT, disabling ACPI\n"); disable_acpi...
b906cfa397fdef8decbd36467b1f63c830a0bf2b
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries: Fix cpu hotplug
Problem Details: Currently, pseries_cpu_die() calls msleep() while polling RTAS for the status of the dying cpu. However, if the cpu that is going down also happens to be the one doing the tick then we're hosed as the tick_do_timer_cpu 'baton' is only passed later on in tick_shutdown() when _cpu_down() does the CPU_DE...
```diff diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 1f032483c026..a20ead87153d 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -116,7 +116,7 @@ static void pseries_cpu_die(unsigned int cpu)...
fad7b9b51e21a97e9e2662f1b51869ed2d209097
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix KVM build on ppc440
Problem Details: Commit 2a4aca1144394653269720ffbb5a325a77abd5fa ("powerpc/mm: Split low level tlb invalidate for nohash processors") changed a call to _tlbia to _tlbil_all but didn't include the header that defines _tlbil_all, leading to a build failure on 440 if KVM is enabled. This fixes it. Signed-off-by: Paul Mac...
```diff diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index eb955d755c9a..8bef0efcdfe1 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -28,6 +28,7 @@ #include <asm/uaccess.h> #include <asm/kvm_ppc.h> #include <asm/tlbflush.h> +#include "../mm/mmu_decl.h" gfn_t ...
11e5e8f5d14a1229706576184d2cf4c4556ed94c
Analyze and fix the following issue in the Linux kernel code: r6040: fix wrong logic in mdio code
Problem Details: This patch fixes a reverse logic in the MDIO code. Signed-off-by: Joe Chou <Joe.Chou@rdc.com.tw> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 281080d579e1..cc5e316de571 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c @@ -214,7 +214,7 @@ static int r6040_phy_read(void __iomem *ioaddr, int phy_addr, int reg) /* Wait for the read bit to be cleared */ while (limit--) { cmd = i...
5f2f6da76c429c42d54f73807f00b8fd761a7d68
Analyze and fix the following issue in the Linux kernel code: net: Fix oops in dev_ifsioc()
Problem Details: A command like this: "brctl addif br1 eth1" issued as a user gave me an oops when bridge module wasn't loaded. It's caused by using a dev pointer before checking for NULL. Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/dev.c b/net/core/dev.c index 048cf1197872..daca72e6b37b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3745,11 +3745,13 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd) { int err; struct net_device *dev = __dev_get_by_name(net, ifr->ifr_name); - con...
077ebed54fe66612f58b076628a72eca2be8df90
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix correctness of irq_enabled check for radeon.
Problem Details: This check was introduced with the logic the wrong way around. Fixes regression: http://bugzilla.kernel.org/show_bug.cgi?id=12216 Tested-by: François Valenduc <francois.valenduc@tvcablenet.be> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_irq.c b/drivers/gpu/drm/radeon/radeon_irq.c index 99be11418ac2..8289e16419a8 100644 --- a/drivers/gpu/drm/radeon/radeon_irq.c +++ b/drivers/gpu/drm/radeon/radeon_irq.c @@ -44,7 +44,7 @@ void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state) else de...
e68558ddcdbfa8cc2e7811bcada3bcbeef79fd4a
Analyze and fix the following issue in the Linux kernel code: powerpc/cell: fix build breakage with CONFIG_SPUFS disabled
Problem Details: CBE_THERM and OPROFILE_CELL both cannot be built without SPU_FS disabled, so make the dependency explicit. Reported-by: Milton Miller <miltonm@bga.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
```diff diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig index c14d7d8d96c8..617f84547b30 100644 --- a/arch/powerpc/platforms/cell/Kconfig +++ b/arch/powerpc/platforms/cell/Kconfig @@ -102,7 +102,7 @@ config PPC_IBM_CELL_POWERBUTTON config CBE_THERM tristate "CBE thermal support...
a01777ecf227de735d7e525ecda48fe74b838a17
Analyze and fix the following issue in the Linux kernel code: uwb: remove unused include/linux/uwb/debug.h
Problem Details: Signed-off-by: David Vrabel <david.vrabel@csr.com>
```diff diff --git a/drivers/uwb/address.c b/drivers/uwb/address.c index 1664ae5f1706..ad21b1d7218c 100644 --- a/drivers/uwb/address.c +++ b/drivers/uwb/address.c @@ -28,7 +28,7 @@ #include <linux/device.h> #include <linux/random.h> #include <linux/etherdevice.h> -#include <linux/uwb/debug.h> + #include "uwb-intern...
472346da9cc4231bec03ff2032e0d5fd4037232c
Analyze and fix the following issue in the Linux kernel code: ALSA: ASoC: fix a typo in omp-pcm.c
Problem Details: Fix a typo (& and &&) Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 803581c9280d..b0362dfd5b71 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -97,7 +97,7 @@ static int omap_pcm_hw_params(struct snd_pcm_substream *substream, prtd->dma_data = dma_data; err = omap_request_dma(dm...
c69134858722977a82f58cae88e7ffdb28e1e858
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix DSP formats in SSM2602 audio codec
Problem Details: Thanks to Troy Kisky <troy.kisky@boundarydevices.com> for noticing. - DSP_A format has 1-bit data delay which corresponds to SSM6202 submode 2 - DSP_B has 0-bit data delay which corresponds to submode 1 - Currently driver sets them opposite so swap the submode setting Signed-off-by: Jarkko Nikula <ja...
```diff diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c index 2325aefea411..cac373616768 100644 --- a/sound/soc/codecs/ssm2602.c +++ b/sound/soc/codecs/ssm2602.c @@ -454,10 +454,10 @@ static int ssm2602_set_dai_fmt(struct snd_soc_dai *codec_dai, iface |= 0x0001; break; case SND_SOC_DAIFMT_D...
bd25867a6cbe7a00ef7dbe8d9ddebc91b00b9b3f
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix incorrect DSP format in OMAP McBSP DAI and affected drivers
Problem Details: - OMAP McBSP DAI driver claims to support DSP_A format which has 1-bit data delay but configures link for 0-bit data delay which is in fact DSP_B - Fix this by changing format from DSP_A to DSP_B - Fix also TLV320AIC23 codec and OSK5912 machine drivers since the same error is populated also there ...
```diff diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 39f5b981d25a..cfdea007c4cb 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c @@ -541,7 +541,7 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai, case SND_SOC_DAIFMT_I2S: iface...
59de580af1c2fd671b0cb27c41ff958859ae5288
Analyze and fix the following issue in the Linux kernel code: sh: oprofile: Fix up the module build.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/oprofile/backtrace.c b/arch/sh/oprofile/backtrace.c index 418e834654c1..9499a2914f89 100644 --- a/arch/sh/oprofile/backtrace.c +++ b/arch/sh/oprofile/backtrace.c @@ -85,11 +85,7 @@ kernel_backtrace(unsigned long *stackaddr, struct pt_regs *regs) */ do { addr = *stackaddr++; - - if ...
b0c50ad71746c4ad148f366135e3c87e32729108
Analyze and fix the following issue in the Linux kernel code: serial: sh-sci: Fix up port pinmux for SH7366.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index a628081e586e..557b54ab2f25 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -269,7 +269,7 @@ static inline void sci_init_pins(struct uart_port *port, unsigned int cflag) if (!(cflag & CRTSCTS)) __raw_writew(0x0080, SC...