* Re: [PATCH net-next] tcp: guarantee forward progress in tcp_sendmsg()
From: David Miller @ 2016-05-03 20:20 UTC (permalink / raw)
To: eric.dumazet; +Cc: edumazet, netdev, soheil, ast, marcelo.leitner
In-Reply-To: <1462250965.5535.286.camel@edumazet-glaptop3.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 02 May 2016 21:49:25 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> Under high rx pressure, it is possible tcp_sendmsg() never has a
> chance to allocate an skb and loop forever as sk_flush_backlog()
> would always return true.
>
> Fix this by calling sk_flush_backlog() only if one skb had been
> allocated and filled before last backlog check.
>
> Fixes: d41a69f1d390 ("tcp: make tcp_sendmsg() aware of socket backlog")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH net v1] ipv6/ila: fix nlsize calculation for lwtunnel
From: David Miller @ 2016-05-03 20:22 UTC (permalink / raw)
To: nicolas.dichtel; +Cc: netdev, tom
In-Reply-To: <1462262307-27498-1-git-send-email-nicolas.dichtel@6wind.com>
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Tue, 3 May 2016 09:58:27 +0200
> The handler 'ila_fill_encap_info' adds one attribute: ILA_ATTR_LOCATOR.
>
> Fixes: 65d7ab8de582 ("net: Identifier Locator Addressing module")
> CC: Tom Herbert <tom@herbertland.com>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
>
> RFC -> v1:
> - rebase on last net tree
Applied and queued up for -stable, thanks for reposting this Nicolas.
^ permalink raw reply
* Re: [PATCH net] bridge: fix igmp / mld query parsing
From: Stephen Hemminger @ 2016-05-03 20:26 UTC (permalink / raw)
To: Linus Lüssing
Cc: Simon Wunderlich, netdev, bridge, David S . Miller, linux-kernel
In-Reply-To: <1462306734-4183-1-git-send-email-linus.luessing@c0d3.blue>
On Tue, 3 May 2016 22:18:54 +0200
Linus Lüssing <linus.luessing@c0d3.blue> wrote:
> diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
> index 03661d9..7105cdf 100644
> --- a/net/bridge/br_multicast.c
> +++ b/net/bridge/br_multicast.c
> @@ -1271,6 +1271,7 @@ static int br_ip4_multicast_query(struct net_bridge *br,
> unsigned long max_delay;
> unsigned long now = jiffies;
> __be32 group;
> + int offset = skb_transport_offset(skb);
shouldn't this be unsigned?
^ permalink raw reply
* [PATCH] fix infoleak in llc
From: Kangjie Lu @ 2016-05-03 20:35 UTC (permalink / raw)
To: acme; +Cc: davem, netdev, linux-kernel, taesoo, insu, Kangjie Lu
The stack object “info” has a total size of 12 bytes. Its last byte
is padding which is not initialized and leaked via “put_cmsg”.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
---
net/llc/af_llc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index b3c52e3..8ae3ed9 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -626,6 +626,7 @@ static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb)
if (llc->cmsg_flags & LLC_CMSG_PKTINFO) {
struct llc_pktinfo info;
+ memset(&info, 0, sizeof(info));
info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex;
llc_pdu_decode_dsap(skb, &info.lpi_sap);
llc_pdu_decode_da(skb, info.lpi_mac);
--
1.9.1
^ permalink raw reply related
* [GIT] Networking
From: David Miller @ 2016-05-03 20:38 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
Some straggler bug fixes:
1) Batman-adv DAT must consider VLAN IDs when choosing candidate nodes, from
Antonio Quartulli.
2) Fix botched reference counting of vlan objects and neigh nodes in batman-adv,
from Sven Eckelmann.
3) netem can crash when it sees GSO packets, the fix is to segment then upon
->enqueue. Fix from Neil Horman with help from Eric Dumazet.
4) Fix VXLAN dependencies in mlx5 driver Kconfig, from Matthew Finlay.
5) Handle VXLAN ops outside of rcu lock, via a workqueue, in mlx5, since it
can sleep. Fix also from Matthew Finlay.
6) Check mdiobus_scan() return values properly in pxa168_eth and macb
drivers. From Sergei Shtylyov.
7) If the netdevice doesn't support checksumming, disable segmentation.
From Alexandery Duyck.
8) Fix races between RDS tcp accept and sending, from Sowmini Varadhan.
9) In macb driver, probe MDIO bus before we register the netdev, otherwise
we can try to open the device before it is really ready for that. Fix
from Florian Fainelli.
10) Netlink attribute size for ILA "tunnels" not calculated properly, fix
from Nicolas Dichtel.
Please pull, thanks a lot!
The following changes since commit 33656a1f2ee5346c742d63ddd0e0970c95a56b70:
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs (2016-05-02 09:59:57 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
for you to fetch changes up to 79e8dc8b80bff0bc5bbb90ca5e73044bf207c8ac:
ipv6/ila: fix nlsize calculation for lwtunnel (2016-05-03 16:21:33 -0400)
----------------------------------------------------------------
Alexander Duyck (2):
net: Disable segmentation if checksumming is not supported
vxlan: Add checksum check to the features check function
Anna-Maria Gleixner (1):
net: mvneta: Remove superfluous SMP function call
Antonio Quartulli (2):
batman-adv: fix DAT candidate selection (must use vid)
batman-adv: B.A.T.M.A.N V - make sure iface is reactivated upon NETDEV_UP event
David S. Miller (4):
Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge
Merge branch 'mlx5-fixes'
Merge branch 'tunnel-csum-and-sg-offloads'
Merge branch 'rds-fixes'
Florian Fainelli (1):
net: macb: Probe MDIO bus before registering netdev
Gal Pressman (1):
net/mlx5: Unmap only the relevant IO memory mapping
Matthew Finlay (3):
net/mlx5: Kconfig: Fix MLX5_EN/VXLAN build issue
net/mlx5e: Implement a mlx5e workqueue
net/mlx5e: Use workqueue for vxlan ops
Neil Horman (1):
netem: Segment GSO packets on enqueue
Nicolas Dichtel (1):
ipv6/ila: fix nlsize calculation for lwtunnel
Sergei Shtylyov (2):
pxa168_eth: fix mdiobus_scan() error check
macb: fix mdiobus_scan() error check
Sowmini Varadhan (2):
RDS:TCP: Synchronize rds_tcp_accept_one with rds_send_xmit when resetting t_sock
RDS: TCP: Synchronize accept() and connect() paths on t_conn_lock.
Sven Eckelmann (2):
batman-adv: Fix reference counting of vlan object for tt_local_entry
batman-adv: Fix reference counting of hardif_neigh_node object for neigh_node
drivers/net/ethernet/cadence/macb.c | 34 +++++++++++++++++++++-------------
drivers/net/ethernet/marvell/mvneta.c | 6 ++----
drivers/net/ethernet/marvell/pxa168_eth.c | 2 ++
drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 +
drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 +
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 34 +++++++++++++++++++++-------------
drivers/net/ethernet/mellanox/mlx5/core/uar.c | 6 ++++--
drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 50 ++++++++++++++++++++++++++++++++++++++------------
drivers/net/ethernet/mellanox/mlx5/core/vxlan.h | 11 +++++++++--
include/linux/if_ether.h | 5 +++++
include/net/vxlan.h | 4 +++-
net/batman-adv/bat_v.c | 12 ++++++++++++
net/batman-adv/distributed-arp-table.c | 17 ++++++++++-------
net/batman-adv/hard-interface.c | 3 +++
net/batman-adv/originator.c | 16 +++++-----------
net/batman-adv/translation-table.c | 42 ++++--------------------------------------
net/batman-adv/types.h | 7 +++++++
net/core/dev.c | 2 +-
net/ipv6/ila/ila_lwt.c | 3 +--
net/rds/tcp.c | 3 ++-
net/rds/tcp.h | 4 ++++
net/rds/tcp_connect.c | 8 ++++++++
net/rds/tcp_listen.c | 54 ++++++++++++++++++++++++++++++++++++------------------
net/sched/sch_netem.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
24 files changed, 259 insertions(+), 127 deletions(-)
^ permalink raw reply
* [PATCH] fix infoleak in wireless
From: Kangjie Lu @ 2016-05-03 20:40 UTC (permalink / raw)
To: johannes; +Cc: davem, linux-wireless, linux-kernel, netdev, Kangjie Lu
The 6-bytes array “mac_addr” is not initialized in the dump_station
implementations of “drivers/staging/wilc1000/wilc_wfi_cfgoperations.c”
and “drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c”, so all 6
bytes may be leaked.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
---
net/wireless/nl80211.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 056a730..2e92d14 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3905,6 +3905,7 @@ static int nl80211_dump_station(struct sk_buff *skb,
while (1) {
memset(&sinfo, 0, sizeof(sinfo));
+ eth_zero_addr(mac_addr);
err = rdev_dump_station(rdev, wdev->netdev, sta_idx,
mac_addr, &sinfo);
if (err == -ENOENT)
--
1.9.1
^ permalink raw reply related
* Re: [PATCH] fix infoleak in wireless
From: Johannes Berg @ 2016-05-03 20:40 UTC (permalink / raw)
To: Kangjie Lu; +Cc: davem, linux-wireless, linux-kernel, netdev, Kangjie Lu
In-Reply-To: <1462308013-6032-1-git-send-email-kjlu@gatech.edu>
On Tue, 2016-05-03 at 16:40 -0400, Kangjie Lu wrote:
> The 6-bytes array “mac_addr” is not initialized in the dump_station
> implementations of
> “drivers/staging/wilc1000/wilc_wfi_cfgoperations.c”
> and “drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c”, so all 6
> bytes may be leaked.
Like I said to you before, this makes those implementations completely
broken. I'm not going to apply this patch. If you want, feel free to
send patches to Greg to remove those dump_station implementations that
are completely broken and that can never do anything useful.
johannes
^ permalink raw reply
* [PATCH] fix infoleak in rtnetlink
From: Kangjie Lu @ 2016-05-03 20:46 UTC (permalink / raw)
To: davem; +Cc: sfeldma, roopa, jiri, netdev, linux-kernel, taesoo, insu,
Kangjie Lu
The stack object “map” has a total size of 32 bytes. Its last 4
bytes are padding generated by compiler. These padding bytes are
not initialized and sent out via “nla_put”.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
---
net/core/rtnetlink.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index a75f7e9..65763c2 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1180,14 +1180,16 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb,
static int rtnl_fill_link_ifmap(struct sk_buff *skb, struct net_device *dev)
{
- struct rtnl_link_ifmap map = {
- .mem_start = dev->mem_start,
- .mem_end = dev->mem_end,
- .base_addr = dev->base_addr,
- .irq = dev->irq,
- .dma = dev->dma,
- .port = dev->if_port,
- };
+ struct rtnl_link_ifmap map;
+
+ memset(&map, 0, sizeof(map));
+ map.mem_start = dev->mem_start;
+ map.mem_end = dev->mem_end;
+ map.base_addr = dev->base_addr;
+ map.irq = dev->irq;
+ map.dma = dev->dma;
+ map.port = dev->if_port;
+
if (nla_put(skb, IFLA_MAP, sizeof(map), &map))
return -EMSGSIZE;
--
1.9.1
^ permalink raw reply related
* Re: [PATCH] fix infoleak in wireless
From: Greg Kroah-Hartman @ 2016-05-03 21:00 UTC (permalink / raw)
To: Kangjie Lu
Cc: Johannes Berg, davem, linux-wireless, linux-kernel, netdev,
Kangjie Lu
In-Reply-To: <CABEk9YxqyBxnqOseJ3-d-aKxnREZBFt1z89nOjHf=DvNQy_hTw@mail.gmail.com>
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
On Tue, May 03, 2016 at 04:47:16PM -0400, Kangjie Lu wrote:
> Hi Greg,
>
> Could you please take a look at this issue.
> mac_addr is not initialized is some implementations of dump_station(), which
> can be exploited by attackers for leaking information.
You are going to have to give me more context here...
Like the patch itself?
thanks,
greg k-h
^ permalink raw reply
* (unknown)
From: to2 @ 2016-05-03 21:03 UTC (permalink / raw)
To: netdev
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="GB2312", Size: 872 bytes --]
ëSÖøÖÐø½úµÄ¸ßËÙ°lÕ¹£¬²»ÉÙÆóI¶¼ÔÚë×ÓÉÌÕß@ÐÐI°lÕ¹é_í£¬ÊÐö¸ ׵÷dz£¼¤ÁÒ¡£ ´Ër£¬ÈçºÎ¼°rÊ´_µÄÕÒµ½¿ÍôÐÅÏ¢£¬¦ì¶ÆóIíÕf׵î³£ÖØÒª£¬Òòéß@²»H¿ÉÒÔ¹¼srég³É±¾£¬¸üÖØÒªµÄÊÇ¿ÉÒÔÕ¼ÏÈC¡£ Èç¹ûÄãȱÉÙ¿Íô£¬Ò²]ÓпÍôÙYÁÏ£¬ÄÇüNÄãÒѽÂýÄãµÄͬÐÐÒ»²½ÁË¡£ ]Óнݽ£¬Ö»Óи¶³öº¹Ë®£¬ÌìáÁËÄãÈçºÎÈ¥ÕÒ¿Íô£¿ ºÜ¶àÈËßxñÁËëÔ£¬Q¶¨¸¶³ö×Ô¼ºµÄ¿ÚÉ࣬µ«ÙYÁÏÄÄÄí£¬î}ÓÖ³ö¬FÁË£¬ÓÖÒ»´ÎÃÔʧÔÚÁˤÕÒ¿ÍôµÄë
ìFÖС£ ¬FÔÚÊÇ»¥Â¾WµÄr´ú£¡»ùì¶¾W½jß@´óµþì¶øÕQÉúµÄÍâÙQܼþ£¬ÒÔܼþéò£¬ÒÔ¾W½jé¾£¬ÒÔÈ«ÇòÐÅÏ¢éµþ죡 ¼ÜÔOͨÍùº£ÍâµÄ¿µÇf´óµÀ£¡ÄãÔÚªqÔ¥¡¢Ó^ÍûµÄrºò£¬ÄãµÄͬÐÐÒѽÔÚÓÃܼþÿÌìÌáÈ¡ÉÏÈfl¿ÍôÐÅÏ¢ÁË£¬®ÔÙÍâÙQܼþºÍƽ̨չþÒ»Ó³ÉÖ÷Á÷r£¬ÄãÓÖʧȥÁËÒ»´Î¾Íþ£¡ ÀûÓÃøëHºÍ¸÷øÖ÷Á÷ËÑË÷ÒýÇæ£¬ÝÈë®aÆ·êPæI×־ͼ´¿ÉÅúÁ¿ÌáÈ¡¿ÍôÙYÁÏ£¡È«Çò200ø¼ÒÏÂ700¶à®µØÖ÷Á÷ÒýÇæÈÎÄúËÑË÷é_°l£¡
Èç¹ûÄú¦ÎÒ®aÆ·ÒÔ¼°·þÕ¸ÐÅdȤ£¬gÓ¼ÓÎÒQQÔÕ¡£
QQ:2188578837
Contact number:0755-32913073
^ permalink raw reply
* Re: [REGRESSION] asix: Lots of asix_rx_fixup() errors and slow transmissions
From: Dean Jenkins @ 2016-05-03 21:16 UTC (permalink / raw)
To: David B. Robins, John Stultz, Dean Jenkins
Cc: lkml, Mark Craske, David S. Miller, YongQin Liu, Guodong Xu,
linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
Ivan Vecera
In-Reply-To: <87ed4c76328ed9dc5591359ea0e98ab9-xeNgNI7VTeVeoWH0uzbU5w@public.gmane.org>
On 03/05/16 15:42, David B. Robins wrote:
>
> I don't think the first one is giving you problems (except as
> triggered by the second) but I had concerns about the second myself
> (and emailed the author off-list, but received no reply), and we did
> not take that commit for our own product.
>
Sorry, I might have missed your original E-mail.
> Specifically, the second change, 3f30... (original patch:
> https://www.mail-archive.com/netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg80720.html) (1)
> appears to do the exact opposite of what it claims, i.e., instead of
> "resync if this looks like a header", it does "resync if this does NOT
> look like a (packet) header", where "looks like a header" means "bits
> 0-10 (size) are equal to the bitwise-NOT of bits 16-26", and (2) can
> happen by coincidence for 1/2048 32-bit values starting a continuation
> URB (easy to hit dealing with large volumes of video data as we were).
> It appears to expect the header for every URB whereas the rest of the
> code at least expects it only once per network packet (look at
> following code that only reads it for remaining == 0).
David, I think that your interpretation is incorrect. Please see below.
Here is the code snippet from the patch with my annotations between # #,
I will try to explain my intentions. Feel free to point out any flaws:
if (rx->remaining && (rx->remaining + sizeof(u32) <= skb->len)) {
# Only runs when rx->remaining !=0 and the end of the Ethernet
frame + next 32-bit header word is within the URB buffer. #
# Therefore, this code does not run when the end of an Ethernet
frame has been reached in the previous URB #
# or when the end of the Ethernet frame + next 32-bit header
word will be in a later URB buffer #
# offset is an index to the expected next 32-bit header word
after the end of the Ethernet frame #
offset = ((rx->remaining + 1) & 0xfffe) + sizeof(u32);
# rx->header contains the expected 32-bit header value
corrected for Endianness and alignment #
rx->header = get_unaligned_le32(skb->data + offset);
offset = 0;
# check the data integrity of the size value from the header word #
size = (u16)(rx->header & 0x7ff);
# if the size value fails the integrity check then we are not
looking at a valid header word so #
# synchronisation has been lost #
if (size != ((~rx->header >> 16) & 0x7ff)) {
netdev_err(dev->net, "asix_rx_fixup() Data Header
synchronisation was lost, remaining %d\n",
rx->remaining);
if (rx->ax_skb) {
kfree_skb(rx->ax_skb);
rx->ax_skb = NULL;
/* Discard the incomplete netdev Ethernet frame
* and assume the Data header is at the start of
* the current URB socket buffer.
*/
}
rx->remaining = 0;
}
}
>
> So that change made no sense to me, but I don't have significant
> kernel dev experience. Effectively it will drop/truncate every
> (2047/2048) split (longer than an URB) packet, and report an error for
> the second URB and then again for treating said second URB as a first
> URB for a packet. I would expect your problems will go away just
> removing the second change. You could also change the != to == in "if
> (size != ...)" but then you'd still have 1/2048 (depending on data
> patterns) false positives.
The code only runs when the Ethernet frame spans across URBs and is
checking that the next 32-bit header word is present and valid.
Upon loss of synchronisation, the strategy is to assume that the 32-bit
header is at the start of the URB buffer. Obviously, that might not be
true every time but it is the most likely location especially when
Ethernet frames are not spanning URBs at that point at time.
Looking at the error messages:
> [ 239.037310] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length
> 0x54ebb5ec, offset 4
The offset 4 means that the 32-bit header word was invalid at the start
of the URB buffer. This could be a consequence of data synchronisation
being lost however, we would expect the timestamps between the error
messages of "synchronisation was lost" and "Bad Header Length" to very
close as they would be consecutive URBs. The evidence is showing 10ms
gaps which does not suggest consecutive URBs. In other words, an
Ethernet frame should not be spanned over a time gap of 10ms as that
would be very inefficient. If that were true then there would be USB
communications problem with the USB to Ethernet adaptor which I hope is
not true.
[ 239.027993] asix 1-1.1:1.0 eth0: asix_rx_fixup() Data Header
synchronisation was lost, remaining 988
This error message consistently shows the remaining value to be 988, at
least for the 3 examples provided by John. This does not suggest a
random failure unless there are other examples of a non 988 remaining
value error message. 988 is well within a Ethernet frame length so seems
to be valid.
I think a good step would be to add some debug to print the
rx->remaining value at entry to asix_rx_fixup_internal(). This would
generate a lot of debug but a pattern of the values might emerge.
A good test would be to run "ping -c 1 -s $packet_length $ip_address"
inside a script which has a loop with an increasing payload length
$packet_length with a small delay between ping calls. This will show
whether particular packet sizes trigger the failures.
Then try with "ping -f -c 200 -s $packet_length $ip_address" to load up
the USB link.
Seems that I need kernel v4.4 or later to get a kernel with my patch in.
This will take me a few days to find time to rig something up to test...
Regards,
Dean
--
Dean Jenkins
Embedded Software Engineer
Linux Transportation Solutions
Mentor Embedded Software Division
Mentor Graphics (UK) Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] fix infoleak in wireless
From: Greg Kroah-Hartman @ 2016-05-03 21:34 UTC (permalink / raw)
To: Kangjie Lu
Cc: Johannes Berg, davem, linux-wireless, linux-kernel, netdev,
Kangjie Lu
In-Reply-To: <CABEk9YwiqpP+Ahxax3AC7tbPcmpUQnrB-Nwsb4rixhVjcL4Crw@mail.gmail.com>
On Tue, May 03, 2016 at 05:11:07PM -0400, Kangjie Lu wrote:
> Opps, I did not notice the patch is not attached.
>
> From 34a82a734388d07eb10f91770f86938e38f7575a Mon Sep 17 00:00:00 2001
> From: Kangjie Lu <kjlu@gatech.edu>
> Date: Tue, 3 May 2016 14:15:18 -0400
> Subject: [PATCH] fix infoleak in wireless
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> The 6-bytes array “mac_addr” is not initialized in the dump_station
> implementations of “drivers/staging/wilc1000/wilc_wfi_cfgoperations.c”
> and “drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c”, so all 6
> bytes may be leaked.
>
> Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
> ---
> net/wireless/nl80211.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 056a730..2e92d14 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -3905,6 +3905,7 @@ static int nl80211_dump_station(struct sk_buff *skb,
>
> while (1) {
> memset(&sinfo, 0, sizeof(sinfo));
> + eth_zero_addr(mac_addr);
> err = rdev_dump_station(rdev, wdev->netdev, sta_idx,
> mac_addr, &sinfo);
> if (err == -ENOENT)
Patch is corrupted :(
Why not fix up the staging drivers, they are the real problem here,
which is what I think the networking maintainers were telling you to do.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH] fix infoleak in wireless
From: Greg Kroah-Hartman @ 2016-05-03 21:46 UTC (permalink / raw)
To: Kangjie Lu
Cc: Johannes Berg, davem, linux-wireless, linux-kernel, netdev,
Kangjie Lu
In-Reply-To: <CABEk9YwmQt9bQb_KXgYRj=irq9-edtdOeANs7+Z4qZp1zmqpxg@mail.gmail.com>
A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
On Tue, May 03, 2016 at 05:41:46PM -0400, Kangjie Lu wrote:
> You are right. But wouldn't it be more general/better if we initialize the
> allocation at very beginning?
> To avoid information leaks, I think we are supposed to initialize all
> allocations properly if
> we are not sure how they are used.
But the networking maintainers told you to fix the broken drivers
instead. So please do that and send those patches to the correct
developers and mailing lists.
The fact that only 2 staging drivers got this wrong means that everyone
knows how to use this api properly, so I agree with the maintainers
here.
thanks,
greg k-h
^ permalink raw reply
* pull request: batman-adv 20160504
From: Antonio Quartulli @ 2016-05-03 22:23 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n
Hello David,
this is a pull request intended for net-next.
In this batch you don't have any patch that depends on our fixes,
therefore you can safely merge it even if the net tree has not been
merged yet.
In this patchset you basically have some cleanup work, code refactoring,
style fixes and two updates for the MAINTAINERS file.
Please pull or let me know of any problem!
Thanks a lot,
Antonio
The following changes since commit e03179fe78d5b39dbf3e8b0b50f7c406514b15c7:
net: ethernet: fec_mpc52xx: move to new ethtool api {get|set}_link_ksettings (2016-05-03 13:03:53 -0400)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batman-adv-for-davem
for you to fetch changes up to 64ae74455371a40bc9f9c8325eb4c37f2978c95f:
batman-adv: Split batadv_iv_ogm_orig_del_if function (2016-05-04 02:22:03 +0800)
----------------------------------------------------------------
In this pull request you have:
- two changes to the MAINTAINERS file where one marks our mailing list
as moderated and the other adds a missing documentation file
- kernel-doc fixes
- code refactoring and various cleanups
----------------------------------------------------------------
Antonio Quartulli (2):
batman-adv: use static string for table headers
batman-adv: fix wrong names in kerneldoc
Geliang Tang (2):
batman-adv: use list_for_each_entry_safe
batman-adv: use to_delayed_work
Simon Wunderlich (4):
batman-adv: Start new development cycle
batman-adv: fix debuginfo macro style issue
batman-adv: move and restructure batadv_v_ogm_forward
batman-adv: Merge batadv_v_ogm_orig_update into batadv_v_ogm_route_update
Sven Eckelmann (7):
MAINTAINERS: Mark BATMAN ADVANCED mailing list as moderated
MAINTAINERS: Add BATMAN ADVANCED documentation files
batman-adv: Fix checkpatch warning about 'unsigned' type
batman-adv: Fix kerneldoc for batadv_compare_claim
batman-adv: Add kernel-doc for batadv_interface_rx
batman-adv: Fix function names on new line starting with '*'
batman-adv: Split batadv_iv_ogm_orig_del_if function
MAINTAINERS | 5 +-
net/batman-adv/bat_iv_ogm.c | 123 +++++++++++++-------
net/batman-adv/bat_v.c | 9 +-
net/batman-adv/bat_v_ogm.c | 205 ++++++++++++++++-----------------
net/batman-adv/bridge_loop_avoidance.c | 19 ++-
net/batman-adv/debugfs.c | 19 +--
net/batman-adv/distributed-arp-table.c | 8 +-
net/batman-adv/fragmentation.c | 12 +-
net/batman-adv/icmp_socket.c | 24 ++--
net/batman-adv/main.c | 8 +-
net/batman-adv/main.h | 5 +-
net/batman-adv/multicast.c | 11 +-
net/batman-adv/network-coding.c | 20 ++--
net/batman-adv/originator.c | 4 +-
net/batman-adv/packet.h | 2 +-
net/batman-adv/send.c | 4 +-
net/batman-adv/soft-interface.c | 20 +++-
net/batman-adv/translation-table.c | 11 +-
18 files changed, 277 insertions(+), 232 deletions(-)
^ permalink raw reply
* [PATCH 01/15] MAINTAINERS: Mark BATMAN ADVANCED mailing list as moderated
From: Antonio Quartulli @ 2016-05-03 22:23 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Sven Eckelmann, Antonio Quartulli
In-Reply-To: <1462314230-16257-1-git-send-email-a@unstable.cc>
From: Sven Eckelmann <sven@narfation.org>
The mailing list of b.a.t.m.a.n@lists.open-mesh.org is moderated for
non-subscribers and non-whitelisted addresses. Such mails will be delayed
but the sender will not be informed about the moderation.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index ab008013cfec..22688419873f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2203,7 +2203,7 @@ BATMAN ADVANCED
M: Marek Lindner <mareklindner@neomailbox.ch>
M: Simon Wunderlich <sw@simonwunderlich.de>
M: Antonio Quartulli <a@unstable.cc>
-L: b.a.t.m.a.n@lists.open-mesh.org
+L: b.a.t.m.a.n@lists.open-mesh.org (moderated for non-subscribers)
W: https://www.open-mesh.org/
Q: https://patchwork.open-mesh.org/project/batman/list/
S: Maintained
--
2.8.2
^ permalink raw reply related
* [PATCH 02/15] MAINTAINERS: Add BATMAN ADVANCED documentation files
From: Antonio Quartulli @ 2016-05-03 22:23 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Sven Eckelmann, Antonio Quartulli
In-Reply-To: <1462314230-16257-1-git-send-email-a@unstable.cc>
From: Sven Eckelmann <sven@narfation.org>
The sysfs ABI documentation files and the batman-adv.txt are maintained by
the BATMAN ADVANCED maintainers and patches for them should therefore be
sent to them.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
MAINTAINERS | 3 +++
1 file changed, 3 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 22688419873f..8f32094f6922 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2207,6 +2207,9 @@ L: b.a.t.m.a.n@lists.open-mesh.org (moderated for non-subscribers)
W: https://www.open-mesh.org/
Q: https://patchwork.open-mesh.org/project/batman/list/
S: Maintained
+F: Documentation/ABI/testing/sysfs-class-net-batman-adv
+F: Documentation/ABI/testing/sysfs-class-net-mesh
+F: Documentation/networking/batman-adv.txt
F: net/batman-adv/
BAYCOM/HDLCDRV DRIVERS FOR AX.25
--
2.8.2
^ permalink raw reply related
* [PATCH 03/15] batman-adv: Start new development cycle
From: Antonio Quartulli @ 2016-05-03 22:23 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Simon Wunderlich, Antonio Quartulli
In-Reply-To: <1462314230-16257-1-git-send-email-a@unstable.cc>
From: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
net/batman-adv/main.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index db4533631834..38e5587675cc 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -24,7 +24,7 @@
#define BATADV_DRIVER_DEVICE "batman-adv"
#ifndef BATADV_SOURCE_VERSION
-#define BATADV_SOURCE_VERSION "2016.1"
+#define BATADV_SOURCE_VERSION "2016.2"
#endif
/* B.A.T.M.A.N. parameters */
--
2.8.2
^ permalink raw reply related
* [PATCH 04/15] batman-adv: use static string for table headers
From: Antonio Quartulli @ 2016-05-03 22:23 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Antonio Quartulli, Sven Eckelmann,
Marek Lindner
In-Reply-To: <1462314230-16257-1-git-send-email-a@unstable.cc>
Use a static string when showing table headers rather then
a nonsense parametric one with fixed arguments.
It is easier to grep and it does not need to be recomputed
at runtime each time.
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
[sven@narfation.org: fix conflicts with current version]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
---
net/batman-adv/bat_iv_ogm.c | 8 +++-----
net/batman-adv/bat_v.c | 9 ++++-----
net/batman-adv/bridge_loop_avoidance.c | 7 +++----
net/batman-adv/distributed-arp-table.c | 4 ++--
net/batman-adv/translation-table.c | 9 ++++-----
5 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index cb2d1b9b0340..682fcaec56e6 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -1829,9 +1829,8 @@ static void batadv_iv_ogm_orig_print(struct batadv_priv *bat_priv,
int batman_count = 0;
u32 i;
- seq_printf(seq, " %-15s %s (%s/%i) %17s [%10s]: %20s ...\n",
- "Originator", "last-seen", "#", BATADV_TQ_MAX_VALUE,
- "Nexthop", "outgoingIF", "Potential nexthops");
+ seq_puts(seq,
+ " Originator last-seen (#/255) Nexthop [outgoingIF]: Potential nexthops ...\n");
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
@@ -1911,8 +1910,7 @@ static void batadv_iv_neigh_print(struct batadv_priv *bat_priv,
struct batadv_hard_iface *hard_iface;
int batman_count = 0;
- seq_printf(seq, " %10s %-13s %s\n",
- "IF", "Neighbor", "last-seen");
+ seq_puts(seq, " IF Neighbor last-seen\n");
rcu_read_lock();
list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c
index 3315b9a598af..246f9e959849 100644
--- a/net/batman-adv/bat_v.c
+++ b/net/batman-adv/bat_v.c
@@ -151,8 +151,8 @@ static void batadv_v_neigh_print(struct batadv_priv *bat_priv,
struct batadv_hard_iface *hard_iface;
int batman_count = 0;
- seq_printf(seq, " %-15s %s (%11s) [%10s]\n", "Neighbor",
- "last-seen", "throughput", "IF");
+ seq_puts(seq,
+ " Neighbor last-seen ( throughput) [ IF]\n");
rcu_read_lock();
list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
@@ -191,9 +191,8 @@ static void batadv_v_orig_print(struct batadv_priv *bat_priv,
int batman_count = 0;
u32 i;
- seq_printf(seq, " %-15s %s (%11s) %17s [%10s]: %20s ...\n",
- "Originator", "last-seen", "throughput", "Nexthop",
- "outgoingIF", "Potential nexthops");
+ seq_puts(seq,
+ " Originator last-seen ( throughput) Nexthop [outgoingIF]: Potential nexthops ...\n");
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index 0a6c8b824a00..56bc971e404b 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -1815,8 +1815,8 @@ int batadv_bla_claim_table_seq_print_text(struct seq_file *seq, void *offset)
"Claims announced for the mesh %s (orig %pM, group id %#.4x)\n",
net_dev->name, primary_addr,
ntohs(bat_priv->bla.claim_dest.group));
- seq_printf(seq, " %-17s %-5s %-17s [o] (%-6s)\n",
- "Client", "VID", "Originator", "CRC");
+ seq_puts(seq,
+ " Client VID Originator [o] (CRC )\n");
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
@@ -1873,8 +1873,7 @@ int batadv_bla_backbone_table_seq_print_text(struct seq_file *seq, void *offset)
"Backbones announced for the mesh %s (orig %pM, group id %#.4x)\n",
net_dev->name, primary_addr,
ntohs(bat_priv->bla.claim_dest.group));
- seq_printf(seq, " %-17s %-5s %-9s (%-6s)\n",
- "Originator", "VID", "last seen", "CRC");
+ seq_puts(seq, " Originator VID last seen (CRC )\n");
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index e96d7c745b4a..ce574e9cef3b 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -814,8 +814,8 @@ int batadv_dat_cache_seq_print_text(struct seq_file *seq, void *offset)
goto out;
seq_printf(seq, "Distributed ARP Table (%s):\n", net_dev->name);
- seq_printf(seq, " %-7s %-9s %4s %11s\n", "IPv4",
- "MAC", "VID", "last-seen");
+ seq_puts(seq,
+ " IPv4 MAC VID last-seen\n");
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 0b43e86328a5..29fd62839fac 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -1008,8 +1008,8 @@ int batadv_tt_local_seq_print_text(struct seq_file *seq, void *offset)
seq_printf(seq,
"Locally retrieved addresses (from %s) announced via TT (TTVN: %u):\n",
net_dev->name, (u8)atomic_read(&bat_priv->tt.vn));
- seq_printf(seq, " %-13s %s %-8s %-9s (%-10s)\n", "Client", "VID",
- "Flags", "Last seen", "CRC");
+ seq_puts(seq,
+ " Client VID Flags Last seen (CRC )\n");
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
@@ -1706,9 +1706,8 @@ int batadv_tt_global_seq_print_text(struct seq_file *seq, void *offset)
seq_printf(seq,
"Globally announced TT entries received via the mesh %s\n",
net_dev->name);
- seq_printf(seq, " %-13s %s %s %-15s %s (%-10s) %s\n",
- "Client", "VID", "(TTVN)", "Originator", "(Curr TTVN)",
- "CRC", "Flags");
+ seq_puts(seq,
+ " Client VID (TTVN) Originator (Curr TTVN) (CRC ) Flags\n");
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
--
2.8.2
^ permalink raw reply related
* [PATCH 06/15] batman-adv: use to_delayed_work
From: Antonio Quartulli @ 2016-05-03 22:23 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Geliang Tang, Marek Lindner,
Antonio Quartulli
In-Reply-To: <1462314230-16257-1-git-send-email-a@unstable.cc>
From: Geliang Tang <geliangtang@163.com>
Use to_delayed_work() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
net/batman-adv/bridge_loop_avoidance.c | 2 +-
net/batman-adv/distributed-arp-table.c | 2 +-
net/batman-adv/network-coding.c | 2 +-
net/batman-adv/originator.c | 2 +-
net/batman-adv/send.c | 4 ++--
net/batman-adv/translation-table.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index 56bc971e404b..cad8cb3a88f2 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -1303,7 +1303,7 @@ static void batadv_bla_periodic_work(struct work_struct *work)
struct batadv_hard_iface *primary_if;
int i;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
priv_bla = container_of(delayed_work, struct batadv_priv_bla, work);
bat_priv = container_of(priv_bla, struct batadv_priv, bla);
primary_if = batadv_primary_if_get_selected(bat_priv);
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index ce574e9cef3b..33f273e5354b 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -152,7 +152,7 @@ static void batadv_dat_purge(struct work_struct *work)
struct batadv_priv_dat *priv_dat;
struct batadv_priv *bat_priv;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
priv_dat = container_of(delayed_work, struct batadv_priv_dat, work);
bat_priv = container_of(priv_dat, struct batadv_priv, dat);
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c
index b41719b6487a..0d3bf4368e9b 100644
--- a/net/batman-adv/network-coding.c
+++ b/net/batman-adv/network-coding.c
@@ -714,7 +714,7 @@ static void batadv_nc_worker(struct work_struct *work)
struct batadv_priv *bat_priv;
unsigned long timeout;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
priv_nc = container_of(delayed_work, struct batadv_priv_nc, work);
bat_priv = container_of(priv_nc, struct batadv_priv, nc);
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index e4cbb0753e37..5b802f0dc24b 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -1222,7 +1222,7 @@ static void batadv_purge_orig(struct work_struct *work)
struct delayed_work *delayed_work;
struct batadv_priv *bat_priv;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
bat_priv = container_of(delayed_work, struct batadv_priv, orig_work);
_batadv_purge_orig(bat_priv);
queue_delayed_work(batadv_event_workqueue,
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index 3ce06e0a91b1..20076b4c5e1d 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -552,7 +552,7 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work)
struct net_device *soft_iface;
struct batadv_priv *bat_priv;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
forw_packet = container_of(delayed_work, struct batadv_forw_packet,
delayed_work);
soft_iface = forw_packet->if_incoming->soft_iface;
@@ -604,7 +604,7 @@ void batadv_send_outstanding_bat_ogm_packet(struct work_struct *work)
struct batadv_forw_packet *forw_packet;
struct batadv_priv *bat_priv;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
forw_packet = container_of(delayed_work, struct batadv_forw_packet,
delayed_work);
bat_priv = netdev_priv(forw_packet->if_incoming->soft_iface);
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 29fd62839fac..d44ce84626c5 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -3226,7 +3226,7 @@ static void batadv_tt_purge(struct work_struct *work)
struct batadv_priv_tt *priv_tt;
struct batadv_priv *bat_priv;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
priv_tt = container_of(delayed_work, struct batadv_priv_tt, work);
bat_priv = container_of(priv_tt, struct batadv_priv, tt);
--
2.8.2
^ permalink raw reply related
* [PATCH 05/15] batman-adv: use list_for_each_entry_safe
From: Antonio Quartulli @ 2016-05-03 22:23 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Geliang Tang, Marek Lindner,
Antonio Quartulli
In-Reply-To: <1462314230-16257-1-git-send-email-a@unstable.cc>
From: Geliang Tang <geliangtang@163.com>
Use list_for_each_entry_safe() instead of list_for_each_safe() to
simplify the code.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Acked-by: Antonio Quartulli <a@unstable.cc>
Reviewed-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
net/batman-adv/icmp_socket.c | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c
index 14d0013b387e..8a5889d134bc 100644
--- a/net/batman-adv/icmp_socket.c
+++ b/net/batman-adv/icmp_socket.c
@@ -104,25 +104,21 @@ static int batadv_socket_open(struct inode *inode, struct file *file)
static int batadv_socket_release(struct inode *inode, struct file *file)
{
- struct batadv_socket_client *socket_client = file->private_data;
- struct batadv_socket_packet *socket_packet;
- struct list_head *list_pos, *list_pos_tmp;
+ struct batadv_socket_client *client = file->private_data;
+ struct batadv_socket_packet *packet, *tmp;
- spin_lock_bh(&socket_client->lock);
+ spin_lock_bh(&client->lock);
/* for all packets in the queue ... */
- list_for_each_safe(list_pos, list_pos_tmp, &socket_client->queue_list) {
- socket_packet = list_entry(list_pos,
- struct batadv_socket_packet, list);
-
- list_del(list_pos);
- kfree(socket_packet);
+ list_for_each_entry_safe(packet, tmp, &client->queue_list, list) {
+ list_del(&packet->list);
+ kfree(packet);
}
- batadv_socket_client_hash[socket_client->index] = NULL;
- spin_unlock_bh(&socket_client->lock);
+ batadv_socket_client_hash[client->index] = NULL;
+ spin_unlock_bh(&client->lock);
- kfree(socket_client);
+ kfree(client);
module_put(THIS_MODULE);
return 0;
--
2.8.2
^ permalink raw reply related
* [PATCH 07/15] batman-adv: fix wrong names in kerneldoc
From: Antonio Quartulli @ 2016-05-03 22:23 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Antonio Quartulli, Sven Eckelmann,
Marek Lindner
In-Reply-To: <1462314230-16257-1-git-send-email-a@unstable.cc>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
[sven@narfation.org: Fix additional names]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
---
net/batman-adv/bridge_loop_avoidance.c | 2 +-
net/batman-adv/distributed-arp-table.c | 2 +-
net/batman-adv/icmp_socket.c | 2 +-
net/batman-adv/main.h | 3 ++-
net/batman-adv/multicast.c | 11 ++++++-----
net/batman-adv/originator.c | 2 +-
net/batman-adv/packet.h | 2 +-
net/batman-adv/soft-interface.c | 2 +-
8 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index cad8cb3a88f2..20b2fd9b3d72 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -1575,7 +1575,7 @@ int batadv_bla_is_backbone_gw(struct sk_buff *skb,
}
/**
- * batadv_bla_init - free all bla structures
+ * batadv_bla_free - free all bla structures
* @bat_priv: the bat priv with all the soft interface information
*
* for softinterface free or module unload
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index 33f273e5354b..f0548b4f66f4 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -717,7 +717,7 @@ void batadv_dat_status_update(struct net_device *net_dev)
}
/**
- * batadv_gw_tvlv_ogm_handler_v1 - process incoming dat tvlv container
+ * batadv_dat_tvlv_ogm_handler_v1 - process incoming dat tvlv container
* @bat_priv: the bat priv with all the soft interface information
* @orig: the orig_node of the ogm
* @flags: flags indicating the tvlv state (see batadv_tvlv_handler_flags)
diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c
index 8a5889d134bc..777aea10cd8f 100644
--- a/net/batman-adv/icmp_socket.c
+++ b/net/batman-adv/icmp_socket.c
@@ -333,7 +333,7 @@ err:
}
/**
- * batadv_socket_receive_packet - schedule an icmp packet to be sent to
+ * batadv_socket_add_packet - schedule an icmp packet to be sent to
* userspace on an icmp socket.
* @socket_client: the socket this packet belongs to
* @icmph: pointer to the header of the icmp packet
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index 38e5587675cc..07a6042d0ad6 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -296,7 +296,8 @@ static inline bool batadv_compare_eth(const void *data1, const void *data2)
}
/**
- * has_timed_out - compares current time (jiffies) and timestamp + timeout
+ * batadv_has_timed_out - compares current time (jiffies) and timestamp +
+ * timeout
* @timestamp: base value to compare with (in jiffies)
* @timeout: added to base value before comparing (in milliseconds)
*
diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
index 8caa2c72efa3..c32f24fafe67 100644
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -394,7 +394,8 @@ static int batadv_mcast_forw_mode_check(struct batadv_priv *bat_priv,
}
/**
- * batadv_mcast_want_all_ip_count - count nodes with unspecific mcast interest
+ * batadv_mcast_forw_want_all_ip_count - count nodes with unspecific mcast
+ * interest
* @bat_priv: the bat priv with all the soft interface information
* @ethhdr: ethernet header of a packet
*
@@ -433,7 +434,7 @@ batadv_mcast_forw_tt_node_get(struct batadv_priv *bat_priv,
}
/**
- * batadv_mcast_want_forw_ipv4_node_get - get a node with an ipv4 flag
+ * batadv_mcast_forw_ipv4_node_get - get a node with an ipv4 flag
* @bat_priv: the bat priv with all the soft interface information
*
* Return: an orig_node which has the BATADV_MCAST_WANT_ALL_IPV4 flag set and
@@ -460,7 +461,7 @@ batadv_mcast_forw_ipv4_node_get(struct batadv_priv *bat_priv)
}
/**
- * batadv_mcast_want_forw_ipv6_node_get - get a node with an ipv6 flag
+ * batadv_mcast_forw_ipv6_node_get - get a node with an ipv6 flag
* @bat_priv: the bat priv with all the soft interface information
*
* Return: an orig_node which has the BATADV_MCAST_WANT_ALL_IPV6 flag set
@@ -487,7 +488,7 @@ batadv_mcast_forw_ipv6_node_get(struct batadv_priv *bat_priv)
}
/**
- * batadv_mcast_want_forw_ip_node_get - get a node with an ipv4/ipv6 flag
+ * batadv_mcast_forw_ip_node_get - get a node with an ipv4/ipv6 flag
* @bat_priv: the bat priv with all the soft interface information
* @ethhdr: an ethernet header to determine the protocol family from
*
@@ -511,7 +512,7 @@ batadv_mcast_forw_ip_node_get(struct batadv_priv *bat_priv,
}
/**
- * batadv_mcast_want_forw_unsnoop_node_get - get a node with an unsnoopable flag
+ * batadv_mcast_forw_unsnoop_node_get - get a node with an unsnoopable flag
* @bat_priv: the bat priv with all the soft interface information
*
* Return: an orig_node which has the BATADV_MCAST_WANT_ALL_UNSNOOPABLES flag
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 5b802f0dc24b..155c1dd36c17 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -289,7 +289,7 @@ void batadv_neigh_node_put(struct batadv_neigh_node *neigh_node)
}
/**
- * batadv_orig_node_get_router - router to the originator depending on iface
+ * batadv_orig_router_get - router to the originator depending on iface
* @orig_node: the orig node for the router
* @if_outgoing: the interface where the payload packet has been received or
* the OGM should be sent to
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index 8a8d7ca1a5cf..0796dfdfbb60 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -501,7 +501,7 @@ struct batadv_coded_packet {
#pragma pack()
/**
- * struct batadv_unicast_tvlv - generic unicast packet with tvlv payload
+ * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload
* @packet_type: batman-adv packet type, part of the general header
* @version: batman-adv protocol version, part of the genereal header
* @ttl: time to live for this packet, part of the genereal header
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 0710379491bf..e158235ada06 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -539,7 +539,7 @@ struct batadv_softif_vlan *batadv_softif_vlan_get(struct batadv_priv *bat_priv,
}
/**
- * batadv_create_vlan - allocate the needed resources for a new vlan
+ * batadv_softif_create_vlan - allocate the needed resources for a new vlan
* @bat_priv: the bat priv with all the soft interface information
* @vid: the VLAN identifier
*
--
2.8.2
^ permalink raw reply related
* [PATCH 08/15] batman-adv: Fix checkpatch warning about 'unsigned' type
From: Antonio Quartulli @ 2016-05-03 22:23 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Sven Eckelmann, Marek Lindner,
Antonio Quartulli
In-Reply-To: <1462314230-16257-1-git-send-email-a@unstable.cc>
From: Sven Eckelmann <sven@narfation.org>
checkpatch.pl warns about the use of 'unsigned' as a short form for
'unsigned int'.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
net/batman-adv/fragmentation.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
index e6956d0746a2..65536db1bff7 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -407,8 +407,8 @@ static struct sk_buff *batadv_frag_create(struct sk_buff *skb,
unsigned int mtu)
{
struct sk_buff *skb_fragment;
- unsigned header_size = sizeof(*frag_head);
- unsigned fragment_size = mtu - header_size;
+ unsigned int header_size = sizeof(*frag_head);
+ unsigned int fragment_size = mtu - header_size;
skb_fragment = netdev_alloc_skb(NULL, mtu + ETH_HLEN);
if (!skb_fragment)
@@ -444,15 +444,15 @@ bool batadv_frag_send_packet(struct sk_buff *skb,
struct batadv_hard_iface *primary_if = NULL;
struct batadv_frag_packet frag_header;
struct sk_buff *skb_fragment;
- unsigned mtu = neigh_node->if_incoming->net_dev->mtu;
- unsigned header_size = sizeof(frag_header);
- unsigned max_fragment_size, max_packet_size;
+ unsigned int mtu = neigh_node->if_incoming->net_dev->mtu;
+ unsigned int header_size = sizeof(frag_header);
+ unsigned int max_fragment_size, max_packet_size;
bool ret = false;
/* To avoid merge and refragmentation at next-hops we never send
* fragments larger than BATADV_FRAG_MAX_FRAG_SIZE
*/
- mtu = min_t(unsigned, mtu, BATADV_FRAG_MAX_FRAG_SIZE);
+ mtu = min_t(unsigned int, mtu, BATADV_FRAG_MAX_FRAG_SIZE);
max_fragment_size = mtu - header_size;
max_packet_size = max_fragment_size * BATADV_FRAG_MAX_FRAGMENTS;
--
2.8.2
^ permalink raw reply related
* [PATCH 09/15] batman-adv: Fix kerneldoc for batadv_compare_claim
From: Antonio Quartulli @ 2016-05-03 22:23 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Sven Eckelmann, Marek Lindner,
Antonio Quartulli
In-Reply-To: <1462314230-16257-1-git-send-email-a@unstable.cc>
From: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
net/batman-adv/bridge_loop_avoidance.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index 20b2fd9b3d72..60d33232bd10 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -120,7 +120,7 @@ static int batadv_compare_backbone_gw(const struct hlist_node *node,
}
/**
- * batadv_compare_backbone_gw - compare address and vid of two claims
+ * batadv_compare_claim - compare address and vid of two claims
* @node: list node of the first entry to compare
* @data2: pointer to the second claims
*
--
2.8.2
^ permalink raw reply related
* Re: [PATCH nf-next 5/9] netfilter: conntrack: small refactoring of conntrack seq_printf
From: Florian Westphal @ 2016-05-03 22:27 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: Florian Westphal, netfilter-devel, netdev
In-Reply-To: <20160503181250.GA4508@salvia>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > - if (NF_CT_DIRECTION(hash))
> > - goto release;
> > - if (nf_ct_l3num(ct) != AF_INET)
> > + /* check if we raced w. object reuse */
> > + if (!nf_ct_is_confirmed(ct) ||
>
> This refactoring includes this new check, is this intentional?
Hmm, yes and no.
I should have put it in an extra commit :-/
Without this, we might erronously print a conntrack that is NEW
and which isn't confirmed yet.
We won't crash since seq_print doesn't depend on extensions being
set up properly, but it seems better to only display those conntracks
that are part of the conntrack hash table (i.e., have the confirmed bit
set).
Let me know if you want me to respin this as a separate fix, thanks!
^ permalink raw reply
* Re: [PATCH nf-next 3/9] netfilter: conntrack: don't attempt to iterate over empty table
From: Pablo Neira Ayuso @ 2016-05-03 22:27 UTC (permalink / raw)
To: Florian Westphal; +Cc: netfilter-devel, netdev
In-Reply-To: <20160503175559.GJ2395@breakpoint.cc>
On Tue, May 03, 2016 at 07:55:59PM +0200, Florian Westphal wrote:
> > Otherwise, every time we'll go container destruction path, we'll hit
> > slow path, ie. scanning the full table.
>
> Yes, but I see no other choice.
Fair enough, will place this in nf-next, thanks.
^ 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