Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-27 Thread Krzysztof Mazur
On Tue, Nov 27, 2012 at 05:16:32PM +, David Woodhouse wrote: > Krzysztof, you've fixed a bunch of races... but I think there's one > still left. > > An ATM driver will often have code like this, which gets called from > arbitrary contexts: > if (vcc->pop) > vcc->pop(vcc

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-27 Thread Krzysztof Mazur
On Tue, Nov 27, 2012 at 06:02:29PM +, David Woodhouse wrote: > On Tue, 2012-11-27 at 18:39 +0100, Krzysztof Mazur wrote: > > Yes, I missed that one - it's even worse, I introduced that bug > > in "[PATCH 1/7] atm: detach protocol before closing vcc". Befor

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-27 Thread Krzysztof Mazur
On Tue, Nov 27, 2012 at 06:02:29PM +, David Woodhouse wrote: > > I'm not running with that patch. This bug exists for br2684 even before > it, and I think also for pppoatm. > Did you use your "atm: br2684: Fix excessive queue bloat" patch? With that patch for pppoatm the dev->close()/pppoat

Re: [PATCH] br2684: don't send frames on not-ready vcc

2012-11-27 Thread Krzysztof Mazur
); > ATM_SKB(skb)->atm_options = atmvcc->atm_options; > With this patch you have still theoretical race that was fixed in patches 5 and 8 in pppoatm series, but I never seen that in practice. Acked-by: Krzysztof Mazur Krzysiek -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] br2684: don't send frames on not-ready vcc

2012-11-28 Thread Krzysztof Mazur
On Wed, Nov 28, 2012 at 12:54:46AM +, David Woodhouse wrote: > On Wed, 2012-11-28 at 00:51 +0100, Krzysztof Mazur wrote: > > If you do this actually it's better to don't use patch 1/7 because > > it introduces race condition that you found earlier. > > Right.

Re: [PATCH v3 8/7] pppoatm: fix missing wakeup in pppoatm_send()

2012-11-28 Thread Krzysztof Mazur
;. > > http://git.infradead.org/users/dwmw2/atm.git > git://git.infradead.org/users/dwmw2/atm.git > > David Woodhouse (5): > atm: Add release_cb() callback to vcc > pppoatm: fix missing wakeup in pppoatm_send() > br2684: fix module_put() race for the thr

Re: [PATCH v3 8/7] pppoatm: fix missing wakeup in pppoatm_send()

2012-11-28 Thread Krzysztof Mazur
On Wed, Nov 28, 2012 at 09:24:09AM +, David Woodhouse wrote: > On Wed, 2012-11-28 at 09:12 +0100, Krzysztof Mazur wrote: > > On Wed, Nov 28, 2012 at 12:48:17AM +, David Woodhouse wrote: > > > On Tue, 2012-11-27 at 10:23 -0500, chas williams - CONTRACTOR wrote: > > &

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-28 Thread Krzysztof Mazur
On Wed, Nov 28, 2012 at 09:21:37AM -, David Laight wrote: > > On Tue, 27 Nov 2012 18:02:29 + > > David Woodhouse wrote: > > > > > In solos-pci at least, the ops->close() function doesn't flush all > > > pending skbs for this vcc before returning. So can be a tasklet > > > somewhere which

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-28 Thread Krzysztof Mazur
On Tue, Nov 27, 2012 at 07:28:43PM +0100, Krzysztof Mazur wrote: > > While reviewing your br2684 patch I also found that some ATM drivers does > not call ->pop() when ->send() fails, they should do: > > if (vcc->pop) > vcc-&

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-28 Thread Krzysztof Mazur
On Wed, Nov 28, 2012 at 08:44:41PM +, David Woodhouse wrote: > On Wed, 2012-11-28 at 21:18 +0100, Krzysztof Mazur wrote: > > > > +void vcc_pop_any(struct atm_vcc *vcc, struct sk_buff *skb) > > +{ > > + if (vcc->pop) > > + vcc->

[PATCH] atm: introduce vcc_pop()

2012-11-28 Thread Krzysztof Mazur
On Wed, Nov 28, 2012 at 04:20:01PM -0500, chas williams - CONTRACTOR wrote: > On Wed, 28 Nov 2012 21:18:37 +0100 > Krzysztof Mazur wrote: > > > On Tue, Nov 27, 2012 at 07:28:43PM +0100, Krzysztof Mazur wrote: > > > I think that we should add atm_pop() function th

Re: [PATCH] atm: introduce vcc_pop()

2012-11-28 Thread Krzysztof Mazur
On Wed, Nov 28, 2012 at 04:59:06PM -0500, chas williams - CONTRACTOR wrote: > On Wed, 28 Nov 2012 22:45:34 +0100 > Krzysztof Mazur wrote: > > > On Wed, Nov 28, 2012 at 04:20:01PM -0500, chas williams - CONTRACTOR wrote: > > > i dont like the vcc->pop() implementation

[PATCH] atm: introduce vcc_pop_skb()

2012-11-28 Thread Krzysztof Mazur
On Wed, Nov 28, 2012 at 11:10:40PM +0100, Krzysztof Mazur wrote: > On Wed, Nov 28, 2012 at 04:59:06PM -0500, chas williams - CONTRACTOR wrote: > > On Wed, 28 Nov 2012 22:45:34 +0100 > > Krzysztof Mazur wrote: > > > > > On Wed, Nov 28, 2012 at 04:20:01PM -05

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-29 Thread Krzysztof Mazur
On Wed, Nov 28, 2012 at 10:18:35PM +, David Woodhouse wrote: > On Wed, 2012-11-28 at 09:21 +, David Laight wrote: > > Even when it might make sense to sleep in close until tx drains > > there needs to be a finite timeout before it become abortive. > > You are, of course, right. We should n

[PATCH] solos-pci: don't call vcc->pop() after pclose()

2012-11-29 Thread Krzysztof Mazur
On Thu, Nov 29, 2012 at 11:55:43AM +, David Woodhouse wrote: > On Thu, 2012-11-29 at 11:57 +0100, Krzysztof Mazur wrote: > > do we really need to wait here? > > Why don't just do something like that: > > > > tasklet_disable(&card->tlet);

Re: [PATCH] solos-pci: don't call vcc->pop() after pclose()

2012-11-29 Thread Krzysztof Mazur
On Thu, Nov 29, 2012 at 12:57:17PM +, David Woodhouse wrote: > On Thu, 2012-11-29 at 13:43 +0100, Krzysztof Mazur wrote: > > > > Removing packets from tx_queue is not needed. We can transmit packets > > also after close. We just can't call vcc->pop() after close,

Re: [PATCH] solos-pci: don't call vcc->pop() after pclose()

2012-11-29 Thread Krzysztof Mazur
On Thu, Nov 29, 2012 at 02:42:17PM +, David Woodhouse wrote: > On Thu, 2012-11-29 at 14:20 +0100, Krzysztof Mazur wrote: > > if (card->tx_skb[port] == skb) { > > skb_get(skb); > > solos_p

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-29 Thread Krzysztof Mazur
On Wed, Nov 28, 2012 at 10:18:35PM +, David Woodhouse wrote: > On Wed, 2012-11-28 at 09:21 +, David Laight wrote: > > Even when it might make sense to sleep in close until tx drains > > there needs to be a finite timeout before it become abortive. > > You are, of course, right. We should n

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-29 Thread Krzysztof Mazur
On Thu, Nov 29, 2012 at 03:47:57PM +, David Woodhouse wrote: > On Thu, 2012-11-29 at 16:09 +0100, Krzysztof Mazur wrote: > > > > I don't like two thinks about this patch: > > > > - if allos_skb(sizeof(*header), GFP_ATOMIC) at beginning of > >

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-30 Thread Krzysztof Mazur
On Fri, Nov 30, 2012 at 08:25:22AM +, David Woodhouse wrote: > On Fri, 2012-11-30 at 01:57 +, David Woodhouse wrote: > > I think it's actually fixed for pppoatm by the bh_lock_sock() and the > > sock_owned_by_user() check. As soon as vcc_release() calls lock_sock(), > > pppoatm stops accept

Re: [PATCH v2 2/3] pppoatm: fix race condition with destroying of vcc

2012-10-31 Thread Krzysztof Mazur
On Wed, Oct 31, 2012 at 10:41:47AM +0100, Krzysztof Mazur wrote: > > I think that we should add a wrapper to vcc->send(), based on > fixed pppoatm_send(), that performs required checks and takes the ATM socket > lock. > I'm sending initial version of such wrapper and upda

Re: [PATCH v2 2/3] pppoatm: fix race condition with destroying of vcc

2012-10-31 Thread Krzysztof Mazur
ter it, because vcc->dev->ops->close() is not called. The pppoatm_send() is called with BH disabled, so bh_lock_sock() should be used instead of lock_sock(). Signed-off-by: Krzysztof Mazur --- net/atm/pppoatm.c | 27 +++ 1 file changed, 19 insertions(+), 8 delet

Re: [PATCH v2 2/3] pppoatm: fix race condition with destroying of vcc

2012-10-31 Thread Krzysztof Mazur
x29/0x50 [] vcc_write_space+0x40/0x80 [] atm_pop_raw+0x21/0x30 [] usbatm_tx_process+0x2a5/0x380 [] tasklet_action+0x39/0x70 [] __do_softirq+0x7f/0x120 [] ? local_bh_enable_ip+0xa0/0xa0 Now the protocol is detached before vcc is closed. Signed-off-by: Krzysztof Mazur --- net/atm/common.c | 4 ++

Re: [PATCH v2 2/3] pppoatm: fix race condition with destroying of vcc

2012-11-02 Thread Krzysztof Mazur
On Thu, Nov 01, 2012 at 10:26:28AM -0400, chas williams - CONTRACTOR wrote: > On Wed, 31 Oct 2012 23:04:35 +0100 > Krzysztof Mazur wrote: > > > There are also some minor potential issues in pppoatm driver: > > > > - locking issues, but now only

Re: [PATCH v2 2/3] pppoatm: fix race condition with destroying of vcc

2012-11-02 Thread Krzysztof Mazur
On Fri, Nov 02, 2012 at 10:40:18AM +0100, Krzysztof Mazur wrote: > On Thu, Nov 01, 2012 at 10:26:28AM -0400, chas williams - CONTRACTOR wrote: > > On Wed, 31 Oct 2012 23:04:35 +0100 > > Krzysztof Mazur wrote: > > > - missing check for SS_CONNECTED in pppoatm_ioctl, >

Re: [PATCH v2 2/3] pppoatm: fix race condition with destroying of vcc

2012-10-30 Thread Krzysztof Mazur
On Tue, Oct 30, 2012 at 10:26:46AM -0400, Chas Williams (CONTRACTOR) wrote: > In message > <1350926091-12642-2-git-send-email-krzys...@podlesie.net>,Krzysztof Mazur > writes: > > as i recall from way back, this shouldnt be necessary. closing a vcc > for an attached p

Re: [PATCH v2 2/3] pppoatm: fix race condition with destroying of vcc

2012-10-30 Thread Krzysztof Mazur
On Tue, Oct 30, 2012 at 09:37:48AM +, David Woodhouse wrote: > > Should we be locking it earlier, so that the atm_may_send() call is also > covered by the lock? Yes, but only to protect against concurent vcc_sendmsg(). > > Either way, it's an obvious improvement on what we had before ??? an

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-10-30 Thread Krzysztof Mazur
On Tue, Oct 30, 2012 at 09:39:22AM +, David Woodhouse wrote: > On Mon, 2012-10-22 at 19:14 +0200, Krzysztof Mazur wrote: > > The pppoatm gets a reference to atmvcc, but does not increment vcc > > usage count. The vcc uses vcc->sk socket for reference counting, > > so

Re: [PATCH v2 2/3] pppoatm: fix race condition with destroying of vcc

2012-10-30 Thread Krzysztof Mazur
On Tue, Oct 30, 2012 at 08:07:25PM +0100, Krzysztof Mazur wrote: > On Tue, Oct 30, 2012 at 09:37:48AM +, David Woodhouse wrote: > > > > Should we be locking it earlier, so that the atm_may_send() call is also > > covered by the lock? > > Yes, but only to protect ag

Re: [PATCH v2 1/3] pppoatm: don't send frames to destroyed vcc

2012-10-30 Thread Krzysztof Mazur
On Tue, Oct 30, 2012 at 09:35:00AM +, David Woodhouse wrote: > On Mon, 2012-10-22 at 19:14 +0200, Krzysztof Mazur wrote: > > Now pppoatm_send(), like vcc_sendmsg(), checks for vcc flags that > > indicate that vcc is not ready. > > I note that vcc_sendmsg() also c

Re: [PATCH v2 2/3] pppoatm: fix race condition with destroying of vcc

2012-10-31 Thread Krzysztof Mazur
On Tue, Oct 30, 2012 at 07:20:01PM +0100, Krzysztof Mazur wrote: > On Tue, Oct 30, 2012 at 10:26:46AM -0400, Chas Williams (CONTRACTOR) wrote: > > In message > > <1350926091-12642-2-git-send-email-krzys...@podlesie.net>,Krzysztof Mazur > > writes: > > &g

[PATCH] pppoatm: don't send frames to destroyed vcc

2012-10-06 Thread Krzysztof Mazur
end(), like vcc_sendmsg(), checks for vcc flags that indicate that vcc is not ready. Signed-off-by: Krzysztof Mazur --- This bug can be easily triggered with 9d02daf754238adac48fa075ee79e7edd3d79ed3 (pppoatm: Fix excessive queue bloat) present in Linux >= 3.5-rc1. Steps to reproduce (teste

Re: [PATCH] pppoatm: don't send frames to destroyed vcc

2012-10-06 Thread Krzysztof Mazur
On Sat, Oct 06, 2012 at 02:32:50PM +0100, David Woodhouse wrote: > On Sat, 2012-10-06 at 14:19 +0200, Krzysztof Mazur wrote: > > Now pppoatm_send(), like vcc_sendmsg(), checks for vcc flags that > > indicate that vcc is not ready. > > And what locking prevents the flag from

Re: [PATCH] pppoatm: don't send frames to destroyed vcc

2012-10-06 Thread Krzysztof Mazur
On Sat, Oct 06, 2012 at 05:38:04PM +0200, Krzysztof Mazur wrote: > On Sat, Oct 06, 2012 at 02:32:50PM +0100, David Woodhouse wrote: > > On Sat, 2012-10-06 at 14:19 +0200, Krzysztof Mazur wrote: > > > Now pppoatm_send(), like vcc_sendmsg(), checks for vcc flags that > > &g

Re: [PATCH] pppoatm: don't send frames to destroyed vcc

2012-10-07 Thread Krzysztof Mazur
On Sat, Oct 06, 2012 at 05:38:04PM +0200, Krzysztof Mazur wrote: > On Sat, Oct 06, 2012 at 02:32:50PM +0100, David Woodhouse wrote: > > On Sat, 2012-10-06 at 14:19 +0200, Krzysztof Mazur wrote: > > > Now pppoatm_send(), like vcc_sendmsg(), checks for vcc flags that > > &g

[PATCH] menuconfig: fix extended colors ncurses support

2012-10-08 Thread Krzysztof Mazur
his patch "make menuconfig" is hard to use. Signed-off-by: Krzysztof Mazur --- scripts/kconfig/lxdialog/check-lxdialog.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh index e3b12c0..5a70e8b 100

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-30 Thread Krzysztof Mazur
k.slock. > + if (atomic_read(&brvcc->qspace) > 0) > + netif_wake_queue(brvcc->device); > + > + if (brvcc->old_release_cb) > + brvcc->old_release_cb(atmvcc); > +} Except that comment, the patch looks good: Acked-by: Krzy

Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-11-30 Thread Krzysztof Mazur
On Fri, Nov 30, 2012 at 12:12:56PM -0500, chas williams - CONTRACTOR wrote: > >Really, what we're saying is that *one* of the driver or protocol close > >functions needs to be split, and we need to do DPD or PDP. Since the > >device driver *can* abort/flush the TX queue and also any pending RX > >b

Re: [PATCH] atm: introduce vcc_pop_skb()

2012-12-03 Thread Krzysztof Mazur
On Mon, Dec 03, 2012 at 01:22:41PM +, David Woodhouse wrote: > On Wed, 2012-11-28 at 23:33 +0100, Krzysztof Mazur wrote: > > > > Many ATM drivers store vcc in ATM_SKB(skb)->vcc and use it for > > freeing skbs. Now they can just use atm_pop_skb() to free such > >

[PATCH v2 2/3] pppoatm: fix race condition with destroying of vcc

2012-10-22 Thread Krzysztof Mazur
). The vcc_release_async() sets ATM_VF_CLOSE, but it should be safe to call ->send() after it, because vcc->dev->ops->close() is not called. The pppoatm_send() is called with BH disabled, so bh_lock_sock() should be used instead of lock_sock(). Signed-off-by: Krzysztof Mazur Cc: David Woodh

[PATCH v2 3/3] pppoatm: protect against freeing of vcc

2012-10-22 Thread Krzysztof Mazur
The pppoatm gets a reference to atmvcc, but does not increment vcc usage count. The vcc uses vcc->sk socket for reference counting, so sock_hold() and sock_put() should be used by pppoatm. Signed-off-by: Krzysztof Mazur Cc: David Woodhouse --- net/atm/pppoatm.c | 3 +++ 1 file changed

[PATCH v2 1/3] pppoatm: don't send frames to destroyed vcc

2012-10-22 Thread Krzysztof Mazur
end(), like vcc_sendmsg(), checks for vcc flags that indicate that vcc is not ready. Signed-off-by: Krzysztof Mazur Cc: David Woodhouse --- Previously sent with more details as: http://marc.info/?l=linux-kernel&m=134952646810580&w=2 This patch extends race window between pppoatm

Linux 3.7 does not boot on OMAP L137 with CONFIG_TI_EDMA=y

2012-12-10 Thread Krzysztof Mazur
Hi, commit c2dde5f8f2095d7c623ff3565c1462e190272273 (dmaengine: add TI EDMA DMA engine driver) with new option CONFIG_TI_EDMA=y causes system hang after "Uncompressing Linux... done, booting the kernel." on OMAP L137. The same problem still exists in current v3.7-rc8-41-gcaf4919. This causes som

Re: Linux 3.7 does not boot on OMAP L137 with CONFIG_TI_EDMA=y

2012-12-10 Thread Krzysztof Mazur
On Tue, Dec 11, 2012 at 12:31:29AM +0100, Krzysztof Mazur wrote: > Hi, > > commit c2dde5f8f2095d7c623ff3565c1462e190272273 > (dmaengine: add TI EDMA DMA engine driver) > with new option CONFIG_TI_EDMA=y causes system hang after > "Uncompressing Linux... done, booting the

[PATCH v3 0/7] pppoatm: fix multiple issues with pppoatm driver

2012-11-06 Thread Krzysztof Mazur
v2 3/3] pppoatm: protect against freeing of vcc" was dropped because it's not necessary, this protection is already provided by ATM layer [v2] "[PATCH v2 1/3] pppoatm: don't send frames to destroyed vcc" http://marc.info/?l=linux-kernel&m=135092672625585&w=2

[PATCH v3 1/7] atm: detach protocol before closing vcc

2012-11-06 Thread Krzysztof Mazur
/0x380 [] tasklet_action+0x39/0x70 [] __do_softirq+0x7f/0x120 [] ? local_bh_enable_ip+0xa0/0xa0 Now the protocol is detached before vcc is closed. Signed-off-by: Krzysztof Mazur Suggested-by: Chas Williams - CONTRACTOR Cc: David Woodhouse Cc: Chas Williams - CONTRACTOR --- net/atm/common.c | 4 ++--

[PATCH v3 6/7] pppoatm: don't send frames on not-ready vcc

2012-11-06 Thread Krzysztof Mazur
which is flagged as ATM_VF_CLOSE (for instance after vcc_release_async()) or it's opened but not ready yet. Now pppoatm_send(), like vcc_sendmsg(), checks for vcc flags that indicate that vcc is not ready. Signed-off-by: Krzysztof Mazur Cc: David Woodhouse --- net/atm/pppoatm.c | 4 1 f

[PATCH v3 5/7] pppoatm: take ATM socket lock in pppoatm_send()

2012-11-06 Thread Krzysztof Mazur
er ATM socket functions. The pppoatm_send() is called with BH disabled, so bh_lock_sock() is used instead of lock_sock(). Signed-off-by: Krzysztof Mazur Cc: David Woodhouse Cc: Chas Williams - CONTRACTOR --- net/atm/pppoatm.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-

[PATCH v3 4/7] pppoatm: fix module_put() race

2012-11-06 Thread Krzysztof Mazur
The pppoatm used module_put() during unassignment from vcc with hope that we have BKL. This assumption is no longer true. Now owner field in atmvcc is used to move this module_put() to vcc_destroy_socket(). Signed-off-by: Krzysztof Mazur --- net/atm/pppoatm.c | 9 +++-- 1 file changed, 7

[PATCH v3 7/7] pppoatm: do not inline pppoatm_may_send()

2012-11-06 Thread Krzysztof Mazur
new delta pppoatm_may_send - 132+132 pppoatm_send 900 533-367 Signed-off-by: Krzysztof Mazur --- net/atm/pppoatm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/atm/pppoatm.c b/net/atm/pppo

[PATCH v3 3/7] pppoatm: allow assign only on a connected socket

2012-11-06 Thread Krzysztof Mazur
The pppoatm does not check if used vcc is in connected state, causing an Oops in pppoatm_send() when vcc->send() is called on not fully connected socket. Now pppoatm can be assigned only on connected sockets; otherwise -EINVAL error is returned. Signed-off-by: Krzysztof Mazur Cc: Da

[PATCH v3 2/7] atm: add owner of push() callback to atmvcc

2012-11-06 Thread Krzysztof Mazur
Now the owner of push() callback is kept in atmvcc and module_put(atmvcc->owner) is called after the protocol is detached from vcc. Signed-off-by: Krzysztof Mazur --- include/linux/atmdev.h | 1 + net/atm/common.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/linux/atmd

Re: [PATCH v3 8/7] pppoatm: fix missing wakeup in pppoatm_send()

2012-11-10 Thread Krzysztof Mazur
On Wed, Nov 07, 2012 at 12:52:14PM +, David Woodhouse wrote: > > diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c > index 7507c20..56ad541 100644 > --- a/net/atm/pppoatm.c > +++ b/net/atm/pppoatm.c > @@ -283,11 +283,11 @@ static int pppoatm_send(struct ppp_channel *chan, > struct sk_buff *s

Re: [PATCH v3 8/7] pppoatm: fix missing wakeup in pppoatm_send()

2012-11-10 Thread Krzysztof Mazur
On Sat, Nov 10, 2012 at 09:02:02PM +, David Woodhouse wrote: > On Sat, 2012-11-10 at 21:23 +0100, Krzysztof Mazur wrote: > > With this tasklet_schedule() we implement a "spin_lock" here, but in > > this case both conditions (vcc not ready and socket locked) can be >

Re: [PATCH v3 8/7] pppoatm: fix missing wakeup in pppoatm_send()

2012-11-11 Thread Krzysztof Mazur
On Sun, Nov 11, 2012 at 07:28:53AM +, David Woodhouse wrote: > On Sat, 2012-11-10 at 21:23 +0100, Krzysztof Mazur wrote: > > With this tasklet_schedule() we implement a "spin_lock" here, but in > > this case both conditions (vcc not ready and socket locked) can be >

Re: [PATCH v3 8/7] pppoatm: fix missing wakeup in pppoatm_send()

2012-11-11 Thread Krzysztof Mazur
k = pvcc; atmvcc->push = pppoatm_push; atmvcc->pop = pppoatm_pop; + atmvcc->unlock_cb = pppoatm_unlock_cb; __module_get(THIS_MODULE); atmvcc->owner = THIS_MODULE; With this change: Acked-by: Krzysztof Mazur This patch should be also acked by Chas,

Re: [PATCH v3 8/7] pppoatm: fix missing wakeup in pppoatm_send()

2012-11-11 Thread Krzysztof Mazur
On Sun, Nov 11, 2012 at 03:26:41PM +, David Woodhouse wrote: > On Sun, 2012-11-11 at 14:50 +0100, Krzysztof Mazur wrote: > > Looks and works ok after: > > + atmvcc->unlock_cb = pppoatm_unlock_cb; > > Heh, yeah. That would probably help :) > > Not su

Re: [PATCH v3 8/7] pppoatm: fix missing wakeup in pppoatm_send()

2012-11-11 Thread Krzysztof Mazur
On Sun, Nov 11, 2012 at 05:03:21PM +, David Woodhouse wrote: > On Sun, 2012-11-11 at 17:12 +0100, Krzysztof Mazur wrote: > > It would require using atomic ops because also pppoatm_pop() can > > modify this word. I think it's better to add additional word instead >

[PATCH] Input: mousedev - fix /dev/input/mice minor number

2012-11-18 Thread Krzysztof Mazur
The mousedev always used relative minor number 31 for MOUSEDEV_MIX (/dev/input/mice), but alsolute minor number was 63. Commit 7f8d4cad1e4e11a45d02bd6e024cc2812963c38a ("Input: extend the number of event (and other) devices") changed it to 31 alsolute minor number. Signed-off-by: Krzys

vt: regression caused by "Fix line garbage in virtual.."

2012-11-18 Thread Krzysztof Mazur
Hi, commit 81732c3b2fede049a692e58a7ceabb6d18ffb18c (tty vt: Fix line garbage in virtual console on command line edition) introduced some regression in deleting characters/clearing line during selecting previous command in bash by using "up" arrow. The problem can be reproduced by two following

Re: 3.7-rc3: mouses stopped working

2012-11-18 Thread Krzysztof Mazur
3 to c,13,31. We need to fix this so that > setups with statically populated /dev continue working. > > Signed-off-by: Dmitry Torokhov I had the same problem and this patch fixes it (I even concurrently fixed that in similar way). If you need that: Tested-by: Krzysztof Mazur Thank

Re: vt: regression caused by "Fix line garbage in virtual.."

2012-11-19 Thread Krzysztof Mazur
This commit introduced frequent display artifacts during simple command line editing in bash, at least with framebuffer console on top inteldrmfb and radeondrmfb framebuffers. Signed-off-by: Krzysztof Mazur --- drivers/tty/vt/vt.c | 78 + 1 file

Re: [PATCH] menuconfig: fix extended colors ncurses support

2012-11-20 Thread Krzysztof Mazur
On Tue, Nov 20, 2012 at 10:53:28AM +0100, Michal Marek wrote: > On Mon, Oct 08, 2012 at 06:18:22PM +0200, Krzysztof Mazur wrote: > > The ncurses library allows for extended colors. The support for extended > > colors support depends on wide-character support. ncurses headers >

Re: vt: regression caused by "Fix line garbage in virtual.."

2012-11-20 Thread Krzysztof Mazur
ng) p, > - (vc->vc_cols - vc->vc_x) / 2); > + vc->vc_cols - vc->vc_x); > } > > static int softcursor_original; Tested-by: Krzysztof Mazur Thanks, Krzysiek -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] tty vt: Fix a regression in command line edition

2012-11-20 Thread Krzysztof Mazur
On Tue, Nov 20, 2012 at 05:35:41PM +0100, Jean-Francois Moine wrote: > From: Jean-François Moine > > The commit 81732c3b2fede049a692e58a7ceabb6d18ffb18c > ("Fix line garbage in virtual console on command line edition") > made a regression with some machines: some characters were not erased > afte

ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression

2013-03-23 Thread Krzysztof Mazur
Hi, commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 ("[libata] Set proper SK when CK_COND is set") breaks "SMART Status command" ATA command issued by smartctl -d ata -a /dev/sda at least on FUJITSU MHV2060AH on ICH6 IDE Controller. The kernel returns -EIO on HDIO_DRIVE_TASK (0x31e) or HDIO_DRIVE_

[PATCH 0/2] usb: fix hub_configure() error handling

2013-08-20 Thread Krzysztof Mazur
in hub_configure by setting hub->maxchild to the total number of allocated ports (or 0 if hub_ports can't be allocated)." http://marc.info/?l=linux-usb&m=136189486922963&w=4 The second patch uses slightly different approach because some users ignore hub->maxchild and u

[PATCH 2/2] usb: fail on usb_hub_create_port_device() errors

2013-08-20 Thread Krzysztof Mazur
Ignoring usb_hub_create_port_device() errors cause later NULL pointer deference when uninitialized hub->ports[i] entries are dereferenced after port memory allocation error. Signed-off-by: Krzysztof Mazur --- I'm not sure if failing in that case is a good idea, but other solutions

[PATCH 1/2] usb: fix cleanup after failure in hub_configure()

2013-08-20 Thread Krzysztof Mazur
zed ports. Suggested-by: Alan Stern Signed-off-by: Krzysztof Mazur --- drivers/usb/core/hub.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 558313d..588c3a3 100644 --- a/drivers/usb/core/hub.c +++ b/drivers

Re: [PATCH 1/2] usb: fix cleanup after failure in hub_configure()

2013-08-20 Thread Krzysztof Mazur
On Tue, Aug 20, 2013 at 02:14:42PM -0400, Alan Stern wrote: > On Tue, 20 Aug 2013, Krzysztof Mazur wrote: > > > If the hub_configure() fails after setting the hdev->maxchild > > the hub->ports might be NULL or point to uninitialized kzallocated > > memory causi

Re: [PATCH 2/2] usb: fail on usb_hub_create_port_device() errors

2013-08-20 Thread Krzysztof Mazur
On Tue, Aug 20, 2013 at 02:18:57PM -0400, Alan Stern wrote: > On Tue, 20 Aug 2013, Krzysztof Mazur wrote: > > > Ignoring usb_hub_create_port_device() errors cause later NULL pointer > > deference when uninitialized hub->ports[i] entries are dereferenced > > after p

Re: [PATCH 1/2] usb: fix cleanup after failure in hub_configure()

2013-08-20 Thread Krzysztof Mazur
On Tue, Aug 20, 2013 at 02:59:18PM -0400, Alan Stern wrote: > On Tue, 20 Aug 2013, Krzysztof Mazur wrote: > > > > Why bother with a separate jump label? Just set maxchild to 0 whenever > > > a failure occurs. > > > > > > > Initially I had just st

Re: [PATCH 2/2] usb: fail on usb_hub_create_port_device() errors

2013-08-21 Thread Krzysztof Mazur
On Tue, Aug 20, 2013 at 03:50:37PM -0400, Alan Stern wrote: > On Tue, 20 Aug 2013, Krzysztof Mazur wrote: > > > On Tue, Aug 20, 2013 at 02:18:57PM -0400, Alan Stern wrote: > > > On Tue, 20 Aug 2013, Krzysztof Mazur wrote: > > > > > > > Ignoring usb_h

[PATCH v3 1/3] usb: fix cleanup after failure in hub_configure()

2013-08-22 Thread Krzysztof Mazur
zed ports. Signed-off-by: Krzysztof Mazur Acked-by: Alan Stern --- drivers/usb/core/hub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 558313d..affed11 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -1568,6 +1568,7

[PATCH v3 3/3] usb: don't use bNbrPorts after initialization

2013-08-22 Thread Krzysztof Mazur
After successful initialization hub->descriptor->bNbrPorts and hub->hdev->maxchild are equal, but using hub->hdev->maxchild is preferred because that value is explicitly used for initialization of hub->ports[]. Signed-off-by: Krzysztof Mazur Acked-by: Alan Stern --- driver

[PATCH v3 0/3] usb: fix hub_configure() error handling

2013-08-22 Thread Krzysztof Mazur
quot;usb: don't use bNbrPorts after initialization" has been added. The first version has been posted here: https://lkml.org/lkml/2013/8/20/469 Krzysiek Krzysztof Mazur (3): usb: fix cleanup after failure in hub_configure() usb: fail on usb_hub_create_port_device() error

[PATCH v3 2/3] usb: fail on usb_hub_create_port_device() errors

2013-08-22 Thread Krzysztof Mazur
Ignoring usb_hub_create_port_device() errors cause later NULL pointer deference when uninitialized hub->ports[i] entries are dereferenced after port memory allocation error. Signed-off-by: Krzysztof Mazur Acked-by: Alan Stern --- drivers/usb/core/hub.c | 10 -- 1 file changed

[PATCH] x86: fix 32-bit *_cpu_data initializers

2013-03-02 Thread Krzysztof Mazur
iv_bug. If CONFIG_X86_F00F_BUG is not set the f00f_bug flag is never cleared. To avoid such problems in future C99-style initialization is now used. Signed-off-by: Krzysztof Mazur --- $ cat < /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model :

drm: i915+fb: crtc->lock recursive locking deadlock on VT switch [>= 3.9-rc1 regresion]

2013-04-13 Thread Krzysztof Mazur
Hi, the drm_fb_helper_hotplug_event() locks all crtc->mutex locks by calling drm_modeset_lock_all() and later calls drm_fb_helper_probe_connector_modes(), which in case of i915 DRM driver effectively calls intel_get_load_detect_pipe() that tries to lock crtc->mutex again. This causes a deadlock, a

Re: drm: i915+fb: crtc->lock recursive locking deadlock on VT switch [>= 3.9-rc1 regresion]

2013-04-13 Thread Krzysztof Mazur
On Sat, Apr 13, 2013 at 06:10:40PM +0100, Chris Wilson wrote: > On Sat, Apr 13, 2013 at 05:41:46PM +0200, Krzysztof Mazur wrote: > > Hi, > > > > the drm_fb_helper_hotplug_event() locks all crtc->mutex locks by calling > > drm_mode

Re: ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression

2013-03-27 Thread Krzysztof Mazur
On Mon, Mar 25, 2013 at 06:26:50PM +0100, Ronald wrote: > In reply to [1]: I have the same issue. Git bisect took 50+ rebuilds xD > > Smartd does not work anymore since 84a9a8cd9 ([libata] Set proper SK > when CK_COND is set.). > > I hope I'm not stepping on anyone's toe's by chosing the same tit

Re: [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-29 Thread Krzysztof Mazur
On Fri, Mar 29, 2013 at 08:26:41AM -0700, Gwendal Grignou wrote: > commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key > used for returning task registers, but HDIO_DRIVE_CMD ioctl was > not changed accordingly. > > Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD return

Re: [PATCH v2] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-29 Thread Krzysztof Mazur
HDIO_DRIVE_CMD returns 0 > instead of EIO. > > Signed-off-by: Gwendal Grignou Works for me. If you like you can add: Reported-and-tested-by: Krzysztof Mazur Krzysiek -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@v

i915: black screen after blank when LID is closed on Linux >= 3.1

2012-11-22 Thread Krzysztof Mazur
Hi, since Linux 3.1 I'm having some problems with i915 driver on HP nc6120 with 915GM chipset. The display goes black after the kernel tries to blank screen while LID is closed (see steps to reproduce to more detailed description). Currently I'm using Linux 3.7-rc6 with KMS enabled and disabled A

Re: i915: black screen after blank when LID is closed on Linux >= 3.1

2012-11-22 Thread Krzysztof Mazur
27; > loose track of it? Yes, I will add a bug report there. > > A few questions and things to test below. > > On Thu, Nov 22, 2012 at 7:54 PM, Krzysztof Mazur > wrote: > > since Linux 3.1 I'm having some problems with i915 driver on HP nc6120 > > with 915GM

Re: i915: black screen after blank when LID is closed on Linux >= 3.1

2012-11-22 Thread Krzysztof Mazur
On Thu, Nov 22, 2012 at 09:17:54PM +0100, Daniel Vetter wrote: > Hi, > > > Since a dpms ioctl call tends to follow a modeset, this likely only > results in that dpms call enabling the hw again. Can you please add > drm.debug=0xe to your kernel cmdline and boot into a 3.6 with this > hack applied,

[PATCH] cpuidle: fix number of initialized/destroyed states

2013-01-07 Thread Krzysztof Mazur
ues might have different values, causing for instance NULL pointer dereference in cpuidle_remove_state_sysfs(). Signed-off-by: Krzysztof Mazur --- Hi, commit bf4d1b5ddb78f86078ac6ae0415802d5f0c68f92 (cpuidle: support multiple drivers, merged in v3.8-rc1) causes NULL pointer deref

Re: [RFC PATCH 00/16] PTI support for x86-32

2018-01-24 Thread Krzysztof Mazur
On Tue, Jan 16, 2018 at 05:36:43PM +0100, Joerg Roedel wrote: > From: Joerg Roedel > > Hi, > > here is my current WIP code to enable PTI on x86-32. It is > still in a pretty early state, but it successfully boots my > KVM guest with PAE and with legacy paging. The existing PTI > code for x86-64

Re: [RFC PATCH 00/16] PTI support for x86-32

2018-01-26 Thread Krzysztof Mazur
On Thu, Jan 25, 2018 at 02:09:40PM -0800, Nadav Amit wrote: > The PoC apparently does not work with 3GB of memory or more on 32-bit. Does > you setup has more? Can you try the attack while setting max_addr=1G ? No, I tested on: Pentium M (Dothan): 1.5 GB RAM, PAE for NX, 2GB/2GB split CONFIG_NOH

[PATCH] ssb: Reenable PCI host on !MIPS

2018-01-26 Thread Krzysztof Mazur
fines that config option). Reenable it. Signed-off-by: Krzysztof Mazur --- drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig index 71c73766ee22..3dc57414e06b 100644 --- a/drivers/ssb/Kconfig +++ b/drivers/ssb/Kconfi

Re: [PATCH] ssb: Reenable PCI host on !MIPS

2018-01-26 Thread Krzysztof Mazur
On Sat, Jan 27, 2018 at 06:29:18AM +0200, Kalle Valo wrote: > Krzysztof Mazur writes: > > > The commit 58eae1416b804d900014d84feadda7195007cc30 > > ("ssb: Disable PCI host for PCI_DRIVERS_GENERIC") disabled > > CONFIG_SSB_PCIHOST and CONFIG_SSB_B43_PCI_BRID

Re: [PATCH] x86/lib: don't use MMX before FPU initialization

2021-01-14 Thread Krzysztof Mazur
On Tue, Jan 12, 2021 at 01:09:23AM +0100, Borislav Petkov wrote: > On Mon, Dec 28, 2020 at 05:06:31PM +0100, Krzysztof Mazur wrote: > > When enabled, the MMX 3DNow! optimized memcpy() is used very early, > > even before FPU is initialized. It worked f

Re: [PATCH] x86/lib: don't use MMX before FPU initialization

2021-01-14 Thread Krzysztof Mazur
ocessors with SSE (like AMD K7, which supports both MMX 3DNow! and SSE). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Signed-off-by: Krzysztof Mazur --- arch/x86/lib/mmx_32.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] x86/lib: don't use MMX before FPU initialization

2021-01-14 Thread Krzysztof Mazur
On Thu, Jan 14, 2021 at 03:07:37PM +0100, Borislav Petkov wrote: > On Thu, Jan 14, 2021 at 01:36:57PM +0100, Krzysztof Mazur wrote: > > The OSFXSR must be set only on CPUs with SSE. There > > are some CPUs with 3DNow!, but without SSE and FXSR (like AMD > > Geode LX, which

Re: [PATCH] x86/lib: don't use MMX before FPU initialization

2021-01-14 Thread Krzysztof Mazur
On Thu, Jan 14, 2021 at 08:31:30AM -0800, Andy Lutomirski wrote: > This is gross. I realize this is only used for old CPUs that we don't > care about perf-wise Performance might be still important for embedded systems (Geode LX seems to be supported "until at least 2021"). > , but this code is n

[PATCH] x86/lib: don't use MMX before FPU initialization

2020-12-28 Thread Krzysztof Mazur
uot;Booting the kernel." message. It affects all kernels with CONFIG_X86_USE_3DNOW=y (enabled when some AMD/Cyrix processors are selected). So, enable MMX 3DNow! optimized memcpy() later. Cc: # 5.8+ Signed-off-by: Krzysztof Mazur --- Hi, this patch fixes a kernel crash during boot obser

Re: [PATCH v3 2/4] x86/mmx: Use KFPU_387 for MMX string operations

2021-01-21 Thread Krzysztof Mazur
aforementioned bit > is clear. > > Fix it by using kernel_fpu_begin_mask(KFPU_387) explicitly. > > Fixes: 7ad816762f9b ("x86/fpu: Reset MXCSR to default in kernel_fpu_begin()") > Cc: > Reported-by: Krzysztof Mazur > Signed-off-by: Andy Lutomirski > --- >

i915: black screen after boot on 915GM (Linux >= 3.4-rc1)

2014-03-13 Thread Krzysztof Mazur
Hi, The commit 3f2dc5ac05714711fc14f2bf0ee5e42d5c08c581 (drm/i915: Fix 915GM self-refresh enable/disable) causes strange regression on the HP Compaq nc6120. During and after boot to framebuffer console with just LVDS the screen is black (backlight on, but black). Starting a X server fixes the prob

Re: [PATCH] init: fix in-place parameter modification regression

2013-10-18 Thread Krzysztof Mazur
hange broke at least parsing "ubd" parameter in the ubd driver when the COW file is used. Now the separate buffer is used for per-initcall parameter parsing. Signed-off-by: Krzysztof Mazur --- init/main.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/init/mai

[PATCH] init: fix in-place parameter modification regression

2013-10-12 Thread Krzysztof Mazur
r-initcall parameter parsing, like in parsing early params. Signed-off-by: Krzysztof Mazur --- Hi, this patch fixes an old Linux 3.4 regression in ubd parameter parsing. It was previously reported by the David Fernández in the "ubd option parsing problem when using cow filesystems in kernel 3.4&q

  1   2   >