mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kamal Mostafa <kamal@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	kernel-team@lists.ubuntu.com
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Cong Wang <cwang@twopensource.com>,
	"David S. Miller" <davem@davemloft.net>,
	Kamal Mostafa <kamal@canonical.com>
Subject: [PATCH 3.8 03/86] ipv4: Fix runtime WARNING in rtmsg_ifa()
Date: Tue,  1 Apr 2014 09:07:16 -0700	[thread overview]
Message-ID: <1396368519-12728-4-git-send-email-kamal@canonical.com> (raw)
In-Reply-To: <1396368519-12728-1-git-send-email-kamal@canonical.com>

3.8.13.21 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Geert Uytterhoeven <geert@linux-m68k.org>

[ Upstream commit 63b5f152eb4a5bb79b9caf7ec37b4201d12f6e66 ]

On m68k/ARAnyM:

WARNING: CPU: 0 PID: 407 at net/ipv4/devinet.c:1599 0x316a99()
Modules linked in:
CPU: 0 PID: 407 Comm: ifconfig Not tainted
3.13.0-atari-09263-g0c71d68014d1 #1378
Stack from 10c4fdf0:
        10c4fdf0 002ffabb 000243e8 00000000 008ced6c 00024416 00316a99 0000063f
        00316a99 00000009 00000000 002501b4 00316a99 0000063f c0a86117 00000080
        c0a86117 00ad0c90 00250a5a 00000014 00ad0c90 00000000 00000000 00000001
        00b02dd0 00356594 00000000 00356594 c0a86117 eff6c9e4 008ced6c 00000002
        008ced60 0024f9b4 00250b52 00ad0c90 00000000 00000000 00252390 00ad0c90
        eff6c9e4 0000004f 00000000 00000000 eff6c9e4 8000e25c eff6c9e4 80001020
Call Trace: [<000243e8>] warn_slowpath_common+0x52/0x6c
 [<00024416>] warn_slowpath_null+0x14/0x1a
 [<002501b4>] rtmsg_ifa+0xdc/0xf0
 [<00250a5a>] __inet_insert_ifa+0xd6/0x1c2
 [<0024f9b4>] inet_abc_len+0x0/0x42
 [<00250b52>] inet_insert_ifa+0xc/0x12
 [<00252390>] devinet_ioctl+0x2ae/0x5d6

Adding some debugging code reveals that net_fill_ifaddr() fails in

    put_cacheinfo(skb, ifa->ifa_cstamp, ifa->ifa_tstamp,
                              preferred, valid))

nla_put complains:

    lib/nlattr.c:454: skb_tailroom(skb) = 12, nla_total_size(attrlen) = 20

Apparently commit 5c766d642bcaffd0c2a5b354db2068515b3846cf ("ipv4:
introduce address lifetime") forgot to take into account the addition of
struct ifa_cacheinfo in inet_nlmsg_size(). Hence add it, like is already
done for ipv6.

Suggested-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 net/ipv4/devinet.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index a8e4f26..1b35f0d 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1243,7 +1243,8 @@ static size_t inet_nlmsg_size(void)
 	       + nla_total_size(4) /* IFA_ADDRESS */
 	       + nla_total_size(4) /* IFA_LOCAL */
 	       + nla_total_size(4) /* IFA_BROADCAST */
-	       + nla_total_size(IFNAMSIZ); /* IFA_LABEL */
+	       + nla_total_size(IFNAMSIZ) /* IFA_LABEL */
+	       + nla_total_size(sizeof(struct ifa_cacheinfo)); /* IFA_CACHEINFO */
 }
 
 static int inet_fill_ifaddr(struct sk_buff *skb, struct in_ifaddr *ifa,
-- 
1.8.3.2


  parent reply	other threads:[~2014-04-01 16:09 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 16:07 [3.8.y.z extended stable] Linux 3.8.13.21 stable review Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 01/86] 6lowpan: fix lockdep splats Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 02/86] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers Kamal Mostafa
2014-04-01 16:07 ` Kamal Mostafa [this message]
2014-04-01 16:07 ` [PATCH 3.8 04/86] net: fix 'ip rule' iif/oif device rename Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 05/86] net: qmi_wwan: add Netgear Aircard 340U Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 06/86] tcp: tsq: fix nonagle handling Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 07/86] tg3: Fix deadlock in tg3_change_mtu() Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 08/86] net: asix: add missing flag to struct driver_info Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 09/86] bonding: 802.3ad: make aggregator_identifier bond-private Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 10/86] ipv4: fix counter in_slow_tot Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 11/86] net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 12/86] net: add and use skb_gso_transport_seglen() Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 13/86] net: core: introduce netif_skb_dev_features Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 14/86] net: ip, ipv6: handle gso skbs in forwarding path Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 15/86] net: use __GFP_NORETRY for high order allocations Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 16/86] net-tcp: fastopen: fix " Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 17/86] virtio-net: alloc big buffers also when guest can receive UFO Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 18/86] ipv6: reuse ip6_frag_id from ip6_ufo_append_data Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 19/86] sfc: check for NULL efx->ptp_data in efx_ptp_event Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 20/86] ipv6: ipv6_find_hdr restore prev functionality Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 21/86] tg3: Don't check undefined error bits in RXBD Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 22/86] net: sctp: fix sctp_sf_do_5_1D_ce to verify if we/peer is AUTH capable Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 23/86] mac80211: send control port protocol frames to the VO queue Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 24/86] mac80211: fix AP powersave TX vs. wakeup race Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 25/86] iwlwifi: dvm: clear IWL_STA_UCODE_INPROGRESS when assoc fails Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 26/86] ath9k: protect tid->sched check Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 27/86] ath9k: Fix ETSI compliance for AR9462 2.0 Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 28/86] iwlwifi: fix TX status for aggregated packets Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 29/86] genirq: Remove racy waitqueue_active check Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 30/86] sched: Fix double normalization of vruntime Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 31/86] cpuset: fix a race condition in __cpuset_node_allowed_softwall() Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 32/86] mac80211: fix association to 20/40 MHz VHT networks Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 33/86] firewire: net: fix use after free Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 34/86] mwifiex: do not advertise usb autosuspend support Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 35/86] ACPI / resources: ignore invalid ACPI device resources Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 36/86] NFS: Fix a delegation callback race Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 37/86] ALSA: hda - Added inverted digital-mic handling for Acer TravelMate 8371 Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 38/86] can: flexcan: fix shutdown: first disable chip, then all interrupts Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 39/86] can: flexcan: flexcan_open(): fix error path if flexcan_chip_start() fails Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 40/86] can: flexcan: fix transition from and to low power mode in chip_{en,dis}able Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 41/86] can: flexcan: flexcan_remove(): add missing netif_napi_del() Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 42/86] tracing: Do not add event files for modules that fail tracepoints Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 43/86] ocfs2: fix quota file corruption Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 44/86] rapidio/tsi721: fix tasklet termination in dma channel release Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 45/86] spi: coldfire-qspi: Fix getting correct address for *mcfqspi Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 46/86] ALSA: usb-audio: Add quirk for Logitech Webcam C500 Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 47/86] drm/radeon: TTM must be init with cpu-visible VRAM, v2 Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 48/86] drm/radeon/atom: select the proper number of lanes in transmitter setup Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 49/86] powerpc: Align p_dyn, p_rela and p_st symbols Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 50/86] libata: add ATA_HORKAGE_BROKEN_FPDMA_AA quirk for Seagate Momentus SpinPoint M8 (2BA30001) Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 51/86] usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 52/86] usb: Make DELAY_INIT quirk wait 100ms between Get Configuration requests Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 53/86] ARM: fix noMMU kallsyms symbol filtering Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 54/86] ARM: 7991/1: sa1100: fix compile problem on Collie Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 55/86] x86: Ignore NMIs that come in during early boot Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 56/86] x86: fix compile error due to X86_TRAP_NMI use in asm files Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 57/86] ASoC: pcm: free path list before exiting from error conditions Kamal Mostafa
2014-04-03 15:57   ` Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 58/86] mac80211: clear sequence/fragment number in QoS-null frames Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 59/86] mwifiex: copy AP's HT capability info correctly Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 60/86] net: unix socket code abuses csum_partial Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 61/86] ibmveth: Fix endian issues with MAC addresses Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 62/86] [SCSI] isci: fix reset timeout handling Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 63/86] [SCSI] isci: correct erroneous for_each_isci_host macro Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 64/86] [SCSI] qla2xxx: Poll during initialization for ISP25xx and ISP83xx Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 65/86] ocfs2 syncs the wrong range Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 66/86] mm/compaction: break out of loop on !PageBuddy in isolate_freepages_block Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 67/86] fs/proc/base.c: fix GPF in /proc/$PID/map_files Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 68/86] vmxnet3: fix netpoll race condition Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 69/86] [SCSI] storvsc: NULL pointer dereference fix Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 70/86] KVM: SVM: fix cr8 intercept window Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 71/86] drm/ttm: don't oops if no invalidate_caches() Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 72/86] vmxnet3: fix building without CONFIG_PCI_MSI Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 73/86] i2c: Remove usage of orphaned symbol OF_I2C Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 74/86] x86/amd/numa: Fix northbridge quirk to assign correct NUMA node Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 75/86] ipc: Fix 2 bugs in msgrcv() MSG_COPY implementation Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 76/86] drm/i915: Disable stolen memory when DMAR is active Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 77/86] ALSA: compress: Pass through return value of open ops callback Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 78/86] i2c: cpm: Fix build by adding of_address.h and of_irq.h Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 79/86] net: mvneta: rename MVNETA_GMAC2_PSC_ENABLE to MVNETA_GMAC2_PCS_ENABLE Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 80/86] Input: synaptics - add manual min/max quirk Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 81/86] Input: synaptics - add manual min/max quirk for ThinkPad X240 Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 82/86] x86: fix boot on uniprocessor systems Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 83/86] Input: mousedev - fix race when creating mixed device Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 84/86] staging: speakup: Prefix externally-visible symbols Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 85/86] ext4: atomically set inode->i_flags in ext4_set_inode_flags() Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 86/86] ioat: fix tasklet tear down Kamal Mostafa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396368519-12728-4-git-send-email-kamal@canonical.com \
    --to=kamal@canonical.com \
    --cc=cwang@twopensource.com \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®