* check this out...
From: Ishtiaq Ahmed @ 2005-10-16 6:30 UTC (permalink / raw)
To: netdev
Hi! I just signed up for this cool promotion where we can both get a free
iPod nano! Check it out!
http://entrynumber21344.com/?r=QTECSSQEZBAJE10FBikF&i=hm&z=1
Talk to you soon!
http://entrynumber21344.com/?r=QTECSSQEZBAJE10FBikF&i=hm&z=1
^ permalink raw reply
* We deliver medication worldwide!
From: Sylvester Hood @ 2005-10-15 11:48 UTC (permalink / raw)
To: netdev
We offer a fast-track repeat prescription service
http://erus.45sgrgatsqscmm4xr4mxr4m4.fulminefg.com/?cylivb
If you can't annoy somebody, there's little point in writing.
The more you know, the less you need to show.
The cynics are right nine times out of ten.
Reason should direct and appetite obey.
I am a part of all that I have met.
^ permalink raw reply
* Re: [PATCH]The type of inet6_ifinfo_notify event in addrconf_ifdown().
From: David S. Miller @ 2005-10-14 20:57 UTC (permalink / raw)
To: yoshfuji; +Cc: yzcorp, netdev, linux-kernel
In-Reply-To: <20051014.195315.106624870.yoshfuji@wide.ad.jp>
From: YOSHIFUJI Hideaki <yoshfuji@wide.ad.jp>
Date: Fri, 14 Oct 2005 19:53:15 +0900 (JST)
> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Applied. I also took the liberty of fixing the "Step 5"
comment above, it should be "Step 6" :-)
Yan, please fix your patch postings. Your email client
adds newlines, and changes tabs into spaces, totally corrupting
your patches. I have to apply every one of your patches by
hand because of this.
To be honest, gmail has been shown to be a very unusable place
from which to send patches. There are certain kinds of outgoing
text mangling that I do not know if they even allow to disable.
Thanks.
^ permalink raw reply
* Re: [PATCH 01/14] Big kfree NULL check cleanup - net
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2005-10-14 12:51 UTC (permalink / raw)
To: jesper.juhl, davem
Cc: linux-kernel, akpm, netdev, acme, ralf, greg, dccp, patrick, jt,
sri, andros, bfields, ncorbic, kuznet, yoshfuji
In-Reply-To: <200510132125.44470.jesper.juhl@gmail.com>
In article <200510132125.44470.jesper.juhl@gmail.com> (at Thu, 13 Oct 2005 21:25:43 +0200), Jesper Juhl <jesper.juhl@gmail.com> says:
> --- linux-2.6.14-rc4-orig/net/ipv4/netfilter/ip_nat_snmp_basic.c 2005-10-11 22:41:33.000000000 +0200
> +++ linux-2.6.14-rc4/net/ipv4/netfilter/ip_nat_snmp_basic.c 2005-10-13 11:31:09.000000000 +0200
> @@ -1161,8 +1161,7 @@ static int snmp_parse_mangle(unsigned ch
>
> if (!snmp_object_decode(&ctx, obj)) {
> if (*obj) {
> - if ((*obj)->id)
> - kfree((*obj)->id);
> + kfree((*obj)->id);
> kfree(*obj);
> }
> kfree(obj);
Maybe:
if (*obj)
kfree((*obj)->id);
kfree(obj);
Otherwise;
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
--yoshfuji
^ permalink raw reply
* Re: [PATCH 01/14] Big kfree NULL check cleanup - net
From: Jesper Juhl @ 2005-10-14 12:02 UTC (permalink / raw)
To: Marcel Holtmann
Cc: linux-kernel, Andrew Morton, netdev, David S. Miller,
Hideaki YOSHIFUJI, Arnaldo Carvalho de Melo, Ralf Baechle,
Greg Kroah-Hartman, dccp, Patrick Caulfield, Jean Tourrilhes,
Sridhar Samudrala, Andy Adamson, J. Bruce Fields, Nenad Corbic,
Alexey Kuznetsov
In-Reply-To: <1129283450.5057.29.camel@localhost.localdomain>
On 10/14/05, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Jesper,
>
> > This is the net/ part of the big kfree cleanup patch.
> >
> > Remove pointless checks for NULL prior to calling kfree() in net/.
> >
> >
> > Sorry about the long Cc: list, but I wanted to make sure I included everyone
> > who's code I've changed with this patch.
>
> you forgot me ;)
>
Sorry. I did try to include everyone, but there were so many different
areas and so many different persons that it was practically impossible
not to miss one or two people - surely was not intentional :)
[snip]
>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
>
Thank you for that.
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply
* Re: [PATCH]The type of inet6_ifinfo_notify event in addrconf_ifdown().
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2005-10-14 10:53 UTC (permalink / raw)
To: yzcorp, davem; +Cc: netdev, linux-kernel, yoshfuji
In-Reply-To: <434F8B23.7090201@gmail.com>
In article <434F8B23.7090201@gmail.com> (at Fri, 14 Oct 2005 18:40:35 +0800), Yan Zheng <yzcorp@gmail.com> says:
> Maybe inet6_ifinfo_notify event type should be RTM_DELLINK in
> addrconf_ifdown().
>
> Signed-off-by: Yan Zheng<yanzheng@21cn.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
--yoshfuji
^ permalink raw reply
* [PATCH]The type of inet6_ifinfo_notify event in addrconf_ifdown().
From: Yan Zheng @ 2005-10-14 10:40 UTC (permalink / raw)
To: netdev, linux-kernel
Maybe inet6_ifinfo_notify event type should be RTM_DELLINK in
addrconf_ifdown().
Signed-off-by: Yan Zheng<yanzheng@21cn.com>
Index: net/ipv6/addrconf.c
------------------------------------------------------------------------
--- linux-2.6.14-rc4-git2/net/ipv6/addrconf.c 2005-10-14
18:28:01.000000000 +0800
+++ linux/net/ipv6/addrconf.c 2005-10-14 18:31:15.000000000 +0800
@@ -2167,7 +2167,7 @@
/* Step 5: netlink notification of this interface */
idev->tstamp = jiffies;
- inet6_ifinfo_notify(RTM_NEWLINK, idev);
+ inet6_ifinfo_notify(RTM_DELLINK, idev);
/* Shot the device (if unregistered) */
^ permalink raw reply
* Re: [PATCH 01/14] Big kfree NULL check cleanup - net
From: Marcel Holtmann @ 2005-10-14 9:50 UTC (permalink / raw)
To: Jesper Juhl
Cc: linux-kernel, Andrew Morton, netdev, David S. Miller,
Hideaki YOSHIFUJI, Arnaldo Carvalho de Melo, Ralf Baechle,
Greg Kroah-Hartman, dccp, Patrick Caulfield, Jean Tourrilhes,
Sridhar Samudrala, Andy Adamson, J. Bruce Fields, Nenad Corbic,
Alexey Kuznetsov
In-Reply-To: <200510132125.44470.jesper.juhl@gmail.com>
Hi Jesper,
> This is the net/ part of the big kfree cleanup patch.
>
> Remove pointless checks for NULL prior to calling kfree() in net/.
>
>
> Sorry about the long Cc: list, but I wanted to make sure I included everyone
> who's code I've changed with this patch.
you forgot me ;)
> --- linux-2.6.14-rc4-orig/net/bluetooth/hidp/core.c 2005-08-29 01:41:01.000000000 +0200
> +++ linux-2.6.14-rc4/net/bluetooth/hidp/core.c 2005-10-13 11:47:49.000000000 +0200
> @@ -657,9 +657,7 @@ unlink:
> failed:
> up_write(&hidp_session_sem);
>
> - if (session->input)
> - kfree(session->input);
> -
> + kfree(session->input);
> kfree(session);
> return err;
> }
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
^ permalink raw reply
* Re: Kconfig Dependencies for CONFIG_NET_CLS_RSVP6
From: Frank Sorenson @ 2005-10-14 7:07 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-kernel, netdev
In-Reply-To: <20051013.235907.66789139.davem@davemloft.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David S. Miller wrote:
> From: Frank Sorenson <frank@tuxrocks.com>
> Date: Fri, 14 Oct 2005 00:37:59 -0600
>
>
>>I noticed that I can still select "Special RSVP classifier for IPv6"
>>even if "The IPv6 protocol" isn't selected. Should CONFIG_NET_CLS_RSVP6
>>depend on or select IPV6?
>>
>>Currently:
>>Depends on: NET && NET_CLS && NET_QOS
>
>
> It doesn't need the ipv6 stack at all, it's just a classifier
> that looks at packet headers and makes decisions.
Okay, I suppose that makes more sense now. I just wanted to check it
through, since I figured I'd turned off everything related to IPv6 :)
Thanks for explaining,
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFDT1lAaI0dwg4A47wRAuXVAKCWBcZj3OTK8wLZInGE7eIegtrBeACg7GOt
gM0finkJL0tRmXm9685vS10=
=8M+k
-----END PGP SIGNATURE-----
^ permalink raw reply
* Re: Kconfig Dependencies for CONFIG_NET_CLS_RSVP6
From: David S. Miller @ 2005-10-14 6:59 UTC (permalink / raw)
To: frank; +Cc: linux-kernel, netdev
In-Reply-To: <434F5247.2040007@tuxrocks.com>
From: Frank Sorenson <frank@tuxrocks.com>
Date: Fri, 14 Oct 2005 00:37:59 -0600
> I noticed that I can still select "Special RSVP classifier for IPv6"
> even if "The IPv6 protocol" isn't selected. Should CONFIG_NET_CLS_RSVP6
> depend on or select IPV6?
>
> Currently:
> Depends on: NET && NET_CLS && NET_QOS
It doesn't need the ipv6 stack at all, it's just a classifier
that looks at packet headers and makes decisions.
^ permalink raw reply
* Kconfig Dependencies for CONFIG_NET_CLS_RSVP6
From: Frank Sorenson @ 2005-10-14 6:37 UTC (permalink / raw)
To: LKML, netdev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I noticed that I can still select "Special RSVP classifier for IPv6"
even if "The IPv6 protocol" isn't selected. Should CONFIG_NET_CLS_RSVP6
depend on or select IPV6?
Currently:
Depends on: NET && NET_CLS && NET_QOS
Thanks,
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFDT1JHaI0dwg4A47wRAhgRAJ0WKH6/S1DjKKRZDSwiLOpIMYJ8cgCgyIld
xXUJRsvCO1TJsCfpSCMj7/A=
=gqzH
-----END PGP SIGNATURE-----
^ permalink raw reply
* [PATCH 01/14] Big kfree NULL check cleanup - net
From: Jesper Juhl @ 2005-10-13 19:25 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, netdev, David S. Miller, Hideaki YOSHIFUJI,
Arnaldo Carvalho de Melo, Ralf Baechle, Greg Kroah-Hartman, dccp,
Patrick Caulfield, Jean Tourrilhes, Sridhar Samudrala,
Andy Adamson, J. Bruce Fields, Nenad Corbic, Alexey Kuznetsov,
Jesper Juhl
This is the net/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in net/.
Sorry about the long Cc: list, but I wanted to make sure I included everyone
who's code I've changed with this patch.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
Please see the initial announcement mail on LKML with subject
"[PATCH 00/14] Big kfree NULL check cleanup"
for additional details.
net/802/p8023.c | 3 +--
net/ax25/af_ax25.c | 6 ++----
net/ax25/ax25_in.c | 6 ++----
net/ax25/ax25_route.c | 19 ++++++-------------
net/bluetooth/hidp/core.c | 4 +---
net/core/dev_mcast.c | 3 +--
net/core/sock.c | 3 +--
net/dccp/ipv4.c | 6 ++----
net/dccp/proto.c | 3 +--
net/decnet/dn_table.c | 16 +++++++---------
net/ethernet/pe2.c | 3 +--
net/ipv4/af_inet.c | 3 +--
net/ipv4/fib_frontend.c | 3 +--
net/ipv4/ip_options.c | 3 +--
net/ipv4/ip_output.c | 12 ++++--------
net/ipv4/ip_sockglue.c | 12 ++++--------
net/ipv4/ipvs/ip_vs_app.c | 6 ++----
net/ipv4/multipath_wrandom.c | 10 +++-------
net/ipv4/netfilter/ip_nat_snmp_basic.c | 3 +--
net/ipv4/tcp_ipv4.c | 3 +--
net/ipv6/addrconf.c | 3 +--
net/ipv6/ip6_output.c | 15 +++++----------
net/ipv6/ip6_tunnel.c | 6 ++----
net/ipv6/ipcomp6.c | 3 +--
net/ipv6/ipv6_sockglue.c | 3 +--
net/irda/discovery.c | 3 +--
net/irda/irias_object.c | 16 ++++++----------
net/rose/rose_route.c | 6 ++----
net/sched/cls_fw.c | 3 +--
net/sched/cls_route.c | 3 +--
net/sched/cls_rsvp.h | 3 +--
net/sched/cls_tcindex.c | 9 +++------
net/sched/cls_u32.c | 4 ++--
net/sched/em_meta.c | 3 +--
net/sched/sch_gred.c | 9 +++------
net/sctp/associola.c | 4 +---
net/sctp/sm_make_chunk.c | 6 ++----
net/sunrpc/auth_gss/gss_krb5_seal.c | 2 +-
net/sunrpc/auth_gss/gss_krb5_unseal.c | 2 +-
net/sunrpc/auth_gss/gss_mech_switch.c | 3 +--
net/sunrpc/auth_gss/gss_spkm3_seal.c | 3 +--
net/sunrpc/auth_gss/gss_spkm3_token.c | 3 +--
net/sunrpc/auth_gss/gss_spkm3_unseal.c | 6 ++----
net/sunrpc/svc.c | 9 +++------
net/sunrpc/xdr.c | 3 +--
net/wanrouter/af_wanpipe.c | 20 +++++++-------------
net/wanrouter/wanmain.c | 12 ++++--------
net/xfrm/xfrm_state.c | 12 ++++--------
48 files changed, 103 insertions(+), 198 deletions(-)
--- linux-2.6.14-rc4-orig/net/802/p8023.c 2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/net/802/p8023.c 2005-10-13 11:24:33.000000000 +0200
@@ -54,8 +54,7 @@ struct datalink_proto *make_8023_client(
*/
void destroy_8023_client(struct datalink_proto *dl)
{
- if (dl)
- kfree(dl);
+ kfree(dl);
}
EXPORT_SYMBOL(destroy_8023_client);
--- linux-2.6.14-rc4-orig/net/ax25/ax25_in.c 2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/net/ax25/ax25_in.c 2005-10-13 11:25:12.000000000 +0200
@@ -401,10 +401,8 @@ static int ax25_rcv(struct sk_buff *skb,
}
if (dp.ndigi == 0) {
- if (ax25->digipeat != NULL) {
- kfree(ax25->digipeat);
- ax25->digipeat = NULL;
- }
+ kfree(ax25->digipeat);
+ ax25->digipeat = NULL;
} else {
/* Reverse the source SABM's path */
memcpy(ax25->digipeat, &reverse_dp, sizeof(ax25_digi));
--- linux-2.6.14-rc4-orig/net/ax25/af_ax25.c 2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/net/ax25/af_ax25.c 2005-10-13 11:25:40.000000000 +0200
@@ -1138,10 +1138,8 @@ static int ax25_connect(struct socket *s
sk->sk_state = TCP_CLOSE;
sock->state = SS_UNCONNECTED;
- if (ax25->digipeat != NULL) {
- kfree(ax25->digipeat);
- ax25->digipeat = NULL;
- }
+ kfree(ax25->digipeat);
+ ax25->digipeat = NULL;
/*
* Handle digi-peaters to be used.
--- linux-2.6.14-rc4-orig/net/ax25/ax25_route.c 2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/net/ax25/ax25_route.c 2005-10-13 11:26:29.000000000 +0200
@@ -54,15 +54,13 @@ void ax25_rt_device_down(struct net_devi
if (s->dev == dev) {
if (ax25_route_list == s) {
ax25_route_list = s->next;
- if (s->digipeat != NULL)
- kfree(s->digipeat);
+ kfree(s->digipeat);
kfree(s);
} else {
for (t = ax25_route_list; t != NULL; t = t->next) {
if (t->next == s) {
t->next = s->next;
- if (s->digipeat != NULL)
- kfree(s->digipeat);
+ kfree(s->digipeat);
kfree(s);
break;
}
@@ -90,10 +88,8 @@ static int ax25_rt_add(struct ax25_route
while (ax25_rt != NULL) {
if (ax25cmp(&ax25_rt->callsign, &route->dest_addr) == 0 &&
ax25_rt->dev == ax25_dev->dev) {
- if (ax25_rt->digipeat != NULL) {
- kfree(ax25_rt->digipeat);
- ax25_rt->digipeat = NULL;
- }
+ kfree(ax25_rt->digipeat);
+ ax25_rt->digipeat = NULL;
if (route->digi_count != 0) {
if ((ax25_rt->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
write_unlock(&ax25_route_lock);
@@ -145,8 +141,7 @@ static int ax25_rt_add(struct ax25_route
static void ax25_rt_destroy(ax25_route *ax25_rt)
{
if (atomic_read(&ax25_rt->ref) == 0) {
- if (ax25_rt->digipeat != NULL)
- kfree(ax25_rt->digipeat);
+ kfree(ax25_rt->digipeat);
kfree(ax25_rt);
return;
}
@@ -530,9 +525,7 @@ void __exit ax25_rt_free(void)
s = ax25_rt;
ax25_rt = ax25_rt->next;
- if (s->digipeat != NULL)
- kfree(s->digipeat);
-
+ kfree(s->digipeat);
kfree(s);
}
write_unlock(&ax25_route_lock);
--- linux-2.6.14-rc4-orig/net/dccp/ipv4.c 2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/dccp/ipv4.c 2005-10-13 11:26:46.000000000 +0200
@@ -1287,10 +1287,8 @@ static int dccp_v4_destroy_sock(struct s
if (inet_csk(sk)->icsk_bind_hash != NULL)
inet_put_port(&dccp_hashinfo, sk);
- if (dp->dccps_service_list != NULL) {
- kfree(dp->dccps_service_list);
- dp->dccps_service_list = NULL;
- }
+ kfree(dp->dccps_service_list);
+ dp->dccps_service_list = NULL;
ccid_hc_rx_exit(dp->dccps_hc_rx_ccid, sk);
ccid_hc_tx_exit(dp->dccps_hc_tx_ccid, sk);
--- linux-2.6.14-rc4-orig/net/dccp/proto.c 2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/dccp/proto.c 2005-10-13 11:27:02.000000000 +0200
@@ -238,8 +238,7 @@ static int dccp_setsockopt_service(struc
lock_sock(sk);
dp->dccps_service = service;
- if (dp->dccps_service_list != NULL)
- kfree(dp->dccps_service_list);
+ kfree(dp->dccps_service_list);
dp->dccps_service_list = sl;
release_sock(sk);
--- linux-2.6.14-rc4-orig/net/core/sock.c 2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/core/sock.c 2005-10-13 11:27:43.000000000 +0200
@@ -1242,8 +1242,7 @@ static void sock_def_write_space(struct
static void sock_def_destruct(struct sock *sk)
{
- if (sk->sk_protinfo)
- kfree(sk->sk_protinfo);
+ kfree(sk->sk_protinfo);
}
void sk_send_sigurg(struct sock *sk)
--- linux-2.6.14-rc4-orig/net/core/dev_mcast.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/core/dev_mcast.c 2005-10-13 11:27:54.000000000 +0200
@@ -194,8 +194,7 @@ int dev_mc_add(struct net_device *dev, v
done:
spin_unlock_bh(&dev->xmit_lock);
- if (dmi1)
- kfree(dmi1);
+ kfree(dmi1);
return err;
}
--- linux-2.6.14-rc4-orig/net/ipv4/ipvs/ip_vs_app.c 2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/ipvs/ip_vs_app.c 2005-10-13 11:28:10.000000000 +0200
@@ -110,8 +110,7 @@ ip_vs_app_inc_new(struct ip_vs_app *app,
return 0;
out:
- if (inc->timeout_table)
- kfree(inc->timeout_table);
+ kfree(inc->timeout_table);
kfree(inc);
return ret;
}
@@ -136,8 +135,7 @@ ip_vs_app_inc_release(struct ip_vs_app *
list_del(&inc->a_list);
- if (inc->timeout_table != NULL)
- kfree(inc->timeout_table);
+ kfree(inc->timeout_table);
kfree(inc);
}
--- linux-2.6.14-rc4-orig/net/ipv4/ip_output.c 2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/ip_output.c 2005-10-13 11:28:50.000000000 +0200
@@ -1189,10 +1189,8 @@ int ip_push_pending_frames(struct sock *
out:
inet->cork.flags &= ~IPCORK_OPT;
- if (inet->cork.opt) {
- kfree(inet->cork.opt);
- inet->cork.opt = NULL;
- }
+ kfree(inet->cork.opt);
+ inet->cork.opt = NULL;
if (inet->cork.rt) {
ip_rt_put(inet->cork.rt);
inet->cork.rt = NULL;
@@ -1216,10 +1214,8 @@ void ip_flush_pending_frames(struct sock
kfree_skb(skb);
inet->cork.flags &= ~IPCORK_OPT;
- if (inet->cork.opt) {
- kfree(inet->cork.opt);
- inet->cork.opt = NULL;
- }
+ kfree(inet->cork.opt);
+ inet->cork.opt = NULL;
if (inet->cork.rt) {
ip_rt_put(inet->cork.rt);
inet->cork.rt = NULL;
--- linux-2.6.14-rc4-orig/net/ipv4/tcp_ipv4.c 2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/tcp_ipv4.c 2005-10-13 11:29:19.000000000 +0200
@@ -825,8 +825,7 @@ out:
*/
static void tcp_v4_reqsk_destructor(struct request_sock *req)
{
- if (inet_rsk(req)->opt)
- kfree(inet_rsk(req)->opt);
+ kfree(inet_rsk(req)->opt);
}
static inline void syn_flood_warning(struct sk_buff *skb)
--- linux-2.6.14-rc4-orig/net/ipv4/ip_sockglue.c 2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/ip_sockglue.c 2005-10-13 11:29:53.000000000 +0200
@@ -202,8 +202,7 @@ int ip_ra_control(struct sock *sk, unsig
if (ra->sk == sk) {
if (on) {
write_unlock_bh(&ip_ra_lock);
- if (new_ra)
- kfree(new_ra);
+ kfree(new_ra);
return -EADDRINUSE;
}
*rap = ra->next;
@@ -446,8 +445,7 @@ int ip_setsockopt(struct sock *sk, int l
#endif
}
opt = xchg(&inet->opt, opt);
- if (opt)
- kfree(opt);
+ kfree(opt);
break;
}
case IP_PKTINFO:
@@ -828,10 +826,8 @@ int ip_setsockopt(struct sock *sk, int l
err = ip_mc_msfilter(sk, msf, ifindex);
mc_msf_out:
- if (msf)
- kfree(msf);
- if (gsf)
- kfree(gsf);
+ kfree(msf);
+ kfree(gsf);
break;
}
case IP_ROUTER_ALERT:
--- linux-2.6.14-rc4-orig/net/ipv4/netfilter/ip_nat_snmp_basic.c 2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/netfilter/ip_nat_snmp_basic.c 2005-10-13 11:31:09.000000000 +0200
@@ -1161,8 +1161,7 @@ static int snmp_parse_mangle(unsigned ch
if (!snmp_object_decode(&ctx, obj)) {
if (*obj) {
- if ((*obj)->id)
- kfree((*obj)->id);
+ kfree((*obj)->id);
kfree(*obj);
}
kfree(obj);
--- linux-2.6.14-rc4-orig/net/ipv4/multipath_wrandom.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/multipath_wrandom.c 2005-10-13 11:31:46.000000000 +0200
@@ -207,16 +207,12 @@ static void wrandom_select_route(const s
decision = mpc->rt;
last_power = mpc->power;
- if (last_mpc)
- kfree(last_mpc);
-
+ kfree(last_mpc);
last_mpc = mpc;
}
- if (last_mpc) {
- /* concurrent __multipath_flush may lead to !last_mpc */
- kfree(last_mpc);
- }
+ /* concurrent __multipath_flush may lead to !last_mpc */
+ kfree(last_mpc);
decision->u.dst.__use++;
*rp = decision;
--- linux-2.6.14-rc4-orig/net/ipv4/af_inet.c 2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/af_inet.c 2005-10-13 11:31:54.000000000 +0200
@@ -147,8 +147,7 @@ void inet_sock_destruct(struct sock *sk)
BUG_TRAP(!sk->sk_wmem_queued);
BUG_TRAP(!sk->sk_forward_alloc);
- if (inet->opt)
- kfree(inet->opt);
+ kfree(inet->opt);
dst_release(sk->sk_dst_cache);
sk_refcnt_debug_dec(sk);
}
--- linux-2.6.14-rc4-orig/net/ipv4/ip_options.c 2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/ip_options.c 2005-10-13 11:32:07.000000000 +0200
@@ -510,8 +510,7 @@ static int ip_options_get_finish(struct
kfree(opt);
return -EINVAL;
}
- if (*optp)
- kfree(*optp);
+ kfree(*optp);
*optp = opt;
return 0;
}
--- linux-2.6.14-rc4-orig/net/ipv4/fib_frontend.c 2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/fib_frontend.c 2005-10-13 11:32:16.000000000 +0200
@@ -266,8 +266,7 @@ int ip_rt_ioctl(unsigned int cmd, void _
if (tb)
err = tb->tb_insert(tb, &req.rtm, &rta, &req.nlh, NULL);
}
- if (rta.rta_mx)
- kfree(rta.rta_mx);
+ kfree(rta.rta_mx);
}
rtnl_unlock();
return err;
--- linux-2.6.14-rc4-orig/net/ipv6/ipv6_sockglue.c 2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv6/ipv6_sockglue.c 2005-10-13 11:32:36.000000000 +0200
@@ -80,8 +80,7 @@ int ip6_ra_control(struct sock *sk, int
if (ra->sk == sk) {
if (sel>=0) {
write_unlock_bh(&ip6_ra_lock);
- if (new_ra)
- kfree(new_ra);
+ kfree(new_ra);
return -EADDRINUSE;
}
--- linux-2.6.14-rc4-orig/net/ipv6/addrconf.c 2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv6/addrconf.c 2005-10-13 11:33:03.000000000 +0200
@@ -2954,8 +2954,7 @@ static int inet6_fill_ifinfo(struct sk_b
nlmsg_failure:
rtattr_failure:
- if (array)
- kfree(array);
+ kfree(array);
skb_trim(skb, b - skb->data);
return -1;
}
--- linux-2.6.14-rc4-orig/net/ipv6/ipcomp6.c 2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv6/ipcomp6.c 2005-10-13 11:33:13.000000000 +0200
@@ -130,8 +130,7 @@ static int ipcomp6_input(struct xfrm_sta
out_put_cpu:
put_cpu();
out:
- if (tmp_hdr)
- kfree(tmp_hdr);
+ kfree(tmp_hdr);
if (err)
goto error_out;
return nexthdr;
--- linux-2.6.14-rc4-orig/net/ipv6/ip6_output.c 2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv6/ip6_output.c 2005-10-13 11:33:50.000000000 +0200
@@ -586,8 +586,7 @@ static int ip6_fragment(struct sk_buff *
skb->next = NULL;
}
- if (tmp_hdr)
- kfree(tmp_hdr);
+ kfree(tmp_hdr);
if (err == 0) {
IP6_INC_STATS(IPSTATS_MIB_FRAGOKS);
@@ -1117,10 +1116,8 @@ int ip6_push_pending_frames(struct sock
out:
inet->cork.flags &= ~IPCORK_OPT;
- if (np->cork.opt) {
- kfree(np->cork.opt);
- np->cork.opt = NULL;
- }
+ kfree(np->cork.opt);
+ np->cork.opt = NULL;
if (np->cork.rt) {
dst_release(&np->cork.rt->u.dst);
np->cork.rt = NULL;
@@ -1145,10 +1142,8 @@ void ip6_flush_pending_frames(struct soc
inet->cork.flags &= ~IPCORK_OPT;
- if (np->cork.opt) {
- kfree(np->cork.opt);
- np->cork.opt = NULL;
- }
+ kfree(np->cork.opt);
+ np->cork.opt = NULL;
if (np->cork.rt) {
dst_release(&np->cork.rt->u.dst);
np->cork.rt = NULL;
--- linux-2.6.14-rc4-orig/net/ipv6/ip6_tunnel.c 2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv6/ip6_tunnel.c 2005-10-13 11:34:06.000000000 +0200
@@ -756,8 +756,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
}
ip6_tnl_dst_store(t, dst);
- if (opt)
- kfree(opt);
+ kfree(opt);
t->recursion--;
return 0;
@@ -766,8 +765,7 @@ tx_err_link_failure:
dst_link_failure(skb);
tx_err_dst_release:
dst_release(dst);
- if (opt)
- kfree(opt);
+ kfree(opt);
tx_err:
stats->tx_errors++;
stats->tx_dropped++;
--- linux-2.6.14-rc4-orig/net/irda/discovery.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/irda/discovery.c 2005-10-13 11:34:26.000000000 +0200
@@ -194,8 +194,7 @@ void irlmp_expire_discoveries(hashbin_t
/* Remove it from the log */
curr = hashbin_remove_this(log, (irda_queue_t *) curr);
- if (curr)
- kfree(curr);
+ kfree(curr);
}
}
--- linux-2.6.14-rc4-orig/net/irda/irias_object.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/irda/irias_object.c 2005-10-13 11:35:29.000000000 +0200
@@ -122,8 +122,7 @@ static void __irias_delete_attrib(struct
IRDA_ASSERT(attrib != NULL, return;);
IRDA_ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;);
- if (attrib->name)
- kfree(attrib->name);
+ kfree(attrib->name);
irias_delete_value(attrib->value);
attrib->magic = ~IAS_ATTRIB_MAGIC;
@@ -136,8 +135,7 @@ void __irias_delete_object(struct ias_ob
IRDA_ASSERT(obj != NULL, return;);
IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;);
- if (obj->name)
- kfree(obj->name);
+ kfree(obj->name);
hashbin_delete(obj->attribs, (FREE_FUNC) __irias_delete_attrib);
@@ -562,14 +560,12 @@ void irias_delete_value(struct ias_value
/* No need to deallocate */
break;
case IAS_STRING:
- /* If string, deallocate string */
- if (value->t.string != NULL)
- kfree(value->t.string);
+ /* Deallocate string */
+ kfree(value->t.string);
break;
case IAS_OCT_SEQ:
- /* If byte stream, deallocate byte stream */
- if (value->t.oct_seq != NULL)
- kfree(value->t.oct_seq);
+ /* Deallocate byte stream */
+ kfree(value->t.oct_seq);
break;
default:
IRDA_DEBUG(0, "%s(), Unknown value type!\n", __FUNCTION__);
--- linux-2.6.14-rc4-orig/net/sctp/sm_make_chunk.c 2005-10-11 22:41:35.000000000 +0200
+++ linux-2.6.14-rc4/net/sctp/sm_make_chunk.c 2005-10-13 11:35:50.000000000 +0200
@@ -254,8 +254,7 @@ struct sctp_chunk *sctp_make_init(const
aiparam.adaption_ind = htonl(sp->adaption_ind);
sctp_addto_chunk(retval, sizeof(aiparam), &aiparam);
nodata:
- if (addrs.v)
- kfree(addrs.v);
+ kfree(addrs.v);
return retval;
}
@@ -347,8 +346,7 @@ struct sctp_chunk *sctp_make_init_ack(co
nomem_chunk:
kfree(cookie);
nomem_cookie:
- if (addrs.v)
- kfree(addrs.v);
+ kfree(addrs.v);
return retval;
}
--- linux-2.6.14-rc4-orig/net/sctp/associola.c 2005-10-11 22:41:35.000000000 +0200
+++ linux-2.6.14-rc4/net/sctp/associola.c 2005-10-13 11:36:05.000000000 +0200
@@ -344,9 +344,7 @@ void sctp_association_free(struct sctp_a
}
/* Free peer's cached cookie. */
- if (asoc->peer.cookie) {
- kfree(asoc->peer.cookie);
- }
+ kfree(asoc->peer.cookie);
/* Release the transport structures. */
list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) {
--- linux-2.6.14-rc4-orig/net/rose/rose_route.c 2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/rose/rose_route.c 2005-10-13 11:36:35.000000000 +0200
@@ -240,8 +240,7 @@ static void rose_remove_neigh(struct ros
if ((s = rose_neigh_list) == rose_neigh) {
rose_neigh_list = rose_neigh->next;
spin_unlock_bh(&rose_neigh_list_lock);
- if (rose_neigh->digipeat != NULL)
- kfree(rose_neigh->digipeat);
+ kfree(rose_neigh->digipeat);
kfree(rose_neigh);
return;
}
@@ -250,8 +249,7 @@ static void rose_remove_neigh(struct ros
if (s->next == rose_neigh) {
s->next = rose_neigh->next;
spin_unlock_bh(&rose_neigh_list_lock);
- if (rose_neigh->digipeat != NULL)
- kfree(rose_neigh->digipeat);
+ kfree(rose_neigh->digipeat);
kfree(rose_neigh);
return;
}
--- linux-2.6.14-rc4-orig/net/xfrm/xfrm_state.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/xfrm/xfrm_state.c 2005-10-13 11:36:55.000000000 +0200
@@ -62,14 +62,10 @@ static void xfrm_state_gc_destroy(struct
{
if (del_timer(&x->timer))
BUG();
- if (x->aalg)
- kfree(x->aalg);
- if (x->ealg)
- kfree(x->ealg);
- if (x->calg)
- kfree(x->calg);
- if (x->encap)
- kfree(x->encap);
+ kfree(x->aalg);
+ kfree(x->ealg);
+ kfree(x->calg);
+ kfree(x->encap);
if (x->type) {
x->type->destructor(x);
xfrm_put_type(x->type);
--- linux-2.6.14-rc4-orig/net/sched/cls_tcindex.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/cls_tcindex.c 2005-10-13 11:37:16.000000000 +0200
@@ -194,8 +194,7 @@ found:
}
tcf_unbind_filter(tp, &r->res);
tcf_exts_destroy(tp, &r->exts);
- if (f)
- kfree(f);
+ kfree(f);
return 0;
}
@@ -442,10 +441,8 @@ static void tcindex_destroy(struct tcf_p
walker.skip = 0;
walker.fn = &tcindex_destroy_element;
tcindex_walk(tp,&walker);
- if (p->perfect)
- kfree(p->perfect);
- if (p->h)
- kfree(p->h);
+ kfree(p->perfect);
+ kfree(p->h);
kfree(p);
tp->root = NULL;
}
--- linux-2.6.14-rc4-orig/net/sched/sch_gred.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/sch_gred.c 2005-10-13 11:37:41.000000000 +0200
@@ -580,8 +580,7 @@ static int gred_dump(struct Qdisc *sch,
return skb->len;
rtattr_failure:
- if (opt)
- kfree(opt);
+ kfree(opt);
DPRINTK("gred_dump: FAILURE!!!!\n");
/* also free the opt struct here */
@@ -594,10 +593,8 @@ static void gred_destroy(struct Qdisc *s
struct gred_sched *table = qdisc_priv(sch);
int i;
- for (i = 0;i < table->DPs; i++) {
- if (table->tab[i])
- kfree(table->tab[i]);
- }
+ for (i = 0;i < table->DPs; i++)
+ kfree(table->tab[i]);
}
static struct Qdisc_ops gred_qdisc_ops = {
--- linux-2.6.14-rc4-orig/net/sched/em_meta.c 2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/em_meta.c 2005-10-13 11:38:28.000000000 +0200
@@ -561,8 +561,7 @@ static int meta_var_change(struct meta_v
static void meta_var_destroy(struct meta_value *v)
{
- if (v->val)
- kfree((void *) v->val);
+ kfree((void *) v->val);
}
static void meta_var_apply_extras(struct meta_value *v,
--- linux-2.6.14-rc4-orig/net/sched/cls_u32.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/cls_u32.c 2005-10-13 11:39:35.000000000 +0200
@@ -347,7 +347,7 @@ static int u32_destroy_key(struct tcf_pr
if (n->ht_down)
n->ht_down->refcnt--;
#ifdef CONFIG_CLS_U32_PERF
- if (n && (NULL != n->pf))
+ if (n)
kfree(n->pf);
#endif
kfree(n);
@@ -680,7 +680,7 @@ static int u32_change(struct tcf_proto *
return 0;
}
#ifdef CONFIG_CLS_U32_PERF
- if (n && (NULL != n->pf))
+ if (n)
kfree(n->pf);
#endif
kfree(n);
--- linux-2.6.14-rc4-orig/net/sched/cls_fw.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/cls_fw.c 2005-10-13 11:39:47.000000000 +0200
@@ -298,8 +298,7 @@ static int fw_change(struct tcf_proto *t
return 0;
errout:
- if (f)
- kfree(f);
+ kfree(f);
return err;
}
--- linux-2.6.14-rc4-orig/net/sched/cls_rsvp.h 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/cls_rsvp.h 2005-10-13 11:39:57.000000000 +0200
@@ -555,8 +555,7 @@ insert:
goto insert;
errout:
- if (f)
- kfree(f);
+ kfree(f);
errout2:
tcf_exts_destroy(tp, &e);
return err;
--- linux-2.6.14-rc4-orig/net/sched/cls_route.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/cls_route.c 2005-10-13 11:40:07.000000000 +0200
@@ -525,8 +525,7 @@ reinsert:
return 0;
errout:
- if (f)
- kfree(f);
+ kfree(f);
return err;
}
--- linux-2.6.14-rc4-orig/net/ethernet/pe2.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/ethernet/pe2.c 2005-10-13 11:40:15.000000000 +0200
@@ -32,8 +32,7 @@ struct datalink_proto *make_EII_client(v
void destroy_EII_client(struct datalink_proto *dl)
{
- if (dl)
- kfree(dl);
+ kfree(dl);
}
EXPORT_SYMBOL(destroy_EII_client);
--- linux-2.6.14-rc4-orig/net/decnet/dn_table.c 2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/decnet/dn_table.c 2005-10-13 11:41:34.000000000 +0200
@@ -784,16 +784,14 @@ struct dn_fib_table *dn_fib_get_table(in
static void dn_fib_del_tree(int n)
{
- struct dn_fib_table *t;
+ struct dn_fib_table *t;
- write_lock(&dn_fib_tables_lock);
- t = dn_fib_tables[n];
- dn_fib_tables[n] = NULL;
- write_unlock(&dn_fib_tables_lock);
-
- if (t) {
- kfree(t);
- }
+ write_lock(&dn_fib_tables_lock);
+ t = dn_fib_tables[n];
+ dn_fib_tables[n] = NULL;
+ write_unlock(&dn_fib_tables_lock);
+
+ kfree(t);
}
struct dn_fib_table *dn_fib_empty_table(void)
--- linux-2.6.14-rc4-orig/net/wanrouter/wanmain.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/wanrouter/wanmain.c 2005-10-13 11:42:22.000000000 +0200
@@ -714,10 +714,8 @@ static int wanrouter_device_new_if(struc
}
/* This code has moved from del_if() function */
- if (dev->priv) {
- kfree(dev->priv);
- dev->priv = NULL;
- }
+ kfree(dev->priv);
+ dev->priv = NULL;
#ifdef CONFIG_WANPIPE_MULTPPP
if (cnf->config_id == WANCONFIG_MPPP)
@@ -851,10 +849,8 @@ static int wanrouter_delete_interface(st
/* Due to new interface linking method using dev->priv,
* this code has moved from del_if() function.*/
- if (dev->priv){
- kfree(dev->priv);
- dev->priv=NULL;
- }
+ kfree(dev->priv);
+ dev->priv=NULL;
unregister_netdev(dev);
--- linux-2.6.14-rc4-orig/net/wanrouter/af_wanpipe.c 2005-10-11 22:41:35.000000000 +0200
+++ linux-2.6.14-rc4/net/wanrouter/af_wanpipe.c 2005-10-13 11:43:14.000000000 +0200
@@ -1099,7 +1099,7 @@ static void release_driver(struct sock *
sock_reset_flag(sk, SOCK_ZAPPED);
wp = wp_sk(sk);
- if (wp && wp->mbox) {
+ if (wp) {
kfree(wp->mbox);
wp->mbox = NULL;
}
@@ -1186,10 +1186,8 @@ static void wanpipe_kill_sock_timer (uns
return;
}
- if (wp_sk(sk)) {
- kfree(wp_sk(sk));
- wp_sk(sk) = NULL;
- }
+ kfree(wp_sk(sk));
+ wp_sk(sk) = NULL;
if (atomic_read(&sk->sk_refcnt) != 1) {
atomic_set(&sk->sk_refcnt, 1);
@@ -1219,10 +1217,8 @@ static void wanpipe_kill_sock_accept (st
sk->sk_socket = NULL;
- if (wp_sk(sk)) {
- kfree(wp_sk(sk));
- wp_sk(sk) = NULL;
- }
+ kfree(wp_sk(sk));
+ wp_sk(sk) = NULL;
if (atomic_read(&sk->sk_refcnt) != 1) {
atomic_set(&sk->sk_refcnt, 1);
@@ -1243,10 +1239,8 @@ static void wanpipe_kill_sock_irq (struc
sk->sk_socket = NULL;
- if (wp_sk(sk)) {
- kfree(wp_sk(sk));
- wp_sk(sk) = NULL;
- }
+ kfree(wp_sk(sk));
+ wp_sk(sk) = NULL;
if (atomic_read(&sk->sk_refcnt) != 1) {
atomic_set(&sk->sk_refcnt, 1);
--- linux-2.6.14-rc4-orig/net/sunrpc/svc.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/svc.c 2005-10-13 11:45:43.000000000 +0200
@@ -196,12 +196,9 @@ svc_exit_thread(struct svc_rqst *rqstp)
struct svc_serv *serv = rqstp->rq_server;
svc_release_buffer(rqstp);
- if (rqstp->rq_resp)
- kfree(rqstp->rq_resp);
- if (rqstp->rq_argp)
- kfree(rqstp->rq_argp);
- if (rqstp->rq_auth_data)
- kfree(rqstp->rq_auth_data);
+ kfree(rqstp->rq_resp);
+ kfree(rqstp->rq_argp);
+ kfree(rqstp->rq_auth_data);
kfree(rqstp);
/* Release the server */
--- linux-2.6.14-rc4-orig/net/sunrpc/xdr.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/xdr.c 2005-10-13 11:46:15.000000000 +0200
@@ -1167,8 +1167,7 @@ xdr_xcode_array2(struct xdr_buf *buf, un
err = 0;
out:
- if (elem)
- kfree(elem);
+ kfree(elem);
if (ppages)
kunmap(*ppages);
return err;
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_mech_switch.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_mech_switch.c 2005-10-13 11:46:26.000000000 +0200
@@ -61,8 +61,7 @@ gss_mech_free(struct gss_api_mech *gm)
for (i = 0; i < gm->gm_pf_num; i++) {
pf = &gm->gm_pfs[i];
- if (pf->auth_domain_name)
- kfree(pf->auth_domain_name);
+ kfree(pf->auth_domain_name);
pf->auth_domain_name = NULL;
}
}
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_spkm3_seal.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_spkm3_seal.c 2005-10-13 11:46:33.000000000 +0200
@@ -124,8 +124,7 @@ spkm3_make_token(struct spkm3_ctx *ctx,
return GSS_S_COMPLETE;
out_err:
- if (md5cksum.data)
- kfree(md5cksum.data);
+ kfree(md5cksum.data);
token->data = NULL;
token->len = 0;
return GSS_S_FAILURE;
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_krb5_seal.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_krb5_seal.c 2005-10-13 11:46:51.000000000 +0200
@@ -171,6 +171,6 @@ krb5_make_token(struct krb5_ctx *ctx, in
return ((ctx->endtime < now) ? GSS_S_CONTEXT_EXPIRED : GSS_S_COMPLETE);
out_err:
- if (md5cksum.data) kfree(md5cksum.data);
+ kfree(md5cksum.data);
return GSS_S_FAILURE;
}
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_spkm3_token.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_spkm3_token.c 2005-10-13 11:47:01.000000000 +0200
@@ -259,8 +259,7 @@ spkm3_verify_mic_token(unsigned char **t
ret = GSS_S_COMPLETE;
out:
- if (spkm3_ctx_id.data)
- kfree(spkm3_ctx_id.data);
+ kfree(spkm3_ctx_id.data);
return ret;
}
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_spkm3_unseal.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_spkm3_unseal.c 2005-10-13 11:47:12.000000000 +0200
@@ -120,9 +120,7 @@ spkm3_read_token(struct spkm3_ctx *ctx,
/* XXX: need to add expiration and sequencing */
ret = GSS_S_COMPLETE;
out:
- if (md5cksum.data)
- kfree(md5cksum.data);
- if (wire_cksum.data)
- kfree(wire_cksum.data);
+ kfree(md5cksum.data);
+ kfree(wire_cksum.data);
return ret;
}
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_krb5_unseal.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_krb5_unseal.c 2005-10-13 11:47:19.000000000 +0200
@@ -197,6 +197,6 @@ krb5_read_token(struct krb5_ctx *ctx,
ret = GSS_S_COMPLETE;
out:
- if (md5cksum.data) kfree(md5cksum.data);
+ kfree(md5cksum.data);
return ret;
}
--- linux-2.6.14-rc4-orig/net/bluetooth/hidp/core.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/bluetooth/hidp/core.c 2005-10-13 11:47:49.000000000 +0200
@@ -657,9 +657,7 @@ unlink:
failed:
up_write(&hidp_session_sem);
- if (session->input)
- kfree(session->input);
-
+ kfree(session->input);
kfree(session);
return err;
}
^ permalink raw reply
* [PATCH 02/14] Big kfree NULL check cleanup - drivers/net
From: Jesper Juhl @ 2005-10-13 19:22 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, David S. Miller, Jes Sorensen, Matt Porter,
Michael Chan, linux.nics, hans, Santiago Leon, Jean Tourrilhes,
Paul Mackerras, Michael Hipp, Jes Sorensen, Carsten Langgaard,
Jeff Garzik, Benjamin Reed, Jouni Malinen, prism54-private,
netdev, Stuart Cheshire, g4klx, Alan Cox, Jesper Juhl
This is the drivers/net/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in drivers/net/.
Sorry about the long Cc: list, but I wanted to make sure I included everyone
who's code I've changed with this patch.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
Please see the initial announcement mail on LKML with subject
"[PATCH 00/14] Big kfree NULL check cleanup"
for additional details.
drivers/net/acenic.c | 6 +--
drivers/net/au1000_eth.c | 6 +--
drivers/net/b44.c | 12 ++-----
drivers/net/bmac.c | 6 +--
drivers/net/bnx2.c | 12 ++-----
drivers/net/e1000/e1000_ethtool.c | 7 +---
drivers/net/hamradio/mkiss.c | 6 +--
drivers/net/ibmveth.c | 19 +++--------
drivers/net/irda/donauboe.c | 6 +--
drivers/net/irda/irda-usb.c | 6 +--
drivers/net/irda/irport.c | 3 -
drivers/net/irda/sir_dev.c | 3 -
drivers/net/irda/vlsi_ir.c | 3 -
drivers/net/mace.c | 6 +--
drivers/net/ni65.c | 9 +----
drivers/net/rrunner.c | 6 +--
drivers/net/s2io.c | 3 -
drivers/net/saa9730.c | 8 +---
drivers/net/sb1250-mac.c | 12 +------
drivers/net/tg3.c | 6 +--
drivers/net/tulip/de2104x.c | 6 +--
drivers/net/tulip/tulip_core.c | 6 +--
drivers/net/via-velocity.c | 6 +--
drivers/net/wireless/airo.c | 48 +++++++++++------------------
drivers/net/wireless/airo_cs.c | 4 --
drivers/net/wireless/atmel.c | 6 +--
drivers/net/wireless/atmel_cs.c | 3 -
drivers/net/wireless/hostap/hostap_ioctl.c | 9 +----
drivers/net/wireless/prism54/islpci_dev.c | 3 -
drivers/net/wireless/prism54/oid_mgt.c | 9 ++---
drivers/net/wireless/strip.c | 38 +++++++---------------
include/net/ax25.h | 3 -
include/net/netrom.h | 3 -
33 files changed, 97 insertions(+), 192 deletions(-)
--- linux-2.6.14-rc4-orig/drivers/net/irda/vlsi_ir.c 2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/irda/vlsi_ir.c 2005-10-12 15:43:54.000000000 +0200
@@ -473,8 +473,7 @@ static int vlsi_free_ring(struct vlsi_ri
rd_set_addr_status(rd, 0, 0);
if (busaddr)
pci_unmap_single(r->pdev, busaddr, r->len, r->dir);
- if (rd->buf)
- kfree(rd->buf);
+ kfree(rd->buf);
}
kfree(r);
return 0;
--- linux-2.6.14-rc4-orig/drivers/net/irda/donauboe.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/irda/donauboe.c 2005-10-12 15:45:19.000000000 +0200
@@ -1695,11 +1695,9 @@ toshoboe_open (struct pci_dev *pci_dev,
freebufs:
for (i = 0; i < TX_SLOTS; ++i)
- if (self->tx_bufs[i])
- kfree (self->tx_bufs[i]);
+ kfree (self->tx_bufs[i]);
for (i = 0; i < RX_SLOTS; ++i)
- if (self->rx_bufs[i])
- kfree (self->rx_bufs[i]);
+ kfree (self->rx_bufs[i]);
kfree(self->ringbuf);
freeregion:
--- linux-2.6.14-rc4-orig/drivers/net/irda/irda-usb.c 2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/irda/irda-usb.c 2005-10-12 15:45:55.000000000 +0200
@@ -1168,10 +1168,8 @@ static inline void irda_usb_close(struct
unregister_netdev(self->netdev);
/* Remove the speed buffer */
- if (self->speed_buff != NULL) {
- kfree(self->speed_buff);
- self->speed_buff = NULL;
- }
+ kfree(self->speed_buff);
+ self->speed_buff = NULL;
}
/********************** USB CONFIG SUBROUTINES **********************/
--- linux-2.6.14-rc4-orig/drivers/net/irda/sir_dev.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/irda/sir_dev.c 2005-10-12 15:46:45.000000000 +0200
@@ -490,8 +490,7 @@ static void sirdev_free_buffers(struct s
{
if (dev->rx_buff.skb)
kfree_skb(dev->rx_buff.skb);
- if (dev->tx_buff.head)
- kfree(dev->tx_buff.head);
+ kfree(dev->tx_buff.head);
dev->rx_buff.head = dev->tx_buff.head = NULL;
dev->rx_buff.skb = NULL;
}
--- linux-2.6.14-rc4-orig/drivers/net/irda/irport.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/irda/irport.c 2005-10-12 15:47:03.000000000 +0200
@@ -235,8 +235,7 @@ static int irport_close(struct irport_cb
__FUNCTION__, self->io.sir_base);
release_region(self->io.sir_base, self->io.sir_ext);
- if (self->tx_buff.head)
- kfree(self->tx_buff.head);
+ kfree(self->tx_buff.head);
if (self->rx_buff.skb)
kfree_skb(self->rx_buff.skb);
--- linux-2.6.14-rc4-orig/drivers/net/b44.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/b44.c 2005-10-12 15:47:33.000000000 +0200
@@ -1076,14 +1076,10 @@ static void b44_init_rings(struct b44 *b
*/
static void b44_free_consistent(struct b44 *bp)
{
- if (bp->rx_buffers) {
- kfree(bp->rx_buffers);
- bp->rx_buffers = NULL;
- }
- if (bp->tx_buffers) {
- kfree(bp->tx_buffers);
- bp->tx_buffers = NULL;
- }
+ kfree(bp->rx_buffers);
+ bp->rx_buffers = NULL;
+ kfree(bp->tx_buffers);
+ bp->tx_buffers = NULL;
if (bp->rx_ring) {
pci_free_consistent(bp->pdev, DMA_TABLE_BYTES,
bp->rx_ring, bp->rx_ring_dma);
--- linux-2.6.14-rc4-orig/drivers/net/e1000/e1000_ethtool.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/e1000/e1000_ethtool.c 2005-10-12 15:48:04.000000000 +0200
@@ -930,11 +930,8 @@ e1000_free_desc_rings(struct e1000_adapt
if(rxdr->desc)
pci_free_consistent(pdev, rxdr->size, rxdr->desc, rxdr->dma);
- if(txdr->buffer_info)
- kfree(txdr->buffer_info);
- if(rxdr->buffer_info)
- kfree(rxdr->buffer_info);
-
+ kfree(txdr->buffer_info);
+ kfree(rxdr->buffer_info);
return;
}
--- linux-2.6.14-rc4-orig/drivers/net/tg3.c 2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/tg3.c 2005-10-12 15:48:37.000000000 +0200
@@ -3905,10 +3905,8 @@ static void tg3_init_rings(struct tg3 *t
*/
static void tg3_free_consistent(struct tg3 *tp)
{
- if (tp->rx_std_buffers) {
- kfree(tp->rx_std_buffers);
- tp->rx_std_buffers = NULL;
- }
+ kfree(tp->rx_std_buffers);
+ tp->rx_std_buffers = NULL;
if (tp->rx_std) {
pci_free_consistent(tp->pdev, TG3_RX_RING_BYTES,
tp->rx_std, tp->rx_std_mapping);
--- linux-2.6.14-rc4-orig/drivers/net/tulip/tulip_core.c 2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/tulip/tulip_core.c 2005-10-12 15:48:58.000000000 +0200
@@ -1727,8 +1727,7 @@ err_out_free_ring:
tp->rx_ring, tp->rx_ring_dma);
err_out_mtable:
- if (tp->mtable)
- kfree (tp->mtable);
+ kfree (tp->mtable);
pci_iounmap(pdev, ioaddr);
err_out_free_res:
@@ -1806,8 +1805,7 @@ static void __devexit tulip_remove_one (
sizeof (struct tulip_rx_desc) * RX_RING_SIZE +
sizeof (struct tulip_tx_desc) * TX_RING_SIZE,
tp->rx_ring, tp->rx_ring_dma);
- if (tp->mtable)
- kfree (tp->mtable);
+ kfree (tp->mtable);
pci_iounmap(pdev, tp->base_addr);
free_netdev (dev);
pci_release_regions (pdev);
--- linux-2.6.14-rc4-orig/drivers/net/tulip/de2104x.c 2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/tulip/de2104x.c 2005-10-12 15:49:20.000000000 +0200
@@ -2071,8 +2071,7 @@ static int __init de_init_one (struct pc
return 0;
err_out_iomap:
- if (de->ee_data)
- kfree(de->ee_data);
+ kfree(de->ee_data);
iounmap(regs);
err_out_res:
pci_release_regions(pdev);
@@ -2091,8 +2090,7 @@ static void __exit de_remove_one (struct
if (!dev)
BUG();
unregister_netdev(dev);
- if (de->ee_data)
- kfree(de->ee_data);
+ kfree(de->ee_data);
iounmap(de->regs);
pci_release_regions(pdev);
pci_disable_device(pdev);
--- linux-2.6.14-rc4-orig/drivers/net/au1000_eth.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/au1000_eth.c 2005-10-12 15:49:37.000000000 +0200
@@ -1609,8 +1609,7 @@ err_out:
/* here we should have a valid dev plus aup-> register addresses
* so we can reset the mac properly.*/
reset_mac(dev);
- if (aup->mii)
- kfree(aup->mii);
+ kfree(aup->mii);
for (i = 0; i < NUM_RX_DMA; i++) {
if (aup->rx_db_inuse[i])
ReleaseDB(aup, aup->rx_db_inuse[i]);
@@ -1809,8 +1808,7 @@ static void __exit au1000_cleanup_module
if (dev) {
aup = (struct au1000_private *) dev->priv;
unregister_netdev(dev);
- if (aup->mii)
- kfree(aup->mii);
+ kfree(aup->mii);
for (j = 0; j < NUM_RX_DMA; j++) {
if (aup->rx_db_inuse[j])
ReleaseDB(aup, aup->rx_db_inuse[j]);
--- linux-2.6.14-rc4-orig/drivers/net/sb1250-mac.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/sb1250-mac.c 2005-10-12 15:50:29.000000000 +0200
@@ -1426,15 +1426,9 @@ static int sbmac_initctx(struct sbmac_so
static void sbdma_uninitctx(struct sbmacdma_s *d)
{
- if (d->sbdma_dscrtable) {
- kfree(d->sbdma_dscrtable);
- d->sbdma_dscrtable = NULL;
- }
-
- if (d->sbdma_ctxtable) {
- kfree(d->sbdma_ctxtable);
- d->sbdma_ctxtable = NULL;
- }
+ kfree(d->sbdma_dscrtable);
+ kfree(d->sbdma_ctxtable);
+ d->sbdma_dscrtable = d->sbdma_ctxtable = NULL;
}
--- linux-2.6.14-rc4-orig/drivers/net/hamradio/mkiss.c 2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/hamradio/mkiss.c 2005-10-12 15:50:51.000000000 +0200
@@ -352,10 +352,8 @@ static void ax_changedmtu(struct mkiss *
"MTU change cancelled.\n",
ax->dev->name);
dev->mtu = ax->mtu;
- if (xbuff != NULL)
- kfree(xbuff);
- if (rbuff != NULL)
- kfree(rbuff);
+ kfree(xbuff);
+ kfree(rbuff);
return;
}
--- linux-2.6.14-rc4-orig/drivers/net/acenic.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/acenic.c 2005-10-12 15:51:18.000000000 +0200
@@ -871,10 +871,8 @@ static void ace_init_cleanup(struct net_
if (ap->info)
pci_free_consistent(ap->pdev, sizeof(struct ace_info),
ap->info, ap->info_dma);
- if (ap->skb)
- kfree(ap->skb);
- if (ap->trace_buf)
- kfree(ap->trace_buf);
+ kfree(ap->skb);
+ kfree(ap->trace_buf);
if (dev->irq)
free_irq(dev->irq, dev);
--- linux-2.6.14-rc4-orig/drivers/net/bmac.c 2005-10-11 22:41:10.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/bmac.c 2005-10-12 15:51:48.000000000 +0200
@@ -1689,10 +1689,8 @@ static void __exit bmac_exit(void)
{
macio_unregister_driver(&bmac_driver);
- if (bmac_emergency_rxbuf != NULL) {
- kfree(bmac_emergency_rxbuf);
- bmac_emergency_rxbuf = NULL;
- }
+ kfree(bmac_emergency_rxbuf);
+ bmac_emergency_rxbuf = NULL;
}
MODULE_AUTHOR("Randy Gobbel/Paul Mackerras");
--- linux-2.6.14-rc4-orig/drivers/net/bnx2.c 2005-10-11 22:41:10.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/bnx2.c 2005-10-12 15:52:16.000000000 +0200
@@ -314,20 +314,16 @@ bnx2_free_mem(struct bnx2 *bp)
bp->tx_desc_ring, bp->tx_desc_mapping);
bp->tx_desc_ring = NULL;
}
- if (bp->tx_buf_ring) {
- kfree(bp->tx_buf_ring);
- bp->tx_buf_ring = NULL;
- }
+ kfree(bp->tx_buf_ring);
+ bp->tx_buf_ring = NULL;
if (bp->rx_desc_ring) {
pci_free_consistent(bp->pdev,
sizeof(struct rx_bd) * RX_DESC_CNT,
bp->rx_desc_ring, bp->rx_desc_mapping);
bp->rx_desc_ring = NULL;
}
- if (bp->rx_buf_ring) {
- kfree(bp->rx_buf_ring);
- bp->rx_buf_ring = NULL;
- }
+ kfree(bp->rx_buf_ring);
+ bp->rx_buf_ring = NULL;
}
static int
--- linux-2.6.14-rc4-orig/drivers/net/saa9730.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/saa9730.c 2005-10-12 15:53:22.000000000 +0200
@@ -997,10 +997,7 @@ static void __devexit saa9730_remove_one
if (dev) {
unregister_netdev(dev);
-
- if (dev->priv)
- kfree(dev->priv);
-
+ kfree(dev->priv);
free_netdev(dev);
pci_release_regions(pdev);
pci_disable_device(pdev);
@@ -1096,8 +1093,7 @@ static int lan_saa9730_init(struct net_d
return 0;
out:
- if (dev->priv)
- kfree(dev->priv);
+ kfree(dev->priv);
return ret;
}
--- linux-2.6.14-rc4-orig/drivers/net/mace.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/mace.c 2005-10-12 15:53:41.000000000 +0200
@@ -1035,10 +1035,8 @@ static void __exit mace_cleanup(void)
{
macio_unregister_driver(&mace_driver);
- if (dummy_buf) {
- kfree(dummy_buf);
- dummy_buf = NULL;
- }
+ kfree(dummy_buf);
+ dummy_buf = NULL;
}
MODULE_AUTHOR("Paul Mackerras");
--- linux-2.6.14-rc4-orig/drivers/net/ni65.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/ni65.c 2005-10-12 15:55:01.000000000 +0200
@@ -696,8 +696,7 @@ static void ni65_free_buffer(struct priv
return;
for(i=0;i<TMDNUM;i++) {
- if(p->tmdbounce[i])
- kfree(p->tmdbounce[i]);
+ kfree(p->tmdbounce[i]);
#ifdef XMT_VIA_SKB
if(p->tmd_skb[i])
dev_kfree_skb(p->tmd_skb[i]);
@@ -710,12 +709,10 @@ static void ni65_free_buffer(struct priv
if(p->recv_skb[i])
dev_kfree_skb(p->recv_skb[i]);
#else
- if(p->recvbounce[i])
- kfree(p->recvbounce[i]);
+ kfree(p->recvbounce[i]);
#endif
}
- if(p->self)
- kfree(p->self);
+ kfree(p->self);
}
--- linux-2.6.14-rc4-orig/drivers/net/s2io.c 2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/s2io.c 2005-10-12 15:55:30.000000000 +0200
@@ -701,8 +701,7 @@ static void free_shared_mem(struct s2io_
}
kfree(mac_control->rings[i].ba[j]);
}
- if (mac_control->rings[i].ba)
- kfree(mac_control->rings[i].ba);
+ kfree(mac_control->rings[i].ba);
}
#endif
--- linux-2.6.14-rc4-orig/drivers/net/wireless/atmel_cs.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/atmel_cs.c 2005-10-12 16:01:15.000000000 +0200
@@ -259,8 +259,7 @@ static void atmel_detach(dev_link_t *lin
/* Unlink device structure, free pieces */
*linkp = link->next;
- if (link->priv)
- kfree(link->priv);
+ kfree(link->priv);
kfree(link);
}
--- linux-2.6.14-rc4-orig/drivers/net/wireless/airo_cs.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/airo_cs.c 2005-10-12 16:01:27.000000000 +0200
@@ -258,9 +258,7 @@ static void airo_detach(dev_link_t *link
/* Unlink device structure, free pieces */
*linkp = link->next;
- if (link->priv) {
- kfree(link->priv);
- }
+ kfree(link->priv);
kfree(link);
} /* airo_detach */
--- linux-2.6.14-rc4-orig/drivers/net/wireless/airo.c 2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/airo.c 2005-10-12 16:10:37.000000000 +0200
@@ -2387,14 +2387,10 @@ void stop_airo_card( struct net_device *
dev_kfree_skb(skb);
}
- if (ai->flash)
- kfree(ai->flash);
- if (ai->rssi)
- kfree(ai->rssi);
- if (ai->APList)
- kfree(ai->APList);
- if (ai->SSID)
- kfree(ai->SSID);
+ kfree(ai->flash);
+ kfree(ai->rssi);
+ kfree(ai->APList);
+ kfree(ai->SSID);
if (freeres) {
/* PCMCIA frees this stuff, so only for PCI and ISA */
release_region( dev->base_addr, 64 );
@@ -3637,10 +3633,8 @@ static u16 setup_card(struct airo_info *
int rc;
memset( &mySsid, 0, sizeof( mySsid ) );
- if (ai->flash) {
- kfree (ai->flash);
- ai->flash = NULL;
- }
+ kfree (ai->flash);
+ ai->flash = NULL;
/* The NOP is the first step in getting the card going */
cmd.cmd = NOP;
@@ -3677,14 +3671,10 @@ static u16 setup_card(struct airo_info *
tdsRssiRid rssi_rid;
CapabilityRid cap_rid;
- if (ai->APList) {
- kfree(ai->APList);
- ai->APList = NULL;
- }
- if (ai->SSID) {
- kfree(ai->SSID);
- ai->SSID = NULL;
- }
+ kfree(ai->APList);
+ ai->APList = NULL;
+ kfree(ai->SSID);
+ ai->SSID = NULL;
// general configuration (read/modify/write)
status = readConfigRid(ai, lock);
if ( status != SUCCESS ) return ERROR;
@@ -3698,10 +3688,8 @@ static u16 setup_card(struct airo_info *
memcpy(ai->rssi, (u8*)&rssi_rid + 2, 512); /* Skip RID length member */
}
else {
- if (ai->rssi) {
- kfree(ai->rssi);
- ai->rssi = NULL;
- }
+ kfree(ai->rssi);
+ ai->rssi = NULL;
if (cap_rid.softCap & 8)
ai->config.rmode |= RXMODE_NORMALIZED_RSSI;
else
@@ -5380,11 +5368,13 @@ static int proc_BSSList_open( struct ino
static int proc_close( struct inode *inode, struct file *file )
{
- struct proc_data *data = (struct proc_data *)file->private_data;
- if ( data->on_close != NULL ) data->on_close( inode, file );
- if ( data->rbuffer ) kfree( data->rbuffer );
- if ( data->wbuffer ) kfree( data->wbuffer );
- kfree( data );
+ struct proc_data *data = file->private_data;
+
+ if (data->on_close != NULL)
+ data->on_close(inode, file);
+ kfree(data->rbuffer);
+ kfree(data->wbuffer);
+ kfree(data);
return 0;
}
--- linux-2.6.14-rc4-orig/drivers/net/wireless/strip.c 2005-10-11 22:41:12.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/strip.c 2005-10-12 16:11:41.000000000 +0200
@@ -860,12 +860,9 @@ static int allocate_buffers(struct strip
strip_info->mtu = dev->mtu = mtu;
return (1);
}
- if (r)
- kfree(r);
- if (s)
- kfree(s);
- if (t)
- kfree(t);
+ kfree(r);
+ kfree(s);
+ kfree(t);
return (0);
}
@@ -922,13 +919,9 @@ static int strip_change_mtu(struct net_d
printk(KERN_NOTICE "%s: strip MTU changed fom %d to %d.\n",
strip_info->dev->name, old_mtu, strip_info->mtu);
- if (orbuff)
- kfree(orbuff);
- if (osbuff)
- kfree(osbuff);
- if (otbuff)
- kfree(otbuff);
-
+ kfree(orbuff);
+ kfree(osbuff);
+ kfree(otbuff);
return 0;
}
@@ -2498,18 +2491,13 @@ static int strip_close_low(struct net_de
/*
* Free all STRIP frame buffers.
*/
- if (strip_info->rx_buff) {
- kfree(strip_info->rx_buff);
- strip_info->rx_buff = NULL;
- }
- if (strip_info->sx_buff) {
- kfree(strip_info->sx_buff);
- strip_info->sx_buff = NULL;
- }
- if (strip_info->tx_buff) {
- kfree(strip_info->tx_buff);
- strip_info->tx_buff = NULL;
- }
+ kfree(strip_info->rx_buff);
+ strip_info->rx_buff = NULL;
+ kfree(strip_info->sx_buff);
+ strip_info->sx_buff = NULL;
+ kfree(strip_info->tx_buff);
+ strip_info->tx_buff = NULL;
+
del_timer(&strip_info->idle_timer);
return 0;
}
--- linux-2.6.14-rc4-orig/drivers/net/wireless/hostap/hostap_ioctl.c 2005-10-11 22:41:12.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/hostap/hostap_ioctl.c 2005-10-12 16:13:42.000000000 +0200
@@ -551,7 +551,6 @@ static int prism2_ioctl_giwaplist(struct
kfree(addr);
kfree(qual);
-
return 0;
}
@@ -3088,9 +3087,7 @@ static int prism2_ioctl_priv_download(lo
ret = local->func->download(local, param);
out:
- if (param != NULL)
- kfree(param);
-
+ kfree(param);
return ret;
}
#endif /* PRISM2_DOWNLOAD_SUPPORT */
@@ -3897,9 +3894,7 @@ static int prism2_ioctl_priv_hostapd(loc
}
out:
- if (param != NULL)
- kfree(param);
-
+ kfree(param);
return ret;
}
--- linux-2.6.14-rc4-orig/drivers/net/wireless/atmel.c 2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/atmel.c 2005-10-12 16:14:10.000000000 +0200
@@ -1653,8 +1653,7 @@ void stop_atmel_card(struct net_device *
unregister_netdev(dev);
remove_proc_entry("driver/atmel", NULL);
free_irq(dev->irq, dev);
- if (priv->firmware)
- kfree(priv->firmware);
+ kfree(priv->firmware);
if (freeres) {
/* PCMCIA frees this stuff, so only for PCI */
release_region(dev->base_addr, 64);
@@ -2450,8 +2449,7 @@ static int atmel_ioctl(struct net_device
break;
}
- if (priv->firmware)
- kfree(priv->firmware);
+ kfree(priv->firmware);
priv->firmware = new_firmware;
priv->firmware_length = com.len;
--- linux-2.6.14-rc4-orig/drivers/net/wireless/prism54/islpci_dev.c 2005-10-11 22:41:12.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/prism54/islpci_dev.c 2005-10-12 16:14:19.000000000 +0200
@@ -756,8 +756,7 @@ islpci_free_memory(islpci_private *priv)
pci_unmap_single(priv->pdev, buf->pci_addr,
buf->size, PCI_DMA_FROMDEVICE);
buf->pci_addr = 0;
- if (buf->mem)
- kfree(buf->mem);
+ kfree(buf->mem);
buf->size = 0;
buf->mem = NULL;
}
--- linux-2.6.14-rc4-orig/drivers/net/wireless/prism54/oid_mgt.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/prism54/oid_mgt.c 2005-10-12 16:15:05.000000000 +0200
@@ -268,11 +268,10 @@ mgt_clean(islpci_private *priv)
if (!priv->mib)
return;
- for (i = 0; i < OID_NUM_LAST; i++)
- if (priv->mib[i]) {
- kfree(priv->mib[i]);
- priv->mib[i] = NULL;
- }
+ for (i = 0; i < OID_NUM_LAST; i++) {
+ kfree(priv->mib[i]);
+ priv->mib[i] = NULL;
+ }
kfree(priv->mib);
priv->mib = NULL;
}
--- linux-2.6.14-rc4-orig/drivers/net/via-velocity.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/via-velocity.c 2005-10-12 16:16:00.000000000 +0200
@@ -1212,10 +1212,8 @@ static void velocity_free_td_ring(struct
velocity_free_td_ring_entry(vptr, j, i);
}
- if (vptr->td_infos[j]) {
- kfree(vptr->td_infos[j]);
- vptr->td_infos[j] = NULL;
- }
+ kfree(vptr->td_infos[j]);
+ vptr->td_infos[j] = NULL;
}
}
--- linux-2.6.14-rc4-orig/drivers/net/rrunner.c 2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/rrunner.c 2005-10-12 16:16:19.000000000 +0200
@@ -1710,10 +1710,8 @@ static int rr_ioctl(struct net_device *d
error = -EFAULT;
}
wf_out:
- if (oldimage)
- kfree(oldimage);
- if (image)
- kfree(image);
+ kfree(oldimage);
+ kfree(image);
return error;
case SIOCRRID:
--- linux-2.6.14-rc4-orig/drivers/net/ibmveth.c 2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/ibmveth.c 2005-10-12 16:17:22.000000000 +0200
@@ -293,10 +293,8 @@ static void ibmveth_free_buffer_pool(str
{
int i;
- if(pool->free_map) {
- kfree(pool->free_map);
- pool->free_map = NULL;
- }
+ kfree(pool->free_map);
+ pool->free_map = NULL;
if(pool->skbuff && pool->dma_addr) {
for(i = 0; i < pool->size; ++i) {
@@ -312,15 +310,10 @@ static void ibmveth_free_buffer_pool(str
}
}
- if(pool->dma_addr) {
- kfree(pool->dma_addr);
- pool->dma_addr = NULL;
- }
-
- if(pool->skbuff) {
- kfree(pool->skbuff);
- pool->skbuff = NULL;
- }
+ kfree(pool->dma_addr);
+ pool->dma_addr = NULL;
+ kfree(pool->skbuff);
+ pool->skbuff = NULL;
}
/* remove a buffer from a pool */
--- linux-2.6.14-rc4-orig/include/net/ax25.h 2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/include/net/ax25.h 2005-10-13 11:23:56.000000000 +0200
@@ -237,8 +237,7 @@ typedef struct ax25_cb {
static __inline__ void ax25_cb_put(ax25_cb *ax25)
{
if (atomic_dec_and_test(&ax25->refcount)) {
- if (ax25->digipeat)
- kfree(ax25->digipeat);
+ kfree(ax25->digipeat);
kfree(ax25);
}
}
--- linux-2.6.14-rc4-orig/include/net/netrom.h 2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/include/net/netrom.h 2005-10-13 11:24:09.000000000 +0200
@@ -136,8 +136,7 @@ static __inline__ void nr_node_put(struc
static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh)
{
if (atomic_dec_and_test(&nr_neigh->refcount)) {
- if (nr_neigh->digipeat != NULL)
- kfree(nr_neigh->digipeat);
+ kfree(nr_neigh->digipeat);
kfree(nr_neigh);
}
}
^ permalink raw reply
* [PATCH] 2.6.14-rc4: wider use of for_each_*cpu() in net
From: hawkes @ 2005-10-13 19:01 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: hawkes
In 'net' change the explicit use of for-loops and NR_CPUS into the
general for_each_cpu() or for_each_online_cpu() constructs, as
appropriate. This widens the scope of potential future optimizations
of the general constructs, as well as takes advantage of the existing
optimizations of first_cpu() and next_cpu(), which is advantageous
when the true CPU count is much smaller than NR_CPUS.
Signed-off-by: John Hawkes <hawkes@sgi.com>
Index: linux/net/core/neighbour.c
===================================================================
--- linux.orig/net/core/neighbour.c 2005-10-13 09:29:54.000000000 -0700
+++ linux/net/core/neighbour.c 2005-10-13 09:30:31.000000000 -0700
@@ -1641,12 +1641,9 @@
memset(&ndst, 0, sizeof(ndst));
- for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ for_each_cpu(cpu) {
struct neigh_statistics *st;
- if (!cpu_possible(cpu))
- continue;
-
st = per_cpu_ptr(tbl->stats, cpu);
ndst.ndts_allocs += st->allocs;
ndst.ndts_destroys += st->destroys;
Index: linux/net/core/pktgen.c
===================================================================
--- linux.orig/net/core/pktgen.c 2005-10-13 09:29:54.000000000 -0700
+++ linux/net/core/pktgen.c 2005-10-13 09:30:31.000000000 -0700
@@ -3065,12 +3065,9 @@
/* Register us to receive netdevice events */
register_netdevice_notifier(&pktgen_notifier_block);
- for (cpu = 0; cpu < NR_CPUS ; cpu++) {
+ for_each_online_cpu(cpu) {
char buf[30];
- if (!cpu_online(cpu))
- continue;
-
sprintf(buf, "kpktgend_%i", cpu);
pktgen_create_thread(buf, cpu);
}
Index: linux/net/ipv4/icmp.c
===================================================================
--- linux.orig/net/ipv4/icmp.c 2005-10-13 09:29:54.000000000 -0700
+++ linux/net/ipv4/icmp.c 2005-10-13 09:30:31.000000000 -0700
@@ -1108,12 +1108,9 @@
struct inet_sock *inet;
int i;
- for (i = 0; i < NR_CPUS; i++) {
+ for_each_cpu(i) {
int err;
- if (!cpu_possible(i))
- continue;
-
err = sock_create_kern(PF_INET, SOCK_RAW, IPPROTO_ICMP,
&per_cpu(__icmp_socket, i));
Index: linux/net/ipv4/proc.c
===================================================================
--- linux.orig/net/ipv4/proc.c 2005-10-13 09:29:54.000000000 -0700
+++ linux/net/ipv4/proc.c 2005-10-13 09:30:31.000000000 -0700
@@ -90,9 +90,7 @@
unsigned long res = 0;
int i;
- for (i = 0; i < NR_CPUS; i++) {
- if (!cpu_possible(i))
- continue;
+ for_each_cpu(i) {
res += *(((unsigned long *) per_cpu_ptr(mib[0], i)) + offt);
res += *(((unsigned long *) per_cpu_ptr(mib[1], i)) + offt);
}
Index: linux/net/ipv6/proc.c
===================================================================
--- linux.orig/net/ipv6/proc.c 2005-10-13 09:29:54.000000000 -0700
+++ linux/net/ipv6/proc.c 2005-10-13 09:30:31.000000000 -0700
@@ -140,9 +140,7 @@
unsigned long res = 0;
int i;
- for (i = 0; i < NR_CPUS; i++) {
- if (!cpu_possible(i))
- continue;
+ for_each_cpu(i) {
res += *(((unsigned long *)per_cpu_ptr(mib[0], i)) + offt);
res += *(((unsigned long *)per_cpu_ptr(mib[1], i)) + offt);
}
Index: linux/net/ipv6/icmp.c
===================================================================
--- linux.orig/net/ipv6/icmp.c 2005-10-13 09:29:54.000000000 -0700
+++ linux/net/ipv6/icmp.c 2005-10-13 09:30:31.000000000 -0700
@@ -700,10 +700,7 @@
struct sock *sk;
int err, i, j;
- for (i = 0; i < NR_CPUS; i++) {
- if (!cpu_possible(i))
- continue;
-
+ for_each_cpu(i) {
err = sock_create_kern(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6,
&per_cpu(__icmpv6_socket, i));
if (err < 0) {
@@ -749,9 +746,7 @@
{
int i;
- for (i = 0; i < NR_CPUS; i++) {
- if (!cpu_possible(i))
- continue;
+ for_each_cpu(i) {
sock_release(per_cpu(__icmpv6_socket, i));
}
inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6);
Index: linux/net/sctp/proc.c
===================================================================
--- linux.orig/net/sctp/proc.c 2005-10-13 09:29:54.000000000 -0700
+++ linux/net/sctp/proc.c 2005-10-13 09:30:31.000000000 -0700
@@ -69,9 +69,7 @@
unsigned long res = 0;
int i;
- for (i = 0; i < NR_CPUS; i++) {
- if (!cpu_possible(i))
- continue;
+ for_each_cpu(i) {
res +=
*((unsigned long *) (((void *) per_cpu_ptr(mib[0], i)) +
sizeof (unsigned long) * nr));
^ permalink raw reply
* Re: Timeline of IPoIB performance
From: Herbert Xu @ 2005-10-13 1:48 UTC (permalink / raw)
To: Matt Leininger; +Cc: netdev, openib-general
In-Reply-To: <1129166672.13948.530.camel@localhost>
On Wed, Oct 12, 2005 at 06:24:32PM -0700, Matt Leininger wrote:
>
> Is it still worth testing the TSO patches that Herbert suggested for
> some of the 2.6.13-rc kernels?
If you're still seeing a performance regression compared to
2.6.12-rc4, then yes (According to the figures in your message
there does seem to be a bit of loss after the release of 2.6.12).
The patch you reverted may degrade the performance on the receiver.
The TSO patches may be causing some degradation on your sender.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: Timeline of IPoIB performance
From: Matt Leininger @ 2005-10-13 1:24 UTC (permalink / raw)
To: Roland Dreier; +Cc: netdev, Herbert Xu, openib-general
In-Reply-To: <1129141706.13945.509.camel@localhost>
On Wed, 2005-10-12 at 11:28 -0700, Matt Leininger wrote:
> On Wed, 2005-10-12 at 09:53 -0700, Roland Dreier wrote:
> > Herbert> Try reverting the changeset
> >
> > Herbert> 314324121f9b94b2ca657a494cf2b9cb0e4a28cc
> >
> > Herbert> which lies between these two points and may be relevant.
> >
> > Matt, I pulled this out of git for you. I guess Herbert is suggesting
> > to patch -R the below against 2.6.12-rc5:
> I applied your patch suggest by Herbert:
>
> http://www.mail-archive.com/openib-general%40openib.org/msg11415.html
>
I backed out this patch out of a few other kernels and always see a
performance improvement. This gets back ~50-60 MB/s of the 90-100 MB/s
drop off in IPoIB performance.
Is it still worth testing the TSO patches that Herbert suggested for
some of the 2.6.13-rc kernels?
Thanks,
- Matt
All benchmarks are with RHEL4 x86_64 with HCA FW v4.7.0
dual EM64T 3.2 GHz PCIe IB HCA (memfull)
Kernel OpenIB msi_x netperf (MB/s)
2.6.14-rc4 in-kernel 1 434 (backed out patch)
2.6.14-rc4 in-kernel 1 385
2.6.13.2 svn3627 1 446 (backed out patch)
2.6.13.2 svn3627 1 386
2.6.13.2 in-kernel 1 394
2.6.12.5 in-kernel 1 464 (backed out patch)
2.6.12.5 in-kernel 1 402
2.6.12-rc6 in-kernel 1 470 (backed out patch)
2.6.12-rc6 in-kernel 1 407
2.6.12-rc5 in-kernel 1 474 (backed out patch)
2.6.12-rc5 in-kernel 1 405
2.6.9-11.ELsmp svn3513 1 425 (Woody's results, 3.6Ghz EM64T)
^ permalink raw reply
* Re: [ANNOUNCE] iproute2 version (050929)
From: Stephen Hemminger @ 2005-10-12 22:32 UTC (permalink / raw)
To: hadi; +Cc: netdev, lartc, Krzysztof Oledzki
In-Reply-To: <1128990692.6353.14.camel@localhost.localdomain>
On Mon, 10 Oct 2005 20:31:31 -0400
jamal <hadi@cyberus.ca> wrote:
> On Mon, 2005-10-10 at 16:16 -0700, Stephen Hemminger wrote:
>
> > Look like the -batch code that keeps the RTNL handle open was
> > breaking this. The patch shows the general idea, but it still has
> > problems because I think it would still not work if used in
> > -batch situation.
>
> I see what you mean.
> You definitely need at least one extra socket for deleting
> in the flush_rule(). Something like the attached, untested,
> uncompiled.
>
>
> Krzysztof, if you have time please try the attached patch?
>
> cheers,
> jamal
applied to iproute2 cvs
--
Stephen Hemminger <shemminger@osdl.org>
OSDL http://developer.osdl.org/~shemminger
^ permalink raw reply
* Re: [PATCH] br: fix race on bridge del if
From: David S. Miller @ 2005-10-12 22:10 UTC (permalink / raw)
To: shemminger; +Cc: ryanh, netdev, chrisw, greg
In-Reply-To: <20051011133328.26db65d7@localhost.localdomain>
From: Stephen Hemminger <shemminger@osdl.org>
Date: Tue, 11 Oct 2005 13:33:28 -0700
> This fixes the RCU race on bridge delete interface. Basically,
> the network device has to be detached from the bridge in the first
> step (pre-RCU), rather than later. At that point, no more bridge traffic
> will come in, and the other code will not think that network device
> is part of a bridge.
>
> This should also fix the XEN test problems. If there is another
> 2.6.13-stable, add it as well.
>
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Applied, thanks Stephen.
^ permalink raw reply
* Re: [PATCH] ebtables: Port ebt_[u]log.c to nf[netlink]_log
From: Ian McDonald @ 2005-10-12 20:10 UTC (permalink / raw)
To: Harald Welte
Cc: Bart De Schuymer, Linux Netdev List,
ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <20051012062745.GB4237-d6usTx1WJblOCgDDqY8e12D2FQJk+8+b@public.gmane.org>
On 12/10/05, Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org> wrote:
> On Tue, Oct 11, 2005 at 07:31:50PM +0000, Bart De Schuymer wrote:
> > I seem to be unable to get Davem's current git tree.
> > This fails miserably:
> > cg-clone http://www.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
>
> Try getting it via rsync, I never have successfully ran cg/git via http.
>
If you want to keep using a git tree have a look at a page I put together:
http://wlug.org.nz/KernelDevelopmentWithGit
Ian
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
^ permalink raw reply
* Re: Timeline of IPoIB performance
From: Matt Leininger @ 2005-10-12 18:28 UTC (permalink / raw)
To: Roland Dreier; +Cc: netdev, Herbert Xu, openib-general
In-Reply-To: <52mzle7k2i.fsf@cisco.com>
On Wed, 2005-10-12 at 09:53 -0700, Roland Dreier wrote:
> Herbert> Try reverting the changeset
>
> Herbert> 314324121f9b94b2ca657a494cf2b9cb0e4a28cc
>
> Herbert> which lies between these two points and may be relevant.
>
> Matt, I pulled this out of git for you. I guess Herbert is suggesting
> to patch -R the below against 2.6.12-rc5:
I applied your patch suggest by Herbert:
http://www.mail-archive.com/openib-general%40openib.org/msg11415.html
to my 2.6.12-rc5 tree and IPoIB performance improved back to the ~475
MB/s range for my EM64T system. The data is below.
I'm building/testing 2.6.14-rc4 with and without this patch now.
All benchmarks are with RHEL4 x86_64 with HCA FW v4.7.0
dual EM64T 3.2 GHz PCIe IB HCA (memfull)
Kernel OpenIB msi_x netperf (MB/s)
2.6.14-rc3 in-kernel 1 374
2.6.13.2 svn3627 1 386
2.6.13.2 in-kernel 1 394
2.6.12.5-lustre in-kernel 1 399
2.6.12.5 in-kernel 1 402
2.6.12 in-kernel 1 406
2.6.12-rc6 in-kernel 1 407
2.6.12-rc5 in-kernel 1 405 <<<<
2.6.12-rc5 <<<<
- remove changeset 314324121f9b94b2ca657a494cf2b9cb0e4a28cc <<<<
in-kernel 1 474 <<<<
2.6.12-rc4 in-kernel 1 470
2.6.12-rc3 in-kernel 1 466
2.6.12-rc2 in-kernel 1 469
2.6.12-rc1 in-kernel 1 466
2.6.11 in-kernel 1 464
2.6.11 svn3687 1 464
2.6.9-11.ELsmp svn3513 1 425 (Woody's results, 3.6Ghz EM64T)
- Matt
^ permalink raw reply
* Re: [PATCH] Add Wake on LAN support to sis900
From: Daniele Venzano @ 2005-10-12 17:32 UTC (permalink / raw)
To: Andrew Morton; +Cc: jgarzik, netdev
In-Reply-To: <20051011205304.34bc07ad.akpm@osdl.org>
Il giorno 12/ott/05, alle ore 05:53, Andrew Morton ha scritto:
>> --- ../../trunk/sis900.h 2005-07-17 10:43:23.000000000 +0200
>> +++ sis900.h 2005-10-06 12:49:37.000000000 +0200
>>
>
> Please prepare patches in `patch -p1' form. See
> http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt.
Yes, I did send a corrected patch some days later, when I found out.
This was the only correction I made there, so you can just trash it.
>> + /* Detect Wake on Lan support */
>> + ret = inl(CFGPMC & PMESP);
>> + if (netif_msg_probe(sis_priv) && (ret & PME_D3C) == 0)
>> + printk(KERN_INFO "%s: Wake on LAN only available from
>> suspend to RAM.", net_dev->name);
>> +
>>
>
> How come? Why doesn't it work after an ordinary `halt -p'?
That register should report, according to the specs, the status of
the additional power supply needed to keep awake the chip when the
computer is shut down. Usually there is an additional cable to be
installed between the NIC and the motherboard, but on laptops or
embedded chips it's difficult to know.
>> @@ -2015,6 +2082,8 @@
>> .get_settings = sis900_get_settings,
>> .set_settings = sis900_set_settings,
>> .nway_reset = sis900_nway_reset,
>> + .get_wol = sis900_get_wol,
>> + .set_wol = sis900_set_wol
>> };
>>
>
> We normally add a comma to the final field so that subsequent
> patches look
> cleaner.
Will do.
Thanks for the comments.
--
Daniele Venzano
http://www.brownhat.org
^ permalink raw reply
* Re: Timeline of IPoIB performance
From: Roland Dreier @ 2005-10-12 16:53 UTC (permalink / raw)
To: Herbert Xu; +Cc: netdev, openib-general
In-Reply-To: <E1EPIxF-0001Cp-00@gondolin.me.apana.org.au>
Herbert> Try reverting the changeset
Herbert> 314324121f9b94b2ca657a494cf2b9cb0e4a28cc
Herbert> which lies between these two points and may be relevant.
Matt, I pulled this out of git for you. I guess Herbert is suggesting
to patch -R the below against 2.6.12-rc5:
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 79835a6..5bad504 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4355,16 +4355,7 @@ int tcp_rcv_established(struct sock *sk,
goto no_ack;
}
- if (eaten) {
- if (tcp_in_quickack_mode(tp)) {
- tcp_send_ack(sk);
- } else {
- tcp_send_delayed_ack(sk);
- }
- } else {
- __tcp_ack_snd_check(sk, 0);
- }
-
+ __tcp_ack_snd_check(sk, 0);
no_ack:
if (eaten)
__kfree_skb(skb);
^ permalink raw reply related
* Re: [PATCH] ebtables: Port ebt_[u]log.c to nf[netlink]_log
From: Harald Welte @ 2005-10-12 6:27 UTC (permalink / raw)
To: Bart De Schuymer
Cc: Linux Netdev List,
ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <1129059110.5087.8.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1121 bytes --]
On Tue, Oct 11, 2005 at 07:31:50PM +0000, Bart De Schuymer wrote:
> I seem to be unable to get Davem's current git tree.
> This fails miserably:
> cg-clone http://www.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
Try getting it via rsync, I never have successfully ran cg/git via http.
Also, a recent linus tree should be sufficient, even one of the latest
2.6.14-rc3/rc4 tarballs should be fine.
> Your patch won't apply to 2.6.13. At first I thought it was a problem
> with evolution or the kernel version, but looking at the source code of
> your mail, I see "=20" added here and there...
I've attached it to this mail again. Since it isn't inline, saving it
as attachment should do fine.
--
- Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org> http://netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #1.2: 81-ebt_ulog-nf_log.patch --]
[-- Type: text/plain, Size: 8941 bytes --]
[NETFILTER] ebtables: Port ebt_[u]log.c to nf[netlink]_log
Since we now have a netfilter core logging API, we port the bridging log
and ulog watchers to this new API.
This basically means that if you use the "ebt_log" watcher, it will by
default log to the system console, but enables a userspace logging daemon
binds itself to PF_BRIDGE, and take over all logging.
ebt_ulog also registers itself as logger with nf_log, but any packets
explicitly send to ebt_ulog will always use the ulog mechanism and not
handled via the generic logging handler.
This change resembles the situation that is now present in ipv4.
Signed-off-by: Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org>
---
commit 0dc2bc0656b4b1c5ba3524dadc8fbf36881903b7
tree 0e43d4f7b10f022ff523ea4751546d76d53c57b7
parent 2e64e94fe8e7e4630c9d9e66c437f3ba81e99f78
author Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org> Sat, 08 Oct 2005 01:43:49 +0200
committer Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org> Sat, 08 Oct 2005 01:43:49 +0200
net/bridge/netfilter/Kconfig | 6 +++-
net/bridge/netfilter/ebt_log.c | 61 +++++++++++++++++++++++++++++++++------
net/bridge/netfilter/ebt_ulog.c | 48 +++++++++++++++++++++++++++++--
3 files changed, 102 insertions(+), 13 deletions(-)
diff --git a/net/bridge/netfilter/Kconfig b/net/bridge/netfilter/Kconfig
--- a/net/bridge/netfilter/Kconfig
+++ b/net/bridge/netfilter/Kconfig
@@ -196,9 +196,13 @@ config BRIDGE_EBT_LOG
To compile it as a module, choose M here. If unsure, say N.
config BRIDGE_EBT_ULOG
- tristate "ebt: ulog support"
+ tristate "ebt: ulog support (OBSOLETE)"
depends on BRIDGE_NF_EBTABLES
help
+ This option enables the old bridge-specific "ebt_ulog" implementation
+ which has been obsoleted by the new "nfnetlink_log" code (see
+ CONFIG_NETFILTER_NETLINK_LOG).
+
This option adds the ulog watcher, that you can use in any rule
in any ebtables table. The packet is passed to a userspace
logging daemon using netlink multicast sockets. This differs
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -3,6 +3,7 @@
*
* Authors:
* Bart De Schuymer <bdschuym-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>
+ * Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org>
*
* April, 2002
*
@@ -10,6 +11,7 @@
#include <linux/netfilter_bridge/ebtables.h>
#include <linux/netfilter_bridge/ebt_log.h>
+#include <linux/netfilter.h>
#include <linux/module.h>
#include <linux/ip.h>
#include <linux/if_arp.h>
@@ -55,17 +57,19 @@ static void print_MAC(unsigned char *p)
}
#define myNIPQUAD(a) a[0], a[1], a[2], a[3]
-static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
- const struct net_device *in, const struct net_device *out,
- const void *data, unsigned int datalen)
+static void
+ebt_log_packet(unsigned int pf, unsigned int hooknum,
+ const struct sk_buff *skb, const struct net_device *in,
+ const struct net_device *out, const struct nf_loginfo *loginfo,
+ const char *prefix)
{
- struct ebt_log_info *info = (struct ebt_log_info *)data;
char level_string[4] = "< >";
+ unsigned int bitmask;
- level_string[1] = '0' + info->loglevel;
+ level_string[1] = '0' + loginfo->u.log.level;
spin_lock_bh(&ebt_log_lock);
printk(level_string);
- printk("%s IN=%s OUT=%s ", info->prefix, in ? in->name : "",
+ printk("%s IN=%s OUT=%s ", prefix, in ? in->name : "",
out ? out->name : "");
printk("MAC source = ");
@@ -75,7 +79,12 @@ static void ebt_log(const struct sk_buff
printk("proto = 0x%04x", ntohs(eth_hdr(skb)->h_proto));
- if ((info->bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto ==
+ if (loginfo->type == NF_LOG_TYPE_LOG)
+ bitmask = loginfo->u.log.logflags;
+ else
+ bitmask = NF_LOG_MASK;
+
+ if ((bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto ==
htons(ETH_P_IP)){
struct iphdr _iph, *ih;
@@ -104,7 +113,7 @@ static void ebt_log(const struct sk_buff
goto out;
}
- if ((info->bitmask & EBT_LOG_ARP) &&
+ if ((bitmask & EBT_LOG_ARP) &&
((eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) ||
(eth_hdr(skb)->h_proto == htons(ETH_P_RARP)))) {
struct arphdr _arph, *ah;
@@ -144,6 +153,21 @@ static void ebt_log(const struct sk_buff
out:
printk("\n");
spin_unlock_bh(&ebt_log_lock);
+
+}
+
+static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
+ const struct net_device *in, const struct net_device *out,
+ const void *data, unsigned int datalen)
+{
+ struct ebt_log_info *info = (struct ebt_log_info *)data;
+ struct nf_loginfo li;
+
+ li.type = NF_LOG_TYPE_LOG;
+ li.u.log.level = info->loglevel;
+ li.u.log.logflags = info->bitmask;
+
+ nf_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li, info->prefix);
}
static struct ebt_watcher log =
@@ -154,13 +178,32 @@ static struct ebt_watcher log =
.me = THIS_MODULE,
};
+static struct nf_logger ebt_log_logger = {
+ .name = "ebt_log",
+ .logfn = &ebt_log_packet,
+ .me = THIS_MODULE,
+};
+
static int __init init(void)
{
- return ebt_register_watcher(&log);
+ int ret;
+
+ ret = ebt_register_watcher(&log);
+ if (ret < 0)
+ return ret;
+ if (nf_log_register(PF_BRIDGE, &ebt_log_logger) < 0) {
+ printk(KERN_WARNING "ebt_log: not logging via system console "
+ "since somebody else already registered for PF_INET\n");
+ /* wecannot make module load fail here, since otherwise
+ * ebtables userspace would abort */
+ }
+
+ return 0;
}
static void __exit fini(void)
{
+ nf_log_unregister_logger(&ebt_log_logger);
ebt_unregister_watcher(&log);
}
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -3,6 +3,7 @@
*
* Authors:
* Bart De Schuymer <bdschuym-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>
+ * Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org>
*
* November, 2004
*
@@ -115,14 +116,13 @@ static struct sk_buff *ulog_alloc_skb(un
return skb;
}
-static void ebt_ulog(const struct sk_buff *skb, unsigned int hooknr,
+static void ebt_ulog_packet(unsigned int hooknr, const struct sk_buff *skb,
const struct net_device *in, const struct net_device *out,
- const void *data, unsigned int datalen)
+ const struct ebt_ulog_info *uloginfo, const char *prefix)
{
ebt_ulog_packet_msg_t *pm;
size_t size, copy_len;
struct nlmsghdr *nlh;
- struct ebt_ulog_info *uloginfo = (struct ebt_ulog_info *)data;
unsigned int group = uloginfo->nlgroup;
ebt_ulog_buff_t *ub = &ulog_buffers[group];
spinlock_t *lock = &ub->lock;
@@ -216,6 +216,39 @@ alloc_failure:
goto unlock;
}
+/* this function is registered with the netfilter core */
+static void ebt_log_packet(unsigned int pf, unsigned int hooknum,
+ const struct sk_buff *skb, const struct net_device *in,
+ const struct net_device *out, const struct nf_loginfo *li,
+ const char *prefix)
+{
+ struct ebt_ulog_info loginfo;
+
+ if (!li || li->type != NF_LOG_TYPE_ULOG) {
+ loginfo.nlgroup = EBT_ULOG_DEFAULT_NLGROUP;
+ loginfo.cprange = 0;
+ loginfo.qthreshold = EBT_ULOG_DEFAULT_QTHRESHOLD;
+ loginfo.prefix[0] = '\0';
+ } else {
+ loginfo.nlgroup = li->u.ulog.group;
+ loginfo.cprange = li->u.ulog.copy_len;
+ loginfo.qthreshold = li->u.ulog.qthreshold;
+ strlcpy(loginfo.prefix, prefix, sizeof(loginfo.prefix));
+ }
+
+ ebt_ulog_packet(hooknum, skb, in, out, &loginfo, prefix);
+}
+
+static void ebt_ulog(const struct sk_buff *skb, unsigned int hooknr,
+ const struct net_device *in, const struct net_device *out,
+ const void *data, unsigned int datalen)
+{
+ struct ebt_ulog_info *uloginfo = (struct ebt_ulog_info *)data;
+
+ ebt_ulog_packet(hooknr, skb, in, out, uloginfo, NULL);
+}
+
+
static int ebt_ulog_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen)
{
@@ -240,6 +273,12 @@ static struct ebt_watcher ulog = {
.me = THIS_MODULE,
};
+static struct nf_logger ebt_ulog_logger = {
+ .name = EBT_ULOG_WATCHER,
+ .logfn = &ebt_log_packet,
+ .me = THIS_MODULE,
+};
+
static int __init init(void)
{
int i, ret = 0;
@@ -265,6 +304,8 @@ static int __init init(void)
else if ((ret = ebt_register_watcher(&ulog)))
sock_release(ebtulognl->sk_socket);
+ nf_log_register(PF_BRIDGE, &ebt_ulog_logger);
+
return ret;
}
@@ -273,6 +314,7 @@ static void __exit fini(void)
ebt_ulog_buff_t *ub;
int i;
+ nf_log_unregister_logger(&ebt_ulog_logger);
ebt_unregister_watcher(&ulog);
for (i = 0; i < EBT_ULOG_MAXNLGROUPS; i++) {
ub = &ulog_buffers[i];
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] Add Wake on LAN support to sis900
From: Andrew Morton @ 2005-10-12 3:53 UTC (permalink / raw)
To: Daniele Venzano; +Cc: jgarzik, netdev
In-Reply-To: <20051006111326.GA3242@renditai.milesteg.arr>
Daniele Venzano <venza@brownhat.org> wrote:
>
> The patch availble below adds support for Wake on LAN to the sis900
> driver. Some register addresses were added to sis900.h and two new
> functions were implemented in sis900.c. WoL status is controlled by
> ethtool.
> Patch is against 2.6.13.
>
> Comments are welcome, but also consider for inclusion in the -mm series.
>
> --- ../../trunk/sis900.h 2005-07-17 10:43:23.000000000 +0200
> +++ sis900.h 2005-10-06 12:49:37.000000000 +0200
Please prepare patches in `patch -p1' form. See
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt.
> ...
> + /* Detect Wake on Lan support */
> + ret = inl(CFGPMC & PMESP);
> + if (netif_msg_probe(sis_priv) && (ret & PME_D3C) == 0)
> + printk(KERN_INFO "%s: Wake on LAN only available from suspend to RAM.", net_dev->name);
> +
How come? Why doesn't it work after an ordinary `halt -p'?
> @@ -2015,6 +2082,8 @@
> .get_settings = sis900_get_settings,
> .set_settings = sis900_set_settings,
> .nway_reset = sis900_nway_reset,
> + .get_wol = sis900_get_wol,
> + .set_wol = sis900_set_wol
> };
We normally add a comma to the final field so that subsequent patches look
cleaner.
^ permalink raw reply
* Re: Re: [PATCH] ebtables: Port ebt_[u]log.c to nf[netlink]_log
From: Bart De Schuymer @ 2005-10-11 20:49 UTC (permalink / raw)
To: David S. Miller
Cc: laforge-Cap9r6Oaw4JrovVCs/uTlw, netdev-u79uwXL29TY76Z2rM5mHXA,
ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <20051011.125506.46476570.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Op di, 11-10-2005 te 12:55 -0700, schreef David S. Miller:
> From: Bart De Schuymer <bdschuym-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>
> Date: Tue, 11 Oct 2005 19:31:50 +0000
>
> > I seem to be unable to get Davem's current git tree.
> > This fails miserably:
> > cg-clone http://www.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
>
> I use an "alternates" file, so that Linus's tree's objects get used
> and only the truly local changes actually get stored in my tree.
>
> Unfortunately that totally doesn't work with transports such
> as rsync.
OK, kernel now compiling without the patch. Harald, could you send it as
attachment?
The instructions at the top of http://www.kernel.org/git/ are somewhat
outdated.
cheers,
Bart
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox