* Re: linux-next: build warning after merge of the net tree
From: Joe Perches @ 2010-07-08 4:13 UTC (permalink / raw)
To: David Miller; +Cc: sfr, netdev, linux-next, linux-kernel, gregkh
In-Reply-To: <20100707.181847.62350965.davem@davemloft.net>
On Wed, 2010-07-07 at 18:18 -0700, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Wed, 07 Jul 2010 17:45:22 -0700 (PDT)
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Tue, 6 Jul 2010 14:25:42 +1000
> >> After merging the net tree, today's linux-next build (powerpc
> >> ppc64_defconfig) produced these warnings:
> >> drivers/scsi/sym53c8xx_2/sym_hipd.c: In function 'sym_print_msg':
> >> drivers/scsi/sym53c8xx_2/sym_hipd.c:78: warning: zero-length gnu_printf format string
> > Thanks Stephen I'll look into this.
> Yeah this is a bit ugly.
>
> It used to be that the dev_*() format string was CPP pasted to whatever
> format string the user gave. So if the user gave an empty string it
> still looked like a non-empty printf string.
>
> But that no longer happens because we hide the implementation, and thus
> the top-level printf format string, in the external functions.
>
> It seems the construction:
>
> /*
> * Stupid hackaround for existing uses of non-printk uses dev_info
> *
> * Note that the definition of dev_info below is actually _dev_info
> * and a macro is used to avoid redefining dev_info
> */
>
> #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
>
> added to linux/device.h was meant to handle these cases, but as we see
> it doesn't.
Nope, the _dev_info/dev_info is meant to handle the
current uses of dev_info as a variable like this one:
$ grep dev_info drivers/net/pcmcia/pcnet_cs.c
static dev_info_t dev_info = "pcnet_cs";
ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev);
Without the _dev_info and dev_info as a macro,
the function is redefined as a variable.
> It looks like there are just a hand-ful of cases, so maybe we can tweak
> them by hand. For example, in the sym53c8xx_2 driver bits we can replace
> the NULL labels passed to sym_print_msg() with a real string and therefore
> remove the "" case.
>
> Joe, any better ideas?
You're right there are just a few cases where dev_info
is uses as a preface for a hex_dump style display.
Maybe it'd be OK to simply add a trailing space to the
preface and remove any leading spaces from the subsequent
initial printks.
dev_info(dev, " ");
^ permalink raw reply
* [PATCH net-next] cxgb4: fix for new ndo_get_stats64 signature
From: Dimitris Michailidis @ 2010-07-08 2:11 UTC (permalink / raw)
To: netdev; +Cc: Dimitris Michailidis
The change to ndo_get_stats64 in "net: fix 64 bit counters on 32 bit arches"
missed cxgb4. Fix it.
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
---
drivers/net/cxgb4/cxgb4_main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c
index 55a720e..2619997 100644
--- a/drivers/net/cxgb4/cxgb4_main.c
+++ b/drivers/net/cxgb4/cxgb4_main.c
@@ -2601,12 +2601,12 @@ static int cxgb_close(struct net_device *dev)
return t4_enable_vi(adapter, 0, pi->viid, false, false);
}
-static struct rtnl_link_stats64 *cxgb_get_stats(struct net_device *dev)
+static struct rtnl_link_stats64 *cxgb_get_stats(struct net_device *dev,
+ struct rtnl_link_stats64 *ns)
{
struct port_stats stats;
struct port_info *p = netdev_priv(dev);
struct adapter *adapter = p->adapter;
- struct rtnl_link_stats64 *ns = &dev->stats64;
spin_lock(&adapter->stats_lock);
t4_get_port_stats(adapter, p->tx_chan, &stats);
--
1.5.4
^ permalink raw reply related
* Re: [PATCH] ixgbe: fix crashing with ixgbe_vlan_filter_enable
From: Yinghai Lu @ 2010-07-08 1:35 UTC (permalink / raw)
To: Tantilov, Emil S; +Cc: David Miller, Brandeburg, Jesse, NetDev
In-Reply-To: <EA929A9653AAE14F841771FB1DE5A1365FF492082D@rrsmsx501.amr.corp.intel.com>
On 07/07/2010 04:31 PM, Tantilov, Emil S wrote:
> Yinghai Lu wrote:
>> happens with reboot or call kexec on system with ixgbe.
>>
>> [ 4912.773390] BUG: unable to handle kernel NULL pointer dereference
>> [ 4912.785756] IP: [<ffffffff81691600>]
>> ixgbe_vlan_filter_enable+0x74/0xda [ 4912.794084] PGD 10391a0067 PUD
>> 1022e3c067 PMD 0 [ 4912.805976] Oops: 0000 [#1] SMP
...
> There should be a patch in net-2.6 that fixes this issue:
>
> http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=fa37813401ff52d78591c262d6542e4d5d935584
That fixes the problem.
Thanks
Yinghai
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2010-07-08 1:35 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) Fix missing length checks in ETHTOOL_* command handling, from Ben
Hutchings.
2) Disable netpoll support for bond interfaces, it's a feature we
tried to add this merge window and we can't make it work properly
without major locking changes. From Andy Gospodarek.
3) XFRMA_MARK attribute extraction uses wrong sizeof() in memcpy(),
fix from Andreas Steffen.
4) ll_temac driver leaks iomaps on error, from Denis Kirjanov.
5) Bridge injection into IPV4 stack crashes because it fails to
clear out the SKB control block, fix from Herbert Xu.
Also, handle correctly the case where we have no bridging multicast
table and see an IGMP. People have reported crashes due to this.
6) Bonding driver can babble excessively in certain configurations
because it sends out pointless notifications when the MAC address
of a client hasn't even changed. Fix from Flavio Leitner.
7) rndis_host status polling change broke some chips, revert.
From Ben Hutchings.
8) netif_vdbg() is bogusly defined when VERBOSE_DEBUG is enabled.
Also from Ben Hutchings.
9) qlge driver timer crash fixes, from Breno Leitao.
10) netfilter ipv6 REJECT module leaks routes, fix from Eric Dumazet.
11) Fix bogus statistic reporting in s2io driver, previously it was possible
(for example) to see more multicast RX than total RX. Fix from
Jon Mason.
12) SB1250 fails to initialize module owner, from Ralf Baechle.
13) virtio net fixes from Michael S. Tsirkin, including a fix for
infinite rx refilling and error handling in polling.
As well as a TX oom handling fix from Rusty.
14) vxge driver shows probe time driver info using KERN_CRIT, fix
from Wu Fengguang.
15) A few small wireless fixes via Wey-Yi Guy, Vasanthakumar Thiagarajan,
and Johannes Berg.
16) Drivers that modify ->real_num_tx_queues on a potentially active
interface must flush the attached qdisc or we get illegal accesses
later, from John Fastabend.
Please pull, thanks a lot!
The following changes since commit 815c4163b6c8ebf8152f42b0a5fd015cfdcedc78:
Linux 2.6.35-rc4 (2010-07-04 20:22:50 -0700)
are available in the git repository at:
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master
Andreas Steffen (1):
xfrm: fix XFRMA_MARK extraction in xfrm_mark_get
Andy Gospodarek (2):
bonding: prevent netpoll over bonded interfaces
ixgbe: fix panic when shutting down system with WoL enabled
Ben Hutchings (5):
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL
ethtool: Fix potential user buffer overflow for ETHTOOL_{G, S}RXFH
net: Revert "rndis_host: Poll status channel before control channel"
usbnet: Set parent device early for netdev_printk()
net: Fix definition of netif_vdbg() when VERBOSE_DEBUG is defined
Breno Leitao (2):
qlge: Replacing add_timer() to mod_timer()
qlge: fix a eeh handler to not add a pending timer
Cody Rester (1):
drivers: bluetooth: bluecard_cs.c: Fixed include error, changed to linux/io.h
David Howells (1):
Bluetooth: Fix abuse of the preincrement operator
David S. Miller (3):
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
Merge branch 'master' of git://git.kernel.org/.../kaber/nf-2.6
Merge branch 'vhost-net' of git://git.kernel.org/.../mst/vhost
Denis Kirjanov (1):
ll_temac: Fix missing iounmaps
Eric Dumazet (1):
netfilter: ip6t_REJECT: fix a dst leak in ipv6 REJECT
Flavio Leitner (1):
bonding: check if clients MAC addr has changed
Guillaume Gaudonville (1):
ixgbe: skip non IPv4 packets in ATR filter
Herbert Xu (2):
bridge br_multicast: BUG: unable to handle kernel NULL pointer dereference
bridge: Clear IPCB before possible entry into IP stack
Johannes Berg (1):
iwlwifi: fix multicast
John Fastabend (3):
ixgbe: disable tx engine before disabling tx laser
sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock
net: decreasing real_num_tx_queues needs to flush qdisc
Jon Mason (1):
s2io: resolve statistics issues
Kulikov Vasiliy (1):
net/ne: fix memory leak in ne_drv_probe()
Michael S. Tsirkin (3):
vhost: break out of polling loop on error
vhost: add unlikely annotations to error path
virtio_net: do not reschedule rx refill forever
Peter Kosyh (1):
xfrm: fix xfrm by MARK logic
Ralf Baechle (1):
NET: SB1250: Initialize .owner
Randy Dunlap (1):
linux/net.h: fix kernel-doc warnings
Rusty Russell (1):
virtio_net: fix oom handling on tx
Saeed Bishara (1):
mv643xx_eth: use sw csum for big packets
Vasanthakumar Thiagarajan (1):
ath9k: Fix bug in starting ani
Wey-Yi Guy (1):
iwlwifi: set TX_CMD_FLAG_PROT_REQUIRE_MSK in tx_flag
Wu Fengguang (1):
vxge: show startup message with KERN_INFO
drivers/bluetooth/bluecard_cs.c | 2 +-
drivers/bluetooth/hci_bcsp.c | 2 +-
drivers/net/bonding/bond_alb.c | 3 +-
drivers/net/bonding/bond_main.c | 33 ++++++---
drivers/net/ixgbe/ixgbe_main.c | 17 +++--
drivers/net/ll_temac_main.c | 18 ++++--
drivers/net/mv643xx_eth.c | 9 ++-
drivers/net/ne.c | 4 +-
drivers/net/qlge/qlge_main.c | 11 ++--
drivers/net/s2io.c | 101 +++++++++++++++++----------
drivers/net/s2io.h | 4 -
drivers/net/sb1250-mac.c | 1 +
drivers/net/usb/rndis_host.c | 18 ++---
drivers/net/usb/usbnet.c | 5 +-
drivers/net/virtio_net.c | 28 ++++---
drivers/net/vxge/vxge-main.c | 4 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 1 +
drivers/net/wireless/ath/ath9k/main.c | 11 +++-
drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 6 +--
drivers/net/wireless/iwlwifi/iwl-core.c | 7 ++-
drivers/vhost/net.c | 12 +++-
drivers/vhost/vhost.c | 86 ++++++++++++-----------
drivers/vhost/vhost.h | 8 +-
include/linux/ethtool.h | 2 +
include/linux/mv643xx_eth.h | 5 ++
include/linux/net.h | 3 +-
include/linux/netdevice.h | 5 +-
include/net/sch_generic.h | 20 ++++-
include/net/xfrm.h | 2 +-
net/bridge/br_multicast.c | 21 +++---
net/bridge/br_netfilter.c | 3 +
net/core/dev.c | 18 +++++
net/core/ethtool.c | 41 ++++++++---
net/ipv4/xfrm4_policy.c | 2 +
net/ipv6/netfilter/ip6t_REJECT.c | 6 +-
net/ipv6/xfrm6_policy.c | 2 +
36 files changed, 332 insertions(+), 189 deletions(-)
^ permalink raw reply
* Re: IPVS: Incorrect helper use for SCTP [was: wensong@linux-vs.org, horms@verge.net.au]
From: xiaoyu Du @ 2010-07-08 1:33 UTC (permalink / raw)
To: Simon Horman; +Cc: lvs-devel, linux-kernel, netdev
In-Reply-To: <20100707122110.GF17967@verge.net.au>
This function is used for sctp app heplers.
since there's no sctp helpers yet at present, it does nothing.
If I make sure this is a bug. I will resend the pathch.
2010/7/7 Simon Horman <horms@verge.net.au>:
> [CCed netdev]
>
> Thanks,
>
> that looks correct to me. Have you tested this change?
> If so could you provided a Signed-off-by line
> as per section 12 of Documentation/SubmittingPatches?
>
> On Wed, Jul 07, 2010 at 05:19:06PM +0800, xiaoyu Du wrote:
>> Hi,all
>>
>> After I compared the sctp with tcp and udp, I thinkt his a bug that
>> sctp_dnat_handler Incorrectly invoked ip_vs_app_pkt_out.
>> below is the patch.
>>
>> ---
>> net/netfilter/ipvs/ip_vs_proto_sctp.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/netfilter/ipvs/ip_vs_proto_sctp.c
>> b/net/netfilter/ipvs/ip_vs_proto_sctp.c
>> index c9a3f7a..db55759 100644
>> --- a/net/netfilter/ipvs/ip_vs_proto_sctp.c
>> +++ b/net/netfilter/ipvs/ip_vs_proto_sctp.c
>> @@ -173,7 +173,7 @@ sctp_dnat_handler(struct sk_buff *skb,
>> return 0;
>>
>> /* Call application helper if needed */
>> - if (!ip_vs_app_pkt_out(cp, skb))
>> + if (!ip_vs_app_pkt_in(cp, skb))
>> return 0;
>> }
>>
>> --
>> --
>> To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH] b44: remove unused dma_desc_align_mask
From: David Miller @ 2010-07-08 1:25 UTC (permalink / raw)
To: fujita.tomonori; +Cc: netdev, zambrano
In-Reply-To: <20100708095537B.fujita.tomonori@lab.ntt.co.jp>
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date: Thu, 8 Jul 2010 09:55:58 +0900
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Applied, thanks.
^ permalink raw reply
* Re: linux-next: build warning after merge of the net tree
From: David Miller @ 2010-07-08 1:23 UTC (permalink / raw)
To: sfr; +Cc: netdev, linux-next, linux-kernel, jonas
In-Reply-To: <20100707143045.0c472f5d.sfr@canb.auug.org.au>
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 7 Jul 2010 14:30:45 +1000
> Hi Dave,
>
> After merging the net tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/net/ethoc.c: In function 'ethoc_init_ring':
> drivers/net/ethoc.c:302: warning: assignment makes integer from pointer without a cast
>
> Introduced by commit f8555ad0cfb0ba6cbc8729f337341fb11c82db89 ("ethoc:
> Write bus addresses to registers").
I'll fix this as follows:
--------------------
ethoc: Fix warning in ethoc_init_ring().
Get rid of the pointless back-and-forth casting of dev->mem_start
from long to pointer back to long again.
Also fixes a warning reported by Stephen Rothwell:
drivers/net/ethoc.c: In function 'ethoc_init_ring':
drivers/net/ethoc.c:302: warning: assignment makes integer from pointer without a cast
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/ethoc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index db519a8..5bb6bb7 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -286,7 +286,7 @@ static inline void ethoc_disable_rx_and_tx(struct ethoc *dev)
ethoc_write(dev, MODER, mode);
}
-static int ethoc_init_ring(struct ethoc *dev, void* mem_start)
+static int ethoc_init_ring(struct ethoc *dev, unsigned long mem_start)
{
struct ethoc_bd bd;
int i;
@@ -670,7 +670,7 @@ static int ethoc_open(struct net_device *dev)
if (ret)
return ret;
- ethoc_init_ring(priv, (void*)dev->mem_start);
+ ethoc_init_ring(priv, dev->mem_start);
ethoc_reset(priv);
if (netif_queue_stopped(dev)) {
--
1.7.1.1
^ permalink raw reply related
* Re: linux-next: build warning after merge of the net tree
From: David Miller @ 2010-07-08 1:18 UTC (permalink / raw)
To: sfr; +Cc: netdev, linux-next, linux-kernel, joe, gregkh
In-Reply-To: <20100707.174522.148565561.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Wed, 07 Jul 2010 17:45:22 -0700 (PDT)
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 6 Jul 2010 14:25:42 +1000
>
>> After merging the net tree, today's linux-next build (powerpc
>> ppc64_defconfig) produced these warnings:
>>
>> drivers/scsi/sym53c8xx_2/sym_hipd.c: In function 'sym_print_msg':
>> drivers/scsi/sym53c8xx_2/sym_hipd.c:78: warning: zero-length gnu_printf format string
>
> Thanks Stephen I'll look into this.
Yeah this is a bit ugly.
It used to be that the dev_*() format string was CPP pasted to whatever
format string the user gave. So if the user gave an empty string it
still looked like a non-empty printf string.
But that no longer happens because we hide the implementation, and thus
the top-level printf format string, in the external functions.
It seems the construction:
/*
* Stupid hackaround for existing uses of non-printk uses dev_info
*
* Note that the definition of dev_info below is actually _dev_info
* and a macro is used to avoid redefining dev_info
*/
#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
added to linux/device.h was meant to handle these cases, but as we see
it doesn't.
It looks like there are just a hand-ful of cases, so maybe we can tweak
them by hand. For example, in the sym53c8xx_2 driver bits we can replace
the NULL labels passed to sym_print_msg() with a real string and therefore
remove the "" case.
Joe, any better ideas?
^ permalink raw reply
* [PATCH] b44: remove unused dma_desc_align_mask
From: FUJITA Tomonori @ 2010-07-08 0:55 UTC (permalink / raw)
To: netdev; +Cc: zambrano
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
drivers/net/b44.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 3d52538..37617ab 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -135,7 +135,6 @@ static void b44_init_rings(struct b44 *);
static void b44_init_hw(struct b44 *, int);
-static int dma_desc_align_mask;
static int dma_desc_sync_size;
static int instance;
@@ -2340,7 +2339,6 @@ static int __init b44_init(void)
int err;
/* Setup paramaters for syncing RX/TX DMA descriptors */
- dma_desc_align_mask = ~(dma_desc_align_size - 1);
dma_desc_sync_size = max_t(unsigned int, dma_desc_align_size, sizeof(struct dma_desc));
err = b44_pci_init();
--
1.6.5
^ permalink raw reply related
* Re: linux-next: build warning after merge of the net tree
From: David Miller @ 2010-07-08 0:45 UTC (permalink / raw)
To: sfr; +Cc: netdev, linux-next, linux-kernel, joe, gregkh
In-Reply-To: <20100706142542.d723903f.sfr@canb.auug.org.au>
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 6 Jul 2010 14:25:42 +1000
> After merging the net tree, today's linux-next build (powerpc
> ppc64_defconfig) produced these warnings:
>
> drivers/scsi/sym53c8xx_2/sym_hipd.c: In function 'sym_print_msg':
> drivers/scsi/sym53c8xx_2/sym_hipd.c:78: warning: zero-length gnu_printf format string
Thanks Stephen I'll look into this.
^ permalink raw reply
* Re: [RFC PATCH]: Fix a warning in the niu driver
From: David Miller @ 2010-07-08 0:08 UTC (permalink / raw)
To: prarit; +Cc: netdev
In-Reply-To: <4C3514ED.2060904@redhat.com>
From: Prarit Bhargava <prarit@redhat.com>
Date: Wed, 07 Jul 2010 19:59:41 -0400
> This is an RFC to fix the mismatch compile warning in the niu driver.
>
> drivers/net/niu.c: In function 'niu_process_rx_pkt':
> drivers/net/niu.c:3490: warning: 'link' may be used uninitialized in this function
>
> AFAICT, link is unused. It is set in several places but never consumed by
> any code. Additionally, the value of page is unchecked in the functions that
> call niu_find_rx_page(). This could lead to a NULL pointer. However, in
> both cases it seems like if !page then the rx ring is corrupt. I *think* a
> BUG() is appropriate, but one of you may have a better suggestion as to
> what to do in that case. Maybe leaving the while loops with a break?
>
> Checking for !page is probably overkill -- maybe the fix is to just remove
> link?
>
> Any suggestions or advice is appreciated,
You completely removed the unlinking of the page from the hash chain
list.
That's the side effect you're missing.
niu_rx_pkt_ignore() {
...
page = niu_find_rxpage(rp, addr, &link);
...
*link = (struct page *) page->mapping;
...
}
niu_process_rx_pkt() {
...
page = niu_find_rxpage(rp, addr, &link);
...
*link = (struct page *) page->mapping;
...
}
Your patch would corrupt the list state, since we'd leave
pages in the rx page hash which have only externally references
and thus will be freed up.
Just BUG() if the loop terminates without finding a page.
--------------------
niu: BUG on inability to find page in rx page hashes.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 3d523cb..5d36531 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -3330,10 +3330,12 @@ static struct page *niu_find_rxpage(struct rx_ring_info *rp, u64 addr,
for (; (p = *pp) != NULL; pp = (struct page **) &p->mapping) {
if (p->index == addr) {
*link = pp;
- break;
+ goto found;
}
}
+ BUG();
+found:
return p;
}
@@ -3417,7 +3419,6 @@ static int niu_rx_pkt_ignore(struct niu *np, struct rx_ring_info *rp)
addr = (val & RCR_ENTRY_PKT_BUF_ADDR) <<
RCR_ENTRY_PKT_BUF_ADDR_SHIFT;
page = niu_find_rxpage(rp, addr, &link);
-
rcr_size = rp->rbr_sizes[(val & RCR_ENTRY_PKTBUFSZ) >>
RCR_ENTRY_PKTBUFSZ_SHIFT];
if ((page->index + PAGE_SIZE) - rcr_size == addr) {
^ permalink raw reply related
* [RFC PATCH]: Fix a warning in the niu driver
From: Prarit Bhargava @ 2010-07-07 23:59 UTC (permalink / raw)
To: netdev; +Cc: davem
This is an RFC to fix the mismatch compile warning in the niu driver.
drivers/net/niu.c: In function 'niu_process_rx_pkt':
drivers/net/niu.c:3490: warning: 'link' may be used uninitialized in this function
AFAICT, link is unused. It is set in several places but never consumed by
any code. Additionally, the value of page is unchecked in the functions that
call niu_find_rx_page(). This could lead to a NULL pointer. However, in
both cases it seems like if !page then the rx ring is corrupt. I *think* a
BUG() is appropriate, but one of you may have a better suggestion as to
what to do in that case. Maybe leaving the while loops with a break?
Checking for !page is probably overkill -- maybe the fix is to just remove
link?
Any suggestions or advice is appreciated,
P.
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 961b9ea..8f2251d 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -3353,19 +3353,17 @@ static unsigned int niu_hash_rxaddr(struct rx_ring_info *rp, u64 a)
return (a & (MAX_RBR_RING_SIZE - 1));
}
-static struct page *niu_find_rxpage(struct rx_ring_info *rp, u64 addr,
- struct page ***link)
+static struct page *niu_find_rxpage(struct rx_ring_info *rp, u64 addr)
{
unsigned int h = niu_hash_rxaddr(rp, addr);
- struct page *p, **pp;
+ struct page *p = NULL;
+ struct page **pp;
addr &= PAGE_MASK;
pp = &rp->rxhash[h];
for (; (p = *pp) != NULL; pp = (struct page **) &p->mapping) {
- if (p->index == addr) {
- *link = pp;
+ if (p->index == addr)
break;
- }
}
return p;
@@ -3441,7 +3439,7 @@ static int niu_rx_pkt_ignore(struct niu *np, struct rx_ring_info *rp)
rp->rx_dropped++;
while (1) {
- struct page *page, **link;
+ struct page *page;
u64 addr, val;
u32 rcr_size;
@@ -3450,12 +3448,12 @@ static int niu_rx_pkt_ignore(struct niu *np, struct rx_ring_info *rp)
val = le64_to_cpup(&rp->rcr[index]);
addr = (val & RCR_ENTRY_PKT_BUF_ADDR) <<
RCR_ENTRY_PKT_BUF_ADDR_SHIFT;
- page = niu_find_rxpage(rp, addr, &link);
+ page = niu_find_rxpage(rp, addr);
+ BUG_ON(!page); /* page cannot be NULL, rx_ring is corrupt */
rcr_size = rp->rbr_sizes[(val & RCR_ENTRY_PKTBUFSZ) >>
RCR_ENTRY_PKTBUFSZ_SHIFT];
if ((page->index + PAGE_SIZE) - rcr_size == addr) {
- *link = (struct page *) page->mapping;
np->ops->unmap_page(np->device, page->index,
PAGE_SIZE, DMA_FROM_DEVICE);
page->index = 0;
@@ -3487,7 +3485,7 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np,
num_rcr = 0;
while (1) {
- struct page *page, **link = NULL;
+ struct page *page;
u32 rcr_size, append_size;
u64 addr, val, off;
@@ -3501,7 +3499,8 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np,
addr = (val & RCR_ENTRY_PKT_BUF_ADDR) <<
RCR_ENTRY_PKT_BUF_ADDR_SHIFT;
- page = niu_find_rxpage(rp, addr, &link);
+ page = niu_find_rxpage(rp, addr);
+ BUG_ON(!page); /* page cannot be NULL, rx_ring is corrupt */
rcr_size = rp->rbr_sizes[(val & RCR_ENTRY_PKTBUFSZ) >>
RCR_ENTRY_PKTBUFSZ_SHIFT];
@@ -3528,7 +3527,6 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np,
niu_rx_skb_append(skb, page, off, append_size);
if ((page->index + rp->rbr_block_size) - rcr_size == addr) {
- *link = (struct page *) page->mapping;
np->ops->unmap_page(np->device, page->index,
PAGE_SIZE, DMA_FROM_DEVICE);
page->index = 0;
^ permalink raw reply related
* RE: [PATCH] ixgbe: fix crashing with ixgbe_vlan_filter_enable
From: Tantilov, Emil S @ 2010-07-07 23:31 UTC (permalink / raw)
To: Yinghai Lu, David Miller, Brandeburg, Jesse; +Cc: NetDev
In-Reply-To: <4C350991.6080002@kernel.org>
Yinghai Lu wrote:
> happens with reboot or call kexec on system with ixgbe.
>
> [ 4912.773390] BUG: unable to handle kernel NULL pointer dereference
> [ 4912.785756] IP: [<ffffffff81691600>]
> ixgbe_vlan_filter_enable+0x74/0xda [ 4912.794084] PGD 10391a0067 PUD
> 1022e3c067 PMD 0 [ 4912.805976] Oops: 0000 [#1] SMP
> [ 4912.809312] last sysfs file:
> /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/host4/target4:2:0/4:2:0:0/vendor
> [ 4912.828965] CPU 1 [ 4912.830533] Modules linked in:
> [ 4912.834366]
> [ 4912.835288] Pid: 25366, comm: reboot Not tainted
> 2.6.34-rc4-tip-yh-04420-g4537151-dirty #70 [ 4912.854250] RIP:
> 0010:[<ffffffff81691600>] [<ffffffff81691600>]
> ixgbe_vlan_filter_enable+0x74/0xda [ 4912.870439] RSP:
> 0018:ffff88203de49d08 EFLAGS: 00010287 [ 4912.885521] RAX:
> 0000000000000000 RBX: ffff88703d5d8900 RCX: ffff88703d5d8900 [
> 4912.896225] RDX: 0000000000000000 RSI: 0000000000000040 RDI:
> ffff88703d5d8900 [ 4912.908265] RBP: ffff88203de49d08 R08:
> ffffc90047280000 R09: ffff88203de49b98 [ 4912.915174] R10:
> 0000000000000000 R11: ffff88203de49d38 R12: ffff88703d5d8000 [
> 4912.936333] R13: ffff88703d5d9e80 R14: 0000000000000000 R15:
> 0000000000000000 [ 4912.947284] FS: 00007f91db5a36f0(0000)
> GS:ffff880079e00000(0000) knlGS:0000000000000000 [ 4912.965019] CS:
> 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 4912.970282] CR2:
> 000000000000002e CR3: 0000001021d27000 CR4: 00000000000006e0 [
> 4912.986573] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
> 0000000000000000 [ 4912.997240] DR3: 0000000000000000 DR6:
> 00000000ffff0ff0 DR7: 0000000000000400 [ 4913.012609] Process reboot
> (pid: 25366, threadinfo ffff88203de48000, task ffff88203d902340) [
> 4913.028237] Stack: [ 4913.030121] ffff88203de49d38 ffffffff81697d16
> ffff88703d5d8900 ffff88503ed00000 [ 4913.045165] <0> 000000000000001e
> ffff88703d5d8000 ffff88203de49d98 ffffffff81697e46 [ 4913.053297] <0>
> ffff88203d902340 ffffffff81bd9fc4 ffff88203de49db7 0000000000000000 [
> 4913.070554] Call Trace: [ 4913.074948] [<ffffffff81697d16>]
> ixgbe_set_rx_mode+0x137/0x17e [ 4913.086386] [<ffffffff81697e46>]
> __ixgbe_shutdown+0xe9/0x1a6 [ 4913.092895] [<ffffffff81bd9fc4>] ?
> _raw_spin_unlock_irq+0x30/0x36 [ 4913.108970] [<ffffffff81697f1d>]
> ixgbe_shutdown+0x1a/0x43 [ 4913.113514] [<ffffffff813e3bea>]
> pci_device_shutdown+0x2c/0x40 [ 4913.128080] [<ffffffff81489e25>]
> device_shutdown+0x53/0x74 [ 4913.135736] [<ffffffff8108dd91>]
> kernel_restart_prepare+0x2c/0x33 [ 4913.147206] [<ffffffff8108dddb>]
> kernel_restart+0x16/0x48 [ 4913.154807] [<ffffffff8108df6f>]
> sys_reboot+0x150/0x196 [ 4913.167525] [<ffffffff810a4891>] ?
> trace_hardirqs_on+0xd/0xf [ 4913.175020] [<ffffffff811430c2>] ?
> mntput_no_expire+0x2c/0xf5 [ 4913.191952] [<ffffffff8112da8c>] ?
> __fput+0x1d8/0x1e7 [ 4913.197452] [<ffffffff81033b8c>] ?
> sysret_check+0x27/0x62 [ 4913.207708] [<ffffffff81bd9472>] ?
> trace_hardirqs_on_thunk+0x3a/0x3f [ 4913.212377]
> [<ffffffff81033b5b>] system_call_fastpath+0x16/0x1b [ 4913.230877]
> Code: 00 00 00 40 48 8b 97 80 15 00 00 25 ff ff ff df 89 82 88 50 00
> 00 31 d2 48 89 f9 eb 6a 48 8b 81 40 0e 00 00 4c 8b 87 80 15 00 00
> <0f> b7 40 2e 83 f8 3f 7f 0d 89 c6 c1 e6 06 81 c6 28 10 00 00 eb [
> 4913.268163] RIP [<ffffffff81691600>]
> ixgbe_vlan_filter_enable+0x74/0xda [ 4913.273435] RSP
> <ffff88203de49d08> [ 4913.285451] CR2: 000000000000002e [
> 4913.290668] ---[ end trace 0aaa048b0b730b65 ]---
>
> add checking before reference them.
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
There should be a patch in net-2.6 that fixes this issue:
http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=fa37813401ff52d78591c262d6542e4d5d935584
Thanks,
Emil
^ permalink raw reply
* [PATCH] ixgbe: fix crashing with ixgbe_vlan_filter_enable
From: Yinghai Lu @ 2010-07-07 23:11 UTC (permalink / raw)
To: David Miller, Brandeburg, Jesse; +Cc: NetDev
happens with reboot or call kexec on system with ixgbe.
[ 4912.773390] BUG: unable to handle kernel NULL pointer dereference
[ 4912.785756] IP: [<ffffffff81691600>] ixgbe_vlan_filter_enable+0x74/0xda
[ 4912.794084] PGD 10391a0067 PUD 1022e3c067 PMD 0
[ 4912.805976] Oops: 0000 [#1] SMP
[ 4912.809312] last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/host4/target4:2:0/4:2:0:0/vendor
[ 4912.828965] CPU 1
[ 4912.830533] Modules linked in:
[ 4912.834366]
[ 4912.835288] Pid: 25366, comm: reboot Not tainted 2.6.34-rc4-tip-yh-04420-g4537151-dirty #70
[ 4912.854250] RIP: 0010:[<ffffffff81691600>] [<ffffffff81691600>] ixgbe_vlan_filter_enable+0x74/0xda
[ 4912.870439] RSP: 0018:ffff88203de49d08 EFLAGS: 00010287
[ 4912.885521] RAX: 0000000000000000 RBX: ffff88703d5d8900 RCX: ffff88703d5d8900
[ 4912.896225] RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff88703d5d8900
[ 4912.908265] RBP: ffff88203de49d08 R08: ffffc90047280000 R09: ffff88203de49b98
[ 4912.915174] R10: 0000000000000000 R11: ffff88203de49d38 R12: ffff88703d5d8000
[ 4912.936333] R13: ffff88703d5d9e80 R14: 0000000000000000 R15: 0000000000000000
[ 4912.947284] FS: 00007f91db5a36f0(0000) GS:ffff880079e00000(0000) knlGS:0000000000000000
[ 4912.965019] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 4912.970282] CR2: 000000000000002e CR3: 0000001021d27000 CR4: 00000000000006e0
[ 4912.986573] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4912.997240] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 4913.012609] Process reboot (pid: 25366, threadinfo ffff88203de48000, task ffff88203d902340)
[ 4913.028237] Stack:
[ 4913.030121] ffff88203de49d38 ffffffff81697d16 ffff88703d5d8900 ffff88503ed00000
[ 4913.045165] <0> 000000000000001e ffff88703d5d8000 ffff88203de49d98 ffffffff81697e46
[ 4913.053297] <0> ffff88203d902340 ffffffff81bd9fc4 ffff88203de49db7 0000000000000000
[ 4913.070554] Call Trace:
[ 4913.074948] [<ffffffff81697d16>] ixgbe_set_rx_mode+0x137/0x17e
[ 4913.086386] [<ffffffff81697e46>] __ixgbe_shutdown+0xe9/0x1a6
[ 4913.092895] [<ffffffff81bd9fc4>] ? _raw_spin_unlock_irq+0x30/0x36
[ 4913.108970] [<ffffffff81697f1d>] ixgbe_shutdown+0x1a/0x43
[ 4913.113514] [<ffffffff813e3bea>] pci_device_shutdown+0x2c/0x40
[ 4913.128080] [<ffffffff81489e25>] device_shutdown+0x53/0x74
[ 4913.135736] [<ffffffff8108dd91>] kernel_restart_prepare+0x2c/0x33
[ 4913.147206] [<ffffffff8108dddb>] kernel_restart+0x16/0x48
[ 4913.154807] [<ffffffff8108df6f>] sys_reboot+0x150/0x196
[ 4913.167525] [<ffffffff810a4891>] ? trace_hardirqs_on+0xd/0xf
[ 4913.175020] [<ffffffff811430c2>] ? mntput_no_expire+0x2c/0xf5
[ 4913.191952] [<ffffffff8112da8c>] ? __fput+0x1d8/0x1e7
[ 4913.197452] [<ffffffff81033b8c>] ? sysret_check+0x27/0x62
[ 4913.207708] [<ffffffff81bd9472>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 4913.212377] [<ffffffff81033b5b>] system_call_fastpath+0x16/0x1b
[ 4913.230877] Code: 00 00 00 40 48 8b 97 80 15 00 00 25 ff ff ff df 89 82 88 50 00 00 31 d2 48 89 f9 eb 6a 48 8b 81 40 0e 00 00 4c 8b 87 80 15 00 00 <0f> b7 40 2e 83 f8 3f 7f 0d 89 c6 c1 e6 06 81 c6 28 10 00 00 eb
[ 4913.268163] RIP [<ffffffff81691600>] ixgbe_vlan_filter_enable+0x74/0xda
[ 4913.273435] RSP <ffff88203de49d08>
[ 4913.285451] CR2: 000000000000002e
[ 4913.290668] ---[ end trace 0aaa048b0b730b65 ]---
add checking before reference them.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/net/ixgbe/ixgbe_main.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
Index: linux-2.6/drivers/net/ixgbe/ixgbe_main.c
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_main.c
+++ linux-2.6/drivers/net/ixgbe/ixgbe_main.c
@@ -2915,7 +2915,13 @@ static void ixgbe_vlan_filter_disable(st
break;
#endif
for (i = 0; i < adapter->num_rx_queues; i++) {
- j = adapter->rx_ring[i]->reg_idx;
+ struct ixgbe_ring *rx_ring;
+
+ rx_ring = adapter->rx_ring[i];
+ if (!rx_ring)
+ continue;
+
+ j = rx_ring->reg_idx;
vlnctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(j));
vlnctrl &= ~IXGBE_RXDCTL_VME;
IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(j), vlnctrl);
@@ -2947,7 +2953,13 @@ static void ixgbe_vlan_filter_enable(str
vlnctrl &= ~IXGBE_VLNCTRL_CFIEN;
IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
for (i = 0; i < adapter->num_rx_queues; i++) {
- j = adapter->rx_ring[i]->reg_idx;
+ struct ixgbe_ring *rx_ring;
+
+ rx_ring = adapter->rx_ring[i];
+ if (!rx_ring)
+ continue;
+
+ j = rx_ring->reg_idx;
vlnctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(j));
vlnctrl |= IXGBE_RXDCTL_VME;
IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(j), vlnctrl);
^ permalink raw reply
* Re: [PATCH] net/ipv4/ip_output.c: Removal of unused variable in ip_fragment()
From: David Miller @ 2010-07-07 22:45 UTC (permalink / raw)
To: desnacked; +Cc: netdev, linux-kernel
In-Reply-To: <874ogctheb.fsf@gmail.com>
From: George Kadianakis <desnacked@gmail.com>
Date: Wed, 07 Jul 2010 00:44:12 +0300
> From: George Kadianakis <desnacked@gmail.com>
>
> Removal of unused integer variable in ip_fragment().
>
> Signed-off-by: George Kadianakis <desnacked@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH] net: sh_eth: add support for SH7757's ETHER
From: David Miller @ 2010-07-07 22:45 UTC (permalink / raw)
To: yoshihiro.shimoda.uh; +Cc: netdev, linux-sh
In-Reply-To: <4C32B1F2.4040106@renesas.com>
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: Tue, 06 Jul 2010 13:32:50 +0900
> The SH7757 has 2 Fast Ethernet controller (ETHER) and 2 Gigabit Ethernet
> Controller (GETHER). This patch supports 2 ETHER only.
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Applied to net-next-2.6, thanks.
^ permalink raw reply
* Re: [net-next PATCH] bnx2x: Set RXHASH for LRO packets
From: David Miller @ 2010-07-07 22:45 UTC (permalink / raw)
To: vladz; +Cc: netdev, eilong
In-Reply-To: <1278425383.22257.4.camel@lb-tlvb-vladz>
From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Tue, 6 Jul 2010 17:09:43 +0300
> Set Toeplitz hash both for LRO and none-LRO skbs.
> The first CQE (TPA_START) will contain a hash for an LRO packet.
>
> Current code sets skb->rx_hash for none-LRO skbs only.
>
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6 V2] net: fix 64 bit counters on 32 bit arches
From: David Miller @ 2010-07-07 22:41 UTC (permalink / raw)
To: eric.dumazet; +Cc: bhutchings, shemminger, arnd, netdev, linux-net-drivers
In-Reply-To: <20100707.143645.135512197.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Wed, 07 Jul 2010 14:36:45 -0700 (PDT)
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Mon, 05 Jul 2010 22:05:22 +0200
>
>> [PATCH net-next-2.6 V2] net: fix 64 bit counters on 32 bit arches
Some dev_get_stats() conversions were missing, such as parisc/led,
some s390 code, usb rndis, etc.
I took care of this when integrating this patch.
^ permalink raw reply
* Re: [PATCH v3 0/9] atm: propagate atm_dev signal carrier to LOWER_UP of netdevice
From: David Miller @ 2010-07-07 22:07 UTC (permalink / raw)
To: karl; +Cc: linux-atm-general, netdev, chas
In-Reply-To: <1278492636-11094-1-git-send-email-karl@hiramoto.org>
From: Karl Hiramoto <karl@hiramoto.org>
Date: Wed, 7 Jul 2010 10:50:27 +0200
> Changes from v2:
> * use atomic instead of blocking notifier
> * use read_lock_irq() instead of read_lock() in atm/br2684
> * clean up comments
> * remove unused variable. I feel really bad about missing that last time.
>
> Changes from v1:
> Use atm_dev notifier chain instead of callback function pointer in struct vcc.
> In drivers/usb/atm call atm_dev_signal_change().
>
> In userspace it's helpful to know if a network device has a carrier signal.
> Often it is monitored via netlink. This patchset allows a way for the
> struct atm_dev drivers to pass carrier on/off to the netdevice.
>
> For DSL, carrier is on when the line has reached showtime state.
>
> Currently this patchset only propagates the changes to br2684 vccs,
> as this is the only type of hardware I have to test.
>
> If you prefer git you can pull from:
> git://github.com/karlhiramoto/linux-2.6.git atm-v3
I think the locking still needs another tweak.
By using read_lock_irq() you are assuming that you are invoked
from a context where irqs are disabled.
That's not necessarily the case, in fact some of your notifier call
sites in the drivers are in interrupt handlers where interrupts may or
may not be disabled.
So you'll likely need to use read_lock_irqsave() and read_lock_irqrestore().
Next, please format comments:
/* Like
* this.
*/
Thanks.
^ permalink raw reply
* Re: NET: SB1250: Initialize .owner
From: David Miller @ 2010-07-07 22:01 UTC (permalink / raw)
To: ralf; +Cc: netdev, linux-mips, macro
In-Reply-To: <20100706151811.GA4829@linux-mips.org>
From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 6 Jul 2010 16:18:11 +0100
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Applied, thanks Ralf.
^ permalink raw reply
* Re: [PATCH] vxge: show startup message with KERN_INFO
From: David Miller @ 2010-07-07 21:52 UTC (permalink / raw)
To: jon.mason; +Cc: fengguang.wu, Sreenivasa.Honnur, netdev
In-Reply-To: <20100706160824.GA31635@exar.com>
From: Jon Mason <jon.mason@exar.com>
Date: Tue, 6 Jul 2010 11:08:25 -0500
> On Tue, Jul 06, 2010 at 06:02:03AM -0700, Wu Fengguang wrote:
>> The original KERN_CRIT will mess up terminals.
>
> Looks reasonable to me.
...
>> CC: Sreenivasa Honnur <Sreenivasa.Honnur@neterion.com>
>> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH kernel 2.6.35-rc3-git7] axnet_cs: local_irq_save before calling ei_irq_wrapper
From: David Miller @ 2010-07-07 21:51 UTC (permalink / raw)
To: ken_kawasaki; +Cc: netdev
In-Reply-To: <20100706202243.95319ab4.ken_kawasaki@spring.nifty.jp>
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Date: Tue, 6 Jul 2010 20:22:43 +0900
>
> axnet_cs:
> local_irq_save before calling ei_irq_wrapper.
>
>
> Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
An interrupt handler may not assume that interrupts are disabled when
it is invoked.
The axnet_interrupt() code needs to be fixed to use
spin_lock_irqsave() et al.
Then, this change of your's is no longer needed.
^ permalink raw reply
* Re: [PATCH -net-2.6] ll_temac: Fix missing iounmaps
From: David Miller @ 2010-07-07 21:48 UTC (permalink / raw)
To: dkirjanov; +Cc: john.linn, brian.hill, netdev
In-Reply-To: <20100706074420.GA15451@hera.kernel.org>
From: Denis Kirjanov <dkirjanov@kernel.org>
Date: Tue, 6 Jul 2010 07:44:20 +0000
> Fix missing iounmaps.
>
> Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Applied, thanks.
^ permalink raw reply
* Re: Possible bug in net/ipv4/route.c?
From: David Miller @ 2010-07-07 21:46 UTC (permalink / raw)
To: herbert
Cc: gjin, shemminger, skavy, linux-kernel, gren, msezgin, silgen,
netdev
In-Reply-To: <20100706072928.GB14612@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Tue, 6 Jul 2010 15:29:28 +0800
> bridge: Clear IPCB before possible entry into IP stack
>
> The bridge protocol lives dangerously by having incestuous relations
> with the IP stack. In this instance an abomination has been created
> where a bogus IPCB area from a bridged packet leads to a crash in
> the IP stack because it's interpreted as IP options.
>
> This patch papers over the problem by clearing the IPCB area in that
> particular spot. To fix this properly we'd also need to parse any
> IP options if present but I'm way too lazy for that.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied, thanks a lot!
^ permalink raw reply
* [PATCH 14/18] irda/irnet: use noop_llseek
From: Arnd Bergmann @ 2010-07-07 21:40 UTC (permalink / raw)
To: linux-kernel
Cc: John Kacur, Frederic Weisbecker, Arnd Bergmann, Christoph Hellwig,
Samuel Ortiz, netdev
In-Reply-To: <1278538820-1392-1-git-send-email-arnd@arndb.de>
There may be applications trying to seek
on the irnet character device, so we should
use noop_llseek to avoid returning an error
when the default llseek changes to no_llseek.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org
---
net/irda/irnet/irnet_ppp.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/irda/irnet/irnet_ppp.h b/net/irda/irnet/irnet_ppp.h
index b5df241..7b9949e 100644
--- a/net/irda/irnet/irnet_ppp.h
+++ b/net/irda/irnet/irnet_ppp.h
@@ -104,6 +104,7 @@ static const struct file_operations irnet_device_fops =
.unlocked_ioctl = dev_irnet_ioctl,
.open = dev_irnet_open,
.release = dev_irnet_close
+ .llseek = noop_llseek,
/* Also : llseek, readdir, mmap, flush, fsync, fasync, lock, readv, writev */
};
--
1.7.1
^ permalink raw reply related
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