[PATCH net-next] net: wan: z85230: drop unused async state

2021-04-07 Thread Johan Hovold
According to the changelog, asynchronous mode was dropped sometime before v2.2. Let's get rid of the unused driver-specific async state as well so that it doesn't show up when doing tree-wide tty work. Signed-off-by: Johan Hovold --- drivers/net/wan/z85

[PATCH net-next] net: cdc_ncm: drop redundant driver-data assignment

2021-03-18 Thread Johan Hovold
The driver data for the data interface has already been set by usb_driver_claim_interface() so drop the subsequent redundant assignment. Note that this also avoids setting the driver data three times in case of a combined interface. Signed-off-by: Johan Hovold --- drivers/net/usb/cdc_ncm.c | 1

[PATCH net] net: cdc-phonet: fix data-interface release on probe failure

2021-03-18 Thread Johan Hovold
ned-off-by: Johan Hovold --- drivers/net/usb/cdc-phonet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c index 02e6bbb17b15..8d1f69dad603 100644 --- a/drivers/net/usb/cdc-phonet.c +++ b/drivers/net/usb/cdc-phonet.c @@ -387,6 +387,8 @@

Re: [patch 1/1] genirq: Disable interrupts for force threaded handlers

2021-03-17 Thread Johan Hovold
before > > invoking the force threaded handler which preserves the regular semantics > > and the usefulness of the interrupt force threading as a general debugging > > tool. > > > > For not RT this is not changing much, except that during the execution of > > the thr

Re: [PATCH v2 1/2] net: usb: qmi_wwan: support ZTE P685M modem

2021-02-09 Thread Johan Hovold
On Mon, Feb 08, 2021 at 09:52:52AM -0800, Jakub Kicinski wrote: > On Mon, 8 Feb 2021 10:35:24 +0100 Johan Hovold wrote: > > > Send patch 2, wait for it to hit net, send 1 seems like the safest > > > option. If we're lucky Johan can still send patch 2 for 5.11, otherwise

Re: [PATCH v3] usb: serial: option: update interface mapping for ZTE P685M

2021-02-08 Thread Johan Hovold
s= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan > E: Ad=87(I) Atr=03(Int.) MxPS= 8 Ivl=32ms > E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) > E: Ad=88(I) Atr=02(Bul

Re: [PATCH v2 1/2] net: usb: qmi_wwan: support ZTE P685M modem

2021-02-08 Thread Johan Hovold
On Sat, Feb 06, 2021 at 12:13:22PM -0800, Jakub Kicinski wrote: > On Sat, 6 Feb 2021 15:50:41 +0100 Lech Perczak wrote: > > >> Cc: Bjørn Mork > > >> Signed-off-by: Lech Perczak > > > Patch looks fine to me. But I don't think you can submit a net and usb > > > serial patch in a series. These are

Re: [PATCH v3 09/24] wfx: add hwio.c/hwio.h

2021-01-04 Thread Johan Hovold
On Mon, Jan 04, 2021 at 03:34:10PM +0300, Dan Carpenter wrote: > There is a Smatch warning for this, but I hadn't looked at the results > in a while. :/ I'm not sure how many are valid. Some kind of > annotation would be nice. > drivers/usb/class/usblp.c:593 usblp_ioctl() error: doing dma on th

Re: [PATCH v2 2/2] usb: serial: option: add Cellient MPL200 card

2020-10-08 Thread Johan Hovold
On Thu, Oct 08, 2020 at 09:22:19AM +0200, Wilken Gottwalt wrote: > Add usb ids of the Cellient MPL200 card. > > Signed-off-by: Wilken Gottwalt > --- So I had already applied this one (which didn't change since v1). Thanks again. Johan

Re: [PATCH 2/2] usb: serial: option: add Cellient MPL200 card

2020-10-08 Thread Johan Hovold
On Thu, Oct 08, 2020 at 08:47:33AM +0200, Wilken Gottwalt wrote: > On Tue, 6 Oct 2020 09:02:01 +0200 > Johan Hovold wrote: > > > On Mon, Oct 05, 2020 at 02:07:23PM +0200, Wilken Gottwalt wrote: > > > On Mon, 5 Oct 2020 18:36:36 +0700 Lars Melin wrote: > > >

Re: [PATCH 2/2] usb: serial: option: add Cellient MPL200 card

2020-10-06 Thread Johan Hovold
On Mon, Oct 05, 2020 at 02:07:23PM +0200, Wilken Gottwalt wrote: > On Mon, 5 Oct 2020 18:36:36 +0700 Lars Melin wrote: > > On 10/5/2020 18:06, Johan Hovold wrote: > > > Do you remember the interface layout and why you blacklisted interface > > > 1? > > It

Re: [PATCH 2/2] usb: serial: option: add Cellient MPL200 card

2020-10-05 Thread Johan Hovold
On Mon, Oct 05, 2020 at 01:01:34PM +0200, Wilken Gottwalt wrote: > On Mon, 5 Oct 2020 10:20:45 +0200 > Johan Hovold wrote: > > > On Sat, Oct 03, 2020 at 11:40:29AM +0200, Wilken Gottwalt wrote: > > > Add usb ids of the Cellient MPL200 card. > > > >

Re: [PATCH 2/2] usb: serial: option: add Cellient MPL200 card

2020-10-05 Thread Johan Hovold
On Sat, Oct 03, 2020 at 11:40:29AM +0200, Wilken Gottwalt wrote: > Add usb ids of the Cellient MPL200 card. > > Signed-off-by: Wilken Gottwalt > --- > drivers/usb/serial/option.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.

Re: [PATCH 1/2] usb: serial: qmi_wwan: add Cellient MPL200 card

2020-10-05 Thread Johan Hovold
On Mon, Oct 05, 2020 at 10:06:12AM +0200, Johan Hovold wrote: > On Sun, Oct 04, 2020 at 08:30:42PM +0200, Wilken Gottwalt wrote: > > Oh sorry, looks like I got it mixed up a bit. It was my first attempt to > > submit > > a patch set. Which is the best way to resubmit an upd

Re: [PATCH 1/2] usb: serial: qmi_wwan: add Cellient MPL200 card

2020-10-05 Thread Johan Hovold
On Sun, Oct 04, 2020 at 08:30:42PM +0200, Wilken Gottwalt wrote: > On Sun, 04 Oct 2020 17:29:38 +0200 > Bjørn Mork wrote: > > > Wilken Gottwalt writes: > > > > > Add usb ids of the Cellient MPL200 card. > > > > > > Signed-off-by: Wilken Gottwalt > > > --- > > > drivers/net/usb/qmi_wwan.c | 1

[PATCH net] net: phy: fix memory leak in device-create error path

2020-08-06 Thread Johan Hovold
A recent commit introduced a late error path in phy_device_create() which fails to release the device name allocated by dev_set_name(). Fixes: 13d0ab6750b2 ("net: phy: check return code when requesting PHY driver module") Cc: Heiner Kallweit Signed-off-by: Johan Hovold --- drive

[PATCH net 2/3] net: lan78xx: fix transfer-buffer memory leak

2020-07-28 Thread Johan Hovold
The interrupt URB transfer-buffer was never freed on disconnect or after probe errors. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Cc: woojung@microchip.com Signed-off-by: Johan Hovold --- drivers/net/usb/lan78xx.c | 1 +

[PATCH net 3/3] net: lan78xx: replace bogus endpoint lookup

2020-07-28 Thread Johan Hovold
. Signed-off-by: Johan Hovold --- drivers/net/usb/lan78xx.c | 117 ++ 1 file changed, 30 insertions(+), 87 deletions(-) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index ee062b27cfa7..442507f25aad 100644 --- a/drivers/net/usb/lan78xx.c +++ b

[PATCH net 0/3] net: lan78xx: fix NULL deref and memory leak

2020-07-28 Thread Johan Hovold
x27;s current broken endpoint lookup helper, which could end up accepting incomplete interfaces and whose results weren't even useeren Johan Johan Hovold (3): net: lan78xx: add missing endpoint sanity check net: lan78xx: fix transfer-buffer memory leak net: lan78xx: replace bogus endpo

[PATCH net 1/3] net: lan78xx: add missing endpoint sanity check

2020-07-28 Thread Johan Hovold
*some* altsetting has a bulk-in and a bulk-out endpoint. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Cc: woojung@microchip.com Signed-off-by: Johan Hovold --- drivers/net/usb/lan78xx.c | 5 + 1 file changed, 5 inse

Re: [PATCH net 11/16] net: ethernet: marvell: mvneta: fix fixed-link phydev leaks

2020-05-07 Thread Johan Hovold
4.4 branch > the following build error found. > > of_mdio: add helper to deregister fixed-link PHYs > commit 3f65047c853a2a5abcd8ac1984af3452b5df4ada upstream. > > Add helper to deregister fixed-link PHYs registered using > of_phy_register_fixed_link(). > > Conver

Re: [PATCH net 11/16] net: ethernet: marvell: mvneta: fix fixed-link phydev leaks

2020-05-06 Thread Johan Hovold
On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote: > On Tue, 29 Nov 2016 at 00:00, Johan Hovold wrote: > > > > Make sure to deregister and free any fixed-link PHY registered using > > of_phy_register_fixed_link() on probe errors and on driver unbind. > > &g

Re: [PATCH] tty: Fix WARNING in tty_set_termios

2019-01-31 Thread Johan Hovold
On Thu, Jan 31, 2019 at 04:18:33PM +0100, Marcel Holtmann wrote: > > I agree with Al that this change doesn't make much sense. The WARN_ON > > is there to catch any bugs leading to the termios being changed for a > > master side pty. Those should bugs should be fixed, and not worked > > around in

Re: [PATCH] tty: Fix WARNING in tty_set_termios

2019-01-30 Thread Johan Hovold
On Mon, Jan 28, 2019 at 02:29:22PM -0700, shuah wrote: > On 1/25/19 9:14 PM, Al Viro wrote: > > On Fri, Jan 25, 2019 at 04:29:05PM -0700, Shuah Khan wrote: > >> tty_set_termios() has the following WARMN_ON which can be triggered with a > >> syscall to invoke TIOCGETD __NR_ioctl. You meant TIOCSETD

[PATCH] net: dsa: realtek-smi: fix OF child-node lookup

2019-01-16 Thread Johan Hovold
9241cb0 Cc: Linus Walleij Signed-off-by: Johan Hovold --- Note that this one has only been compile tested. drivers/net/dsa/realtek-smi.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/net/dsa/realtek-smi.c b/drivers/net/dsa/realtek-smi.c index b4

[PATCH 0/3] net: dsa: lantiq_gswip: probe fixes and remove cleanup

2019-01-16 Thread Johan Hovold
This series fix a few issues found through inspection when fixing up new bad uses of of_find_compatible_node() that have crept in since 4.19. Note that these have only been compile tested. Johan Johan Hovold (3): net: dsa: lantiq_gswip: fix use-after-free on failed probe net: dsa

[PATCH 2/3] net: dsa: lantiq_gswip: fix OF child-node lookups

2019-01-16 Thread Johan Hovold
e Mehrtens Signed-off-by: Johan Hovold --- drivers/net/dsa/lantiq_gswip.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c index b06c41c98de9..5792674dd4e4 100644 --- a/drivers/net/dsa/lantiq_gsw

[PATCH 1/3] net: dsa: lantiq_gswip: fix use-after-free on failed probe

2019-01-16 Thread Johan Hovold
Make sure to disable and deregister the switch on late probe errors to avoid use-after-free when the device-resource-managed switch is freed. Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Cc: stable # 4.20 Cc: Hauke Mehrtens Signed-off-by: Jo

[PATCH 3/3] net: dsa: lantiq_gswip: drop bogus drvdata check

2019-01-16 Thread Johan Hovold
The platform-device driver data is set on successful probe and will never be NULL on remove (or we have much bigger problems). Signed-off-by: Johan Hovold --- drivers/net/dsa/lantiq_gswip.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa

Re: [RFC lora-next 5/5] HACK: net: lora: sx130x: Add PicoCell gateway shim for cdc-acm

2019-01-07 Thread Johan Hovold
On Sat, Jan 05, 2019 at 12:43:48AM +0100, Andreas Färber wrote: > Hi Rob, > > Am 04.01.19 um 18:07 schrieb Rob Herring: > > On Fri, Jan 4, 2019 at 5:21 AM Andreas Färber wrote: > >> > >> Ignore our device in cdc-acm probing and add a new driver for it, > >> dispatching to cdc-acm for the actual i

[PATCH] net: rfkill: gpio: fix memory leak in probe error path

2018-04-26 Thread Johan Hovold
Make sure to free the rfkill device in case registration fails during probe. Fixes: 5e7ca3937fbe ("net: rfkill: gpio: convert to resource managed allocation") Cc: stable # 3.13 Cc: Heikki Krogerus Signed-off-by: Johan Hovold --- net/rfkill/rfkill-gpio.c | 7 ++- 1 file

Re: [PATCH 2/2] staging: irda: Replace mdelay with usleep_range in irda_usb_probe

2018-04-11 Thread Johan Hovold
() to busily wait. > This is not necessary and can be replaced with usleep_range() to > avoid busy waiting. > > This is found by a static analysis tool named DCNS written by myself. > And I also manually check it. > > Signed-off-by: Jia-Ju Bai Reviewed-by: Johan Hovold

Re: [PATCH 1/2] staging: irda: Replace mdelay with usleep_range in stir421x_fw_upload

2018-04-11 Thread Johan Hovold
; avoid busy waiting. > > This is found by a static analysis tool named DCNS written by myself. > And I also manually check it. > > Signed-off-by: Jia-Ju Bai This all looks good (also note the call to usb_control_msg(), which may sleep, just above the mdelay()). Reviewed-by: Johan Hovold Thanks, Johan

Re: [PATCH] net: usb: hso: Replace GFP_ATOMIC with GFP_KERNEL in hso_create_device

2018-04-10 Thread Johan Hovold
ol named DCNS written by myself. > And I also manually check it. > > Signed-off-by: Jia-Ju Bai Thanks for the patch. This looks good to me. Reviewed-by: Johan Hovold Johan

[PATCH net-next 1/2] net: kalmia: clean up bind error path

2018-03-07 Thread Johan Hovold
owned by the usbnet driver and would not even have been set by the time bind() is called. Signed-off-by: Johan Hovold --- drivers/net/usb/kalmia.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c index 1ec523b0e932

[PATCH net-next 2/2] net: cdc_eem: clean up bind error path

2018-03-07 Thread Johan Hovold
owned by the usbnet driver and would not even have been set by the time bind() is called. Signed-off-by: Johan Hovold --- drivers/net/usb/cdc_eem.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index f7180f8db39e

Re: [PATCH] wcn36xx: fix iris child-node lookup

2017-11-13 Thread Johan Hovold
On Mon, Nov 13, 2017 at 08:51:49AM +, Kalle Valo wrote: > Johan Hovold writes: > > > Fix child-node lookup during probe, which ended up searching the whole > > device tree depth-first starting at the parent rather than just matching > > on its children. > >

[PATCH] wcn36xx: fix iris child-node lookup

2017-11-11 Thread Johan Hovold
") Cc: stable # 4.14 Cc: Loic Poulain Signed-off-by: Johan Hovold --- drivers/net/wireless/ath/wcn36xx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 71812a2dd513..f7d228b5b

Re: [PATCH] net: hso: remove redundant unused variable dev

2017-10-31 Thread Johan Hovold
v' is > never read You could also have mentioned that it was a leftover since commit 4134069f3ea6 ("hso: Use static attribute groups for sysfs entry"). > Signed-off-by: Colin Ian King Reviewed-by: Johan Hovold Thanks, Johan

Re: [PATCH] NFC: fix device-allocation error return

2017-08-28 Thread Johan Hovold
Samuel or David, On Sat, Jul 22, 2017 at 03:32:28PM +0200, Johan Hovold wrote: > On Sun, Jul 09, 2017 at 01:08:58PM +0200, Johan Hovold wrote: > > A recent change fixing NFC device allocation itself introduced an > > error-handling bug by returning an error pointer in

Re: [PATCH] NFC: fix device-allocation error return

2017-07-22 Thread Johan Hovold
On Sun, Jul 09, 2017 at 01:08:58PM +0200, Johan Hovold wrote: > A recent change fixing NFC device allocation itself introduced an > error-handling bug by returning an error pointer in case device-id > allocation failed. This is clearly broken as the callers still expected > NULL to be

[PATCH] NFC: fix device-allocation error return

2017-07-09 Thread Johan Hovold
ed-by: Dan Carpenter Signed-off-by: Johan Hovold --- net/nfc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/nfc/core.c b/net/nfc/core.c index 5cf33df888c3..c699d64a0753 100644 --- a/net/nfc/core.c +++ b/net/nfc/core.c @@ -1106,7 +1106,7 @@ struct nfc_dev *nfc_al

Re: [PATCH v2 0/8] NFC: fix device allocation and nfcmrvl crashes

2017-06-01 Thread Johan Hovold
Hi Samuel, On Tue, May 16, 2017 at 11:42:29AM +0200, Johan Hovold wrote: > On Thu, Apr 27, 2017 at 12:42:38AM +0200, Samuel Ortiz wrote: > > Hi Johan, > > > > On Thu, Mar 30, 2017 at 12:15:34PM +0200, Johan Hovold wrote: > > > This started out with the observatio

Re: [PATCH v2 0/8] NFC: fix device allocation and nfcmrvl crashes

2017-05-16 Thread Johan Hovold
Hi Samuel, On Thu, Apr 27, 2017 at 12:42:38AM +0200, Samuel Ortiz wrote: > Hi Johan, > > On Thu, Mar 30, 2017 at 12:15:34PM +0200, Johan Hovold wrote: > > This started out with the observation that the nfcmrvl_uart driver > > unconditionally dereferenced the tty class de

[PATCH] wireless: mwifiex: add missing USB-descriptor endianness conversion

2017-05-12 Thread Johan Hovold
Add the missing endianness conversions to a debug statement printing the USB device-descriptor bcdUSB field during probe. Signed-off-by: Johan Hovold --- drivers/net/wireless/marvell/mwifiex/usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell

[PATCH] net: ch9200: add missing USB-descriptor endianness conversions

2017-05-12 Thread Johan Hovold
Add the missing endianness conversions to a debug statement printing the USB device-descriptor idVendor and idProduct fields during probe. Signed-off-by: Johan Hovold --- drivers/net/usb/ch9200.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/ch9200.c b

[PATCH] net: irda: irda-usb: fix firmware name on big-endian hosts

2017-05-12 Thread Johan Hovold
Add missing endianness conversion when using the USB device-descriptor bcdDevice field to construct a firmware file name. Fixes: 8ef80aef118e ("[IRDA]: irda-usb.c: STIR421x cleanups") Cc: stable # 2.6.18 Cc: Nick Fedchik Signed-off-by: Johan Hovold --- drivers/net/irda/irda

[PATCH] net: can: peak: fix product-id endianness in error message

2017-05-12 Thread Johan Hovold
Make sure to use the USB device product-id stored in host-byte order in a probe error message. Also remove a redundant reassignment of the local usb_dev variable which had already been used to retrieve the product id. Signed-off-by: Johan Hovold --- drivers/net/can/usb/peak_usb/pcan_usb_core.c

Re: [PATCH] net: hso: register netdev later to avoid a race condition

2017-04-28 Thread Johan Hovold
On Fri, Apr 28, 2017 at 07:36:29PM +0200, Andreas Kemnade wrote: > On Thu, 27 Apr 2017 10:44:01 +0200 > Johan Hovold wrote: > > > On Wed, Apr 26, 2017 at 07:26:40PM +0200, Andreas Kemnade wrote: > > > If the netdev is accessed before the urbs are initialized, > >

Re: [PATCH] net: hso: register netdev later to avoid a race condition

2017-04-27 Thread Johan Hovold
deregistering netdevs that have never been registered (e.g. if a required endpoint is missing or if registration fails for some reason). But just to be clear, this problem existed also before this change. > + } > + > hso_log_port(hso_dev); > > hso_create_rfkill(hso_dev, interface); Reviewed-by: Johan Hovold Thanks, Johan

Re: [PATCH v2 0/8] NFC: fix device allocation and nfcmrvl crashes

2017-04-26 Thread Johan Hovold
On Wed, Apr 19, 2017 at 01:24:31AM +0200, Samuel Ortiz wrote: > On Tue, Apr 18, 2017 at 12:09:16PM +0200, Johan Hovold wrote: > > On Thu, Mar 30, 2017 at 12:15:34PM +0200, Johan Hovold wrote: > > > This started out with the observation that the nfcmrvl_uart driver >

Re: [PATCH] net: hso: fix module unloading

2017-04-25 Thread Johan Hovold
On Mon, Apr 24, 2017 at 09:18:39PM +0200, Andreas Kemnade wrote: > keep tty driver until usb driver is unregistered > rmmod hso > produces traces like this without that: Yeah, a blatant use-after-free. > Signed-off-by: Andreas Kemnade Reviewed-by: Johan Hovold > --- > dri

Re: [PATCH v2 0/8] NFC: fix device allocation and nfcmrvl crashes

2017-04-18 Thread Johan Hovold
On Thu, Mar 30, 2017 at 12:15:34PM +0200, Johan Hovold wrote: > This started out with the observation that the nfcmrvl_uart driver > unconditionally dereferenced the tty class device despite the fact that > not every tty has an associated struct device (Unix98 ptys). Some > further

Re: [PATCH 1/2] wireless: ath9k_htc: fix NULL-deref at probe

2017-04-03 Thread Johan Hovold
On Mon, Apr 03, 2017 at 01:21:08PM +, Kalle Valo wrote: > Johan Hovold writes: > > > On Mon, Apr 03, 2017 at 01:02:28PM +, Kalle Valo wrote: > >> Kalle Valo writes: > >> > >> > Johan Hovold writes: > >> > > >>

Re: [PATCH 1/2] wireless: ath9k_htc: fix NULL-deref at probe

2017-04-03 Thread Johan Hovold
On Mon, Apr 03, 2017 at 01:02:28PM +, Kalle Valo wrote: > Kalle Valo writes: > > > Johan Hovold writes: > > > >> On Mon, Mar 13, 2017 at 01:44:20PM +0100, Johan Hovold wrote: > >>> Make sure to check the number of endpoints to avoid dereferencing a

Re: [PATCH 1/2] wireless: ath9k_htc: fix NULL-deref at probe

2017-04-03 Thread Johan Hovold
On Mon, Mar 13, 2017 at 01:44:20PM +0100, Johan Hovold wrote: > Make sure to check the number of endpoints to avoid dereferencing a > NULL-pointer or accessing memory beyond the endpoint array should a > malicious device lack the expected endpoints. > > Fixes: 36bcce430657 (&qu

[PATCH v2 1/8] NFC: fix broken device allocation

2017-03-30 Thread Johan Hovold
h did not use nfc_free_device() in its error path. Fixes: 7eda8b8e9677 ("NFC: Use IDR library to assing NFC devices IDs") Cc: stable # 3.8 Cc: Samuel Ortiz Signed-off-by: Johan Hovold --- net/nfc/core.c | 31 ++- net/nfc/nci/core.c | 3 +--

[PATCH v2 3/8] NFC: nfcmrvl: do not use device-managed resources

2017-03-30 Thread Johan Hovold
valid. This will be addressed in a follow-up patch. Fixes: b2fe288eac72 ("NFC: nfcmrvl: free reset gpio") Fixes: 4a2b947f56b3 ("NFC: nfcmrvl: add chip reset management") Cc: stable # 4.2: b2fe288eac72 Cc: Vincent Cuissard Signed-off-by: Johan Hovold --- drivers/nfc

[PATCH v2 0/8] NFC: fix device allocation and nfcmrvl crashes

2017-03-30 Thread Johan Hovold
different ttys without any actual NFC hardware connected. Johan Changes in v2 - fix typo in commit message (1/8) - release reset gpio in error paths (3/8) - fix description of patch impact (3/8) - allow gpio 0 to be used for reset signalling (8/8, new) Johan Hovold (8): NFC: fix broken device

[PATCH v2 2/8] NFC: nfcmrvl_uart: add missing tty-device sanity check

2017-03-30 Thread Johan Hovold
Make sure to check the tty-device pointer before trying to access the parent device to avoid dereferencing a NULL-pointer when the tty is one end of a Unix98 pty. Fixes: e097dc624f78 ("NFC: nfcmrvl: add UART driver") Cc: stable # 4.2 Cc: Vincent Cuissard Signed-off-by: Jo

[PATCH v2 8/8] NFC: nfcmrvl: allow gpio 0 for reset signalling

2017-03-30 Thread Johan Hovold
Allow gpio 0 to be used for reset signalling, and instead use negative errnos to disable the reset functionality. Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/main.c| 9 - include/linux/platform_data/nfcmrvl.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions

[PATCH v2 7/8] NFC: nfcmrvl_usb: use interface as phy device

2017-03-30 Thread Johan Hovold
that private device pointer had already been set by nfcmrvl_nci_register_dev() so the redundant assignment can therefore be removed. Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/nfc/nfcmrvl/usb.c b

[PATCH v2 4/8] NFC: nfcmrvl: use nfc-device for firmware download

2017-03-30 Thread Johan Hovold
for any debugging, which is fine for now. Fixes: 3194c6870158 ("NFC: nfcmrvl: add firmware download support") Cc: stable # 4.4 Cc: Vincent Cuissard Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/fw_dnld.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH v2 5/8] NFC: nfcmrvl: fix firmware-management initialisation

2017-03-30 Thread Johan Hovold
initialisation back to to nci_allocate_device() as the firmware-workqueue name is now derived from the nfc-device name. Fixes: 3194c6870158 ("NFC: nfcmrvl: add firmware download support") Cc: stable # 4.4 Cc: Vincent Cuissard Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/m

[PATCH v2 6/8] NFC: nfcmrvl_uart: fix device-node leak during probe

2017-03-30 Thread Johan Hovold
Make sure to release the device-node reference when done parsing the node. Fixes: e097dc624f78 ("NFC: nfcmrvl: add UART driver") Cc: Vincent Cuissard Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/uart.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/nfc/nfcmrv

Re: [PATCH 3/7] NFC: nfcmrvl: do not use device-managed resources

2017-03-29 Thread Johan Hovold
On Wed, Mar 29, 2017 at 06:21:08PM +0200, Johan Hovold wrote: > This specifically fixes a NULL-pointer dereference when using the n_nci > line discipline on one end of a Unix98 pty as well as resource leaks in > the registration error paths. I noticed I forgot to actually fix up the er

[PATCH 3/7] NFC: nfcmrvl: do not use device-managed resources

2017-03-29 Thread Johan Hovold
resource leak at close. Fixes: b2fe288eac72 ("NFC: nfcmrvl: free reset gpio") Fixes: 4a2b947f56b3 ("NFC: nfcmrvl: add chip reset management") Cc: stable # 4.2: b2fe288eac72 Cc: Vincent Cuissard Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/main.c | 9

[PATCH 0/7] NFC: fix device allocation and nfcmrvl crashes

2017-03-29 Thread Johan Hovold
different ttys without any actual NFC hardware connected. Johan Johan Hovold (7): NFC: fix broken device allocation NFC: nfcmrvl_uart: add missing tty-device sanity check NFC: nfcmrvl: do not use device-managed resources NFC: nfcmrvl: use nfc-device for firmware download NFC: nfcmrvl: fix

[PATCH 1/7] NFC: fix broken device allocation

2017-03-29 Thread Johan Hovold
h did not use nfc_free_device() in its registration error path. Fixes: 7eda8b8e9677 ("NFC: Use IDR library to assing NFC devices IDs") Cc: stable # 3.8 Cc: Samuel Ortiz Signed-off-by: Johan Hovold --- net/nfc/core.c | 31 ++- net/nfc/nci/core.c |

[PATCH 5/7] NFC: nfcmrvl: fix firmware-management initialisation

2017-03-29 Thread Johan Hovold
initialisation back to to nci_allocate_device() as the firmware-workqueue name is now derived from the nfc-device name. Fixes: 3194c6870158 ("NFC: nfcmrvl: add firmware download support") Cc: stable # 4.4 Cc: Vincent Cuissard Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/m

[PATCH 2/7] NFC: nfcmrvl_uart: add missing tty-device sanity check

2017-03-29 Thread Johan Hovold
Make sure to check the tty-device pointer before trying to access the parent device to avoid dereferencing a NULL-pointer when the tty is one end of a Unix98 pty. Fixes: e097dc624f78 ("NFC: nfcmrvl: add UART driver") Cc: stable # 4.2 Cc: Vincent Cuissard Signed-off-by: Jo

[PATCH 7/7] NFC: nfcmrvl_usb: use interface as phy device

2017-03-29 Thread Johan Hovold
that private device pointer had already been set by nfcmrvl_nci_register_dev() so the redundant assignment can therefore be removed. Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/nfc/nfcmrvl/usb.c b

[PATCH 4/7] NFC: nfcmrvl: use nfc-device for firmware download

2017-03-29 Thread Johan Hovold
for any debugging, which is fine for now. Fixes: 3194c6870158 ("NFC: nfcmrvl: add firmware download support") Cc: stable # 4.4 Cc: Vincent Cuissard Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/fw_dnld.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH 6/7] NFC: nfcmrvl_uart: fix device-node leak during probe

2017-03-29 Thread Johan Hovold
Make sure to release the device-node reference when done parsing the node. Fixes: e097dc624f78 ("NFC: nfcmrvl: add UART driver") Cc: Vincent Cuissard Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/uart.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/nfc/nfcmrv

Re: [2/2] zd1211rw: fix NULL-deref at probe

2017-03-22 Thread Johan Hovold
On Wed, Mar 22, 2017 at 03:02:12PM +0200, Kalle Valo wrote: > Johan Hovold writes: > > > On Wed, Mar 22, 2017 at 09:04:15AM +, Kalle Valo wrote: > >> Johan Hovold wrote: > >> > Make sure to check the number of endpoints to avoid dereferencing a > >>

Re: [2/2] zd1211rw: fix NULL-deref at probe

2017-03-22 Thread Johan Hovold
On Wed, Mar 22, 2017 at 09:04:15AM +, Kalle Valo wrote: > Johan Hovold wrote: > > Make sure to check the number of endpoints to avoid dereferencing a > > NULL-pointer or accessing memory beyond the endpoint array should a > > malicious device lack the expected endp

[PATCH 2/2] wireless: zd1211rw: fix NULL-deref at probe

2017-03-13 Thread Johan Hovold
e Signed-off-by: Johan Hovold --- drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c index c5effd6c6be9..01ca1d57b3d9 100644 --- a/drivers/net/wire

[PATCH 1/2] wireless: ath9k_htc: fix NULL-deref at probe

2017-03-13 Thread Johan Hovold
Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. Fixes: 36bcce430657 ("ath9k_htc: Handle storage devices") Cc: Sujith Manoharan Signed-off-by: Jo

[PATCH] net: wimax/i2400m: fix NULL-deref at probe

2017-03-13 Thread Johan Hovold
i2400mu_tx_bulk_out). Fixes: f398e4240fce ("i2400m/USB: probe/disconnect, dev init/shutdown and reset backends") Cc: Inaky Perez-Gonzalez Signed-off-by: Johan Hovold --- drivers/net/wimax/i2400m/usb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wimax/i2400m/usb.c b/drivers

[PATCH] isdn/gigaset: fix NULL-deref at probe

2017-03-13 Thread Johan Hovold
Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: cf7776dc05b8 ("[PATCH] isdn4linux: Siemens Gigaset drivers - direct USB connection") Cc: stable # 2.6.17 Cc: Hansjoerg Lipp Signed-off-by: Jo

Re: [PATCH net 1/4] pegasus: Use heap buffers for all register access

2017-02-06 Thread Johan Hovold
On Mon, Feb 06, 2017 at 02:32:23PM +0100, Johan Hovold wrote: > On Mon, Feb 06, 2017 at 02:21:24PM +0100, Johan Hovold wrote: > > On Mon, Feb 06, 2017 at 02:51:09PM +0200, Petko Manolov wrote: > > > On 17-02-06 09:28:22, Greg KH wrote: > > > > On Mon, Feb 06, 2

Re: [PATCH net 1/4] pegasus: Use heap buffers for all register access

2017-02-06 Thread Johan Hovold
On Mon, Feb 06, 2017 at 02:21:24PM +0100, Johan Hovold wrote: > On Mon, Feb 06, 2017 at 02:51:09PM +0200, Petko Manolov wrote: > > On 17-02-06 09:28:22, Greg KH wrote: > > > On Mon, Feb 06, 2017 at 10:14:44AM +0200, Petko Manolov wrote: > > > > > Random thought:

Re: [PATCH net 1/4] pegasus: Use heap buffers for all register access

2017-02-06 Thread Johan Hovold
On Mon, Feb 06, 2017 at 02:51:09PM +0200, Petko Manolov wrote: > On 17-02-06 09:28:22, Greg KH wrote: > > On Mon, Feb 06, 2017 at 10:14:44AM +0200, Petko Manolov wrote: > > > Random thought: isn't it better to add the alloc/free code in > > > usb_control_msg() and avoid code duplication all over

Re: [PATCH] [v2] net: qcom/emac: grab a reference to the phydev on ACPI systems

2017-01-12 Thread Johan Hovold
ped only on DT systems. > > Instead, it's cleaner if up grab an reference on ACPI systems. > When the driver unloads, we can drop the reference without having > to check whether we're on a DT system. > > Signed-off-by: Timur Tabi Reviewed-by: Johan Hovold

Re: [PATCH] net: qcom/emac: grab a reference to the phydev on ACPI systems

2017-01-10 Thread Johan Hovold
On Mon, Jan 09, 2017 at 05:52:06PM -0600, Timur Tabi wrote: > Commit 6ffe1c4cd0a7 ("net: qcom/emac: fix of_node and phydev leaks") > fixed the problem with reference leaks on phydev, but the fix is > device-tree specific. When the driver unloads, the reference is > dropped only on DT systems. > >

Re: [PATCH net v2 5/5] net: qcom/emac: fix of_node and phydev leaks

2017-01-10 Thread Johan Hovold
On Mon, Jan 09, 2017 at 01:49:53PM -0600, Timur Tabi wrote: > On 11/24/2016 12:21 PM, Johan Hovold wrote: > > + if (!has_acpi_companion(&pdev->dev)) > > + put_device(&adpt->phydev->mdio.dev); > > I was wondering if, instead of calling put_device()

[PATCH net 2/3] net: stmmac: dwmac-oxnas: fix fixed-link-phydev leaks

2017-01-02 Thread Johan Hovold
("net: stmmac: Add OXNAS Glue Driver") Signed-off-by: Johan Hovold --- drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c | 41 ++- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c b/drivers/net/ethern

[PATCH net 3/3] net: stmmac: dwmac-oxnas: use generic pm implementation

2017-01-02 Thread Johan Hovold
Now that we have an exit callback in place, add init as well and get rid of the custom PM callbacks in favour of the generic ones. Signed-off-by: Johan Hovold --- drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c | 38 +++ 1 file changed, 5 insertions(+), 33 deletions

[PATCH net 0/3] net: stmmac: dwmac-oxnas: fix leaks and simplify pm

2017-01-02 Thread Johan Hovold
These patches fixes of-node and fixed-phydev leaks in the recently added dwmac-oxnas driver, and ultimately switches over to using the generic pm implementation as the required callbacks are now in place. Note that this series has only been compile tested. Johan Johan Hovold (3): net: stmmac

[PATCH net 1/3] net: stmmac: dwmac-oxnas: fix of-node leak

2017-01-02 Thread Johan Hovold
Use the syscon lookup-by-phandle helper so that the reference taken by of_parse_phandle() is released when done with the node. Fixes: 5ed7414062e7 ("net: stmmac: Add OXNAS Glue Driver") Signed-off-by: Johan Hovold --- drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c | 10 ++--

Re: [PATCH net] phy: Don't increment MDIO bus refcount unless it's a different owner

2016-12-08 Thread Johan Hovold
On Thu, Dec 08, 2016 at 08:47:54AM -0800, Florian Fainelli wrote: > On 12/08/2016 08:27 AM, Johan Hovold wrote: > > On Tue, Dec 06, 2016 at 08:54:43PM -0800, Florian Fainelli wrote: > >> Commit 3e3aaf649416 ("phy: fix mdiobus module safety") fixed the way we >

Re: [PATCH net] phy: Don't increment MDIO bus refcount unless it's a different owner

2016-12-08 Thread Johan Hovold
On Tue, Dec 06, 2016 at 08:54:43PM -0800, Florian Fainelli wrote: > Commit 3e3aaf649416 ("phy: fix mdiobus module safety") fixed the way we > dealt with MDIO bus module reference count, but sort of introduced a > regression in that, if an Ethernet driver registers its own MDIO bus > driver, as is c

Re: [patch] net: renesas: ravb: unintialized return value

2016-12-02 Thread Johan Hovold
ravb: fix fixed-link phydev > leaks") > Signed-off-by: Dan Carpenter Thanks for catching this. Reviewed-by: Johan Hovold Johan

[PATCH net 4/7] net: ethernet: stmmac: dwmac-generic: fix probe error path

2016-11-30 Thread Johan Hovold
Make sure to call any exit() callback to undo the effect of init() before returning on late probe errors. Fixes: cf3f047b9af4 ("stmmac: move hw init in the probe (v2)") Signed-off-by: Johan Hovold --- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 12 +++- 1 file c

[PATCH net 3/7] net: ethernet: stmmac: dwmac-rk: fix probe error path

2016-11-30 Thread Johan Hovold
Make sure to disable runtime PM, power down the PHY, and disable clocks before returning on late probe errors. Fixes: 27ffefd2d109 ("stmmac: dwmac-rk: create a new probe function") Signed-off-by: Johan Hovold --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 11 ++- 1 fi

[PATCH net 6/7] net: ethernet: stmmac: platform: fix outdated function header

2016-11-30 Thread Johan Hovold
Fix the OF-helper function header to reflect that the function no longer has a platform-data parameter. Fixes: b0003ead75f3 ("stmmac: make stmmac_probe_config_dt return the platform data struct") Signed-off-by: Johan Hovold --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1

[PATCH net 7/7] net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks

2016-11-30 Thread Johan Hovold
stmmac_dvr_remove() to the new helper. Fixes: 277323814e49 ("stmmac: add fixed-link device-tree support") Fixes: 4613b279bee7 ("ethernet: stmicro: stmmac: add missing of_node_put after calling of_parse_phandle") Signed-off-by: Johan Hovold --- .../net/ethernet/stmicro/stmmac/dwm

[PATCH net 5/7] net: ethernet: stmmac: dwmac-meson8b: fix probe error path

2016-11-30 Thread Johan Hovold
Make sure to disable clocks before returning on late probe errors. Fixes: 566e82516253 ("net: stmmac: add a glue driver for the Amlogic Meson 8b / GXBB DWMAC") Signed-off-by: Johan Hovold --- drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 11 ++- 1 file changed, 10

[PATCH net 0/7] net: stmmac: fix probe error handling and phydev leaks

2016-11-30 Thread Johan Hovold
these patches have only been compile tested. Johan Johan Hovold (7): net: ethernet: stmmac: dwmac-socfpga: fix use-after-free on probe errors net: ethernet: stmmac: dwmac-sti: fix probe error path net: ethernet: stmmac: dwmac-rk: fix probe error path net: ethernet: stmmac: dwmac

[PATCH net 1/7] net: ethernet: stmmac: dwmac-socfpga: fix use-after-free on probe errors

2016-11-30 Thread Johan Hovold
Make sure to call stmmac_dvr_remove() before returning on late probe errors so that memory is freed, clocks are disabled, and the netdev is deregistered before its resources go away. Fixes: 3c201b5a84ed ("net: stmmac: socfpga: Remove re-registration of reset controller") Signed-off

  1   2   >