patch "vmbus: don't return values for uninitalized channels" added to char-misc-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
vmbus: don't return values for uninitalized channels
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
6712cc9c22117a8af9f3df272b4a44fd2e4201cdMon Sep 17 00:00:00 2001
From: Stephen Hemminger <[email protected]>
Date: Mon, 20 Aug 2018 21:16:40 +0000
Subject: vmbus: don't return values for uninitalized channels
For unsupported device types, the vmbus channel ringbuffer is never initialized, and therefore reading the sysfs files will return garbage or cause a kernel OOPS.
--- drivers/hv/vmbus_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/hv/vmbus_drv.c +3 -0
@@ -1291,6 +1291,9 @@ static ssize_t vmbus_chan_attr_show(struct kobject *kobj,if (!attribute->show)return -EIO ; +if (chan->state !=CHANNEL_OPENED_STATE ) +return -EINVAL ; +return attribute->show (chan, buf); }
Signature · 1 line
2.18.0