Re: [syzbot] WARNING in ieee802154_del_seclevel

2021-04-01 Thread Alan Stern
On Wed, Mar 31, 2021 at 02:03:08PM -0700, syzbot wrote: > syzbot has bisected this issue to: > > commit 416dacb819f59180e4d86a5550052033ebb6d72c > Author: Alan Stern > Date: Wed Aug 21 17:27:12 2019 + > > HID: hidraw: Fix invalid read in hidraw_ioctl >

Re: WARNING in port100_send_frame_async/usb_submit_urb

2020-12-02 Thread Alan Stern
ine] > port100_probe+0xd4f/0x1600 drivers/nfc/port100.c:1567 I don't understand this driver very well. It looks like the problem stems from the fact that port100_send_frame_async() submits two URBs, but port100_send_cmd_sync() only waits for one of them to complete. The other URB may then still be active when the driver tries to reuse it. Maybe someone who's more familiar with the port100 driver can fix the problem. Alan Stern

Re: [PATCH v2] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-29 Thread Alan Stern
ee you used for building did not include the declarations of usb_control_msg_{send|recv}(). It's hard to tell exactly what that tree does contain, because the github.com links embedded in the web page you mention above don't work. Alan Stern

Re: [PATCH] net: usb: Fix uninit-was-stored issue in asix_read_cmd()

2020-08-25 Thread Alan Stern
verting everything > over to a sane, and checkable, api and remove a bunch of wrapper > functions as well. Suggestion: _read and _send are not a natural pair. Consider instead _read and _write. _recv and _send don't feel right either, because it both cases the host sends the control message -- the difference lies in who sends the data. Alan Stern

Re: [PATCH 8/8] net/iucv: Use the new device_to_pm() helper to access struct dev_pm_ops

2020-05-26 Thread Alan Stern
uccinct, although it wouldn't fit every usage. For example, #define pm_do_callback(dev, method) \ (dev->driver && dev->driver->pm && dev->driver->pm->callback ? \ dev->driver->pm->callback(dev) : 0) Then the usage is something like: ret = pm_do_callback(dev, prepare); Would this be an overall improvement? Alan Stern

Re: [PATCH RFC 0/4] barriers using data dependency

2019-01-03 Thread Alan Stern
On Wed, 2 Jan 2019, Michael S. Tsirkin wrote: > On Wed, Jan 02, 2019 at 04:36:40PM -0500, Alan Stern wrote: > > On Wed, 2 Jan 2019, Michael S. Tsirkin wrote: > > > > > So as explained in Documentation/memory-barriers.txt e.g. > > > a load followed by a st

Re: [PATCH RFC 0/4] barriers using data dependency

2019-01-02 Thread Alan Stern
e.g. smp_rmb is a nop. This should be easy to fix with an architecture-specific override. Alan Stern > Sending out for early feedback/flames. > > Michael S. Tsirkin (4): > include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR > include/linux/compiler.h: allow memory operand

Re: dvb usb issues since kernel 4.9

2018-01-08 Thread Alan Stern
ol URBs. The DVB driver in question uses bulk transfers. xhci-hcd, on the other hand, does not use these tasklets (it doesn't set the HCD_BH bit in the hc_driver's .flags member). Alan Stern

Re: Aw: Re: Re: dvb usb issues since kernel 4.9

2018-01-08 Thread Alan Stern
st? The post says that the testing was done on an x86_64 machine. > Gesendet: Montag, 08. Januar 2018 um 17:31 Uhr > Von: "Alan Stern" > An: "Josef Griebichler" > Cc: "Mauro Carvalho Chehab" , "Greg Kroah-Hartman" > , linux-...@vger.kernel.

Re: Aw: Re: dvb usb issues since kernel 4.9

2018-01-08 Thread Alan Stern
dditional tcp load on raspberry. > > Unfortunately there's no usbmon or tshark on libreelec so I can't provide > further logs. Can you try running the same test on an x86_64 system? Alan Stern

Re: dvb usb issues since kernel 4.9

2018-01-08 Thread Alan Stern
eduling parameters if needed, to adjust for > > such use-cases (it was not really an admin choice before). > > Can't the ksoftirq patch be modified to only apply to the networking > IRQ handling? That sounds less risky of affecting unrelated subsystems[1]. That might work. Or mo

Re: dvb usb issues since kernel 4.9

2018-01-08 Thread Alan Stern
On Mon, 8 Jan 2018, Mauro Carvalho Chehab wrote: > Em Sun, 7 Jan 2018 10:41:37 -0500 (EST) > Alan Stern escreveu: > > > On Sun, 7 Jan 2018, Mauro Carvalho Chehab wrote: > > > > > > > It seems that the original patch were designed to solve some IRQ > >

Re: dvb usb issues since kernel 4.9

2018-01-07 Thread Alan Stern
to revert the kernel logic to prioritize latency instead of > throughput. It can't be done without pervasive changes to the USB subsystem, which I would greatly prefer to avoid. Besides, this wouldn't really solve the problem. Decreasing the latency for one device will cause it to be increased for others. Alan Stern

Re: dvb usb issues since kernel 4.9

2018-01-06 Thread Alan Stern
la kernel that gets plenty of video glitches? Overall, this may be a very difficult problem to solve. The 4cd13c21b207 commit was intended to improve throughput at the cost of increased latency. But then what do you do when the latency becomes too high for the video subsystem to handle? Alan Stern

Re: [PATCH v2 0/9] Remove spin_unlock_wait()

2017-07-08 Thread Alan Stern
ll our problems by defining the generic version > thusly: > > void spin_unlock_wait(spinlock_t *lock) > { > if (spin_trylock(lock)) > spin_unlock(lock); > } How could this possibly be a generic version of spin_unlock_wait()? It does noth

Re: [PATCH v2 0/9] Remove spin_unlock_wait()

2017-07-06 Thread Alan Stern
On Thu, 6 Jul 2017, Peter Zijlstra wrote: > On Thu, Jul 06, 2017 at 12:49:12PM -0400, Alan Stern wrote: > > On Thu, 6 Jul 2017, Paul E. McKenney wrote: > > > > > On Thu, Jul 06, 2017 at 06:10:47PM +0200, Peter Zijlstra wrote: > > > > On Thu, Jul 06, 2017 a

Re: [PATCH v2 0/9] Remove spin_unlock_wait()

2017-07-06 Thread Alan Stern
I > am confused, but I am not seeing it for any of them. If somebody really wants the full spin_unlock_wait semantics and doesn't want to interfere with other CPUs, wouldn't synchronize_sched() or something similar do the job? It wouldn't be as efficient as lock+unlock, but it also wouldn't affect other CPUs. Alan Stern

Re: [PATCH RFC 01/26] netfilter: Replace spin_unlock_wait() with lock/unlock pair

2017-07-03 Thread Alan Stern
On Mon, 3 Jul 2017, Paul E. McKenney wrote: > On Mon, Jul 03, 2017 at 10:39:49AM -0400, Alan Stern wrote: > > On Sat, 1 Jul 2017, Manfred Spraul wrote: > > > > > As we want to remove spin_unlock_wait() and replace it with explicit > > > spin_lock()/spin_u

Re: [PATCH RFC 01/26] netfilter: Replace spin_unlock_wait() with lock/unlock pair

2017-07-03 Thread Alan Stern
ld mention that it pairs with the smp_store_release() from an earlier invocation of nf_conntrack_all_unlock(). (Alternatively, you could make nf_conntrack_all_unlock() do a lock+unlock on all the locks in the array, just like nf_conntrack_all_lock(). But of course, that would be a lot less efficient.) Alan Stern

Re: [PATCH RFC 01/26] netfilter: Replace spin_unlock_wait() with lock/unlock pair

2017-07-03 Thread Alan Stern
f_conntrack_locks_all, by (a) the read will always see the write. Similarly for (2), since nf_conntrack_all_lock() acquires nf_conntrack_locks_all_lock before writing to nf_conntrack_locks_all, and since nf_conntrack_lock() reads nf_conntrack_locks_all before releasing nf_conntr

Re: [PATCH RFC 02/26] task_work: Replace spin_unlock_wait() with lock/unlock pair

2017-06-30 Thread Alan Stern
hat nobody except me likes > this primitive, but to me spin_unlock_wait() looks like synchronize_rcu(() and > sometimes it makes sense. If it looks like synchronize_rcu(), why not actually use synchronize_rcu()? Alan Stern > Including this particular case. task_work_run() is going to flush/destroy the > ->task_works list, so it needs to wait until all currently executing "readers" > (task_work_cancel()'s which have started before ->task_works was updated) have > completed.

Re: [PATCH] r8152: Allocate interrupt buffer as part of struct r8152

2017-01-31 Thread Alan Stern
roblem. I am open to suggestions > for a better fix. The proper approach is to keep the allocation as it is, but _before_ deallocating the buffer, make sure that the interrupt buffer won't be accessed any more. This may involve calling usb_kill_urb(), or synchronize_irq(), or something similar. Alan Stern

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-10 Thread Alan Stern
On Thu, 10 Nov 2016, Kai-Heng Feng wrote: > Hi, > > On Wed, Nov 9, 2016 at 8:32 PM, Bjørn Mork wrote: > > Oliver Neukum writes: > > > >> On Tue, 2016-11-08 at 13:44 -0500, Alan Stern wrote: > >> > >>> These problems could very well be cause

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-08 Thread Alan Stern
On Tue, 8 Nov 2016, Bjørn Mork wrote: > Alan Stern writes: > > > On Tue, 8 Nov 2016, Kai-Heng Feng wrote: > > > >> Hi, > >> > >> On Mon, Nov 7, 2016 at 7:02 PM, Oliver Neukum wrote: > >> > On Fri, 2016-11-04 at 17:57 +0800, Kai-Heng

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-08 Thread Alan Stern
-2: config 1 has an invalid interface number: 13 but max is 1 [3.862255] usb 2-2: config 1 has no interface number 0 [3.862256] usb 2-2: config 1 has no interface number 1 ... [8.295180] usb 2-2: Disable of device-initiated U1 failed. [8.295322] usb 2-2: Disable of device-initiated U2 failed. I get the impression that the device won't work properly with runtime PM at all. Alan Stern

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-04 Thread Alan Stern
the PM usage counter of a device before probing its interfaces. Alan Stern > Signed-off-by: Kai-Heng Feng > --- > drivers/net/usb/usbnet.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c > inde

Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-22 Thread Alan Stern
On Tue, 22 Mar 2016, Oliver Neukum wrote: > On Tue, 2016-03-22 at 10:21 -0400, Alan Stern wrote: > > I don't see any point in resuming the device just in order to collect > > operating statistics. If it was already suspended then it wasn't > > operating, so

Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-22 Thread Alan Stern
On Tue, 22 Mar 2016, Oliver Neukum wrote: > On Mon, 2016-03-21 at 15:30 -0400, Alan Stern wrote: > > On Mon, 21 Mar 2016, Oliver Neukum wrote: > > > > > > We have an autosuspend timeout because we think that IO, if it will > > > come at all, is likeliest

RE: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-21 Thread Alan Stern
the autosuspend timeout. That's why I suggested making the > > interval adjustable. > > What do you mean statistics interval? > Interval calling ndo_get_stats64 or another thread/timer or else getting > statistics? The time between calls to ndo_get_stats64, since that's the routine which queries the device. Alan Stern

Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-21 Thread Alan Stern
On Mon, 21 Mar 2016, Oliver Neukum wrote: > On Mon, 2016-03-21 at 14:24 -0400, Alan Stern wrote: > > On Mon, 21 Mar 2016, Oliver Neukum wrote: > > > > > On Mon, 2016-03-21 at 10:57 -0400, Alan Stern wrote: > > > > > > > One possible solut

RE: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-21 Thread Alan Stern
statistics interval to the autosuspend timeout (or 0 if autosuspend is disabled) plus some fixed value. Alan Stern

Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-21 Thread Alan Stern
On Mon, 21 Mar 2016, Oliver Neukum wrote: > On Mon, 2016-03-21 at 10:57 -0400, Alan Stern wrote: > > > One possible solution is to export a sysfs parameter to prevent > > statistics collection (or more generally, to change the interval at > > which it occurs). >

Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-21 Thread Alan Stern
ection (or more generally, to change the interval at which it occurs). But checking the runtime_auto flag is probably not a great idea. Even if it isn't set, collecting statistics is likely to wait up a device that otherwise would have remained suspended. Perhaps the best solution is to collect the statistics only when the device is not suspended or is about to suspend. Alan Stern

Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-24 Thread Alan Stern
On Thu, 24 Dec 2015, Oliver Neukum wrote: > On Thu, 2015-12-24 at 10:14 -0500, Alan Stern wrote: > > On Thu, 24 Dec 2015, Oliver Neukum wrote: > > > > > On Wed, 2015-12-23 at 20:32 -0500, Alan Stern wrote: > > > > But you cannot keep that setting if the sys

Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-24 Thread Alan Stern
On Thu, 24 Dec 2015, Oliver Neukum wrote: > On Wed, 2015-12-23 at 20:32 -0500, Alan Stern wrote: > > > I don't understand why the wakeup conditions are different. It seems > > to me that the choice of which packets will generate a wakeup ought to > > depend on the

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-23 Thread Alan Stern
n that should be true for both runtime suspend and system suspend. To put it another way, as far as the device is concerned a suspend is just a suspend -- there's no different between a runtime suspend and a system suspend. Alan Stern -- To unsubscribe from this list: send the line "unsubs

Re: [PATCH] Adding Reset resume support for CDC-EEM driver.

2015-12-21 Thread Alan Stern
ontrol endpoint. And calls the existing > usbnet_resume thereafter You know, the USB core already issues a Set-Interface request on the control endpoint whenever a reset-resume occurs (unless the interface was using altsetting 0 beforehand). Issuing another Set-Interface shouldn't make any dif

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-24 Thread Alan Stern
On Mon, 24 Aug 2015, Alan Stern wrote: > On Mon, 24 Aug 2015, David Miller wrote: > > > From: Eugene Shatokhin > > Date: Wed, 19 Aug 2015 14:59:01 +0300 > > > > > So the following might be possible, although unlikely: > > > > > > CPU0

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-24 Thread Alan Stern
dn't find any mention of it in Documentation/atomic_ops.txt. In theory, an architecture could implement atomic bit operations using a spinlock to insure atomicity. I don't know if any architectures do this, but if they do then the scenario above could arise. Alan Stern -- To unsubscribe

Re: [PATCH] net: fec: fix initial runtime PM refcount

2015-08-04 Thread Alan Stern
On Tue, 4 Aug 2015, Uwe [iso-8859-1] Kleine-K�nig wrote: > Hello, > > On Tue, Aug 04, 2015 at 10:20:55AM -0400, Alan Stern wrote: > > In that case, adding a call pm_runtime_get_noresume() is the right > > thing to do. > Is this an ack for Lucas' patch? Yes: Acke

Re: [PATCH] net: fec: fix initial runtime PM refcount

2015-08-04 Thread Alan Stern
On Tue, 4 Aug 2015, Lucas Stach wrote: > Am Montag, den 03.08.2015, 14:28 -0400 schrieb Alan Stern: > > On Mon, 3 Aug 2015, Uwe [iso-8859-1] Kleine-Knig wrote: > > > > > Hello, > > > > > > I have no clue about runtime-pm, but I added a few

Re: [PATCH] net: fec: fix initial runtime PM refcount

2015-08-03 Thread Alan Stern
PM status to "active". A call to pm_runtime_get_noresume() (or something similar) is necessary to balance the call to pm_runtime_put_autosuspend() at the end of the probe routine. Both the _get_ and the _put_ should be present or neither should be. For instance, an alternative way to a

Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable

2015-05-21 Thread Alan Stern
On Thu, 21 May 2015, Takashi Iwai wrote: > At Thu, 21 May 2015 11:26:17 -0400 (EDT), > Alan Stern wrote: > > > > On Thu, 21 May 2015, Takashi Iwai wrote: > > > > > At Thu, 21 May 2015 10:18:08 -0400 (EDT), > > > Alan Stern wrote: > > >

Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable

2015-05-21 Thread Alan Stern
the kernel log will tell just what happened. On Thu, 21 May 2015, Takashi Iwai wrote: > At Thu, 21 May 2015 10:18:08 -0400 (EDT), > Alan Stern wrote: > > > > On Thu, 21 May 2015, Takashi Iwai wrote: > > > > > Then avoiding the failed firmware is no solution, in

Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable

2015-05-21 Thread Alan Stern
ing resume under certain circumstances. A driver lacking a reset_resume callback is one of those circumstances. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [usb regression] Re: [PATCH 2.6.24-rc3] Fix /proc/net breakage

2008-01-02 Thread Alan Stern
On Tue, 1 Jan 2008, Greg KH wrote: > On Mon, Dec 31, 2007 at 11:26:43AM -0800, Greg KH wrote: > > On Mon, Dec 31, 2007 at 12:49:52PM -0500, Alan Stern wrote: > > > On Sun, 30 Dec 2007, Greg KH wrote: > > > > > > > > It looks like Greg misused t

Re: [usb regression] Re: [PATCH 2.6.24-rc3] Fix /proc/net breakage

2007-12-31 Thread Alan Stern
st enable CONFIG_DEBUGFS is USB_DEBUG is enabled and > then simplify this logic a bunch at the same time. Most distributions enable CONFIG_DEBUGFS by default, don't they? So this problem only comes up when people make up their own configs. Having USB_DEBUG enabled and DEBUGFS disabled seem

Re: [usb regression] Re: [PATCH 2.6.24-rc3] Fix /proc/net breakage

2007-12-30 Thread Alan Stern
ges... And wondering how to properly elevate > > this issue (prompt Greg about it, new thread, bug #, ...?) It looks like Greg misused the debugfs API -- which is ironic, because he wrote debugfs in the first place! :-) Let me know if this patch fixes the problem. If it does, I'll subm

Re: [linux-pm] QUESTION: How to fix race between .suspend routine and watchdog timer

2007-10-27 Thread Alan Stern
time I looked at the source code, that's what it did. I'll look again... Yep, it still does. It checks to see if the timer routine is currently running; if so then it waits a little while and tries again. Alan Stern - To unsubscribe from this list: send the line "unsubscribe

Re: [linux-pm] QUESTION: How to fix race between .suspend routine and watchdog timer

2007-10-27 Thread Alan Stern
(if possible) to be sure that the timer won't run > anymore? > (Taking in the account the fact that it re-enables itself) Use del_timer_sync(). It guarantees that when it returns, the timer will be stopped and the timer routine will no longer be running on any CPU. Alan Stern - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [linux-pm] QUESTION: How to fix race between .suspend routine and watchdog timer

2007-10-25 Thread Alan Stern
d don't re-enable the timer if it is set. Even without any memory barriers, the timer routine won't iterate more than once or twice. Alan Stern - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Questions about IPsec and Netfilter

2007-05-10 Thread Alan Stern
any security association? Thanks for any answers. I may think up more questions later... Alan Stern - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Runtime power management for network interfaces

2006-07-25 Thread Alan Stern
twork cable is unplugged. Has any progress been made in this direction? If not, a natural approach would be to start with a reference implementation in one driver which could then be copied to other drivers. Any suggestions? Alan Stern - To unsubscribe from this list: send the line "u