id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c1b14c0a46232246f61d3157bac1201e1e102227
Analyze and fix the following issue in the Linux kernel code: [NetLabel]: Comment corrections.
Problem Details: Fix some incorrect comments. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 835b485b2afd..4f7642c7337e 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -2617,7 +2617,7 @@ int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, } /** - * selinux_netlbl_sock...
99f59ed073d3c1b890690064ab285a201dea2e35
Analyze and fix the following issue in the Linux kernel code: [NetLabel]: Correctly initialize the NetLabel fields.
Problem Details: Fix a problem where the NetLabel specific fields of the sk_security_struct structure were not being initialized early enough in some cases. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 180b26b97d2d..5a66c4c09f7a 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -281,6 +281,8 @@ static int sk_alloc_security(struct sock *sk, int family, gfp_t priority) ssec->sid = SECINITSID_UNLABELED; sk->sk_securi...
8394e9b2faf539f82470b36c86f0485cab5278bd
Analyze and fix the following issue in the Linux kernel code: [NETFILTER] bridge: debug message fixes
Problem Details: If CONFIG_NETFILTER_DEBUG is enabled, it shouldn't change the actions of the filtering. The message about skb->dst being NULL is commonly triggered by dhclient, so it is useless. Make sure all messages end in newline. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Mille...
```diff diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index b498efcfe451..cf80dd0e896d 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c @@ -718,16 +718,6 @@ static unsigned int br_nf_local_out(unsigned int hook, struct sk_buff **pskb, else pf = PF_INET6; -#ifdef CONFIG_...
0719bdf1b5e7eb0d9c3c73ebbd9c9d5d382bb9e1
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: xt_CONNMARK.c build fix
Problem Details: net/netfilter/xt_CONNMARK.c: In function 'target': net/netfilter/xt_CONNMARK.c:59: warning: implicit declaration of function 'nf_conntrack_event_cache' The warning is due to the following .config: CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CONNTRACK_EVENTS is not set CONFIG_...
```diff diff --git a/net/netfilter/xt_CONNMARK.c b/net/netfilter/xt_CONNMARK.c index 0e4249ddc17b..6ccb45ee0880 100644 --- a/net/netfilter/xt_CONNMARK.c +++ b/net/netfilter/xt_CONNMARK.c @@ -53,7 +53,7 @@ target(struct sk_buff **pskb, newmark = (*ctmark & ~markinfo->mask) | markinfo->mark; if (newmark != *ctmar...
33cc48966827165e49de1cb8ff4fb57c127d4be0
Analyze and fix the following issue in the Linux kernel code: [IPV6] ROUTE: Fix dst reference counting in ip6_pol_route_lookup().
Problem Details: In ip6_pol_route_lookup(), when we finish backtracking at the top-level root entry, we need to hold it. Bug noticed by Mitsuru Chinen <CHINEN@jp.ibm.com>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 75f4bb9611ce..d6b4b4f48d18 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -510,8 +510,8 @@ restart: rt = fn->leaf; rt = rt6_device_match(rt, fl->oif, flags); BACKTRACK(&fl->fl6_src); - dst_hold(&rt->u.dst); out: + dst_hold(&rt->u.dst); rea...
6a28ec8cd0c6993a4ac0d52f4347f7ed077b5cac
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix nf_conntrack_ftp.c build.
Problem Details: Noticed by Adrian Bunk. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c index 9dccb4039889..0c17a5bd112b 100644 --- a/net/netfilter/nf_conntrack_ftp.c +++ b/net/netfilter/nf_conntrack_ftp.c @@ -21,6 +21,7 @@ #include <linux/ip.h> #include <linux/ipv6.h> #include <linux/ctype.h> +#include <linux/inet...
366e4adc0f9ef33f56c62f980a7d83775e64abd0
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix routing by fwmark
Problem Details: Fix mark comparison, also dump the mask to userspace when the mask is zero, but the mark is not (in which case the mark is dumped, so the mask is needed to make sense of it). Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index ee4aa43ad973..2fbc71d90187 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c @@ -129,7 +129,7 @@ static int fib6_rule_match(struct fib_rule *rule, struct flowi *fl, int flags) return 0; #ifdef CONFIG_IPV6_ROUTE_FWMARK - if ((r->...
267935b197d2a6e6924f9de2841f0470bfe63acd
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix build with fwmark disabled.
Problem Details: Based upon a patch by Brian Haley. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 649350bd9299..d83844d9499b 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -703,7 +703,9 @@ void ip6_route_input(struct sk_buff *skb) .ip6_u = { .daddr = iph->daddr, .saddr = iph->saddr, +#ifdef CONFIG_IPV6_ROUTE_FWMARK .fwmark = ...
2613aad5ab28579687519918cdc353af0eed5a3f
Analyze and fix the following issue in the Linux kernel code: [IPV6] ROUTE: Fix size of fib6_rule_policy.
Problem Details: It should not be RTA_MAX+1 but FRA_MAX+1. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index b4cd5c03b0b6..3d64c71f52de 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c @@ -135,7 +135,7 @@ static int fib6_rule_match(struct fib_rule *rule, struct flowi *fl, int flags) return 1; } -static struct nla_policy fib6_rule_polic...
6c5eb6a50741b882fd99fbb8178942ca2f74b724
Analyze and fix the following issue in the Linux kernel code: [IPV6] ROUTE: Fix FWMARK support.
Problem Details: - Add missing nla_policy entry. - type of fwmark is u32, not u8. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index aebd9e2b85a8..b4cd5c03b0b6 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c @@ -27,7 +27,7 @@ struct fib6_rule struct rt6key src; struct rt6key dst; #ifdef CONFIG_IPV6_ROUTE_FWMARK - u8 fwmark; + u32 fwmark; #endif u8 ...
1ccf6aa19aabc11587d6d7818a5729adfed0e3de
Analyze and fix the following issue in the Linux kernel code: IB/uverbs: Fix lockdep warning when QP is created with 2 CQs
Problem Details: Lockdep warns when userspace creates a QP that uses different CQs for send completions and receive completions, because both CQs are locked and their mutexes belong to the same lock class. However, we know that the mutexes are distinct and the nesting is safe (there is no possibility of AB-BA deadlock...
```diff diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index b81307b625a6..8b6df7cec0bf 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -155,7 +155,7 @@ static struct ib_uobject *__idr_get_uobj(struct idr *idr, int id, } stati...
9217b27b12eb5ab910d14b3376c2b6cd13d87711
Analyze and fix the following issue in the Linux kernel code: IB/ipoib: Fix flush/start xmit race (from code review)
Problem Details: Prevent flush task from freeing the ipoib_neigh pointer, while ipoib_start_xmit() is accessing the ipoib_neigh through the pointer it has loaded from the skb's hardware address. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index cf71d2a5515c..36d76987a481 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -336,7 +336,8 @@ void ipoib_flush_paths(struct net_device *dev) struct i...
b27075735e371f481940a4920b329202334d2259
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Fix lid used for sending traps
Problem Details: The SM LID used to send traps to is incorrectly set to port LID. This is a regression from 2.6.17 -- after a PortInfo MAD is received, no traps are sent to the SM LID. The traps go to the loopback interface instead, and are dropped there. The SM LID should be taken from the sm_lid of the PortInfo re...
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_mad.c b/drivers/infiniband/hw/mthca/mthca_mad.c index d9bc030bcccc..45e106f14807 100644 --- a/drivers/infiniband/hw/mthca/mthca_mad.c +++ b/drivers/infiniband/hw/mthca/mthca_mad.c @@ -119,7 +119,7 @@ static void smp_snoop(struct ib_device *ibdev, mthca_update...
2518c7c2b3d7f0a6b302b4efe17c911f8dd4049f
Analyze and fix the following issue in the Linux kernel code: [XFRM]: Hash policies when non-prefixed.
Problem Details: This idea is from Alexey Kuznetsov. It is common for policies to be non-prefixed. And for that case we can optimize lookups, insert, etc. quite a bit. For each direction, we have a dynamically sized policy hash table for non-prefixed policies. We also have a hash table on policy->index. For prefix...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index c7870b6eae01..0acabf2a0a8f 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -331,7 +331,8 @@ struct xfrm_tmpl struct xfrm_policy { struct xfrm_policy *next; - struct list_head list; + struct hlist_node bydst; + struct hlist_node byidx; ...
654b32c6aad19d2fd363813cd8a1a1e64daf611b
Analyze and fix the following issue in the Linux kernel code: [XFRM]: Fix message about transformation user interface.
Problem Details: Transformation user interface is not only for IPsec. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig index 0c1c04322baf..43228f7fd3a0 100644 --- a/net/xfrm/Kconfig +++ b/net/xfrm/Kconfig @@ -6,11 +6,11 @@ config XFRM depends on NET config XFRM_USER - tristate "IPsec user configuration interface" + tristate "Transformation user configuration interface"...
e53820de0f81da1429048634cadc6ef5f50c2f8b
Analyze and fix the following issue in the Linux kernel code: [XFRM] IPV6: Restrict bundle reusing
Problem Details: For outbound transformation, bundle is checked whether it is suitable for current flow to be reused or not. In such IPv6 case as below, transformation may apply incorrect bundle for the flow instead of creating another bundle: - The policy selector has destination prefix length < 128 (Two or more ad...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 248874ecf8df..7f1630630dcf 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -869,6 +869,23 @@ xfrm_state_addr_check(struct xfrm_state *x, return 0; } +static __inline__ int +xfrm_state_addr_flow_check(struct xfrm_state *x, struct flowi *...
c0bece9f2aec546c3750ae3972f80e024a923f34
Analyze and fix the following issue in the Linux kernel code: [IPV6] ROUTE: Add credits about subtree fixes.
Problem Details: Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index f0fdaf182b3f..fbca60950b14 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -18,6 +18,7 @@ * Yuji SEKIYA @USAGI: Support default route on router node; * remove ip6_null_entry from the top of * routing table. + * Ville Nuorvala...
3fc5e0440be7fab3abae4e801b0ef17e9b3b58c4
Analyze and fix the following issue in the Linux kernel code: [IPV6] ROUTE: Fix looking up a route on subtree.
Problem Details: Even on RTN_ROOT node, we need to process its subtree first. Fix NULL pointer dereference in fib6_locate(). Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 35b91ff95db2..5408b64f3b5f 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -850,33 +850,26 @@ static struct fib6_node * fib6_lookup_1(struct fib6_node *root, break; } - while ((fn->fn_flags & RTN_ROOT) == 0) { -#ifdef CONFIG_IPV6_SUBT...
2809486424df58043b380aeb9d7f402c031c46f6
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: x_tables: Fix typos after conversion to use mass registation helper
Problem Details: Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netfilter/xt_CONNSECMARK.c b/net/netfilter/xt_CONNSECMARK.c index 4b0e14bb1726..467386266674 100644 --- a/net/netfilter/xt_CONNSECMARK.c +++ b/net/netfilter/xt_CONNSECMARK.c @@ -130,14 +130,14 @@ static struct xt_target xt_connsecmark_target[] = { static int __init xt_connsecmark_init(void) {...
1158ba27bec6d1a20999099a938908cf85f47640
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: nfnetlink_queue: fix typo in error message
Problem Details: Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index eddfbe4441a2..8eb2473d83e1 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c @@ -584,7 +584,7 @@ nfqnl_enqueue_packet(struct sk_buff *skb, struct nf_info *info, queue->queue_dro...
a468701db58a8b3e08e3f55fa6ac66db42014922
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: x_tables: replace IPv4 DSCP target by address family independent version
Problem Details: This replaces IPv4 DSCP target by address family independent version. This also - utilizes dsfield.h to get/mangle DS field in IPv4/IPv6 header - fixes Kconfig help text. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: ...
```diff diff --git a/include/linux/netfilter/xt_DSCP.h b/include/linux/netfilter/xt_DSCP.h new file mode 100644 index 000000000000..3c7c963997bd --- /dev/null +++ b/include/linux/netfilter/xt_DSCP.h @@ -0,0 +1,20 @@ +/* x_tables module for setting the IPv4/IPv6 DSCP field + * + * (C) 2002 Harald Welte <laforge@gnumonks...
9ba1627617d396135a4d679542a3623d5819e628
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: x_tables: replace IPv4 dscp match by address family independent version
Problem Details: This replaces IPv4 dscp match by address family independent version. This also - utilizes dsfield.h to get the DS field in IPv4/IPv6 header, and - checks for the DSCP value from user space. - fixes Kconfig help text. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Pa...
```diff diff --git a/include/linux/netfilter/xt_dscp.h b/include/linux/netfilter/xt_dscp.h new file mode 100644 index 000000000000..1da61e6acaf7 --- /dev/null +++ b/include/linux/netfilter/xt_dscp.h @@ -0,0 +1,23 @@ +/* x_tables module for matching the IPv4/IPv6 DSCP field + * + * (C) 2002 Harald Welte <laforge@gnumonk...
eb5fa39f5ef490c72901b547ac5e7211efd47d56
Analyze and fix the following issue in the Linux kernel code: [SCTP]: Fix IPv6 address flag setting when doing peel-off/accept.
Problem Details: During accept/peeloff we try to copy the list of bound addresses from the original endpoint to the new one. However, we forgot to set the flag to say that IPv6 is allowed on the new endpoint. Signed-off-by: Vladislav Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com...
```diff diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 85caf7963886..30d2dbeebb43 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -5619,6 +5619,8 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, /* Copy the bind_addr list from the original endpoint to the new * endpoint ...
ab364a6f96bad9625bdb97b5688c76c44eb1e96e
Analyze and fix the following issue in the Linux kernel code: [IPv6] route: Convert GETROUTE to use new netlink api
Problem Details: Fixes various unvalidated netlink attributes causing memory corruptions when left empty by userspace applications. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index f0a66de84331..5d6e9083ca2c 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1833,6 +1833,7 @@ void rt6_mtu_change(struct net_device *dev, unsigned mtu) static struct nla_policy rtm_ipv6_policy[RTA_MAX+1] __read_mostly = { [RTA_GATEWAY] ...
2e4ca75b31b6851dcc036c2cdebf3ecfe279a653
Analyze and fix the following issue in the Linux kernel code: [ETH]: indentation and cleanup
Problem Details: Run ethernet support through Lindent and fix up. Applies after docbook comments patch Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index 72bdb15036ec..43863933f27f 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c @@ -78,39 +78,37 @@ __setup("ether=", netdev_boot_setup); * in here instead. It is up to the 802.2 layer to carry protocol information. */ int eth_header(struct sk_...
d889ce3b29e55b91257964b4c9aac70b91fedd91
Analyze and fix the following issue in the Linux kernel code: [IPv4]: Convert route get to new netlink api
Problem Details: Fixes various unvalidated netlink attributes causing memory corruptions when left empty by userspace applications. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 42ed96fab3f5..fcc159a4ac17 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -216,6 +216,7 @@ extern void fib_select_default(const struct flowi *flp, struct fib_result *res); #endif /* CONFIG_IP_MULTIPLE_TABLES */ /* Exported by fi...
280a306c539389156477cc9c07028d43fe4fbf86
Analyze and fix the following issue in the Linux kernel code: [BRIDGE]: Convert notifications to use rtnl_notify()
Problem Details: Fixes a wrong use of current->pid as netlink pid. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index 53086fb75089..8f661195d09d 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -12,6 +12,7 @@ #include <linux/kernel.h> #include <linux/rtnetlink.h> +#include <net/netlink.h> #include "br_private.h" /* @@ -76,26 +77,2...
8c384bfa36b1dbeba8154da20d49167ce3e275c4
Analyze and fix the following issue in the Linux kernel code: [IPv6] prefix: Convert prefix notifications to use rtnl_notify()
Problem Details: Fixes a wrong use of current->pid as netlink pid. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 2a3be0f1c516..4af741ef8d6b 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -3506,20 +3506,23 @@ static void inet6_prefix_notify(int event, struct inet6_dev *idev, struct prefix_info *pinfo) { struct sk_buff *skb; - int size = NLM...
8d7a76c9b17866f426fcbb531c81af7a1f53e071
Analyze and fix the following issue in the Linux kernel code: [IPv6] link: Convert link notifications to use rtnl_notify()
Problem Details: Fixes a wrong use of current->pid as netlink pid. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 81e9ef14676f..2a3be0f1c516 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -3438,20 +3438,23 @@ static int inet6_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb) void inet6_ifinfo_notify(int event, struct inet6_dev *idev) ...
21713ebc4f119950e87d21c4637d5a750eea20e8
Analyze and fix the following issue in the Linux kernel code: [IPv6] route: Convert route notifications to use rtnl_notify()
Problem Details: Fixes a wrong use of current->pid as netlink pid. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 024c8e26c2ec..1aca787ead85 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -35,7 +35,6 @@ #include <linux/netdevice.h> #include <linux/in6.h> #include <linux/init.h> -#include <linux/netlink.h> #include <linux/if_arp.h> #ifdef CONFIG_PROC_FS...
5d620266431c03d1dac66287367c6da26c64a069
Analyze and fix the following issue in the Linux kernel code: [IPv6] address: Convert address notification to use rtnl_notify()
Problem Details: Fixes a wrong use of current->pid as netlink pid. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 4f991a2234d0..81e9ef14676f 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -73,6 +73,7 @@ #include <net/addrconf.h> #include <net/tcp.h> #include <net/ip.h> +#include <net/netlink.h> #include <linux/if_tunnel.h> #include <linux/rtne...
f8d8fda54a1bfcf8cf829e44c494b2b4582819aa
Analyze and fix the following issue in the Linux kernel code: [IPV6] udp: Fix type in previous change.
Problem Details: UDPv6 stats are UDP6_foo not UDP_foo. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index c813381020bc..eb9e1b39c8f8 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -361,7 +361,7 @@ static inline int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb) if ((rc = sock_queue_rcv_skb(sk,skb)) < 0) { /* Note that an ENOMEM error is charge...
9c3bd6833a4df1abd9ecd3b51492b8949bf9cd11
Analyze and fix the following issue in the Linux kernel code: [IRDA]: Replace hard-coded dev_self[] array sizes with ARRAY_SIZE()
Problem Details: Several IR drivers used "for (i = 0; i < 4; i++)" to walk their dev_self[] table. Better to use ARRAY_SIZE(). And fix ali-ircc so it won't run off the end if we find too many adapters. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dav...
```diff diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index e3c8cd5eca67..68d4c418cb98 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c @@ -249,7 +249,7 @@ static void __exit ali_ircc_cleanup(void) IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __...
d1aa62f15b511457af2233150c960dc1fd02769b
Analyze and fix the following issue in the Linux kernel code: [DECNET] Fix to decnet rules compare function
Problem Details: Here is a fix to the DECnet rules compare function where we used 32bit values rather than 16bit values. Spotted by Patrick McHardy. Signed-off-by: Steven Whitehouse <steve@chygwyn.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index c8d9411e5943..977bb56c3ce4 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c @@ -197,10 +197,10 @@ static int dn_fib_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, return 0; #endif - if (tb[FRA_SRC] && (r->src != ...
d880309ae17783c27016bf4f903782d322d0a2a1
Analyze and fix the following issue in the Linux kernel code: [DECNET] Fix to multiple tables routing
Problem Details: Here is a fix to Patrick McHardy's increase number of routing tables patch for DECnet. I did just test this and it appears to be working fine with this patch. Signed-off-by: Steven Whitehouse <steve@chygwyn.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemlof...
```diff diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index 878312ff34ec..c8d9411e5943 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c @@ -116,6 +116,7 @@ static struct nla_policy dn_fib_rule_policy[FRA_MAX+1] __read_mostly = { [FRA_SRC] = { .type = NLA_U16 }, [FRA_DST] = { .type = NLA_U...
3696f625e2efa1f1b228b276788274e1eb86fcfa
Analyze and fix the following issue in the Linux kernel code: [HTB]: rbtree cleanup
Problem Details: Add code to initialize rb tree nodes, and check for double deletion. This is not a real fix, but I can make it trap sometimes and may be a bandaid for: http://bugzilla.kernel.org/show_bug.cgi?id=6681 Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft...
```diff diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index a686b9511b05..bb3ddd4784b1 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -366,7 +366,7 @@ static void htb_add_to_wait_tree(struct htb_sched *q, * When we are past last key we return NULL. * Average complexity is 2 steps per call. ...
3bf72957d2a553c343e4285463ef0a88139bdec4
Analyze and fix the following issue in the Linux kernel code: [HTB]: Remove broken debug code.
Problem Details: The HTB network scheduler had debug code that wouldn't compile and confused and obfuscated the code, remove it. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 880a3394a51f..73094e7f4169 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -70,7 +70,6 @@ #define HTB_HSIZE 16 /* classid hash size */ #define HTB_EWMAC 2 /* rate average over HTB_EWMAC*HTB_HSIZE sec */ -#undef HTB_DEBUG /* compile d...
ca860fb39b4aa1479e2fea67435a2c1eac9ce789
Analyze and fix the following issue in the Linux kernel code: [NEIGH]: Convert neighbour table dumping to new netlink api
Problem Details: Also fixes skipping of already dumped neighbours. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 5a0b8f48a099..2f4e06a13457 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1597,56 +1597,59 @@ out: static int neightbl_fill_parms(struct sk_buff *skb, struct neigh_parms *parms) { - struct rtattr *nest = NULL; - - nest = RTA_N...
5208debd0f1da07bbb350f8b0b142775d4f002ea
Analyze and fix the following issue in the Linux kernel code: [NEIGH]: Convert neighbour addition to new netlink api
Problem Details: Fixes: Return EAFNOSUPPORT if no table matches the specified address family. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 39c07cc66ee7..6036f43c1fd6 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1506,76 +1506,88 @@ out: int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) { - struct ndmsg *ndm = NLMSG_DATA(nlh); - struct rtattr **n...
a14a49d2b7b9290e87751f21f503f1954267d4c4
Analyze and fix the following issue in the Linux kernel code: [NEIGH]: Convert neighbour deletion to new netlink api
Problem Details: Fixes: Return ENOENT if the neighbour is not found (was EINVAL) Return EAFNOSUPPORT if no table matches the specified address family. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/neighbour.c b/net/core/neighbour.c index fe2113f54e2b..39c07cc66ee7 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -30,6 +30,7 @@ #include <net/dst.h> #include <net/sock.h> #include <net/netevent.h> +#include <net/netlink.h> #include <linux/rtnetlink.h> #include <linu...
3226f6881719e61e00e92b4c85a8ef49aa4d42b1
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix policy routing lookup
Problem Details: When the lookup in a table returns ip6_null_entry the policy routing lookup returns it instead of continuing in the next table, which effectively means it only searches the local table. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index c3c8195744ee..94a46ec967a4 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c @@ -94,8 +94,10 @@ int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, if (rt != &ip6_null_entry) goto out; - dst_release(&rt->u.dst); + ...
6c813a7297e3af4cd7c3458e09e9ee3d161c6830
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix crash in ip6_del_rt
Problem Details: ip6_null_entry doesn't have rt6i_table set, when trying to delete it the kernel crashes dereferencing table->tb6_lock. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index ff5affe2636c..41c5905d3191 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1223,6 +1223,9 @@ int ip6_del_rt(struct rt6_info *rt, struct nlmsghdr *nlh, void *_rtattr, struct int err; struct fib6_table *table; + if (rt == &ip6_null_entry) + re...
d7aba67f814729647c938ac6da2d5224b790f926
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix thinko in rt6_fill_node
Problem Details: This looks like a mistake, the table ID is overwritten again. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 438977e2085d..ff5affe2636c 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1902,7 +1902,6 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt, rtm->rtm_table = rt->rt6i_table->tb6_id; else rtm->rtm_table = RT6_TABLE_UNSPEC;...
8584d6df39db5601965f9bc5e3bf2fea833ad7bb
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: netbios conntrack: fix compile
Problem Details: Fix compile breakage caused by move of IFA_F_SECONDARY to new header file. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/netfilter/ip_conntrack_netbios_ns.c b/net/ipv4/netfilter/ip_conntrack_netbios_ns.c index a566a81325b2..3d0b438783db 100644 --- a/net/ipv4/netfilter/ip_conntrack_netbios_ns.c +++ b/net/ipv4/netfilter/ip_conntrack_netbios_ns.c @@ -21,6 +21,7 @@ #include <linux/skbuff.h> #include <linux/net...
dfdd5fd4e93d98e06be9ac9db84e3b98c6c26706
Analyze and fix the following issue in the Linux kernel code: [IPV4]: Convert address deletion to new netlink api
Problem Details: Fixes various unvalidated netlink attributes causing memory corruptions when left empty by userspace. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 6b297c8697e6..309640e9ede1 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -430,34 +430,48 @@ struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix, static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh,...
5c7539781d392629fb40b04aad9a1f197b66cd01
Analyze and fix the following issue in the Linux kernel code: [IPV4]: Convert address addition to new netlink api
Problem Details: Adds rtm_to_ifaddr() transforming a netlink message to a struct in_ifaddr. Fixes various unvalidated netlink attributes causing memory corruptions when left empty by userspace applications. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 9f3ffbec3296..6b297c8697e6 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -62,6 +62,7 @@ #include <net/ip.h> #include <net/route.h> #include <net/ip_fib.h> +#include <net/netlink.h> struct ipv4_devconf ipv4_devconf = { .accept_redir...
bf8b79e444a748963c71d2a58709e1ce5597e1b5
Analyze and fix the following issue in the Linux kernel code: [NETLINK]: Convert core netlink handling to new netlink api
Problem Details: Fixes a theoretical memory and locking leak when the size of the netlink header would exceed the skb tailroom. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 8b85036ba8e3..0f36ddc0b72d 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1147,7 +1147,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock, if (len > sk->sk_sndbuf - 32) goto out; err = -...
fe4944e59c357f945f81bc67edb7ed1392e875ad
Analyze and fix the following issue in the Linux kernel code: [NETLINK]: Extend netlink messaging interface
Problem Details: Adds: nlmsg_get_pos() return current position in message nlmsg_trim() trim part of message nla_reserve_nohdr(skb, len) reserve room for an attribute w/o hdr nla_put_nohdr(skb, len, data) add attribute w/o hdr nla_find_nested() find attribute i...
```diff diff --git a/include/net/netlink.h b/include/net/netlink.h index 640c26a90cf1..3a5e40b1e045 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h @@ -35,6 +35,8 @@ * nlmsg_put() add a netlink message to an skb * nlmsg_put_answer() callback based nlmsg_put() * nlmsg_end() finanlize net...
a51c64f1e5c2876eab2a32955acd9e8015c91c15
Analyze and fix the following issue in the Linux kernel code: [MLSXFRM]: Fix build with SECURITY_NETWORK_XFRM disabled.
Problem Details: The following patch will fix the build problem (encountered by Andrew Morton) when SECURITY_NETWORK_XFRM is not enabled. As compared to git-net-selinux_xfrm_decode_session-build-fix.patch in -mm, this patch sets the return parameter sid to SECSID_NULL in selinux_xfrm_decode_session() and handles this ...
```diff diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 1dc935f7b919..33028b3b19ce 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -3591,6 +3591,11 @@ int selinux_inet_conn_request(struct sock *sk, struct sk_buff *skb, err = selinux_xfrm_decode_session(skb, &peersid, 0);...
51bd39860ff829475aef611a3234309e37e090d9
Analyze and fix the following issue in the Linux kernel code: [MLSXFRM]: Granular IPSec associations for use in MLS environments
Problem Details: The current approach to labeling Security Associations for SELinux purposes uses a one-to-one mapping between xfrm policy rules and security associations. This doesn't address the needs of real world MLS (Multi-level System, traditional Bell-LaPadula) environments where a single xfrm policy rule (pert...
```diff diff --git a/security/selinux/include/av_perm_to_string.h b/security/selinux/include/av_perm_to_string.h index 7c9b58380833..09fc8a2345eb 100644 --- a/security/selinux/include/av_perm_to_string.h +++ b/security/selinux/include/av_perm_to_string.h @@ -241,6 +241,7 @@ S_(SECCLASS_ASSOCIATION, ASSOCIATION__SEN...
e4e3295f0c0e1a09a46522359e24c0569e2e7b47
Analyze and fix the following issue in the Linux kernel code: Revert "[MTD] blkdev helper code: fix printk format warning"
Problem Details: This reverts commit 668040fcd1e06fc3e68a92708cbdfa5a52c37d3c. The 'flags' field of the struct request is 'unsigned long'. Quite how Randy came to see 'long int format, different type arg' I don't know, but it doesn't seem to be the case any more. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index 302bed5f0845..458d3c8ae1ee 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -69,7 +69,7 @@ static int do_blktrans_request(struct mtd_blktrans_ops *tr, return 1; default: - printk(KERN_NOTICE "Unknown reques...
6a545a0d6021a4d759ba6d0c1082d1abf8d64c84
Analyze and fix the following issue in the Linux kernel code: [MTD NAND] Fix in typo ndfc.c causing wrong ECC layout
Problem Details: Due to this typo, a wrong ECC layout table is chosen. Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index e5bd88f2d560..039c759cfbfc 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c @@ -168,7 +168,7 @@ static void ndfc_chip_init(struct ndfc_nand_mtd *mtd) chip->ecc.mode = NAND_ECC_HW; chip->ecc.size = 256; chip->ecc.bytes =...
25f0c659fe64832d8ee06aa623fffaad708dcf8b
Analyze and fix the following issue in the Linux kernel code: ioremap balanced with iounmap for drivers/mtd subsystem
Problem Details: ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Tested (compilation only) with: - allmodconfig - Modifying drivers/mtd/maps/Kconfig and drivers/mtd/nand/Kconfig to make sure that the changed file is compiling without warning Signed-off-by: Amol Lad <amol@veris...
```diff diff --git a/drivers/mtd/maps/arctic-mtd.c b/drivers/mtd/maps/arctic-mtd.c index d95ae582fbe9..642d96bc8919 100644 --- a/drivers/mtd/maps/arctic-mtd.c +++ b/drivers/mtd/maps/arctic-mtd.c @@ -96,6 +96,8 @@ static struct mtd_partition arctic_partitions[PARTITIONS] = { static int __init init_arctic_mtd(void) { ...
668040fcd1e06fc3e68a92708cbdfa5a52c37d3c
Analyze and fix the following issue in the Linux kernel code: [MTD] blkdev helper code: fix printk format warning
Problem Details: Fix printk format warning(s): drivers/mtd/mtd_blkdevs.c:72: warning: long int format, different type arg (arg 2) Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index 458d3c8ae1ee..302bed5f0845 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -69,7 +69,7 @@ static int do_blktrans_request(struct mtd_blktrans_ops *tr, return 1; default: - printk(KERN_NOTICE "Unknown reques...
f40a6f1cc7fe522e51e1ac4c7ab3035a434f2cef
Analyze and fix the following issue in the Linux kernel code: [MTD] Fix ixp4xx partition parsing.
Problem Details: If the amount of flash is not divisible by 2 then the mask in parse_mtd_partitions would fail to work as designed. Passing in the base address corrects this problem. Signed-off-by: Brian Walsh <brian@walsh.ws> Cc: Deepak Sanexa <dsanexa@mvista.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-...
```diff diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index 986c58628390..7a828e3e6446 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c @@ -253,7 +253,7 @@ static int ixp4xx_flash_probe(struct platform_device *dev) /* Use the fast version */ info->map.write = ixp4xx_write1...
69917c26c840e7de94522bf90fb190de63bf92bd
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix ohare IDE irq workaround on old powermacs
Problem Details: Looks like a workaround for old bogus OF bitrot... This fixes it and hence fixes boot on some performa machines. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index fa46856e8068..996c694341bc 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c @@ -1326,7 +1326,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) if (macio_irq_count(mdev) == 0) { printk(KERN_...
ed709d134deeaea7925a3d748b33ca7e58cc683d
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix IPIC pending register assignments
Problem Details: This patch fixes the assignment of pending registers to IRQ numbers for the IPIC; the code previously assigned all IRQs to the high pending word regardless of which word the interrupt belonged to. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 70e707785d49..0251b7c68d0e 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c @@ -210,7 +210,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 4, }, [64] = { - .pend = IPIC_SIPNR_H, + .pend = IPIC_S...
7d452c326c2ac879aced884411a0fe3ba75d9c87
Analyze and fix the following issue in the Linux kernel code: [POWERPC] powerpc: fix building gdb against asm/ptrace.h
Problem Details: Ulrich Weigand found a bug with the current version of the asm-powerpc/ptrace.h that prevents building at least the SPU target version of gdb, since some ptrace opcodes are not defined. The problem seems to have originated in the merging of 32 and 64 bit versions of that file, the problem is that some...
```diff diff --git a/include/asm-powerpc/ptrace.h b/include/asm-powerpc/ptrace.h index dc4cb9cc73a1..4435efe85d0e 100644 --- a/include/asm-powerpc/ptrace.h +++ b/include/asm-powerpc/ptrace.h @@ -215,12 +215,10 @@ do { \ #define PTRACE_GETVRREGS 18 #define PTRACE_SETVRREGS 19 -#ifndef __powerpc64__ /*...
7276b3b0c77101f8b3f4e45e89a29cf9045e831a
Analyze and fix the following issue in the Linux kernel code: [GFS2] Tidy up meta_io code
Problem Details: Fix a bug in the directory reading code, where we might have dereferenced a NULL pointer in case of OOM. Updated the directory code to use the new & improved version of gfs2_meta_ra() which now returns the first block that was being read. Previously it was releasing it requiring following code to grab ...
```diff diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 19b9bfc10349..3fb9a26b6f58 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -448,6 +448,8 @@ static int gfs2_block_pointers(struct inode *inode, u64 lblock, int create, u64 dblock = 0; int boundary; + BUG_ON(maxlen == 0); + if (gfs2_assert_warn(sdp, ...
214ff13d9ebbba7940f29bc89669f85f12533083
Analyze and fix the following issue in the Linux kernel code: drm: fd.o Bug #7595: Avoid u32 overflows in radeon_check_and_fixup_offset().
Problem Details: The overflows could cause valid offsets to get rejected under some circumstances, e.g. when the framebuffer resides at the very end of the card's address space. Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/radeon_state.c b/drivers/char/drm/radeon_state.c index 0433ff80cb70..bcfa1514a4d0 100644 --- a/drivers/char/drm/radeon_state.c +++ b/drivers/char/drm/radeon_state.c @@ -42,7 +42,11 @@ static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t * drm_file_t *...
47cc140931cc03076014fdbfdd512d6dd9d74d34
Analyze and fix the following issue in the Linux kernel code: drm: Fix hashtab implementation leaking illegal error codes to user space.
Problem Details: reported by Dave Airlie Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drm_hashtab.c b/drivers/char/drm/drm_hashtab.c index 480611395481..a0b2d6802ae4 100644 --- a/drivers/char/drm/drm_hashtab.c +++ b/drivers/char/drm/drm_hashtab.c @@ -106,7 +106,7 @@ int drm_ht_insert_item(drm_open_hash_t *ht, drm_hash_item_t *item) hlist_for_each(list, h_list) { ...
9b1a51b69c89028f18277e235533c160e7506ebb
Analyze and fix the following issue in the Linux kernel code: drm: domain changes broke ppc r200
Problem Details: Freedesktop.org bug #8246 The domain changes regressed on PPC, go back to just using 0, as X.org's domain support is crap Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 84e9c18fdbef..4363f6e50c77 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -747,7 +747,7 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev, #ifdef __alpha__ #define drm_get_pci_domain(dev) dev->hose...
fb41e54be4bad6f64d343d051d699efde3c92e2c
Analyze and fix the following issue in the Linux kernel code: drm: cleanups
Problem Details: This patch contains the following cleanups: - make 3 needlessly global functions static - sis_mm.c: fix compile warnings with CONFIG_FB_SIS=y Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c index 71d2e0917636..03c6db9029cf 100644 --- a/drivers/char/drm/drm_bufs.c +++ b/drivers/char/drm/drm_bufs.c @@ -65,8 +65,8 @@ static drm_map_list_t *drm_find_matching_map(drm_device_t *dev, return NULL; } -int drm_map_handle(drm_device_...
c7aed1790254aed286b7bfb51167c2676df86f4b
Analyze and fix the following issue in the Linux kernel code: drm: i810_dma.c: fix pointer arithmetic for 64-bit target
Problem Details: First warning result from open-coded PTR_ERR, the rest is caused by code like this: *(u32 *) ((u32) buf_priv->kernel_virtual + used) I've also fixed a missing PTR_ERR in i830_dma.c Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c index 28ee6e3f1d99..fa2de70f7401 100644 --- a/drivers/char/drm/i810_dma.c +++ b/drivers/char/drm/i810_dma.c @@ -141,10 +141,10 @@ static int i810_map_buffer(drm_buf_t * buf, struct file *filp) MAP_SHARED, buf->bus_address); dev_p...
78eca43d0391f59c3b1505bb7bd38ff45b650aab
Analyze and fix the following issue in the Linux kernel code: drm: fix i965 build bug
Problem Details: Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c index 99e9d07409e4..d932f80f264c 100644 --- a/drivers/char/drm/i915_dma.c +++ b/drivers/char/drm/i915_dma.c @@ -404,7 +404,7 @@ static int i915_emit_box(drm_device_t * dev, BEGIN_LP_RING(4); OUT_RING(GFX_OP_DRAWRECT_INFO_I965); OUT_...
572225bedf8e39b5dd7cc687a51015edbb738401
Analyze and fix the following issue in the Linux kernel code: drm: fix return value in auth function
Problem Details: This just fixes up the return value in the drm_auth:remove_magic Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drm_auth.c b/drivers/char/drm/drm_auth.c index 40cd262ca9e1..c7b19d35bcd6 100644 --- a/drivers/char/drm/drm_auth.c +++ b/drivers/char/drm/drm_auth.c @@ -121,7 +121,7 @@ static int drm_remove_magic(drm_device_t * dev, drm_magic_t magic) drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC); ...
8669cbc5e651bf4effa20e8c244a5a7d67da6fe9
Analyze and fix the following issue in the Linux kernel code: drm: move drm authentication to new generic hash table.
Problem Details: Fix drm_remove_magic potential memory leak / corruption. Move drm authentication token hashing to new generic hash table implementation. Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index c93985bb91a2..fedaf013f848 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -105,7 +105,7 @@ #define DRM_DEBUG_CODE 2 /**< Include debugging code if > 1, then also include looping detection. */ -#define DRM_...
ae1b1a4816ac11075d338af79a239f4c326d675c
Analyze and fix the following issue in the Linux kernel code: drm: radeon: fix up bus mastering when writeback is disabled
Problem Details: When writeback isn't used, actually disable it in the hardware. Not doing this might waste bus bandwidth or even cause memory corruption or system crashes on systems that check bus transfers. No such incident has been reported though. Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index 5ad43ba7b5aa..3956628b2576 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c @@ -1258,6 +1258,13 @@ static void radeon_test_writeback(drm_radeon_private_t * dev_priv) dev_priv->writeback_works = 0; DR...
9ca941615ee6418cd38c13602960f29c7ac7d973
Analyze and fix the following issue in the Linux kernel code: drm: radeon: add some debug output when getparam is called with unknown
Problem Details: Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/radeon_state.c b/drivers/char/drm/radeon_state.c index 39a7f685e3fd..99589fe0032f 100644 --- a/drivers/char/drm/radeon_state.c +++ b/drivers/char/drm/radeon_state.c @@ -2997,6 +2997,7 @@ static int radeon_cp_getparam(DRM_IOCTL_ARGS) value = RADEON_CARD_PCI; break; default:...
7da8a2e5c1fd2ee513fdeac8d13c4f3623838fd0
Analyze and fix the following issue in the Linux kernel code: [POWERPC] 40x: Fix debug status register defines
Problem Details: This fixes some debug register defines on PPC 40x that were incorrect. Signed-off-by: Josh Boyer <jdub@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/include/asm-ppc/reg_booke.h b/include/asm-ppc/reg_booke.h index 4944c0fb8bea..602fbadeaf48 100644 --- a/include/asm-ppc/reg_booke.h +++ b/include/asm-ppc/reg_booke.h @@ -300,14 +300,14 @@ do { \ #define DBSR_IC 0x80000000 /* Instruction Completion */ #define DBSR_BT 0x40000000 /* Branch ta...
8b9b5a77e3aeb9650b511a8be4c61632999537db
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix compile error in sbc8560
Problem Details: The following fixes compile errors in sbc8560. Signed-off-by: Amy Fong <amy.fong@windriver.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/ppc/platforms/85xx/sbc8560.h b/arch/ppc/platforms/85xx/sbc8560.h index c7d61cf3a449..e5e156f60100 100644 --- a/arch/ppc/platforms/85xx/sbc8560.h +++ b/arch/ppc/platforms/85xx/sbc8560.h @@ -14,6 +14,7 @@ #define __MACH_SBC8560_H__ #include <platforms/85xx/sbc85xx.h> +#include <asm/irq.h> ...
4dbefe6459555d6fb9d08743615fbaa53894beb2
Analyze and fix the following issue in the Linux kernel code: [POWERPC] PPC: Fix xmon stack frame address in backtrace
Problem Details: The stack frame address was being printed incorrectly in the backtrace option of XMON on PPC. This patch fixes it to print the actual stack address instead of the address of the local variable that contains it. Signed-off-by: Josh Boyer <jdub@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.or...
```diff diff --git a/arch/ppc/xmon/xmon.c b/arch/ppc/xmon/xmon.c index 25d032b2aec7..b1a91744fd2d 100644 --- a/arch/ppc/xmon/xmon.c +++ b/arch/ppc/xmon/xmon.c @@ -806,7 +806,7 @@ backtrace(struct pt_regs *excp) for (; sp != 0; sp = stack[0]) { if (mread(sp, stack, sizeof(stack)) != sizeof(stack)) break; - pri...
ed9526b0d342a1c08a19f880c3f0c1d0fec4e8db
Analyze and fix the following issue in the Linux kernel code: Clean up exported headers on CRIS
Problem Details: This fixes most of the issues with exported headers on CRIS, although we do still need to deal with the asm/arch symlink. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/include/asm-cris/Kbuild b/include/asm-cris/Kbuild index c68e1680da01..14498d5a2f65 100644 --- a/include/asm-cris/Kbuild +++ b/include/asm-cris/Kbuild @@ -1 +1,5 @@ include include/asm-generic/Kbuild.asm + +header-y += arch-v10/ arch-v32/ + +unifdef-y += rs485.h diff --git a/include/asm-cris/arch-v...
2a1b181eff32f497f285fcfc1e771ec469205908
Analyze and fix the following issue in the Linux kernel code: Fix v850 exported headers
Problem Details: Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/include/asm-v850/page.h b/include/asm-v850/page.h index ad03c46a1f92..d693ffb1364d 100644 --- a/include/asm-v850/page.h +++ b/include/asm-v850/page.h @@ -14,6 +14,8 @@ #ifndef __V850_PAGE_H__ #define __V850_PAGE_H__ +#ifdef __KERNEL__ + #include <asm/machdep.h> @@ -32,7 +34,6 @@ #endif ...
0000f0b1bc9aa340356a8dcdb9e8b1dbbaf0afcb
Analyze and fix the following issue in the Linux kernel code: Fix H8300 exported headers.
Problem Details: Just clean up asm/page.h Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/include/asm-h8300/page.h b/include/asm-h8300/page.h index d673077d2fd6..3b4f2903f91d 100644 --- a/include/asm-h8300/page.h +++ b/include/asm-h8300/page.h @@ -1,6 +1,7 @@ #ifndef _H8300_PAGE_H #define _H8300_PAGE_H +#ifdef __KERNEL__ /* PAGE_SHIFT determines the page size */ @@ -8,8 +9,6 @@...
5daf3033aa4fc5ec0535816d8a8e94874160482e
Analyze and fix the following issue in the Linux kernel code: Fix m68knommu exported headers
Problem Details: Just clean up asm/page.h Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h index a22bf5a88160..2a1b8bdcb29c 100644 --- a/include/asm-m68knommu/page.h +++ b/include/asm-m68knommu/page.h @@ -1,6 +1,7 @@ #ifndef _M68KNOMMU_PAGE_H #define _M68KNOMMU_PAGE_H +#ifdef __KERNEL__ /* PAGE_SHIFT determines the page s...
09087a1a8722fac30b1969a4a542cde064af13f8
Analyze and fix the following issue in the Linux kernel code: Fix exported headers for SPARC, SPARC64
Problem Details: Mostly removing files which have no business being used in userspace. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/asm-sparc/Kbuild b/include/asm-sparc/Kbuild index b22b67a64ecc..c6a55cf0d337 100644 --- a/include/asm-sparc/Kbuild +++ b/include/asm-sparc/Kbuild @@ -2,20 +2,13 @@ include include/asm-generic/Kbuild.asm header-y += apc.h header-y += asi.h -header-y += auxio.h header-y += bpp.h -header-...
47dbec79d1b9ce9e80bed932f345adc92049f05d
Analyze and fix the following issue in the Linux kernel code: Fix 'make headers_check' on m32r
Problem Details: > asm-m32r/page.h requires asm-generic/memory_model.h, which does not exist > asm-m32r/ptrace.h requires asm/m32r.h, which does not exist > asm-m32r/signal.h requires linux/linkage.h, which does not exist > asm-m32r/unistd.h requires asm/syscall.h, which does not exist > asm-m32r/user.h requires asm/pr...
```diff diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h index 9688be003620..404a4c24007b 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h @@ -87,10 +87,9 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define devmem_is_allowed(x) 1 -#endif /* __KERNEL__ */ - #include <asm-g...
029669da25efa18ee4b8911e694fdcf4a11c8cbe
Analyze and fix the following issue in the Linux kernel code: Fix 'make headers_check' on sh64
Problem Details: Cleanup for user headers, as noted: asm-sh64/page.h requires asm-generic/memory_model.h, which does not exist in exported headers asm-sh64/shmparam.h requires asm/cache.h, which does not exist in exported headers asm-sh64/signal.h requires asm/processor.h, which does not exist in exported headers asm-...
```diff diff --git a/include/asm-sh64/page.h b/include/asm-sh64/page.h index 34fb34754ae6..472089aefc60 100644 --- a/include/asm-sh64/page.h +++ b/include/asm-sh64/page.h @@ -112,9 +112,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYR...
b5233d0704c9a6147ebbfabc576d1638b3ac5274
Analyze and fix the following issue in the Linux kernel code: Fix 'make headers_check' on sh
Problem Details: Cleanup for user headers, as noted: asm-sh/page.h requires asm-generic/memory_model.h, which does not exist in exported headers asm-sh/ptrace.h requires asm/ubc.h, which does not exist in exported headers Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: David Woodhouse <dwmw2@infradead....
```diff diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 22dc9c21201d..f2031314cb2b 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c @@ -26,6 +26,7 @@ #include <asm/uaccess.h> #include <asm/mmu_context.h> #include <asm/elf.h> +#include <asm/ubc.h> static int hlt_counter=0...
6ff6340abeaaf1a15587c87dac3e56754778cc7a
Analyze and fix the following issue in the Linux kernel code: [HEADERS] Fix ARM 'make headers_check'
Problem Details: Sanitise the ARM headers exported to userspace. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index ae7baa6c73f7..17f0c656d272 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h @@ -8,9 +8,6 @@ #include <asm/ptrace.h> #include <asm/user.h> -#ifdef __KERNEL -#include <asm/procinfo.h> -#endif typedef unsigned long elf_greg_t; t...
54caf44da31995df1f51174468fd9e83ca5c67a2
Analyze and fix the following issue in the Linux kernel code: [netdrvr] mv643xx_eth: fix obvious typo, which caused build breakage
Problem Details: The last minute fix submitted by the author fixed a bug, but broke the driver build. Noticed by Al Viro, since I can't build on said platform. Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index eeab1df5bef3..59de3e74d2d7 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -385,7 +385,7 @@ static int mv643xx_eth_receive_queue(struct net_device *dev, int budget) struct pkt_info pkt_info; while (budget-- ...
8ce90907ea534f10075a9eba5f83d6dd77b39cb6
Analyze and fix the following issue in the Linux kernel code: [netdrvr] lp486e: fix typo
Problem Details: inside #if 0'd code, but it bugged me. Really, we should probably just delete the driver. Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/lp486e.c b/drivers/net/lp486e.c index b783a6984abc..393aba95cf12 100644 --- a/drivers/net/lp486e.c +++ b/drivers/net/lp486e.c @@ -442,16 +442,16 @@ init_rx_bufs(struct net_device *dev, int num) { if (rbd) { rbd->pad = 0; rbd->count = 0; - rbd->skb = dev_alloc_skb(RX_SKB_SIZ...
df89820ebd5bbf4f3c6b5f8ee7d9e983107f6a91
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] cipher: Removed special IV checks for ECB
Problem Details: This patch makes IV operations on ECB fail through nocrypt_iv rather than calling BUG(). This is needed to generalise CBC/ECB using the template mechanism. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/crypto/cipher.c b/crypto/cipher.c index 56406a4a88d4..aebc4a2adc80 100644 --- a/crypto/cipher.c +++ b/crypto/cipher.c @@ -399,6 +399,8 @@ int crypto_init_cipher_ops(struct crypto_tfm *tfm) case CRYPTO_TFM_MODE_ECB: ops->cit_encrypt = ecb_encrypt; ops->cit_decrypt = ecb_decrypt; + ops->cit_...
25cdbcd9e5d20e431f829cafce48a418830011f4
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] crc32c: Fix unconventional setkey usage
Problem Details: The convention for setkey is that once it is set it should not change, in particular, init must not wipe out the key set by it. In fact, init should always be used after setkey before any digestion is performed. The only user of crc32c that sets the key is tcrypt. This patch adds the necessary init ...
```diff diff --git a/crypto/crc32c.c b/crypto/crc32c.c index f2660123aeb4..91ecd895e957 100644 --- a/crypto/crc32c.c +++ b/crypto/crc32c.c @@ -16,14 +16,14 @@ #include <linux/string.h> #include <linux/crypto.h> #include <linux/crc32c.h> -#include <linux/types.h> -#include <asm/byteorder.h> +#include <linux/kernel.h>...
758f570ea785a5fbcdca026dfab2e9e1a3f89726
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] twofish: Fix the priority
Problem Details: This patch adds a proper driver name and priority to the generic c implemtation to allow coexistance of c and assembler modules. Signed-off-by: Joachim Fritschi <jfritschi@freenet.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/crypto/twofish.c b/crypto/twofish.c index e3b3a0a6cb4d..4979a2be48a9 100644 --- a/crypto/twofish.c +++ b/crypto/twofish.c @@ -181,6 +181,8 @@ static void twofish_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) static struct crypto_alg alg = { .cra_name = "twofish", + .cra_dr...
eb35746ca5e2211569b91ebb44d55b88ec91f3b0
Analyze and fix the following issue in the Linux kernel code: ocfs2: Remove overzealous BUG_ON()
Problem Details: The truncate code was never supposed to BUG() on an allocator it doesn't know about, but rather to ignore it. Right now, this does nothing, but when we change our allocation paths to use all suballocator files, this will allow current versions of the fs module to work fine. Signed-off-by: Mark Fasheh ...
```diff diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index edaab05a93e0..f43bc5f18a35 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -1717,17 +1717,29 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, ocfs2_remove_from_cache(inode, eb_bh); - BUG_ON(eb->h_suballoc_slot); BUG_ON(el->l_re...
e0b4096d34fbd6b30838c417100c9d0ef73c71f2
Analyze and fix the following issue in the Linux kernel code: ocfs2: properly update i_mtime on buffered write
Problem Details: We weren't always updating i_mtime on writes, so fix ocfs2_commit_write() to handle this. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> Acked-by: Zach Brown <zach.brown@oracle.com>
```diff diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index f1d1c342ce01..3d7c082a8f58 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -391,31 +391,28 @@ out: static int ocfs2_commit_write(struct file *file, struct page *page, unsigned from, unsigned to) { - int ret, extending = 0, locklevel = 0; - l...
0f62de2c9ca60a35f63122e7ea992cee8aae4bef
Analyze and fix the following issue in the Linux kernel code: ocfs2: Fix directory link count checks in ocfs2_link()
Problem Details: Remove the redundant "i_nlink >= OCFS2_LINK_MAX" check and adds an unlinked directory check in ocfs2_link(). Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index d8161a77c370..24126476a8cc 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -641,11 +641,6 @@ static int ocfs2_link(struct dentry *old_dentry, goto bail; } - if (inode->i_nlink >= OCFS2_LINK_MAX) { - err = -EMLINK; - goto bail; - } - handl...
a663e30513d7ecc77dd71d474e7646bf78c0ba62
Analyze and fix the following issue in the Linux kernel code: ocfs2: move nlink check in ocfs2_mknod()
Problem Details: The dir nlink check in ocfs2_mknod() was being done outside of the cluster lock, which means we could have been checking against a stale version of the inode. Fix this by doing the check after the cluster lock instead. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 0673862c8bdd..d8161a77c370 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -310,13 +310,6 @@ static int ocfs2_mknod(struct inode *dir, /* get our super block */ osb = OCFS2_SB(dir->i_sb); - if (S_ISDIR(mode) && (dir->i_nlink >= OCFS2_LINK_MAX)...
471e3f57286da7ce8820ad42c77d5f5f49d56a41
Analyze and fix the following issue in the Linux kernel code: ocfs2: Fix heartbeat sector calculation
Problem Details: This fixes things for devices which set max_sectors to 8. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 504595d6cf65..305cba3681fe 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -320,8 +320,12 @@ static int compute_max_sectors(struct block_device *bdev) max_pages = q->max_hw_segments; max_pages--; ...
ca4d147e62df370c334898464023aa7f9126abe1
Analyze and fix the following issue in the Linux kernel code: ocfs2: add ext2 attributes
Problem Details: Support immutable, and other attributes. Some renaming and other minor fixes done by myself. Signed-off-by: Herbert Poetzl <herbert@13thfloor.at> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/Makefile b/fs/ocfs2/Makefile index 7d3be845a614..9fb8132f19b0 100644 --- a/fs/ocfs2/Makefile +++ b/fs/ocfs2/Makefile @@ -16,6 +16,7 @@ ocfs2-objs := \ file.o \ heartbeat.o \ inode.o \ + ioctl.o \ journal.o \ localalloc.o \ mmap.o \ diff --git a/fs/ocfs2/dlmglue....
45af3af8761a3f790fe414c017de039a08ccd780
Analyze and fix the following issue in the Linux kernel code: [S390] fix typo in vmcp.
Problem Details: Fix comment typo in vmcp, it is z/VM and not v/VM. Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 19762f3476aa..1678b6c757ec 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2004,2005 IBM Corporation - * Interface implementation for communication with the v/VM control program + * ...
9514e2311be97a01e8669c4de78e9fea37489f09
Analyze and fix the following issue in the Linux kernel code: [S390] Kernel stack overflow handling.
Problem Details: Substract the size of the initial stack frame from the correct register. Otherwise we will end up in a program check loop. Fix the offset into the save area as well. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 8b956d1538f5..29bbfbab7332 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S @@ -827,7 +827,7 @@ restart_go: */ stack_overflow: lg %r15,__LC_PANIC_STACK # change to panic stack - aghi %r1,-SP_SIZE + aghi %r15,...
b0035f127e007ea0afc8baad740093eb124f7b0b
Analyze and fix the following issue in the Linux kernel code: [S390] dasd default debug level.
Problem Details: Enhanced default DBF level to get most important messages in debug feature files. Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 3cd87f85f702..d0647d116eaa 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -184,7 +184,7 @@ dasd_state_known_to_basic(struct dasd_device * device) device->debug_area = debug_register(device->cdev->dev.bus_id, 1,...
a00bfd7147c0c5c04a59f7adcb0e6d8948b90a6e
Analyze and fix the following issue in the Linux kernel code: [S390] dasd deadlock after state change pending interrupt.
Problem Details: The dasd_device_from_cdev function is called from interrupt context to get the struct dasd_device associated with a ccw device. The driver_data of the ccw device points to the dasd_devmap structure which contains the pointer to the dasd_device structure. The lock that protects the dasd_devmap structure...
```diff diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 25c1ef6dfd44..3cd87f85f702 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -893,7 +893,7 @@ dasd_handle_killed_request(struct ccw_device *cdev, unsigned long intparm) device = (struct dasd_device *) cqr->devic...
7d5d688f724dd5a651d1ce7bc3ea7c03d28137a1
Analyze and fix the following issue in the Linux kernel code: [S390] Use simple_strtoul instead of own cmm_strtoul wrapper.
Problem Details: Fix compile warning with some configurations: arch/s390/mm/cmm.c:58: warning: 'cmm_strtoul' defined but not used Originally cmm_strtoul was introduced because simple_strtoul couldn't handle strings with hexadecimal numbers that contained a capital 'X'. Since this is no longer true cmm_strtoul can be ...
```diff diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index ceea51cff03b..786a44dba5bf 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -52,22 +52,6 @@ static struct timer_list cmm_timer; static void cmm_timer_fn(unsigned long); static void cmm_set_timer(void); -static long -cmm_strtoul(const char...
8427082a506f7ae0abf82ce0047a045ec4309e59
Analyze and fix the following issue in the Linux kernel code: [S390] fix syscall restart handling.
Problem Details: If do_signal() gets called several times before returning to user space and no signal is pending (e.g. cancelled by a debugger) syscall restart handling could be done several times. This would change the user space PSW to an address prior to the syscall instruction. Fix this by making sure that syscall...
```diff diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index a887b686f279..dd05423f87a8 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c @@ -457,6 +457,7 @@ void do_signal(struct pt_regs *regs) case -ERESTART_RESTARTBLOCK: regs->gprs[2] = -EINTR; } + regs->trap = -1;...
b36e4758dc1b9ff1f6d97e951edba22366230d11
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix kernel/fork.c for lockdep on ARM
Problem Details: ARM has interrupts enabled over context switches (iow, has __ARCH_WANT_INTERRUPTS_ON_CTXSW defined.) The lockdep code in fork.c assumes that interrupts are always disabled. Fix this wrong assumption by making the initialisation of 'p->hardirqs_enabled' depend on __ARCH_WANT_INTERRUPTS_ON_CTXSW. Ack...
```diff diff --git a/kernel/fork.c b/kernel/fork.c index f9b014e3e700..8f76adf1c6a6 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1056,7 +1056,11 @@ static struct task_struct *copy_process(unsigned long clone_flags, #endif #ifdef CONFIG_TRACE_IRQFLAGS p->irq_events = 0; +#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW ...
19e59df4dc2e6f7b46190ee77ce7093769f597a7
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iseries: eliminate a couple of warnings
Problem Details: Copy and paste bug in io.h Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
```diff diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 57e7d14d6563..174fb89d5eda 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h @@ -68,8 +68,8 @@ extern unsigned long pci_io_base; * for older code. */ #define insb(port, buf, ns) _insb((u8 __iomem *)((port)+pci_io_base...