Bug#770327: #770327 broadcom-sta/6.30.223.248-2

2014-12-07 Thread Mickael MASSON
Hello,

system hang when monitor interface is enabled/disabled should be fixed
thanks
to the 3 patches in attachment:
   07-fix_procfs_handling.patch
   08-enable_error_traces.patch
   09-fix_system_hang_when_deleting_monitor.patch
It should be applied after original Debian's patches and it has been tested
on Linux 3.14.

Regards,
Mickael

fix kernel crash/system hang because of incorrect pointer argument use while
retrieving cookie in procfs handling.
based on: http://ix.io/9DV
tested on: kernel 3.14

diff -p -u5 -r  broadcom-sta_6.30.223.248-2_deb/src/wl/sys/wl_linux.c  broadcom-sta_6.30.223.248-2_fix/src/wl/sys/wl_linux.c
---  broadcom-sta_6.30.223.248-2_deb/src/wl/sys/wl_linux.c
+++  broadcom-sta_6.30.223.248-2_fix/src/wl/sys/wl_linux.c
@@ -3223,70 +3223,112 @@ wl_linux_watchdog(void *ctx)
 }
 
 #if LINUX_VERSION_CODE  KERNEL_VERSION(3, 10, 0)
 static int
 wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
+{
+	wl_info_t * wl = (wl_info_t *)data;
 #else
 static ssize_t
-wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *data)
-#endif
+wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp)
 {
-	wl_info_t * wl = (wl_info_t *)data;
-	int to_user;
-	int len;
+	wl_info_t * wl = PDE_DATA(file_inode(filp));
+#endif
+	int bcmerror, len;
+	int to_user = 0;
+	char tmp[8];
 
 #if LINUX_VERSION_CODE  KERNEL_VERSION(3, 10, 0)
 	if (offset  0) {
 		*eof = 1;
 		return 0;
 	}
+#else
+	if (*offp  0) { /* for example, stop: cat /proc/brcm_monitor0 */
+		return 0; /* 0 = EOF */
+	}
 #endif
 
-	if (!length) {
-		WL_ERROR((%s: Not enough return buf space\n, __FUNCTION__));
-		return 0;
-	}
 	WL_LOCK(wl);
-	wlc_ioctl(wl-wlc, WLC_GET_MONITOR, to_user, sizeof(int), NULL);
-	len = sprintf(buffer, %d\n, to_user);
-	WL_UNLOCK(wl);
-	return len;
+	bcmerror = wlc_ioctl(wl-wlc, WLC_GET_MONITOR, to_user, sizeof(int), NULL);
+ 	WL_UNLOCK(wl);
+
+	if (bcmerror != BCME_OK) {
+		WL_ERROR((%s: GET_MONITOR failed with %d\n, __FUNCTION__, bcmerror));
+		return -EIO;
+	}
+
+ 	len = snprintf(tmp, ARRAY_SIZE(tmp), %d\n, to_user);
+	tmp[ARRAY_SIZE(tmp) - 1] = '\0';
+	if (len = ARRAY_SIZE(tmp)) {
+		printk(KERN_ERR %s:%d [%s()] output would be truncated (ret=%d)!, __FILE__, __LINE__, __FUNCTION__, len);
+		return -ERANGE;
+	}
+	else if (len  0) {
+		printk(KERN_ERR %s:%d [%s()] unable to convert value (ret=%d)!, __FILE__, __LINE__, __FUNCTION__, len);
+		return len;
+	}
+	if (length  len) {
+		printk(KERN_ERR %s:%d [%s()] user buffer is too small (at least=%d ; user=%d)!, __FILE__, __LINE__, __FUNCTION__, len, (int)length);
+		return -EMSGSIZE;
+	}
+	if (copy_to_user(buffer, tmp, len) != 0) {
+		printk(KERN_ERR %s:%d [%s()] unable to copy data!, __FILE__, __LINE__, __FUNCTION__);
+		return -EFAULT;
+	}
+	
+#if LINUX_VERSION_CODE = KERNEL_VERSION(3, 10, 0)
+	*offp += len;
+#endif
+
+ 	return len;
 }
 
 #if LINUX_VERSION_CODE  KERNEL_VERSION(3, 10, 0)
 static int
 wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
+{
+	wl_info_t * wl = (wl_info_t *)data;
 #else
 static ssize_t
-wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *data)
-#endif
+wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp)
 {
-	wl_info_t * wl = (wl_info_t *)data;
+	wl_info_t * wl = PDE_DATA(file_inode(filp));
+#endif
 	int from_user = 0;
 	int bcmerror;
 
 	if (length == 0 || length  2) {
 
 		WL_ERROR((%s: Invalid data length\n, __FUNCTION__));
 		return -EIO;
 	}
 	if (copy_from_user(from_user, buff, 1)) {
 		WL_ERROR((%s: copy from user failed\n, __FUNCTION__));
-		return -EIO;
+#if LINUX_VERSION_CODE  KERNEL_VERSION(3, 10, 0)
+ 		return -EIO;
+#else
+		return -EFAULT;
+#endif
 	}
 
 	if (from_user = 0x30)
 		from_user -= 0x30;
 
 	WL_LOCK(wl);
 	bcmerror = wlc_ioctl(wl-wlc, WLC_SET_MONITOR, from_user, sizeof(int), NULL);
 	WL_UNLOCK(wl);
 
-	if (bcmerror  0) {
+	if (bcmerror != BCME_OK) {
 		WL_ERROR((%s: SET_MONITOR failed with %d\n, __FUNCTION__, bcmerror));
 		return -EIO;
 	}
+	
+#if (LINUX_VERSION_CODE = KERNEL_VERSION(3, 10, 0))  0 /* no need to update offset because this file should only trigger action... */
+	*offp += length;
+#endif
+
 	return length;
 }
 
 #if LINUX_VERSION_CODE = KERNEL_VERSION(3, 10, 0)
 static const struct file_operations wl_fops = {
@@ -3303,12 +3345,12 @@ wl_reg_proc_entry(wl_info_t *wl)
 	sprintf(tmp, %s%d, HYBRID_PROC, wl-pub-unit);
 #if LINUX_VERSION_CODE  KERNEL_VERSION(3, 10, 0)
 	if ((wl-proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
 		WL_ERROR((%s: create_proc_entry %s failed\n, __FUNCTION__, tmp));
 #else
-	if ((wl-proc_entry = proc_create(tmp, 0644, NULL, wl_fops)) == NULL) {
-		WL_ERROR((%s: proc_create %s failed\n, __FUNCTION__, tmp));
+	if ((wl-proc_entry = proc_create_data(tmp, 0644, NULL, wl_fops, wl)) == NULL) {
+		WL_ERROR((%s: proc_create_data %s failed\n, __FUNCTION__, tmp));
 #endif
 		ASSERT(0);
 		return -1

Bug#669392: tetex-frogg: unowned file /usr/local/share/texmf/ls-R after purge (policy 6.8, 9.1.2)

2012-04-19 Thread Mickael Profeta
Hi,

Thanks for reports.  This package should not be part of debian anymore
as it is included in texlive-latex-extra.

I'll send the removal request, I thought this has been done for a
while...

Mickael.


 Package: tetex-frogg
 Version: 0.4-3
 Severity: serious
 User: debian...@lists.debian.org
 Usertags: piuparts
 
 Hi,
 
 during a test with piuparts I noticed your package left unowned files
 on the system after purge, which is a violation of policy 6.8:
 http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-removedetails
 
 As putting files into /usr/local is also a violation of
 http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.1.2
 I'm setting the severity to serious.
 
 From the attached log (scroll to the bottom...):
 
 0m53.8s ERROR: FAIL: Package purging left files on system:
   /usr/local/share/texmf/not owned
   /usr/local/share/texmf/ls-Rnot owned
 
 
 This problem is usually caused by running mktexlsr (or texhash)
 without path arguments from a maintainer script.
 
 The recommende solution is to switch to use dh_installtex and have
 this generate most (or perhaps even all) of the maintainer scripts
 content.
 
 Otherwise run mktexlsr with the tree as argument where the package
 installs its files, which is usually
   mktexlsr /usr/share/texmf
 
 There has been some further discussion about these bugs in this
 thread: http://lists.debian.org/debian-tex-maint/2012/04/msg00306.html
 
 Please have a look at the Debian-TeX-Policy (in the tex-common
 package) for the current practice of handling TeX packages. For
 further TeX packaging related questions contact
 debian-tex-ma...@lists.debian.org
 
 
 cheers,
 
 Andreas




-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#589796: saving does not work

2010-07-24 Thread Mickael Profeta
Hi,

I also encouter this bug.

I apply the patch and try to scan 2 pages and save in pdf, nothing
written about the save process:

Expecting 26099557, found 26099557
Running sane_start for SANE_Handle 52017360
Getting parameters for SANE_Handle 52017360
gscan2pdf: scanning image of size 2480x3508 pixels at 24 bits/pixel
gscan2pdf: acquiring RGB frame
gscan2pdf: min/max graylevel value = 255/0
gscan2pdf: sane_read: Document feeder out of documents
Scanned page /tmp/wR1g50bYOX/out3.pnm. (scanner status = 7)
Closing SANE_Handle 52017360
Exiting via sane_exit
Exiting via sane_exit


Hope this can help...

Mike



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#347822: prelude-nids: FTBFS: libprelude/list.h: No such file or directory

2006-06-09 Thread Mickael Profeta


Hi,

Sorry that you spent time on this bug, the package is to be removed.
As you noticed it is not maintained upstream and not compatible with new
version of prelude.

The bug#370662
to ftp.debian.org is the proposal for removal.

Regards.

Mike






-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#368911: prelude-manager: Broken depend on libpreludedb0

2006-05-28 Thread Mickael Profeta
Cedric Foll wrote:
 Package: prelude-manager
 Severity: grave
 Justification: renders package unusable


 The package libpreludedb0 doesn't seem available and is needed in order
 to install the package prelude-manager.

   
I know about that. The package is in the new queue and is waiting for
approval for months...

Mike


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#324182: printconf: error during installation

2005-08-20 Thread mickael
Package: printconf
Version: 0.7.4.14
Severity: grave
Justification: renders package unusable


I just types apt-get install printconf and I did get this error message :

Paramétrage de printconf (0.7.4.14) ...
Traceback (most recent call last):
  File /usr/bin/printconf, line 107, in ?
for q in existing.queues:
AttributeError: 'NoneType' object has no attribute 'queues'



-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.12
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages printconf depends on:
ii  cupsys1.1.23-10  Common UNIX Printing System(tm) - 
ii  cupsys-client 1.1.23-10  Common UNIX Printing System(tm) - 
ii  debconf [debconf-2.0] 1.4.30.13  Debian configuration management sy
ii  foomatic-db   20050420-1 linuxprinting.org printer support 
ii  foomatic-db-gimp-print4.2.7-10   linuxprinting.org printer support 
ii  foomatic-db-hpijs 1.5-20050420-1 linuxprinting.org printer support 
ii  gs8.01-5 Transitional package
ii  gs-gpl [gs]   8.01-5 The GPL Ghostscript PostScript int
ii  python2.3.5-2An interactive high-level object-o
ii  python-foomatic   0.7.4.14   Python interface to the Foomatic p

-- debconf information:
  printconf/setup_printers: true
  printconf/printconf_run: false



Bug#322172: Fails to install

2005-08-09 Thread Mickael Profeta
On Tue, Aug 09, 2005 at 07:48:11AM -0700, Debian BTS wrote:

Hi,

 Package: pts-tetex-cm-super
 Version: 0.3.3-7
 Severity: grave
 
 The package fails to install with the error:
 ==
 Setting up pts-tetex-cm-super (0.3.3-7) ...
 configure
 /var/lib/dpkg/info/pts-tetex-cm-super.postinst: line 10: cd: 
 /usr/share/texmf/fonts/type1/public/cm-super: No such file or directory
 dpkg: error processing pts-tetex-cm-super (--configure):
  subprocess post-installation script returned error exit status 1
 ==



Did you upgrade from previous version 0.3.3-6?

As explains in README.Debian, there was a mistake in the postinst script
of previous version. It should be corrected it in the new one, but as
postinst old  is called during upgrade, the bug remains.

You should remove manually version 0.3.3-6 and then install new version.

If the bug occurs in another cirumpstance, please tell me.

Thanks

Mike


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#321461: vlc is uninstallable

2005-08-05 Thread Mickael Profeta
Package: vlc
Version: 0.8.2-1
Severity: grave
Justification: renders package unusable

Hi,

The package depend on libmodplug0 which is uninstallable on sid (renamed
to libmodplug0c2) 
It also depend on aalib-dev which change name (FTBFS), and I stop there the
investigation.

Mike


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (900, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12.3
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]