From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754485AbXKDRPj (ORCPT ); Sun, 4 Nov 2007 12:15:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752937AbXKDRPb (ORCPT ); Sun, 4 Nov 2007 12:15:31 -0500 Received: from an-out-0708.google.com ([209.85.132.246]:39218 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752643AbXKDRP3 (ORCPT ); Sun, 4 Nov 2007 12:15:29 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=DTmGp9PPg+UYpNxFyR8Q9hrTG/tn4MPd6DvLwE61OuDYqdiSuaQEE284/kvxEfT6GVt6aK/0zodGu6WO06DWXPFAYF2cS81ZG0lKX+GaQE27zHG6YWnA+AuiDnU7VTFrsILEKxJ50x+CDGnIgYpFikv/lkD0QKq3myKs5P8UufU= Message-ID: <3c16e8dc0711040915n206c38d6u7e15972bf55e0e0d@mail.gmail.com> Date: Sun, 4 Nov 2007 14:15:28 -0300 From: "Felipe Dias" To: linux-kernel@vger.kernel.org Subject: textsearch in module = BUG: scheduling while atomic MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org hi, i have a short module in kernel 2.6.22 with uses textsearch to search strings in network packages, and i have this erros in dmesg: -------------- BUG: scheduling while atomic: apache2/0x10000101/3710 [] __sched_text_start+0x56/0x7c8 [] __wake_up_common+0x35/0x53 [] __wake_up+0x32/0x43 [] tcp_v4_send_check+0x86/0xbc [] __cond_resched+0x18/0x29 [] cond_resched+0x26/0x31 [] __kmalloc+0x38/0x6e [] bm_init+0x28/0x1c9 [ts_bm] [] __alloc_skb+0x47/0x104 [] textsearch_prepare+0xf4/0x11a [] hook_test+0x4c/0xb6 [test_mod] [] tcp_v4_rcv+0x84c/0x8aa [] nf_iterate+0x38/0x6a [] ip_rcv_finish+0x0/0x294 [] nf_hook_slow+0x4d/0xb5 [] ip_rcv_finish+0x0/0x294 [] ip_rcv+0x20b/0x4bd [] ip_rcv_finish+0x0/0x294 [] netif_receive_skb+0x2ef/0x309 [] process_backlog+0x7c/0xe9 [] net_rx_action+0x95/0x186 [] __do_softirq+0x6c/0xcf [] do_softirq+0x32/0x36 [] local_bh_enable+0x7b/0x89 [] dev_queue_xmit+0x202/0x221 [] ip_output+0x269/0x2a3 [] ip_queue_xmit+0x358/0x39a [] journal_end+0xba/0xc2 [reiserfs] [] reiserfs_dirty_inode+0x78/0x7e [reiserfs] [] tcp_transmit_skb+0x618/0x652 [] __tcp_push_pending_frames+0x71c/0x7cc [] reiserfs_file_write+0x1841/0x1871 [reiserfs] [] __alloc_skb+0x47/0x104 [] tcp_sendmsg+0x91b/0x9f0 [] skb_copy_datagram_iovec+0x53/0x1d0 [] tcp_recvmsg+0x8e5/0x9f0 [] sock_aio_write+0xf3/0xfb [] do_sync_readv_writev+0xc0/0x103 [] autoremove_wake_function+0x0/0x33 [] sys_getsockname+0x9f/0xb0 [] copy_from_user+0x23/0x4f [] rw_copy_check_uvector+0x50/0xaa [] do_readv_writev+0xbc/0x187 [] sock_aio_write+0x0/0xfb [] do_page_fault+0x273/0x516 [] vfs_writev+0x3d/0x48 [] sys_writev+0x41/0x67 [] sysenter_past_esp+0x5f/0x85 ======================= My module part with find the string with textsearch: ------------------------------- int pos, err; struct ts_config *conf; struct ts_state state; list_for_each_entry_safe(entry, next, &head, list) { conf = textsearch_prepare("bm", entry->content, strlen(entry->content), GFP_KERNEL, TS_AUTOLOAD); if (IS_ERR(conf)) err = PTR_ERR(conf); pos = textsearch_find_continuous(conf, &state, sb->data, sb->len); if (pos != -1) printk("%s: Contet: %s match!\n", MODULE_NAME, entry->content); textsearch_destroy(conf); } ------------------------------- What is this message ? somebody can help-me ? Please send-me the correct mail list if this is wrong place to this question. Att. Felipe Dias