* [PATCH 07/25] tty: mips_ejtag_fdc: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_port_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/tty/mips_ejtag_fdc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c
index 4c1cd49..33e06b4 100644
--- a/drivers/tty/mips_ejtag_fdc.c
+++ b/drivers/tty/mips_ejtag_fdc.c
@@ -763,7 +763,9 @@ static int mips_ejtag_fdc_tty_install(struct tty_driver *driver,
struct mips_ejtag_fdc_tty *priv = driver->driver_state;
tty->driver_data = &priv->ports[tty->index];
- return tty_port_install(&priv->ports[tty->index].port, driver, tty);
+ tty_port_install(&priv->ports[tty->index].port, driver, tty);
+
+ return 0;
}
static int mips_ejtag_fdc_tty_open(struct tty_struct *tty, struct file *filp)
--
2.7.4
^ permalink raw reply related
* [PATCH 08/25] tty: n_gsm: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_port_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/tty/n_gsm.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 86b7e20..c52fa2d 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -2917,7 +2917,6 @@ static int gsmtty_install(struct tty_driver *driver, struct tty_struct *tty)
unsigned int line = tty->index;
unsigned int mux = line >> 6;
bool alloc = false;
- int ret;
line = line & 0x3F;
@@ -2949,14 +2948,8 @@ static int gsmtty_install(struct tty_driver *driver, struct tty_struct *tty)
mutex_unlock(&gsm->mutex);
return -ENOMEM;
}
- ret = tty_port_install(&dlci->port, driver, tty);
- if (ret) {
- if (alloc)
- dlci_put(dlci);
- mutex_unlock(&gsm->mutex);
- return ret;
- }
+ tty_port_install(&dlci->port, driver, tty);
dlci_get(dlci);
dlci_get(gsm->dlci[0]);
mux_get(gsm);
--
2.7.4
^ permalink raw reply related
* [PATCH 09/25] tty: serial: kgdb_nmi: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_port_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/tty/serial/kgdb_nmi.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c
index 4029272..ed8f806 100644
--- a/drivers/tty/serial/kgdb_nmi.c
+++ b/drivers/tty/serial/kgdb_nmi.c
@@ -234,7 +234,6 @@ static const struct tty_port_operations kgdb_nmi_tty_port_ops = {
static int kgdb_nmi_tty_install(struct tty_driver *drv, struct tty_struct *tty)
{
struct kgdb_nmi_tty_priv *priv;
- int ret;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv)
@@ -245,17 +244,9 @@ static int kgdb_nmi_tty_install(struct tty_driver *drv, struct tty_struct *tty)
tty_port_init(&priv->port);
priv->port.ops = &kgdb_nmi_tty_port_ops;
tty->driver_data = priv;
+ tty_port_install(&priv->port, drv, tty);
- ret = tty_port_install(&priv->port, drv, tty);
- if (ret) {
- pr_err("%s: can't install tty port: %d\n", __func__, ret);
- goto err;
- }
return 0;
-err:
- tty_port_destroy(&priv->port);
- kfree(priv);
- return ret;
}
static void kgdb_nmi_tty_cleanup(struct tty_struct *tty)
--
2.7.4
^ permalink raw reply related
* [PATCH 10/25] tty: synclink: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_port_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/tty/synclink.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
index fbdf4d0..6e7e4d6 100644
--- a/drivers/tty/synclink.c
+++ b/drivers/tty/synclink.c
@@ -3355,8 +3355,9 @@ static int mgsl_install(struct tty_driver *driver, struct tty_struct *tty)
if (mgsl_paranoia_check(info, tty->name, "mgsl_open"))
return -ENODEV;
tty->driver_data = info;
+ tty_port_install(&info->port, driver, tty);
- return tty_port_install(&info->port, driver, tty);
+ return 0;
}
/* mgsl_open()
--
2.7.4
^ permalink raw reply related
* [PATCH 11/25] tty: synclinkmp: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_port_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/tty/synclinkmp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
index 1e4d5b9..2d99a5b 100644
--- a/drivers/tty/synclinkmp.c
+++ b/drivers/tty/synclinkmp.c
@@ -734,8 +734,9 @@ static int install(struct tty_driver *driver, struct tty_struct *tty)
}
tty->driver_data = info;
+ tty_port_install(&info->port, driver, tty);
- return tty_port_install(&info->port, driver, tty);
+ return 0;
}
/* Called when a port is opened. Init and enable port.
--
2.7.4
^ permalink raw reply related
* [PATCH 12/25] tty: vt: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_port_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/tty/vt/vt.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 5f1183b..cc72254 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3222,10 +3222,7 @@ static int con_install(struct tty_driver *driver, struct tty_struct *tty)
goto unlock;
}
- ret = tty_port_install(&vc->port, driver, tty);
- if (ret)
- goto unlock;
-
+ tty_port_install(&vc->port, driver, tty);
tty->driver_data = vc;
vc->port.tty = tty;
--
2.7.4
^ permalink raw reply related
* [PATCH 13/25] usb: xhci: dbc: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_port_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/usb/host/xhci-dbgtty.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-dbgtty.c b/drivers/usb/host/xhci-dbgtty.c
index aff79ff..18d661c 100644
--- a/drivers/usb/host/xhci-dbgtty.c
+++ b/drivers/usb/host/xhci-dbgtty.c
@@ -174,8 +174,9 @@ static int dbc_tty_install(struct tty_driver *driver, struct tty_struct *tty)
struct dbc_port *port = driver->driver_state;
tty->driver_data = port;
+ tty_port_install(&port->port, driver, tty);
- return tty_port_install(&port->port, driver, tty);
+ return 0;
}
static int dbc_tty_open(struct tty_struct *tty, struct file *file)
--
2.7.4
^ permalink raw reply related
* [PATCH 14/25] Bluetooth: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_port_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
net/bluetooth/rfcomm/tty.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index 5e44d84..b654420 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -710,7 +710,6 @@ static int rfcomm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
{
struct rfcomm_dev *dev;
struct rfcomm_dlc *dlc;
- int err;
dev = rfcomm_dev_get(tty->index);
if (!dev)
@@ -725,11 +724,7 @@ static int rfcomm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
set_bit(RFCOMM_TTY_ATTACHED, &dev->flags);
/* install the tty_port */
- err = tty_port_install(&dev->port, driver, tty);
- if (err) {
- rfcomm_tty_cleanup(tty);
- return err;
- }
+ tty_port_install(&dev->port, driver, tty);
/* take over the tty_port reference if the port was created with the
* flag RFCOMM_RELEASE_ONHUP. This will force the release of the port
--
2.7.4
^ permalink raw reply related
* [PATCH 16/25] isdn: capi: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_standard_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/isdn/capi/capi.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index ef5560b..08daf3a 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -999,13 +999,11 @@ static int
capinc_tty_install(struct tty_driver *driver, struct tty_struct *tty)
{
struct capiminor *mp = capiminor_get(tty->index);
- int ret = tty_standard_install(driver, tty);
- if (ret == 0)
- tty->driver_data = mp;
- else
- capiminor_put(mp);
- return ret;
+ tty_standard_install(driver, tty);
+ tty->driver_data = mp;
+
+ return 0;
}
static void capinc_tty_cleanup(struct tty_struct *tty)
--
2.7.4
^ permalink raw reply related
* [PATCH 19/25] staging: fwserial: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_standard_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/staging/fwserial/fwserial.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index fa0dd42..5134019 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -1064,27 +1064,21 @@ static void fwtty_cleanup(struct tty_struct *tty)
static int fwtty_install(struct tty_driver *driver, struct tty_struct *tty)
{
struct fwtty_port *port = fwtty_port_get(tty->index);
- int err;
- err = tty_standard_install(driver, tty);
- if (!err)
- tty->driver_data = port;
- else
- fwtty_port_put(port);
- return err;
+ tty_standard_install(driver, tty);
+ tty->driver_data = port;
+
+ return 0;
}
static int fwloop_install(struct tty_driver *driver, struct tty_struct *tty)
{
struct fwtty_port *port = fwtty_port_get(table_idx(tty->index));
- int err;
- err = tty_standard_install(driver, tty);
- if (!err)
- tty->driver_data = port;
- else
- fwtty_port_put(port);
- return err;
+ tty_standard_install(driver, tty);
+ tty->driver_data = port;
+
+ return 0;
}
static int fwtty_write(struct tty_struct *tty, const unsigned char *buf, int c)
--
2.7.4
^ permalink raw reply related
* [PATCH 20/25] staging: gdm724x: gdm_tty: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_standard_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/staging/gdm724x/gdm_tty.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
index 6e81369..d6348df 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -62,6 +62,7 @@ static int gdm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
return -ENODEV;
mutex_lock(&gdm_table_lock);
+
gdm = gdm_table[ret][tty->index];
if (!gdm) {
mutex_unlock(&gdm_table_lock);
@@ -69,15 +70,9 @@ static int gdm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
}
tty_port_get(&gdm->port);
-
- ret = tty_standard_install(driver, tty);
- if (ret) {
- tty_port_put(&gdm->port);
- mutex_unlock(&gdm_table_lock);
- return ret;
- }
-
+ tty_standard_install(driver, tty);
tty->driver_data = gdm;
+
mutex_unlock(&gdm_table_lock);
return 0;
--
2.7.4
^ permalink raw reply related
* [PATCH 22/25] tty: nozomi: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_standard_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/tty/nozomi.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index fed820e..479583d 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
@@ -1555,13 +1555,11 @@ static int ntty_install(struct tty_driver *driver, struct tty_struct *tty)
{
struct port *port = get_port_by_tty(tty);
struct nozomi *dc = get_dc_by_tty(tty);
- int ret;
if (!port || !dc || dc->state != NOZOMI_STATE_READY)
return -ENODEV;
- ret = tty_standard_install(driver, tty);
- if (ret == 0)
- tty->driver_data = port;
- return ret;
+ tty_standard_install(driver, tty);
+ tty->driver_data = port;
+ return 0;
}
static void ntty_cleanup(struct tty_struct *tty)
--
2.7.4
^ permalink raw reply related
* [PATCH 24/25] usb: cdc-acm: Change return type to void
From: Jaejoong Kim @ 2018-09-04 2:44 UTC (permalink / raw)
To: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel
Cc: Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Since tty_standard_install() always returns 0, the return type has changed
to void. Now apply this and remove the obsolete error check.
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
---
drivers/usb/class/cdc-acm.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 27346d6..de6a27e 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -572,23 +572,15 @@ static void acm_softint(struct work_struct *work)
static int acm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
{
struct acm *acm;
- int retval;
acm = acm_get_by_minor(tty->index);
if (!acm)
return -ENODEV;
- retval = tty_standard_install(driver, tty);
- if (retval)
- goto error_init_termios;
-
+ tty_standard_install(driver, tty);
tty->driver_data = acm;
return 0;
-
-error_init_termios:
- tty_port_put(&acm->port);
- return retval;
}
static int acm_tty_open(struct tty_struct *tty, struct file *filp)
--
2.7.4
^ permalink raw reply related
* Re: [PATCH] vhost: fix VHOST_GET_BACKEND_FEATURES ioctl request definition
From: Jason Wang @ 2018-09-04 3:08 UTC (permalink / raw)
To: Michael S. Tsirkin, Gleb Fotengauer-Malinovskiy
Cc: David S. Miller, kvm, virtualization, netdev, linux-kernel
In-Reply-To: <20180903222127-mutt-send-email-mst@kernel.org>
On 2018年09月04日 10:22, Michael S. Tsirkin wrote:
> On Mon, Sep 03, 2018 at 08:59:13PM +0300, Gleb Fotengauer-Malinovskiy wrote:
>> The _IOC_READ flag fits this ioctl request more because this request
>> actually only writes to, but doesn't read from userspace.
>> See NOTEs in include/uapi/asm-generic/ioctl.h for more information.
>>
>> Fixes: 429711aec282 ("vhost: switch to use new message format")
>> Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
> Hmm it does make sense, and it's not too late to fix this up.
> Jason, what's your take on this? Was _IOW intentional?
My bad, not intentional. And I agree that fixing this is not too late.
So
Acked-by: Jason Wang <jasowang@redhat.com>
>
>> ---
>> include/uapi/linux/vhost.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h
>> index b1e22c40c4b6..84c3de89696a 100644
>> --- a/include/uapi/linux/vhost.h
>> +++ b/include/uapi/linux/vhost.h
>> @@ -176,7 +176,7 @@ struct vhost_memory {
>> #define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
>>
>> #define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
>> -#define VHOST_GET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x26, __u64)
>> +#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
>>
>> /* VHOST_NET specific defines */
>>
>>
>> --
>> glebfm
^ permalink raw reply
* Re: [PATCH] vhost: fix VHOST_GET_BACKEND_FEATURES ioctl request definition
From: Michael S. Tsirkin @ 2018-09-04 3:11 UTC (permalink / raw)
To: Jason Wang
Cc: Gleb Fotengauer-Malinovskiy, David S. Miller, kvm, virtualization,
netdev, linux-kernel
In-Reply-To: <a9ea89ac-4816-96a1-7de4-caf9884da876@redhat.com>
On Tue, Sep 04, 2018 at 11:08:40AM +0800, Jason Wang wrote:
>
>
> On 2018年09月04日 10:22, Michael S. Tsirkin wrote:
> > On Mon, Sep 03, 2018 at 08:59:13PM +0300, Gleb Fotengauer-Malinovskiy wrote:
> > > The _IOC_READ flag fits this ioctl request more because this request
> > > actually only writes to, but doesn't read from userspace.
> > > See NOTEs in include/uapi/asm-generic/ioctl.h for more information.
> > >
> > > Fixes: 429711aec282 ("vhost: switch to use new message format")
> > > Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
> > Hmm it does make sense, and it's not too late to fix this up.
> > Jason, what's your take on this? Was _IOW intentional?
>
> My bad, not intentional. And I agree that fixing this is not too late.
>
> So
>
> Acked-by: Jason Wang <jasowang@redhat.com>
OK then
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> >
> > > ---
> > > include/uapi/linux/vhost.h | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h
> > > index b1e22c40c4b6..84c3de89696a 100644
> > > --- a/include/uapi/linux/vhost.h
> > > +++ b/include/uapi/linux/vhost.h
> > > @@ -176,7 +176,7 @@ struct vhost_memory {
> > > #define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
> > > #define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
> > > -#define VHOST_GET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x26, __u64)
> > > +#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
> > > /* VHOST_NET specific defines */
> > >
> > > --
> > > glebfm
^ permalink raw reply
* Re: [PATCH net-next v1 3/5] ipv4: enable IFA_IF_NETNSID for RTM_GETADDR
From: David Ahern @ 2018-09-04 3:11 UTC (permalink / raw)
To: Christian Brauner, netdev, linux-kernel
Cc: davem, kuznet, yoshfuji, pombredanne, kstewart, gregkh, fw,
ktkhai, lucien.xin, jakub.kicinski, jbenc, nicolas.dichtel
In-Reply-To: <20180903043717.20136-4-christian@brauner.io>
On 9/2/18 10:37 PM, Christian Brauner wrote:
> - Backwards Compatibility:
> If userspace wants to determine whether ipv4 RTM_GETADDR requests support
> the new IFA_IF_NETNSID property they should verify that the reply after
> sending a request includes the IFA_IF_NETNSID property. If it does not
> userspace should assume that IFA_IF_NETNSID is not supported for ipv4
> RTM_GETADDR requests on this kernel.
Can only use it once per message type, but NLM_F_DUMP_FILTERED is a flag
that can be set to explicitly say the request is filtered as requested.
See 21fdd092acc7e. I would like to see other filters added for addresses
in the same release this gets used. The only one that comes to mind for
addresses is to only return addresses for devices with master device
index N (same intent as 21fdd092acc7e for neighbors).
^ permalink raw reply
* Re: [PATCH net-next v2 1/2] netlink: ipv4 igmp join notifications
From: Roopa Prabhu @ 2018-09-03 23:12 UTC (permalink / raw)
To: Patrick Ruddy; +Cc: netdev, Jiří Pírko, Stephen Hemminger
In-Reply-To: <4d4b3f2c67df3d77c16994a24a306ad086612420.camel@vyatta.att-mail.com>
On Sun, Sep 2, 2018 at 4:18 AM, Patrick Ruddy
<pruddy@vyatta.att-mail.com> wrote:
> Hi Roopa
>
> inline
>
> thx
>
> -pr
>
> On Fri, 2018-08-31 at 09:29 -0700, Roopa Prabhu wrote:
>> On Fri, Aug 31, 2018 at 4:20 AM, Patrick Ruddy
>> <pruddy@vyatta.att-mail.com> wrote:
>> > Some userspace applications need to know about IGMP joins from the kernel
>> > for 2 reasons
>> > 1. To allow the programming of multicast MAC filters in hardware
>> > 2. To form a multicast FORUS list for non link-local multicast
>> > groups to be sent to the kernel and from there to the interested
>> > party.
>> > (1) can be fulfilled but simply sending the hardware multicast MAC
>> > address to be programmed but (2) requires the L3 address to be sent
>> > since this cannot be constructed from the MAC address whereas the
>> > reverse translation is a standard library function.
>> >
>> > This commit provides addition and deletion of multicast addresses
>> > using the RTM_NEWADDR and RTM_DELADDR messages. It also provides
>> > the RTM_GETADDR extension to allow multicast join state to be read
>> > from the kernel.
>> >
>> > Signed-off-by: Patrick Ruddy <pruddy@vyatta.att-mail.com>
>> > ---
>> > v2: fix kbuild warnings.
>>
>> I am still going through the series, but AFAICT, user-space caches listening to
>> RTNLGRP_IPV4_IFADDR will now also get multicast addresses by default ?
>>
>
> Yes that's the crux of this change. It's unfortunate that I could not
> use IFA_MULTICAST to distinguish the SAFI. I suppose the other option
> would be to create a set of new NEW/DEL/GETMULTICAST messages but the
> partial code for RTM_GETMULTICAST in ipv6/mcast.c complicates that
> slightly. Happy to look at it if you think that would be be better.
>
yeah, true. Thinking about this some more, you are adding an interface
for multicast entries learnt via igmp.
There is already a netlink channel for layer2 mc addresses via igmp. I
can't see why that cannot be used.
It is RTM_*MDB msgs. It is currently only available for the bridge.
But, I have a requirement for it to be
available via a vxlan dev...so, I am looking at making it available on
other devices.
Can you check if RTM_*MDB msgs can be made to work for your case ?.
The reason I think it should be possible is because this is similar to
bridge fdb entries.
The bridge fdb api (RTM_NEWNEIGH with AF_BRIDGE) is overloaded to
notify and dump netdev unicast addresses.
similarly I think the mdb api can be overloaded to notify and dump
netdev multicast addresses (statically added or learnt via igmp)
^ permalink raw reply
* Re: [PATCH] net: ipv6: route: Fix a sleep-in-atomic-context bug in ip6_convert_metrics()
From: Jia-Ju Bai @ 2018-09-04 3:38 UTC (permalink / raw)
To: David Ahern, davem, kuznet, yoshfuji; +Cc: netdev, linux-kernel
In-Reply-To: <94b1372d-43da-1a9a-9cde-40c855050552@gmail.com>
On 2018/9/4 10:40, David Ahern wrote:
> On 9/1/18 5:19 AM, Jia-Ju Bai wrote:
>> The kernel module may sleep with holding a spinlock.
>>
>> The function call paths (from bottom to top) in Linux-4.16 are:
>>
>> [FUNC] kzalloc(GFP_KERNEL)
>> net/ipv6/route.c, 2430:
>> kzalloc in ip6_convert_metrics
>> net/ipv6/route.c, 2890:
>> ip6_convert_metrics in ip6_route_add
>> net/ipv6/addrconf.c, 2322:
>> ip6_route_add in addrconf_prefix_route
>> net/ipv6/addrconf.c, 3331:
>> addrconf_prefix_route in fixup_permanent_addr
>> net/ipv6/addrconf.c, 3354:
>> fixup_permanent_addr in addrconf_permanent_addr
>> net/ipv6/addrconf.c, 3358:
>> _raw_write_lock_bh in addrconf_permanent_addr
>>
>> To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC.
>>
>> This bug is found by my static analysis tool DSAC.
> No kernel change is needed. Your static analysis tool and you in sending
> out patches need to take into context.
>
> ip6_convert_metrics only calls kzalloc when fc_mx is set. fc_mx is only
> set via the RTA_METRICS attribute and only from the userspace call path.
> Hence, kzalloc with GFP_KERNEL is the appropriate argument.
Oh, sorry for my false report.
Best wishes,
Jia-Ju Bai
^ permalink raw reply
* RE: [PATCH 1/4 next] net: lan78xx: Bail out if lan78xx_get_endpoints fails
From: RaghuramChary.Jallipalli @ 2018-09-04 4:20 UTC (permalink / raw)
To: stefan.wahren, Woojung.Huh
Cc: UNGLinuxDriver, davem, netdev, linux-usb, linux-kernel
In-Reply-To: <1535994759-8938-2-git-send-email-stefan.wahren@i2se.com>
> We need to bail out if lan78xx_get_endpoints() fails, otherwise the result is
> overwritten.
>
> Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000
> Ethernet")
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Raghuram Chary Jallipalli <raghuramchary.jallipalli@microchip.com>
Thanks,
-Raghu
^ permalink raw reply
* RE: [PATCH 2/4 next] net: lan78xx: Drop unnecessary strcpy in lan78xx_probe
From: RaghuramChary.Jallipalli @ 2018-09-04 4:22 UTC (permalink / raw)
To: stefan.wahren, Woojung.Huh
Cc: UNGLinuxDriver, davem, netdev, linux-usb, linux-kernel
In-Reply-To: <1535994759-8938-3-git-send-email-stefan.wahren@i2se.com>
> There is no need for this strcpy because alloc_etherdev() already does this
> job.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Raghuram Chary Jallipalli <raghuramchary.jallipalli@microchip.com>
Thanks,
-Raghu
^ permalink raw reply
* Re: [PATCH] vhost: fix VHOST_GET_BACKEND_FEATURES ioctl request definition
From: David Miller @ 2018-09-04 4:23 UTC (permalink / raw)
To: mst; +Cc: jasowang, glebfm, kvm, virtualization, netdev, linux-kernel
In-Reply-To: <20180903231102-mutt-send-email-mst@kernel.org>
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Mon, 3 Sep 2018 23:11:11 -0400
> On Tue, Sep 04, 2018 at 11:08:40AM +0800, Jason Wang wrote:
>>
>>
>> On 2018年09月04日 10:22, Michael S. Tsirkin wrote:
>> > On Mon, Sep 03, 2018 at 08:59:13PM +0300, Gleb Fotengauer-Malinovskiy wrote:
>> > > The _IOC_READ flag fits this ioctl request more because this request
>> > > actually only writes to, but doesn't read from userspace.
>> > > See NOTEs in include/uapi/asm-generic/ioctl.h for more information.
>> > >
>> > > Fixes: 429711aec282 ("vhost: switch to use new message format")
>> > > Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
>> > Hmm it does make sense, and it's not too late to fix this up.
>> > Jason, what's your take on this? Was _IOW intentional?
>>
>> My bad, not intentional. And I agree that fixing this is not too late.
>>
>> So
>>
>> Acked-by: Jason Wang <jasowang@redhat.com>
>
>
> OK then
>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
Applied, thanks everyone.
^ permalink raw reply
* RE: [PATCH 4/4 next] net: lan78xx: Make declaration style consistent
From: RaghuramChary.Jallipalli @ 2018-09-04 4:23 UTC (permalink / raw)
To: stefan.wahren, Woojung.Huh
Cc: UNGLinuxDriver, davem, netdev, linux-usb, linux-kernel
In-Reply-To: <1535994759-8938-5-git-send-email-stefan.wahren@i2se.com>
> This patch makes some declaration more consistent.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Raghuram Chary Jallipalli <raghuramchary.jallipalli@microchip.com>
Thanks,
-Raghu
^ permalink raw reply
* RE: [PATCH 3/4 next] net: lan78xx: Switch to SPDX identifier
From: RaghuramChary.Jallipalli @ 2018-09-04 4:29 UTC (permalink / raw)
To: stefan.wahren, Woojung.Huh
Cc: UNGLinuxDriver, davem, netdev, linux-usb, linux-kernel
In-Reply-To: <1535994759-8938-4-git-send-email-stefan.wahren@i2se.com>
> +// SPDX-License-Identifier: GPL-2.0+
> +/* Copyright (C) 2015 Microchip Technology */
Can we merge both in single comment line?
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/* Copyright (C) 2015 Microchip Technology */
Here too.
Thanks,
-Raghu
^ permalink raw reply
* Re: [PATCH 00/25] Change tty_port(standard)_install's return type
From: Sam Ravnborg @ 2018-09-04 4:42 UTC (permalink / raw)
To: Jaejoong Kim
Cc: linux-um, netdev, linux-mmc, linux-s390, devel, greybus-dev,
linuxppc-dev, linux-serial, sparclinux, linux-usb,
linux-bluetooth, linux-kernel, Greg Kroah-Hartman, Jiri Slaby
In-Reply-To: <1536029091-4426-1-git-send-email-climbbb.kim@gmail.com>
Hi Jaejoong.
> Change return type for tty functions. Patch No.01
> tty: Change return type to void
Adding this patch first will generate a lot of warnings
until all users are updated.
It is usual practice to prepare all users
and then apply the infrastructure changes as the
last patch.
Then people will not see a lot of warnings when
they build something in the middle,
and I guess current stack set may also generate
a few mails from the 0-day build infrastructure.
> isdn: i4l: isdn_tty: Change return type to void
And a nitpick on the patch description.
This patch do not change any return type, but
it ignore the return value og tty_part_install().
Same goes for all ramaining patches.
Sam
^ permalink raw reply
* Re: [PATCH v2] net/ibm/emac: wrong emac_calc_base call was used by typo
From: David Miller @ 2018-09-04 4:51 UTC (permalink / raw)
To: ivan; +Cc: netdev, linux-kernel, chunkeey
In-Reply-To: <20180903072628.19986-1-ivan@de.ibm.com>
From: Ivan Mikhaylov <ivan@de.ibm.com>
Date: Mon, 3 Sep 2018 10:26:28 +0300
> __emac_calc_base_mr1 was used instead of __emac4_calc_base_mr1
> by copy-paste mistake for emac4syn.
>
> Fixes: 45d6e545505fd32edb812f085be7de45b6a5c0af ("net/ibm/emac: add 8192 rx/tx fifo size")
> Signed-off-by: Ivan Mikhaylov <ivan@de.ibm.com>
Applied.
^ 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