All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: stable@vger.kernel.org
Cc: Oliver Hartkopp <socketcan@hartkopp.net>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Jiri Slaby <jslaby@suse.cz>
Subject: [patch added to 3.12-stable] can: fix handling of unmodifiable configuration options fix
Date: Thu, 18 Aug 2016 14:49:08 +0200	[thread overview]
Message-ID: <20160818124953.31969-3-jslaby@suse.cz> (raw)
In-Reply-To: <20160818124953.31969-1-jslaby@suse.cz>

From: Oliver Hartkopp <socketcan@hartkopp.net>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit bce271f255dae8335dc4d2ee2c4531e09cc67f5a upstream.

With upstream commit bb208f144cf3f59 (can: fix handling of unmodifiable
configuration options) a new can_validate() function was introduced.

When invoking 'ip link set can0 type can' without any configuration data
can_validate() tries to validate the content without taking into account that
there's totally no content. This patch adds a check for missing content.

Reported-by: ajneu <ajneu1@gmail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/net/can/dev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index f66aeb79abdf..3c1a7f8211be 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -644,6 +644,9 @@ static int can_changelink(struct net_device *dev,
 	/* We need synchronization with dev->stop() */
 	ASSERT_RTNL();
 
+	if (!data)
+		return 0;
+
 	if (data[IFLA_CAN_CTRLMODE]) {
 		struct can_ctrlmode *cm;
 
-- 
2.9.3


  parent reply	other threads:[~2016-08-18 12:49 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-18 12:49 [patch added to 3.12-stable] x86, asmlinkage, lguest: Pass in globals into assembler statement Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] can: at91_can: RX queue could get stuck at high bus load Jiri Slaby
2016-08-18 12:49 ` Jiri Slaby [this message]
2016-08-18 12:49 ` [patch added to 3.12-stable] can: fix oops caused by wrong rtnl dellink usage Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] ipr: Clear interrupt on croc/crocodile when running with LSI Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] net: mvneta: set real interrupt per packet for tx_done Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] random32: add prandom_u32_max and convert open coded users Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] tcp: make challenge acks less predictable Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] net/irda: fix NULL pointer dereference on memory allocation failure Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] tcp: consider recv buf for the initial window scale Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] MIPS: KVM: Fix mapped fault broken commpage handling Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] MIPS: KVM: Add missing gfn range check Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] MIPS: KVM: Fix gfn range check in kseg0 tlb faults Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] MIPS: KVM: Propagate kseg0/mapped tlb fault errors Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] HID: i2c-hid: set power sleep before shutdown Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] HID: multitouch: Add MT_QUIRK_NOT_SEEN_MEANS_UP to Surface Pro 3 Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] x86/mm: Improve switch_mm() barrier comments Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] arm: oabi compat: add missing access checks Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] KEYS: 64-bit MIPS needs to use compat_sys_keyctl for 32-bit userspace Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] apparmor: fix ref count leak when profile sha1 hash is read Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] block: fix use-after-free in seq file Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] sysv, ipc: fix security-layer leaking Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] fuse: fix wrong assignment of ->flags in fuse_send_init() Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] crypto: gcm - Filter out async ghash if necessary Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] crypto: scatterwalk - Fix test in scatterwalk_done Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] ext4: check for extents that wrap around Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] ext4: fix deadlock during page writeback Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] ext4: don't call ext4_should_journal_data() on the journal inode Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] ext4: short-cut orphan cleanup on error Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] ext4: fix reference counting bug on block allocation error Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] usb: renesas_usbhs: protect the CFIFOSEL setting in usbhsg_ep_enable() Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] USB: serial: option: add support for Telit LE910 PID 0x1206 Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] gpio: pca953x: Fix NBANK calculation for PCA9536 Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] s5p-mfc: Set device name for reserved memory region devs Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] s5p-mfc: Add release callback for " Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] Bluetooth: Fix l2cap_sock_setsockopt() with optname BT_RCVMTU Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] cifs: Check for existing directory when opening file with O_CREAT Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] cifs: fix crash due to race in hmac(md5) handling Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] CIFS: Fix a possible invalid memory access in smb2_query_symlink() Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] random: properly align get_random_int_hash Jiri Slaby
2016-08-19  3:14   ` Eric Biggers
2016-08-19  7:07     ` Jiri Slaby
2016-08-18 12:49 ` [patch added to 3.12-stable] nfs: don't create zero-length requests Jiri Slaby

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=20160818124953.31969-3-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=mkl@pengutronix.de \
    --cc=socketcan@hartkopp.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.